Skip to content

Commit

Permalink
Merge pull request #195 from EvanNotFound/dev
Browse files Browse the repository at this point in the history
v2.3.0
  • Loading branch information
EvanNotFound authored Jul 31, 2023
2 parents 6de18fa + 96d8b1a commit 8c23d94
Show file tree
Hide file tree
Showing 56 changed files with 620 additions and 518 deletions.
44 changes: 27 additions & 17 deletions DONATION.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,43 @@
# 赞助
# 赞助 / Sponsorship

**非常感谢各位对本项目的支持!!**
**非常感谢各位对本项目的支持!!**
**Thank you very much for your support to this project!**

## 引言
## 引言 / Introduction

刚开始这个主题其实是自用的,后来有网友看见我的博客,就问我是怎么改的。
刚开始这个主题其实是自用的,后来有网友看见我的博客,就问我是怎么改的。
Initially, this theme was created for my personal use, but later, some readers came across my blog and asked me how I customized it.

想了一下,就开了个项目。一路走来,跌跌撞撞也写了几个版本,也收到了不少网友的反馈,而且第一次拿到这么多 Star,在这里非常感谢各位的支持。
想了一下,就开了个项目。一路走来,跌跌撞撞也写了几个版本,也收到了不少网友的反馈,而且第一次拿到这么多 Star,在这里非常感谢各位的支持。
After giving it some thought, I decided to start a project. Along the way, I encountered some challenges and went through several versions. I also received valuable feedback from many users. Moreover, it's the first time I've received such a high number of stars. I want to express my sincere appreciation for all your support.

本来没想着要求打赏,但是目前阿里云国内下行流量平均一个月消耗 100GB,本人每月流量费用大概在 20 元左右,想着换 unpkg/jsdelivr 做 cdn,但是那个速度真的感人。
本来没想着要求打赏,但是目前阿里云国内下行流量平均一个月消耗 100GB,本人每月流量费用大概在 20 元左右,想着换 unpkg/jsdelivr 做 cdn,但是那个速度真的感人。
Originally, I hadn't planned on requesting any contributions. However, currently, the average monthly consumption of downstream traffic on Aliyun in China is around 100GB, and my monthly traffic cost is approximately 20 yuan. I considered switching to unpkg/jsdelivr as a CDN, but the speed there is truly disappointing.

如果各位能支持一下,**一块两块都已足够**,就能维持阿里云cdn的流量费用,本人实在是感激不尽。
如果各位能支持一下,**一块两块都已足够**,就能维持阿里云 CDN 的流量费用,本人实在是感激不尽。
If any of you could provide some support, even a small amount such as one or two yuan, it would be sufficient to cover the CDN traffic cost on Aliyun. I would be immensely grateful for your assistance.

感谢所有赞助本项目的朋友,你们的支持是我继续更新的动力!
感谢所有赞助本项目的朋友,你们的支持是我继续更新的动力!
Thank you to all the friends who have sponsored this project. Your support is what motivates me to keep updating and improving it!

## 赞助方法
## 赞助方法 / Sponsorship Methods

