From 38b97475b0bff295debc2c40bddeeb77119fcf8e Mon Sep 17 00:00:00 2001
From: "1152958806@qq.com" <1152958806@qq.com>
Date: Sat, 1 Jul 2023 13:50:58 +0800
Subject: [PATCH 1/3] =?UTF-8?q?=E6=96=87=E7=AB=A0ai=E6=91=98=E8=A6=81?=
=?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=8C=E9=94=99=E8=AF=AF=E6=8F=90=E7=A4=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
templates/modules/postHeadAiDescription.html | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/templates/modules/postHeadAiDescription.html b/templates/modules/postHeadAiDescription.html
index fc8baea6..683b031f 100644
--- a/templates/modules/postHeadAiDescription.html
+++ b/templates/modules/postHeadAiDescription.html
@@ -145,7 +145,18 @@
j = (j % 3) + 1; // 在 1、2、3 之间循环
}, 500);
const response = await fetch(`https://summary.tianli0.top/?${queryParams}`, requestOptions);
- const result = await response.json();
+ let result;
+ if (response.status === 403) {
+ result = {
+ summary: "403 refer与key不匹配,本地无法显示。"
+ }
+ } else if (response.status === 500) {
+ result = {
+ summary: "500 系统内部错误"
+ }
+ } else {
+ result = await response.json();
+ }
const summary = result.summary.trim();
setTimeout(() => {
aiTitleRefreshIcon.style.opacity = "1";
From 9750770844f95361f731ea8775979845cafbc899 Mon Sep 17 00:00:00 2001
From: "1152958806@qq.com" <1152958806@qq.com>
Date: Sun, 2 Jul 2023 20:28:57 +0800
Subject: [PATCH 2/3] =?UTF-8?q?=E4=BE=A7=E8=BE=B9=E6=A0=8F=E4=BD=8D?=
=?UTF-8?q?=E7=BD=AE=20=E6=A0=87=E7=AD=BE&=E7=BB=9F=E8=AE=A1=E6=94=B9?=
=?UTF-8?q?=E4=B8=BA=20=E6=A0=87=E7=AD=BE&=E5=BD=92=E6=A1=A3&=E7=BB=9F?=
=?UTF-8?q?=E8=AE=A1=EF=BC=8C=20=E8=B5=9E=E8=B5=8F=E5=90=8D=E5=8D=95?=
=?UTF-8?q?=E6=96=B0=E5=A2=9E=E4=BA=BA=E6=95=B0=E6=98=BE=E7=A4=BA=EF=BC=8C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
settings.yaml | 27 +++++++++++-
templates/about.html | 2 +-
.../aside/contain/archive-contain.html | 41 +++++++++++++++++++
.../widgets/aside/contain/stat-contain.html | 8 ++--
.../modules/widgets/aside/tags-stat.html | 16 ++++++--
templates/modules/widgets/console.html | 19 +++++++--
6 files changed, 100 insertions(+), 13 deletions(-)
create mode 100644 templates/modules/widgets/aside/contain/archive-contain.html
diff --git a/settings.yaml b/settings.yaml
index bd37507c..85e7379d 100644
--- a/settings.yaml
+++ b/settings.yaml
@@ -317,7 +317,7 @@ spec:
name: widgets
label: 小部件
value: "profile,wechat,comments,recent-posts,categories,tags-stat"
- help: "目前提供的小部件有:profile(站点资料), wechat(微信), recent-posts(近期文章), comments(最新评论), categories(文章分类), tags(文章标签), stat(统计), tags-stat(标签&统计)。你可以随意组合或排序,以逗号隔开。"
+ help: "目前提供的小部件有:profile(站点资料), wechat(微信), recent-posts(近期文章), comments(最新评论), categories(文章分类), tags(文章标签), stat(统计), tags-stat(标签&归档&统计)。你可以随意组合或排序,以逗号隔开。"
- $formkit: textarea
name: postWidgets
label: 文章页面小部件
@@ -458,6 +458,29 @@ spec:
label: 分类数量
value: -1
help: "小于 0 则展示全部分类"
+ - $formkit: radio
+ name: tags_switch
+ label: 标签&归档&统计 (标签按钮开关)
+ value: true
+ options:
+ - label: 显示
+ value: true
+ - label: 隐藏
+ value: false
+ - $formkit: radio
+ name: archive_switch
+ label: 标签&归档&统计 (归档按钮开关)
+ value: true
+ options:
+ - label: 显示
+ value: true
+ - label: 隐藏
+ value: false
+ - $formkit: number
+ name: archivesQuantity
+ label: 归档数量
+ value: -1
+ help: "小于 0 则展示全部归档(目前没用等适配)"
- $formkit: number
name: newcommentnumber
label: 评论数量
@@ -1112,7 +1135,7 @@ spec:
wxPay:
alipay:
enable_reward_wz:
- reward_md_url:
+ reward_md_url:
children:
- $formkit: radio
name: enable_reward_wz
diff --git a/templates/about.html b/templates/about.html
index 3147c83a..ed52464a 100644
--- a/templates/about.html
+++ b/templates/about.html
@@ -811,7 +811,7 @@
-
+
共[[${theme.config.aboutReward.reward_list.size()}]]人
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/templates/modules/widgets/aside/contain/stat-contain.html b/templates/modules/widgets/aside/contain/stat-contain.html
index ce2bfe87..213f7012 100644
--- a/templates/modules/widgets/aside/contain/stat-contain.html
+++ b/templates/modules/widgets/aside/contain/stat-contain.html
@@ -12,18 +12,18 @@
-
+
+
访问量 :
diff --git a/templates/modules/widgets/aside/tags-stat.html b/templates/modules/widgets/aside/tags-stat.html
index 36a9e75a..f68517c6 100644
--- a/templates/modules/widgets/aside/tags-stat.html
+++ b/templates/modules/widgets/aside/tags-stat.html
@@ -6,11 +6,21 @@
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/templates/modules/widgets/console.html b/templates/modules/widgets/console.html
index 070dc896..9d2bcd64 100644
--- a/templates/modules/widgets/console.html
+++ b/templates/modules/widgets/console.html
@@ -37,10 +37,23 @@
[[${archive.year}]]-[[${month.month}]]
+ data-pjax-state="load">
+ [[${(month.month=='01') ? '一月' :
+ (month.month == '02') ? "二月" :
+ (month.month == '03') ? "三月" :
+ (month.month == '04') ? "四月" :
+ (month.month == '05') ? "五月" :
+ (month.month == '06') ? "六月" :
+ (month.month == '07') ? "七月" :
+ (month.month == '08') ? "八月" :
+ (month.month == '09') ? "九月" :
+ (month.month == '10') ? "十月" :
+ (month.month == '11') ? "十一月" :
+ "十二月"}]] [[${archive.year}]]
+
[[${month.posts.size()}]]
+ class="card-archive-list-count">[[${month.posts.size()}]]
篇
From 9d6ecef9d2bb6ab501c5e650e34cdfb00d199b4f Mon Sep 17 00:00:00 2001
From: "1152958806@qq.com" <1152958806@qq.com>
Date: Sun, 2 Jul 2023 21:22:00 +0800
Subject: [PATCH 3/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B7=B1=E8=89=B2?=
=?UTF-8?q?=E6=A8=A1=E5=BC=8F=E7=B2=92=E5=AD=90=E6=95=88=E6=9E=9C?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
settings.yaml | 10 ++++++
templates/assets/libs/canvas/dark.js | 50 +++++++++++++++++++++++++++
templates/assets/zhheo/zhheoblog.css | 29 +++++++++++++---
templates/modules/layouts/layout.html | 4 +++
4 files changed, 89 insertions(+), 4 deletions(-)
create mode 100644 templates/assets/libs/canvas/dark.js
diff --git a/settings.yaml b/settings.yaml
index 85e7379d..aeac35cf 100644
--- a/settings.yaml
+++ b/settings.yaml
@@ -1220,6 +1220,15 @@ spec:
name: enableChangeColorScheme
label: 允许访客切换配色
value: true
+ - $formkit: radio
+ name: universe
+ label: 深色模式粒子效果
+ value: true
+ options:
+ - label: 打开
+ value: true
+ - label: 关闭
+ value: false
- $formkit: textarea
name: fontFamily
label: 全局字体
@@ -1229,6 +1238,7 @@ spec:
label: 全局背景图
placeholder: "请输入图片地址"
+
- group: snackbar
label: 弹窗
help: 右下角 snackbar 弹窗
diff --git a/templates/assets/libs/canvas/dark.js b/templates/assets/libs/canvas/dark.js
new file mode 100644
index 00000000..687b2f5d
--- /dev/null
+++ b/templates/assets/libs/canvas/dark.js
@@ -0,0 +1,50 @@
+function dark() {
+ window.requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || window.msRequestAnimationFrame;
+ var n, e, i, h, t = .05,
+ s = document.getElementById("universe"),
+ o = !0,
+ a = "180,184,240",
+ r = "226,225,142",
+ d = "226,225,224",
+ c = [];
+
+ function f() {
+ n = window.innerWidth, e = window.innerHeight, i = .216 * n, s.setAttribute("width", n), s.setAttribute("height", e)
+ }
+ function u() {
+ h.clearRect(0, 0, n, e);
+ for (var t = c.length, i = 0; i < t; i++) {
+ var s = c[i];
+ s.move(), s.fadeIn(), s.fadeOut(), s.draw()
+ }
+ }
+ function y() {
+ this.reset = function() {
+ this.giant = m(3), this.comet = !this.giant && !o && m(10), this.x = l(0, n - 10), this.y = l(0, e), this.r = l(1.1, 2.6), this.dx = l(t, 6 * t) + (this.comet + 1 - 1) * t * l(50, 120) + 2 * t, this.dy = -l(t, 6 * t) - (this.comet + 1 - 1) * t * l(50, 120), this.fadingOut = null, this.fadingIn = !0, this.opacity = 0, this.opacityTresh = l(.2, 1 - .4 * (this.comet + 1 - 1)), this.do = l(5e-4, .002) + .001 * (this.comet + 1 - 1)
+ }, this.fadeIn = function() {
+ this.fadingIn && (this.fadingIn = !(this.opacity > this.opacityTresh), this.opacity += this.do)
+ }, this.fadeOut = function() {
+ this.fadingOut && (this.fadingOut = !(this.opacity < 0), this.opacity -= this.do /2,(this.x>n||this.y<0)&&(this.fadingOut=!1,this.reset()))},this.draw=function(){if(h.beginPath(),this.giant)h.fillStyle="rgba("+a+","+this.opacity+")",h.arc(this.x,this.y,2,0,2*Math.PI,!1);else if(this.comet){h.fillStyle="rgba("+d+","+this.opacity+")",h.arc(this.x,this.y,1.5,0,2*Math.PI,!1);for(var t=0;t<30;t++)h.fillStyle="rgba("+d+","+(this.opacity-this.opacity/20 * t) + ")", h.rect(this.x - this.dx / 4 * t, this.y - this.dy / 4 * t - 2, 2, 2), h.fill()
+ } else h.fillStyle = "rgba(" + r + "," + this.opacity + ")", h.rect(this.x, this.y, this.r, this.r);
+ h.closePath(), h.fill()
+ }, this.move = function() {
+ this.x += this.dx, this.y += this.dy, !1 === this.fadingOut && this.reset(), (this.x > n - n / 4 || this.y < 0) && (this.fadingOut = !0)
+ }, setTimeout(function() {
+ o = !1
+ }, 50)
+ }
+ function m(t) {
+ return Math.floor(1e3 * Math.random()) + 1 < 10 * t
+ }
+ function l(t, i) {
+ return Math.random() * (i - t) + t
+ }
+ f(), window.addEventListener("resize", f, !1), function() {
+ h = s.getContext("2d");
+ for (var t = 0; t < i; t++) c[t] = new y, c[t].reset();
+ u()
+ }(), function t() {
+ document.getElementsByTagName('html')[0].getAttribute('data-theme') == 'dark' && u(), window.requestAnimationFrame(t)
+ }()
+};
+dark()
\ No newline at end of file
diff --git a/templates/assets/zhheo/zhheoblog.css b/templates/assets/zhheo/zhheoblog.css
index 6798bf9e..68b574e3 100644
--- a/templates/assets/zhheo/zhheoblog.css
+++ b/templates/assets/zhheo/zhheoblog.css
@@ -100,7 +100,7 @@
--heo-post-tabs-bg: #121212;
--heo-secondbg: #30343f;
--heo-shadow-nav: 0 5px 20px 0px rgba(28, 28, 28, 0.4);
- --heo-card-bg: #1e1e1e;
+ --heo-card-bg: #1d1e22;
--heo-card-bg-op: var(--heo-white-op);
--heo-card-bg-none: #1d1b2600;
--heo-shadow-lightblack: 0 5px 12px -5px rgba(102, 68, 68, 0);
@@ -9193,6 +9193,27 @@ li {
margin-left: 4px;
cursor: pointer;
}
+
+/* 添加粒子效果 */
+[data-theme="dark"] #universe {
+ display: block;
+ position: fixed;
+ margin: 0;
+ padding: 0;
+ border: 0;
+ outline: 0;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ pointer-events: none;
+ z-index: 1;
+}
+
+canvas#universe {
+ display: none;
+}
+
.post-ai {
background: var(--heo-secondbg);
border-radius: 12px;
@@ -13998,7 +14019,7 @@ button.el-button.tk-cancel.el-button--default.el-button--small {
color: var(--heo-fontcolor) !important;
font-size: 1.4em !important;
padding: 0.2em .5em;
- background: var(--heo-secondbg);
+ background: var(--heo-card-bg);
margin: .5em .5em;
border-radius: 12px;
-webkit-backface-visibility: hidden;
@@ -14008,7 +14029,7 @@ button.el-button.tk-cancel.el-button--default.el-button--small {
}
#page .tag-cloud-list a:hover {
- background: var(--heo-blue) !important;
+ background: var(--heo-theme) !important;
box-shadow: var(--heo-shadow-blue);
color: var(--heo-white) !important;
border: var(--style-border-hover);
@@ -14259,7 +14280,7 @@ figure.gallery-group:hover .gallery-group-name::after {
/* 随机文章 */
#random-post {
min-height: 32px;
- background: var(--card-bg);
+ background: var(--heo-card-bg);
border: var(--style-border-always);
box-shadow: var(--heo-shadow-border);
padding: 20px 30px;
diff --git a/templates/modules/layouts/layout.html b/templates/modules/layouts/layout.html
index 6a1e4559..0c17bbf0 100644
--- a/templates/modules/layouts/layout.html
+++ b/templates/modules/layouts/layout.html
@@ -53,6 +53,10 @@
+
+
+
+