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 @@ 更多 - + +