From 602b3d5da36feb78e550f973c667df0fa03f93ad Mon Sep 17 00:00:00 2001 From: "1152958806@qq.com" <1152958806@qq.com> Date: Mon, 7 Aug 2023 22:04:55 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A6=96=E9=A1=B5=E5=88=86=E9=A1=B5=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E7=BD=AE=E9=A1=B6=E5=86=85=E5=AE=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/assets/zhheo/blogex.js | 14 +++++++++++++- templates/assets/zhheo/zhheoblog.css | 8 ++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/templates/assets/zhheo/blogex.js b/templates/assets/zhheo/blogex.js index b0e3ae14..1b35348e 100644 --- a/templates/assets/zhheo/blogex.js +++ b/templates/assets/zhheo/blogex.js @@ -635,8 +635,20 @@ function percent() { window.onscroll = percent } +// 首页分页隐藏置顶内容 +function checkUrlAndAddHideBanner() { + var e = window.location.href; + if (/\/page\//.test(e)) { + var t = document.getElementById("recent-top-post-group") + , o = document.getElementById("bbTimeList"); + t && (t.classList.add("more-page"), + o && o.classList.add("more-page")); + } +} + function initBlog() { - heo.initIndexEssay() + heo.initIndexEssay(), + checkUrlAndAddHideBanner() } //检查是否开启快捷键 diff --git a/templates/assets/zhheo/zhheoblog.css b/templates/assets/zhheo/zhheoblog.css index 060e9734..03259b0b 100644 --- a/templates/assets/zhheo/zhheoblog.css +++ b/templates/assets/zhheo/zhheoblog.css @@ -8925,6 +8925,10 @@ li { height: 50px; } +#bbTimeList.more-page { + margin-bottom: 0; +} + #bbTimeList:hover { border: var(--style-border-hover); box-shadow: var(--heo-shadow-main); @@ -9508,6 +9512,10 @@ ins.adsbygoogle { margin-bottom: 0rem; } +.recent-top-post-group.more-page { + display: none; +} + .recent-post-top { display: flex; flex-direction: row;