From 0553b07ac72e2a2b12d354c32443b70e40135248 Mon Sep 17 00:00:00 2001 From: "1152958806@qq.com" <17683872107czx> Date: Fri, 14 Jul 2023 13:52:50 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E5=8F=8B=E6=83=85=E9=93=BE=E6=8E=A5?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=A8=A1=E7=89=88=EF=BC=8C=E6=94=AF=E6=8C=81?= =?UTF-8?q?=E5=8F=AF=E9=A2=84=E8=AE=BE=E6=96=87=E6=9C=AC=EF=BC=8C=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E8=AF=84=E8=AE=BA=E4=B8=8D=E4=BC=9A=E5=87=BA=E7=8E=B0?= =?UTF-8?q?=E6=9C=AA=E7=9F=A5=E6=83=85=E5=86=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/modules/head.html | 6 +- templates/page_links.html | 186 ++++++++++++++++++++++++++++++++++++ theme.yaml | 4 + 3 files changed, 195 insertions(+), 1 deletion(-) create mode 100644 templates/page_links.html diff --git a/templates/modules/head.html b/templates/modules/head.html index ef3c73a9..3a693e96 100644 --- a/templates/modules/head.html +++ b/templates/modules/head.html @@ -232,7 +232,7 @@ var GLOBAL_CONFIG = { // 页面类型 index,page,post,tag,category htmlType: [[${ htmlType }]], - postTitle: [[${ htmlType == 'post' ? post.spec.title : ''}]], + postTitle: [[${ htmlType == 'post' ? post.spec.title : htmlType == 'page' ? singlePage.spec.title : ''}]], isanchor: true, isPost: [[${htmlType == 'post'}]], isHome: [[${ htmlType == 'index'}]], @@ -295,6 +295,10 @@ if (GLOBAL_CONFIG.postTitle != '') title = GLOBAL_CONFIG.postTitle break; + case 'page': + if (GLOBAL_CONFIG.postTitle != '') + title = GLOBAL_CONFIG.postTitle + break; case 'archive': title = '归档' break; diff --git a/templates/page_links.html b/templates/page_links.html new file mode 100644 index 00000000..c5531b87 --- /dev/null +++ b/templates/page_links.html @@ -0,0 +1,186 @@ + + + + +
+ +
+
+ + + + +
+
+

🎣 钓鱼

+
+ +
+
+ + +
+ +
+ + + +

+ + [[${group.spec.displayName}]] ([[${group.links.size}]]) +

+ + + + + +
+
+ [[${link.spec.label}]] + + + + + +
+ +
+
+ + +
+
+
+ +
+ + + + + + +
+ + + + +
+ +
+ + +
+
+
+
+
评论
+ +
+ 你无需删除空行,直接评论以获取最佳展示效果 +
+
+ +
+ +
+
+ + +
+ +
+ + \ No newline at end of file diff --git a/theme.yaml b/theme.yaml index 8bd939eb..0fe1cd45 100644 --- a/theme.yaml +++ b/theme.yaml @@ -9,6 +9,10 @@ spec: website: https://liuzhihang.com customTemplates: page: + - name: 友情链接页面模版 + description: 支持可预设文本的友链 + screenshot: + file: page_links.html - name: 关于页面模版 description: 关于页面 screenshot: From 74a640a048476ae862b6fbb674f5b1511a4333b0 Mon Sep 17 00:00:00 2001 From: "1152958806@qq.com" <1152958806@qq.com> Date: Sat, 15 Jul 2023 00:15:05 +0800 Subject: [PATCH 2/8] =?UTF-8?q?=E5=8F=8B=E8=81=94=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- settings.yaml | 9 ++ templates/fcircle.html | 4 +- templates/links.html | 144 +----------------------- templates/macro/content-links.html | 151 ++++++++++++++++++++++++++ templates/modules/layouts/layout.html | 3 +- templates/page_links.html | 146 +------------------------ 6 files changed, 167 insertions(+), 290 deletions(-) create mode 100644 templates/macro/content-links.html diff --git a/settings.yaml b/settings.yaml index abead65b..d7408816 100644 --- a/settings.yaml +++ b/settings.yaml @@ -1080,6 +1080,15 @@ spec: value: "https://moments.0206.ink/randomfriend" label: 随机访问地址 help: 注意格式 (你的鱼塘token地址 + randomfriend) + - $formkit: url + name: fcircleUrl + value: "/fcircle" + label: 鱼塘链接 + - $formkit: url + name: linksUrl + value: "/links" + label: 友链链接 + - group: fcircle label: 友链鱼塘 diff --git a/templates/fcircle.html b/templates/fcircle.html index f32b46b2..08ed9e99 100644 --- a/templates/fcircle.html +++ b/templates/fcircle.html @@ -36,7 +36,9 @@ href="javascript:fetchRandomPost();"> -
全部友链
+
+ 全部友链 +
- - - -
- - - -

- - [[${group.spec.displayName}]] ([[${group.links.size}]]) -

- - - - - -
-
- [[${link.spec.label}]] - - - - - -
- -
-
- - -
-
-
- -
- - - - - - -
- -
+
diff --git a/templates/macro/content-links.html b/templates/macro/content-links.html new file mode 100644 index 00000000..ee34bb4d --- /dev/null +++ b/templates/macro/content-links.html @@ -0,0 +1,151 @@ + + + + + + + +
+
+

🎣 钓鱼

+ + + +
+ +
+
+ + +
+ +
+ + + +

+ + [[${group.spec.displayName}]] ([[${group.links.size}]]) +

+ + + + + +
+
+ [[${link.spec.label}]] + + + + + +
+ +
+
+ + +
+
+
+ +
+ + + + + + +
+ + + + +
+ +
+
\ No newline at end of file diff --git a/templates/modules/layouts/layout.html b/templates/modules/layouts/layout.html index 95d2af45..a1c52c1a 100644 --- a/templates/modules/layouts/layout.html +++ b/templates/modules/layouts/layout.html @@ -211,6 +211,7 @@ // 页脚友链 addFriendLinksInFooter: function () { + var linksUrl = '[[${theme.config.link.linksUrl}]]' var fetchUrl = [[${theme.config.footer.footer_group.fetchUrl}]] fetch(fetchUrl) .then(res => res.json()) @@ -222,7 +223,7 @@ var item = randomFriendLinks[i] htmlText += `${item.name}`; } - htmlText += `更多` + htmlText += `更多` document.getElementById("friend-links-in-footer").innerHTML = htmlText; }) } diff --git a/templates/page_links.html b/templates/page_links.html index c5531b87..2663d758 100644 --- a/templates/page_links.html +++ b/templates/page_links.html @@ -11,153 +11,9 @@
- - - -
-
-

🎣 钓鱼

-
- -
-
- - -
+ -
- - - -

- - [[${group.spec.displayName}]] ([[${group.links.size}]]) -

- - - - - -
-
- [[${link.spec.label}]] - - - - - -
- -
-
- - -
-
-
- -
- - - - - - -
- - - - -

From 2b888254a126985a4abfefd19fb0e02cbc05b977 Mon Sep 17 00:00:00 2001 From: "1152958806@qq.com" <1152958806@qq.com> Date: Sat, 15 Jul 2023 01:36:24 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E8=AF=84=E8=AE=BA=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/comments.html | 20 ++++---------------- templates/links.html | 19 +++++-------------- templates/modules/comment.html | 21 +++++++++++++++++++++ templates/moments.html | 20 ++++---------------- templates/page.html | 21 +++++---------------- templates/page_links.html | 19 +++++-------------- templates/post.html | 19 ++++--------------- 7 files changed, 48 insertions(+), 91 deletions(-) create mode 100644 templates/modules/comment.html diff --git a/templates/comments.html b/templates/comments.html index 5798a61f..95cdf14f 100644 --- a/templates/comments.html +++ b/templates/comments.html @@ -136,23 +136,11 @@

- + -
-
-
-
-
评论
- -
- 你无需删除空行,直接评论以获取最佳展示效果 -
-
- -
+ th:replace="~{modules/comment :: comment(group = 'content.halo.run', + kind = 'SinglePage', + name = ${singlePage.metadata.name})}"/> diff --git a/templates/links.html b/templates/links.html index ef12f4c4..787b4657 100644 --- a/templates/links.html +++ b/templates/links.html @@ -14,20 +14,11 @@
- - -
-
-
-
-
评论
- -
- 你无需删除空行,直接评论以获取最佳展示效果 -
-
- -
+ +
diff --git a/templates/modules/comment.html b/templates/modules/comment.html new file mode 100644 index 00000000..b759450f --- /dev/null +++ b/templates/modules/comment.html @@ -0,0 +1,21 @@ + + + + +
+
+ +
+
+
评论
+ +
+ 你无需删除空行,直接评论以获取最佳展示效果 +
+
+ +
+
+ \ No newline at end of file diff --git a/templates/moments.html b/templates/moments.html index 613dd0bd..95e36461 100644 --- a/templates/moments.html +++ b/templates/moments.html @@ -70,23 +70,11 @@
- + -
-
-
-
-
评论
- -
- 你无需删除空行,直接评论以获取最佳展示效果 -
-
- -
+ th:replace="~{modules/comment :: comment(group = 'content.halo.run', + kind = 'SinglePage', + name = 'moments')}"/> diff --git a/templates/page.html b/templates/page.html index 308aa13f..0c75e149 100644 --- a/templates/page.html +++ b/templates/page.html @@ -13,23 +13,12 @@

- + -
-
-
-
-
评论
- -
- 你无需删除空行,直接评论以获取最佳展示效果 -
-
- -
+ th:replace="~{modules/comment :: comment(group = 'content.halo.run', + kind = 'SinglePage', + name = ${singlePage.metadata.name})}"/> +
diff --git a/templates/page_links.html b/templates/page_links.html index 2663d758..61433945 100644 --- a/templates/page_links.html +++ b/templates/page_links.html @@ -16,20 +16,11 @@
- - -
-
-
-
-
评论
- -
- 你无需删除空行,直接评论以获取最佳展示效果 -
-
- -
+ + diff --git a/templates/post.html b/templates/post.html index 94a74f65..63238fd5 100644 --- a/templates/post.html +++ b/templates/post.html @@ -272,22 +272,11 @@
- + -
-
-
-
-
评论
- -
- 你无需删除空行,直接评论以获取最佳展示效果 -
-
- -
+ th:replace="~{modules/comment :: comment(group = 'content.halo.run', + kind = 'Post', + name = ${post.metadata.name})}"/> From 9b6eb7a319a23a692250b017236f601e3b50dbfa Mon Sep 17 00:00:00 2001 From: "1152958806@qq.com" <1152958806@qq.com> Date: Sat, 15 Jul 2023 13:54:45 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E8=8F=9C=E5=8D=95=E8=B7=B3=E8=BD=AC?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- settings.yaml | 6 ++++++ templates/assets/zhheo/zhheoblog.css | 13 ------------- templates/modules/footer.html | 4 +++- templates/modules/widgets/about-widgets/game.html | 14 ++++++++++++++ templates/modules/widgets/nav-left.html | 2 +- templates/modules/widgets/nav-menu.html | 8 ++++---- 6 files changed, 28 insertions(+), 19 deletions(-) diff --git a/settings.yaml b/settings.yaml index d7408816..fbedd96f 100644 --- a/settings.yaml +++ b/settings.yaml @@ -1303,6 +1303,7 @@ spec: game_title: game_uid: game_bg: + loading_bar: children: - $formkit: text name: game_tips @@ -1324,6 +1325,11 @@ spec: label: 爱好游戏背景 placeholder: 请输入内容 value: https://img.zhheo.com/i/2022/08/31/630efa7ae39fe.webp + - $formkit: attachment + name: loading_bar + label: 爱好游戏logo + placeholder: 请输入内容 + value: https://img.cdn.yzczi.com/img/64795eaece0fc.png - $formkit: group name: game2 label: 爱好游戏 2 diff --git a/templates/assets/zhheo/zhheoblog.css b/templates/assets/zhheo/zhheoblog.css index c6a688c2..835b3dfc 100644 --- a/templates/assets/zhheo/zhheoblog.css +++ b/templates/assets/zhheo/zhheoblog.css @@ -17030,19 +17030,6 @@ span.hexo-douban-pagenum { overflow: hidden; } -.loading-bar::after { - content: ""; - position: absolute; - top: 500px; - left: 0; - filter: drop-shadow(0 -500px 0 #ece5d8); - width: 500px; - height: 62.5px; - background: url("https://img.cdn.yzczi.com/img/64795eaece0fc.png") no-repeat left 100%; - background-size: 500px 62.5px; - background-position-x: 0; -} - .author-content-item.game-lol:hover .loading-bar::after { animation: loading-bar 3.5s cubic-bezier(0.28, 0.11, 0.32, 1) infinite forwards; } diff --git a/templates/modules/footer.html b/templates/modules/footer.html index ccfab083..fb2e9e55 100644 --- a/templates/modules/footer.html +++ b/templates/modules/footer.html @@ -30,7 +30,9 @@ diff --git a/templates/modules/widgets/about-widgets/game.html b/templates/modules/widgets/about-widgets/game.html index 1e33f2f6..415b42c5 100644 --- a/templates/modules/widgets/about-widgets/game.html +++ b/templates/modules/widgets/about-widgets/game.html @@ -29,6 +29,20 @@ + diff --git a/templates/modules/widgets/nav-left.html b/templates/modules/widgets/nav-left.html index 483e5c71..f1cd88ac 100644 --- a/templates/modules/widgets/nav-left.html +++ b/templates/modules/widgets/nav-left.html @@ -19,7 +19,7 @@
+ th:target="${childMenu.spec.target?.value}" th:href="@{${childMenu.status.href}}"> - @@ -23,9 +25,7 @@