From 9d735b18318e7247af8df76855d49ec75483a652 Mon Sep 17 00:00:00 2001 From: "1152958806@qq.com" <1152958806@qq.com> Date: Wed, 18 Oct 2023 22:27:52 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BE=E5=BA=93=E9=A1=B5=E9=9D=A2=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=E5=88=86=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/archives.html | 2 +- templates/assets/js/heo.js | 20 +++++-- templates/category.html | 81 +---------------------------- templates/macro/post-list.html | 72 +++++++++++++++++++++++++ templates/modules/footer.html | 4 +- templates/modules/post-list.html | 2 +- templates/modules/widgets/page.html | 10 ++-- templates/photos.html | 4 ++ templates/tag.html | 78 +-------------------------- 9 files changed, 107 insertions(+), 166 deletions(-) create mode 100644 templates/macro/post-list.html diff --git a/templates/archives.html b/templates/archives.html index 2cf06a58..7c325b6e 100644 --- a/templates/archives.html +++ b/templates/archives.html @@ -53,7 +53,7 @@ -
+
diff --git a/templates/assets/js/heo.js b/templates/assets/js/heo.js index aba709ba..48a7d40a 100644 --- a/templates/assets/js/heo.js +++ b/templates/assets/js/heo.js @@ -484,9 +484,23 @@ var heo = { , o = document.getElementById("toPageText") , n = parseInt(o.value); if (!isNaN(n) && n > 0 && "0" !== ("" + n)[0] && n <= t) { - var a, l = window.location.href.replace(/\/page\/\d$/, ""); - a = 1 === n ? l : l + (l.endsWith("/") ? "" : "/") + "page/" + n, - document.getElementById("toPageButton").href = a + var url = window.location.href; + + var photosIndexOf = url.indexOf("?group") >= 0 ? url.indexOf("?group") : -1; + if (photosIndexOf >= 0) {//图库页面 + var new_url = url.substr(0,photosIndexOf); + var group = url.substr(photosIndexOf) + var a, l = new_url.replace(/\/page\/\d$/, ""); + a = 1 === n ? l : l + (l.endsWith("/") ? "" : "/") + "page/" + n, + document.getElementById("toPageButton").href = a + group + }else{ + var a, l = url.replace(/\/page\/\d$/, ""); + a = 1 === n ? l : l + (l.endsWith("/") ? "" : "/") + "page/" + n, + document.getElementById("toPageButton").href = a + } + //首页有第一屏就跳转指定位置 + scrollToPost(); + } }, changeSayHelloText: function() { diff --git a/templates/category.html b/templates/category.html index befcf3b1..cbf6c5d0 100644 --- a/templates/category.html +++ b/templates/category.html @@ -32,85 +32,8 @@ 更多 -
- -
- -
- - - -
- -
- -
-
- -
+ +
diff --git a/templates/macro/post-list.html b/templates/macro/post-list.html new file mode 100644 index 00000000..9a5a974c --- /dev/null +++ b/templates/macro/post-list.html @@ -0,0 +1,72 @@ + +
+ +
+ +
+ + + +
+ +
+ +
+ +
+
\ No newline at end of file diff --git a/templates/modules/footer.html b/templates/modules/footer.html index 5e5e0ad8..9f4d24e4 100644 --- a/templates/modules/footer.html +++ b/templates/modules/footer.html @@ -14,7 +14,8 @@ - + @@ -22,6 +23,7 @@ + diff --git a/templates/modules/post-list.html b/templates/modules/post-list.html index 1e5df13d..7c402c5b 100644 --- a/templates/modules/post-list.html +++ b/templates/modules/post-list.html @@ -104,7 +104,7 @@ -
+
diff --git a/templates/modules/widgets/page.html b/templates/modules/widgets/page.html index ada0170e..455431b6 100644 --- a/templates/modules/widgets/page.html +++ b/templates/modules/widgets/page.html @@ -6,8 +6,9 @@ @param path '/path/page/n' 中的 `/path` 需要保留 `/` @param pageInfo Halo类型UrlContextListResult @param isIndex 是否主页 + @param _param 参数 --> -