From dc11338ca24b721f9adb88a282daaee28ead1a58 Mon Sep 17 00:00:00 2001 From: nanhaoluo <3075912108@qq.com> Date: Fri, 23 Jan 2026 13:50:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=96=87=E7=AB=A0?= =?UTF-8?q?=E5=8A=A0=E8=BD=BD=E5=8A=A8=E7=94=BB=E5=8A=9F=E8=83=BD=E6=97=A0?= =?UTF-8?q?=E8=AE=BA=E6=98=AF=E5=90=A6=E5=90=AF=E7=94=A8=E9=83=BD=E8=83=BD?= =?UTF-8?q?=E6=AD=A3=E5=B8=B8=E5=B7=A5=E4=BD=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改CSS选择器从.post-preview改为.post,匹配所有文章卡片 - 修改JavaScript选择器从article.post-preview改为article.post - 添加#main.article-list限定,只在文章列表页生效 - 修复清理代码,确保能正确移除所有文章的加载状态 --- argontheme.js | 8 ++++---- style.css | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/argontheme.js b/argontheme.js index 41fc4d3..480a43b 100644 --- a/argontheme.js +++ b/argontheme.js @@ -2821,8 +2821,8 @@ $(document).pjax("a[href]:not([no-pjax]):not(.no-pjax):not([target='_blank']):no NProgress.start(); pjaxLoading = true; }).on('pjax:afterGetContainers', function(e, f, g) { - if (g.is("#main article.post-preview a.post-title")){ - let $card = $(g.parents("article.post-preview")[0]); + if (g.is("#main.article-list article.post a.post-title")){ + let $card = $(g.parents("article.post")[0]); let waterflowOn = false; if ($("#main").hasClass("waterflow")){ waterflowOn = true; @@ -2857,13 +2857,13 @@ $(document).pjax("a[href]:not([no-pjax]):not(.no-pjax):not([target='_blank']):no cleanupPjaxResources(); // 清理文章列表的 PJAX 加载状态 - $(".post-preview.post-pjax-loading").removeClass("post-pjax-loading").css({ + $(".post.post-pjax-loading").removeClass("post-pjax-loading").css({ "transform": "", "transition": "", "left": "", "width": "" }); - $(".post-preview .loading-css-animation").remove(); + $(".post .loading-css-animation").remove(); $("#main").removeClass("post-list-pjax-loading"); // 更新 UI 状态 diff --git a/style.css b/style.css index 74a03b9..e4a8f95 100644 --- a/style.css +++ b/style.css @@ -3877,13 +3877,13 @@ html.filter-grayscale { z-index: 10; } -.post-list-pjax-loading .post-preview { +#main.post-list-pjax-loading .post { opacity: 0; pointer-events: none; transition: opacity 0.3s ease; } -.post-list-pjax-loading .post-preview.post-pjax-loading { +#main.post-list-pjax-loading .post.post-pjax-loading { opacity: 1 !important; pointer-events: auto; }