微信 | 支付宝| Paypal
微信 / WeChat | 支付宝 / Alipay | Paypal
:-------------------------:|:-------------------------:|:-------------------------:
![IMG_0382](https://user-images.githubusercontent.com/68590232/223455834-d2e5ab6e-9d75-4bbf-adfb-2c519d6b4582.JPG) | ![IMG_9570](https://user-images.githubusercontent.com/68590232/223463950-f7276ef8-0198-4070-8541-697ec25e5b9a.png) | ![IMG_0385](https://user-images.githubusercontent.com/68590232/223459896-593e105e-89f3-4631-8cab-cb7798a53bf1.jpg)

赞助完以后,请各位加我微信 `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`.

感谢!
Thank you!

赞助完以后,请各位加我微信 `do-not-go-plzzz` 联系我添加 Github账号 和 网站链接!
## 赞助名单 / Sponsorship List

感谢!
按时间先后排序 / Sorted by chronological order

## 赞助名单

按时间先后排序

| 赞助时间 | 赞助人 | 赞助金额 | 赞助方式 | 网站 |
| 赞助时间 / Date | 赞助人 / Sponsor | 赞助金额 / Amount | 赞助方式 / Method | 网站 / Website |
| :----------: | :--------------------------------------------------------: | :------: | :--------: | :---------------: |
| Mar 4 | [@username0occupied](https://github.com/username0occupied) | ¥6.66 | 微信红包 | / |
| Mar 4 | [@jkoor](https://github.com/jkoor) | ¥15.00 | 微信红包 | https://jkor.site |
Expand All @@ -50,4 +57,7 @@
| Jun 12 | Anonymous | ¥0.99 | 微信赞赏码 | / |
| Jun 22 | [@JuTemp](https://github.com/JuTemp) | ¥15.00 | 支付宝 | https://jtp0415.top |
| Jul 13 | [@825i](https://github.com/825i) | $20.00 | Paypal | https://blog.xtu.icu/ |

| Jul 14 | 点点 | ¥8.88 | 微信赞赏码 | / |



2 changes: 1 addition & 1 deletion README_zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div align="right">
<img src="https://img.shields.io/badge/-%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87-A31F34?style=for-the-badge" alt="简体中文">
<a title="en" href="README.md"><img src="https://img.shields.io/badge/-English-545759?style=for-the-badge" alt="english"></a>
<img src="https://img.shields.io/badge/-%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87-A31F34?style=for-the-badge" alt="简体中文">
<a title="zh-TW" href="README_zh-TW.md"><img src="https://img.shields.io/badge/-%E7%B9%81%E4%BD%93%E4%B8%AD%E6%96%87-545759?style=for-the-badge" alt="繁体中文"></a>
</div>

Expand Down
2 changes: 1 addition & 1 deletion README_zh-TW.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div align="right">
<img src="https://img.shields.io/badge/-%E7%B9%81%E9%AB%94%E4%B8%AD%E6%96%87-A31F34?style=for-the-badge" alt="language">
<a title="en" href="README.md"><img src="https://img.shields.io/badge/-English-545759?style=for-the-badge" alt="english"></a>
<a title="zh-CN" href="README_zh-CN.md"> <img src="https://img.shields.io/badge/-%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87-545759?style=for-the-badge" alt="简体中文"></a>
<img src="https://img.shields.io/badge/-%E7%B9%81%E9%AB%94%E4%B8%AD%E6%96%87-A31F34?style=for-the-badge" alt="language">
</div>

<a href="https://redefine.ohevan.com"><img align="center" src="https://user-images.githubusercontent.com/68590232/226141917-68124e8f-fde0-4edd-b86d-c62932ec369a.png" alt="Redefine"></a>
Expand Down
13 changes: 9 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,15 @@ global:
scroll_progress:
bar: false # progress bar
percentage: true # percentage
# Website counter (powered by https://busuanzi.ibruce.info/)
busuanzi_counter:
# Website counter
website_counter:
url: https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js # counter API URL (no need to change)
enable: true # enable website counter or not
site_pv: true # site page view
site_uv: true # site unique visitor
post_pv: true # post page view
# Whether to enable PJAX
pjax: true
# Whether to enable single page experience (using swup). See https://swup.js.org/. similar to pjax
single_page: true
# Whether to enable open graph
open_graph: true
# Google Analytics
Expand Down Expand Up @@ -150,6 +151,10 @@ home_banner:
twitter: # your twitter URL
email: # your email
# ...... # you can add more
# Social links with QRcode drawers
qrs:
weixin: # your Wechat QRcode image URL
# ...... # you can add more
# HOME BANNER <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< end


Expand Down
2 changes: 1 addition & 1 deletion layout/_meta/article-info.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<i class="fa-regular fa-clock"></i>&nbsp;<span><%= temp_min2read %> <%- __('min2read') %></span>
</span>
<% } %>
<% if (is_post() && theme.global.busuanzi_counter.enable && theme.global.busuanzi_counter.post_pv) { %>
<% if (is_post() && theme.global.website_counter.enable && theme.global.website_counter.post_pv) { %>
<span class="article-pv article-meta-item">
<i class="fa-regular fa-eye"></i>&nbsp;<span id="busuanzi_value_page_pv"></span>
</span>
Expand Down
2 changes: 1 addition & 1 deletion layout/_partials/comments/comment.ejs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div class="comments-container">
<div class="comments-container pjax">
<div id="comment-anchor"></div>
<div class="comment-area-title">
<i class="fa-solid fa-comments"></i>&nbsp;<%- __('comments') %>
Expand Down
4 changes: 2 additions & 2 deletions layout/_partials/comments/giscus.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
theme.comment.config.giscus.category_id
) { %>
<div id="giscus-container"></div>
<script <%= theme.global.pjax === true ? 'data-pjax' : '' %> defer>
<script <%= theme.global.single_page === true ? 'data-swup-reload-script' : '' %> defer>
async function loadGiscus() {
const giscusConfig = {
'src': 'https://giscus.app/client.js',
Expand All @@ -30,7 +30,7 @@
}
document.getElementById('giscus-container').appendChild(giscusScript);
}
if ('<%= theme.global.pjax %>') {
if ('<%= theme.global.single_page %>') {
let loadGiscusTimeout = setTimeout(() => {
loadGiscus();
clearTimeout(loadGiscusTimeout);
Expand Down
6 changes: 3 additions & 3 deletions layout/_partials/comments/gitalk.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
&& theme.comment.config.gitalk.repo
) { %>
<div id="gitalk-container"></div>
<script <%= theme.global.pjax === true ? 'data-pjax' : '' %>
<script <%= theme.global.single_page === true ? 'data-swup-reload-script' : '' %>
src="//cdn.jsdelivr.net/npm/gitalk/dist/gitalk.min.js"></script>
<script <%= theme.global.pjax === true ? 'data-pjax' : '' %>>
<script <%= theme.global.single_page === true ? 'data-swup-reload-script' : '' %>>
function loadGitalk() {
let __gitalk__pathname = decodeURI(location.pathname);
Expand All @@ -34,7 +34,7 @@
}
}
if ('<%= theme.global.pjax %>') {
if ('<%= theme.global.single_page %>') {
const loadGitalkTimeout = setTimeout(() => {
loadGitalk();
clearTimeout(loadGitalkTimeout);
Expand Down
12 changes: 6 additions & 6 deletions layout/_partials/comments/twikoo.ejs
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<% if(theme.comment.system === 'twikoo' && theme.comment.config.twikoo.server_url) { %>
<div class="twikoo-container">
<script <%= theme.global.pjax === true ? 'data-pjax' : '' %>
<script <%= theme.global.single_page === true ? 'data-swup-reload-script' : '' %>
src='https://cdn.staticfile.org/twikoo/<%- theme.comment.config.twikoo.version %>/twikoo.all.min.js'
></script>
<div id="twikoo-comment"></div>
<script <%= theme.global.pjax === true ? 'data-pjax' : '' %>>
<script <%= theme.global.single_page === true ? 'data-swup-reload-script' : '' %>>
function loadTwikoo() {
twikoo.init({
el: '#twikoo-comment',
envId: '<%= theme.comment.config.twikoo.server_url %>',
});
}
if ('<%= theme.global.pjax %>') {
if ('<%= theme.global.single_page %>') {
const loadTwikooTimeout = setTimeout(() => {
loadTwikoo();
clearTimeout(loadTwikooTimeout);
Expand All @@ -24,11 +24,11 @@
</div>
<% } else if (theme.comment.system === 'twikoo' && theme.comment.config.twikoo.server_url && theme.comment.config.twikoo.region) { %>
<div class="twikoo-container">
<script <%= theme.global.pjax === true ? 'data-pjax' : '' %>
<script <%= theme.global.single_page === true ? 'data-swup-reload-script' : '' %>
src='<%- theme.comment_version.twikoo %>'
></script>
<div id="twikoo-comment"></div>
<script <%= theme.global.pjax === true ? 'data-pjax' : '' %>>
<script <%= theme.global.single_page === true ? 'data-swup-reload-script' : '' %>>
function loadTwikoo() {
twikoo.init({
el: '#twikoo-comment',
Expand All @@ -37,7 +37,7 @@
});
}
if ('<%= theme.global.pjax %>') {
if ('<%= theme.global.single_page %>') {
const loadTwikooTimeout = setTimeout(() => {
loadTwikoo();
clearTimeout(loadTwikooTimeout);
Expand Down
4 changes: 2 additions & 2 deletions layout/_partials/comments/waline.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
) { %>
<div id="waline"></div>
<script type="module" <%= theme.global.pjax === true ? 'data-pjax' : '' %>>
<script type="module" <%= theme.global.single_page === true ? 'data-swup-reload-script' : '' %>>
import { init } from 'https://evan.beee.top/js/waline.mjs';
function loadWaline() {
Expand All @@ -18,7 +18,7 @@
});
}
if ('<%= theme.global.pjax %>') {
if ('<%= theme.global.single_page %>') {
const loadWalineTimeout = setTimeout(() => {
loadWaline();
clearTimeout(loadWalineTimeout);
Expand Down
23 changes: 9 additions & 14 deletions layout/_partials/footer.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@
<% } %>
<%= date(new Date(), 'YYYY') %>&nbsp;&nbsp;<%- theme.footer.icon || '<i class="fa-regular fa-computer-classic"></i>' %>&nbsp;&nbsp;<a href="/"><%= theme.info.author || config.author %></a>
</div>
<% if (theme.global.busuanzi_counter.enable === true) { %>
<script async <%= theme.global.pjax === true ? 'data-pjax' : '' %> src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<% if (theme.global.website_counter.enable === true) { %>
<script <%= theme.global.single_page === true ? 'data-swup-reload-script' : '' %> src="<%= theme.global.website_counter.url ? theme.global.website_counter.url : "//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js" %>"></script>
<div class="website-count info-item">
<% if (theme.global.busuanzi_counter.site_uv) { %>
<% if (theme.global.website_counter.site_uv) { %>
<span id="busuanzi_container_site_uv" class="busuanzi_container_site_uv">
<%- __('site_uv') %>&nbsp;<span id="busuanzi_value_site_uv" class="busuanzi_value_site_uv"></span>
</span>
<% } %>
<% if (theme.global.busuanzi_counter.site_pv) { %>
<% if (theme.global.website_counter.site_pv) { %>
<span id="busuanzi_container_site_pv" class="busuanzi_container_site_pv">
<%- __('site_pv') %>&nbsp;<span id="busuanzi_value_site_pv" class="busuanzi_value_site_pv"></span>
</span>
Expand All @@ -26,7 +26,7 @@
<div class="theme-info info-item">
<span class="powered-by-container"><%- __('powered_by', '<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg version="1.1" id="圖層_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="1rem" height="1rem" viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve"><path fill="#0E83CD" d="M256.4,25.8l-200,115.5L56,371.5l199.6,114.7l200-115.5l0.4-230.2L256.4,25.8z M349,354.6l-18.4,10.7l-18.6-11V275H200v79.6l-18.4,10.7l-18.6-11v-197l18.5-10.6l18.5,10.8V237h112v-79.6l18.5-10.6l18.5,10.8V354.6z"/></svg><a target="_blank" href="https://hexo.io">Hexo</a>') %></span>
<br>
<%# 保留主题信息是对作者的尊重,感谢! %><span class="theme-version-container"><%- __('theme') %>&nbsp;<a class="theme-version" target="_blank" href="https://github.com/EvanNotFound/hexo-theme-redefine">Redefine v<%- getThemeVersion() %></a><%# 保留主题信息是对作者的尊重,感谢! %>
<%# 保留主题信息是对作者的尊重,感谢! %><span class="theme-version-container"><%- __('theme') %>&nbsp;<a class="theme-version" target="_blank" href="https://github.com/EvanNotFound/hexo-theme-redefine">Redefine v<%- getThemeVersion() %></a></span><%# 保留主题信息是对作者的尊重,感谢! %>
</div>
<% if (theme.footer.icp.enable && theme.footer.icp.hasOwnProperty('number')) { %>
<div class="icp-info info-item"><a target="_blank" rel="nofollow" href="
Expand All @@ -37,11 +37,6 @@
<% } %>
"><%= theme.footer.icp.number %></a></div>
<% } %>
<% if (theme.footer.hasOwnProperty('upyun') && theme.footer.upyun) { %>
<div class="icp-info info-item"><a target="_blank" rel="nofollow" href="<%= theme.footer.upyun %>">本网站由
<img src="/images/upyun.png" alt="upyun" srcset="" height="24" style="position:relative; top:6px">
提供CDN加速/云存储服务</a></div>
<% } %>
<% if (theme.footer.runtime === true) {%>
<div>
<%= __('runtime') %> <span class="odometer" id="runtime_days" ></span> <%= __('days') %> <span class="odometer" id="runtime_hours"></span> <%= __('hours') %> <span class="odometer" id="runtime_minutes"></span> <%= __('minutes') %> <span class="odometer" id="runtime_seconds"></span> <%= __('seconds') %>
Expand All @@ -51,7 +46,7 @@
<div class="customize-info info-item"><%- theme.footer.customize %></div>
<% } %>
<% if (theme.footer.runtime === true) {%>
<script async <%= theme.global.pjax === true ? 'data-pjax' : '' %>>
<script <%= theme.global.single_page === true ? 'data-swup-reload-script' : '' %>>
try {
function odometer_init() {
const elements = document.querySelectorAll('.odometer');
Expand All @@ -67,12 +62,12 @@
} catch (error) {}
</script>
<% } %>
<% if (theme.inject.enable == true) { %>
<% if (theme.inject.enable === true) { %>
<% for (let i in theme.inject.footer) { %>
<% if (theme.inject.footer[i] !== null ){ %>
<% if (theme.global.pjax == true) { %>
<%- theme.inject.footer[i].replace("<script", "<script data-pjax") %>
<% if (theme.global.single_page === true) { %>
<%- theme.inject.footer[i].replace("<script", "<script data-swup-reload-script") %>
<% } else { %>
<%- theme.inject.footer[i] %>
<% } } %>
Expand Down
6 changes: 3 additions & 3 deletions layout/_partials/head.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
<% } %>
<% if (theme.global.google_analytics.enable) { %>
<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=<%= theme.global.google_analytics.id %>"></script>
<script src="https://www.googletagmanager.com/gtag/js?id=<%= theme.global.google_analytics.id %>"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
Expand Down Expand Up @@ -92,8 +92,8 @@
<% if (theme.inject.enable == true) { %>
<% for (let i in theme.inject.head) { %>
<% if (theme.inject.head[i] !== null){ %>
<% if (theme.global.pjax == true) { %>
<%- theme.inject.head[i].replace("<script", "<script data-pjax") %>
<% if (theme.global.single_page == true) { %>
<%- theme.inject.head[i].replace("<script", "<script data-swup-reload-script") %>
<% } else { %>
<%- theme.inject.head[i] %>
<% } }%>
Expand Down
Loading

0 comments on commit 8c23d94

Please sign in to comment.