Skip to content

Commit

Permalink
Merge pull request #297 from EvanNotFound/dev
Browse files Browse the repository at this point in the history
Bump version to v2.5.1
  • Loading branch information
EvanNotFound committed Nov 14, 2023
2 parents 312707e + a10e75a commit 3b41508
Show file tree
Hide file tree
Showing 32 changed files with 897 additions and 465 deletions.
13 changes: 0 additions & 13 deletions .editorconfig

This file was deleted.

3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ testem.log
Thumbs.db
.com.greenworldsoft.syncfolderspro
_DelSyncFiles/

.env
.env.local
17 changes: 10 additions & 7 deletions DONATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ A big thank you to all the friends who have sponsored this project. Your support


赞助完以后,请各位加我微信 `do-not-go-plzzz` 联系我添加 GitHub 账号和网站链接!
After making a donation, if you want to get in touch with me, please add me on Discord with my username `evan404`.
After making a donation, if you want to get in touch with me, please add me on Discord with my username `evannotfound`.

感谢!
Thank you!
Expand Down Expand Up @@ -67,9 +67,12 @@ Thank you!
| Jul 14 | 点点 | ¥8.88 | 微信赞赏码 | - |
| Aug 1 | 风宇 | ¥14.99 | 微信赞赏码 | [https://krazyu.com](https://krazyu.com) |
| Aug 27 | 匿名 | ¥88.00 | 微信赞赏码 | - |
| Sep 03 | Locam | ¥30.00 | 支付宝 | [https://locam-cyj.github.io](https://locam-cyj.github.io) |
| Sep 03 | 夜鹿 | ¥6.66 | 微信赞赏码 | - |
| Sep 03 | **| ¥6.66 | 支付宝 | - |
| Sep 04 | 匿名 | ¥10.00 | 微信赞赏码 | - |
| Sep 23 | 今日店休. | ¥6.66 | 微信赞赏码 | - |
| Sep 29 | Ficon | ¥6.00 | 微信 | - |
| Sep 03 | Locam | ¥30.00 | 支付宝 | [https://locam-cyj.github.io](https://locam-cyj.github.io) |
| Sep 03 | 夜鹿 | ¥6.66 | 微信赞赏码 | - |
| Sep 03 | **| ¥6.66 | 支付宝 | - |
| Sep 04 | 匿名 | ¥10.00 | 微信赞赏码 | - |
| Sep 23 | 今日店休. | ¥6.66 | 微信赞赏码 | - |
| Sep 29 | Ficon | ¥6.00 | 微信 | - |
| Oct 05 | Ryou | ¥14.99 | 微信赞赏码 | - |
| Oct 16 |*| ¥20.00 | 微信赞赏码 | - |
| Oct 24 | Neptune. | ¥14.99 | 微信赞赏码 | - |
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,19 @@ Drawing its core from [hexo-theme-keep](https://github.com/XPoet/hexo-theme-keep
<img src="https://img.shields.io/badge/node-%3E=12.0-a6d189?style=for-the-badge&amp;logo=node.js&amp;logoColor=a6d189" referrerpolicy="no-referrer" alt="NodeJS Version" />
</p>


<p align="center">
<a href>

## 📷 Screenshots

![redefine-1-final](https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/1c4f802b-b949-4313-8935-6ea5178be9e3)

![redefine-2-final](https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/bf6529a6-bce9-4388-899c-1d96325c49d6)

![redefine-3-final](https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/33ee3d7c-189c-4b75-89c9-914b0cb63caf)
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/863f7dd7-2f59-4ef4-a876-5b0a707289b1" />
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/92427ac8-fbb8-4ce9-9807-5d0ed98484ac" />
<img alt="Cover Image" src="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/863f7dd7-2f59-4ef4-a876-5b0a707289b1" />
</picture>

<picture>
<source media="(prefers-color-scheme: light)" srcset="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/5c1f93ec-ff0d-4459-83c1-894b7538f713" />
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/ee04971c-a199-448b-a91c-6f4bbe17d105" />
<img alt="Pages Image" src="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/5c1f93ec-ff0d-4459-83c1-894b7538f713" />
</picture>
</p>

## 🌐 Demo

Expand Down Expand Up @@ -148,4 +150,4 @@ Thanks to all of you!

## 💻 Development

If you want to contribute to this project, you can clone the `dev` branch and check out the [Development Docs](https://redefine-docs.ohevan.com/developer) to get started.
If you want to contribute to this project, you can clone the `dev` branch and check out the [Development Docs](https://redefine-docs.ohevan.com/developer) to get started.
20 changes: 13 additions & 7 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,19 @@
</p>


## 📷 屏幕截图

![redefine-1-final](https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/1c4f802b-b949-4313-8935-6ea5178be9e3)

![redefine-2-final](https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/bf6529a6-bce9-4388-899c-1d96325c49d6)

![redefine-3-final](https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/33ee3d7c-189c-4b75-89c9-914b0cb63caf)
<p align="center">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/863f7dd7-2f59-4ef4-a876-5b0a707289b1" />
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/92427ac8-fbb8-4ce9-9807-5d0ed98484ac" />
<img alt="Cover Image" src="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/863f7dd7-2f59-4ef4-a876-5b0a707289b1" />
</picture>

<picture>
<source media="(prefers-color-scheme: light)" srcset="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/5c1f93ec-ff0d-4459-83c1-894b7538f713" />
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/ee04971c-a199-448b-a91c-6f4bbe17d105" />
<img alt="Pages Image" src="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/5c1f93ec-ff0d-4459-83c1-894b7538f713" />
</picture>
</p>

## 🌐 官方演示站

Expand Down
22 changes: 14 additions & 8 deletions README_zh-TW.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,19 @@



## 📷 屏幕截圖

![redefine-1-final](https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/1c4f802b-b949-4313-8935-6ea5178be9e3)

![redefine-2-final](https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/bf6529a6-bce9-4388-899c-1d96325c49d6)

![redefine-3-final](https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/33ee3d7c-189c-4b75-89c9-914b0cb63caf)
<p align="center">
<picture>
<source media="(prefers-color-scheme: light)" srcset="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/863f7dd7-2f59-4ef4-a876-5b0a707289b1" />
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/92427ac8-fbb8-4ce9-9807-5d0ed98484ac" />
<img alt="Cover Image" src="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/863f7dd7-2f59-4ef4-a876-5b0a707289b1" />
</picture>

<picture>
<source media="(prefers-color-scheme: light)" srcset="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/5c1f93ec-ff0d-4459-83c1-894b7538f713" />
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/ee04971c-a199-448b-a91c-6f4bbe17d105" />
<img alt="Pages Image" src="https://github.com/EvanNotFound/hexo-theme-redefine/assets/68590232/5c1f93ec-ff0d-4459-83c1-894b7538f713" />
</picture>
</p>


## 🌐 在線演示站
Expand Down Expand Up @@ -145,4 +151,4 @@ $ git clone https://github.com/EvanNotFound/hexo-theme-redefine.git themes/redef

如果你想參與主題開發,請 `clone` 本專案的 `dev` 分支,然後在 `dev` 分支上進行開發。

同時,請查看 [Redefine 主題開發文件](https://redefine-docs.ohevan.com/developer)
同時,請查看 [Redefine 主題開發文件](https://redefine-docs.ohevan.com/developer)
9 changes: 6 additions & 3 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,12 @@ global:
fonts:
# Chinese fonts
chinese:
enable: false # Whether to enable custom chinese font
enable: false # Whether to enable custom chinese fonts
family: # Font family
url: # Font URL to CSS file
# English fonts
english:
enable: false # Whether to enable custom chinese font
enable: false # Whether to enable custom english fonts
family: # Font family
url: # Font URL to CSS file
# Content max width
Expand Down Expand Up @@ -243,6 +243,7 @@ articles:
image_alignment: center # image alignment. left, center
image_caption: false # Whether to display image caption
link_icon: true # Whether to display link icon
title_alignment: left # Title alignment. left, center
# Word count. Requires hexo-wordcount (npm install hexo-wordcount). See https://github.com/willin/hexo-wordcount
word_count:
enable: true # Whether to enable
Expand All @@ -269,7 +270,9 @@ articles:
expand: true # Whether to expand TOC
init_open: true # Open toc by default
# Whether to enable copyright notice
copyright: true
copyright:
enable: true # Whether to enable
default: cc_by_nc_sa # Default license, can be cc_by_nc_sa, cc_by_nd, cc_by_nc, cc_by_sa, cc_by, all_rights_reserved, public_domain
# Whether to enable lazyload for images
lazyload: true
# Article recommendation. Requires nodejieba (npm install nodejieba). Transplanted from hexo-theme-volantis.
Expand Down
76 changes: 55 additions & 21 deletions layout/_meta/article-copyright.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,64 @@
<strong>
<%- __('copyright.license_title') %>:
</strong>
<% if (page.copyright && page.copyright !== "") { %>
<%= page.copyright %>
<% } else if (page.license) { %>
<% if (page.license === 'all_rights_reserved') { %>
<%- __('copyright.all_rights_reserved', theme.info.author) %>
<% } else if (page.license === 'cc_by') { %>
<%- __('copyright.license_content', '<a class="license" href="https://creativecommons.org/licenses/by/4.0/deed.zh">CC BY 4.0</a>') %>
<% } else if (page.license === 'cc_by_sa') { %>
<%- __('copyright.license_content', '<a class="license" href="https://creativecommons.org/licenses/by-sa/4.0/deed.zh">CC BY-SA 4.0</a>') %>
<% } else if (page.license === 'cc_by_nc') { %>
<%- __('copyright.license_content', '<a class="license" href="https://creativecommons.org/licenses/by-nc/4.0/deed.zh">CC BY-NC 4.0</a>') %>
<% } else if (page.license === 'cc_by_nd') { %>
<%- __('copyright.license_content', '<a class="license" href="https://creativecommons.org/licenses/by-nd/4.0/deed.zh">CC BY-ND 4.0</a>') %>
<% } else if (page.license === 'cc_by_nc_sa') { %>
<%- __('license_content', '<a class="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">CC BY-NC-SA 4.0</a>') %>
<% } else if (page.license === 'public_domain') { %>
<%- __('copyright.public_domain') %>
<% } else { %>
<%- __('copyright.license_content', '<a class="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">CC BY-NC-SA 4.0</a>') %>
<% } %>
<%
const licenseMap = {
'all_rights_reserved': {
label: __('copyright.all_rights_reserved', theme.info.author),
url: null
},
'cc_by': {
label: __('copyright.license_content', '<a class="license" href="https://creativecommons.org/licenses/by/4.0">CC BY 4.0</a>'),
url: 'https://creativecommons.org/licenses/by/4.0'
},
'cc_by_sa': {
label: __('copyright.license_content', '<a class="license" href="https://creativecommons.org/licenses/by-sa/4.0">CC BY-SA 4.0</a>'),
url: 'https://creativecommons.org/licenses/by-sa/4.0'
},
'cc_by_nc': {
label: __('copyright.license_content', '<a class="license" href="https://creativecommons.org/licenses/by-nc/4.0">CC BY-NC 4.0</a>'),
url: 'https://creativecommons.org/licenses/by-nc/4.0'
},
'cc_by_nd': {
label: __('copyright.license_content', '<a class="license" href="https://creativecommons.org/licenses/by-nd/4.0">CC BY-ND 4.0</a>'),
url: 'https://creativecommons.org/licenses/by-nd/4.0'
},
'cc_by_nc_sa': {
label: __('license_content', '<a class="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0">CC BY-NC-SA 4.0</a>'),
url: 'https://creativecommons.org/licenses/by-nc-sa/4.0'
},
'public_domain': {
label: __('copyright.public_domain'),
url: null
}
};
const isValidLicense = (licenseKey) => {
return licenseMap.hasOwnProperty(licenseKey);
};
const getLicenseType = () => {
if (page.copyright && page.copyright !== "") {
return 'custom';
} else if (page.license && isValidLicense(page.license)) {
return page.license;
} else if (theme.articles.copyright.default && isValidLicense(theme.articles.copyright.default)) {
return theme.articles.copyright.default;
} else {
return 'cc_by_nc_sa';
}
};
const licenseType = getLicenseType();
%>

<% if (licenseType === 'custom') { %>
<%- page.copyright %>
<% } else { %>
<%- __('copyright.license_content', '<a class="license" href="https://creativecommons.org/licenses/by-nc-sa/4.0/deed.zh">CC BY-NC-SA 4.0</a>') %>
<%- licenseMap[licenseType].label %>
<% } %>


</li>
</ul>
</div>
2 changes: 1 addition & 1 deletion layout/_partials/comments/gitalk.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
) { %>
<div id="gitalk-container"></div>
<script <%= theme.global.single_page === true ? 'data-swup-reload-script' : '' %>
src="//cdn.jsdelivr.net/npm/gitalk/dist/gitalk.min.js"></script>
src="//cdn.staticfile.org/gitalk/1.8.0/gitalk.min.js"></script>
<script <%= theme.global.single_page === true ? 'data-swup-reload-script' : '' %>>
function loadGitalk() {
Expand Down
46 changes: 18 additions & 28 deletions layout/_partials/comments/waline.ejs
Original file line number Diff line number Diff line change
@@ -1,32 +1,22 @@
<% if(
theme.comment.system === 'waline'
&& theme.comment.config.waline.serverUrl
&& theme.comment.config.waline.lang
) { %>
<% if(theme.comment.system === 'waline' && theme.comment.config.waline.serverUrl && theme.comment.config.waline.lang) { %>
<div id="waline"></div>
<script type="module" <%= theme.global.single_page === true ? 'data-swup-reload-script' : '' %>>
import { init } from '<%= renderJSPath('js/libs/waline.mjs') %>';
<script type="module" data-swup-reload-script>
import { init } from '<%= url_for('js/libs/waline.mjs') %>';
function loadWaline() {
init({
el: '#waline',
serverURL: '<%= theme.comment.config.waline.serverUrl %>',
lang: '<%= theme.comment.config.waline.lang %>',
dark: 'body[class~="dark-mode"]',
requiredMeta: ['nick','mail'], // cannot customize by theme config, change it yourself
});
}
function loadWaline() {
init({
el: '#waline',
serverURL: '<%= theme.comment.config.waline.serverUrl %>',
lang: '<%= theme.comment.config.waline.lang %>',
dark: 'body[class~="dark-mode"]',
requiredMeta: ['nick', 'mail']
});
}
if ('<%= theme.global.single_page %>') {
const loadWalineTimeout = setTimeout(() => {
loadWaline();
clearTimeout(loadWalineTimeout);
}, 1000);
} else {
window.addEventListener('DOMContentLoaded', loadWaline);
}
if (typeof swup !== 'undefined') {
loadWaline();
} else {
window.addEventListener('DOMContentLoaded', loadWaline);
}
</script>
<% } %>
<% } %>
Loading

0 comments on commit 3b41508

Please sign in to comment.