From 7b11b5a215c6d59a0a1383e3ef7486c815c46335 Mon Sep 17 00:00:00 2001 From: Ad-closeNN <1709301095@qq.com> Date: Sun, 1 Mar 2026 16:16:48 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E5=8D=A1=E7=89=87?= =?UTF-8?q?=E8=BD=BD=E5=85=A5=E5=8A=A8=E7=94=BB=E9=87=8D=E5=A4=8D=E6=92=AD?= =?UTF-8?q?=E6=94=BE=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CodeGeeX GLM 4.7 牛逼 --- .vscode/settings.json | 3 ++- src/components/PostPage.astro | 2 -- src/layouts/Layout.astro | 7 +++++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 4570936..e16575b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -28,5 +28,6 @@ "[json]": { "editor.defaultFormatter": "vscode.json-language-features" }, - "markdown.validate.enabled": false + "markdown.validate.enabled": false, + "Codegeex.RepoIndex": true } diff --git a/src/components/PostPage.astro b/src/components/PostPage.astro index 4e46ed4..87e4df3 100644 --- a/src/components/PostPage.astro +++ b/src/components/PostPage.astro @@ -21,8 +21,6 @@ const interval = 50; image={entry.data.image} description={entry.data.description} draft={entry.data.draft} - class:list="onload-animation" - style={`animation-delay: calc(var(--content-delay) + ${delay++ * interval}ms);`} > ))} \ No newline at end of file diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 44c712d..7fe1c1e 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -412,6 +412,13 @@ function showBanner() { return; } + // 在显示Banner前,先移除所有已加载的onload-animation类,防止动画重复触发 + const animatedElements = document.querySelectorAll('.onload-animation'); + animatedElements.forEach(el => { + el.style.animation = 'none'; + el.style.opacity = '1'; + }); + banner.classList.remove('opacity-0', 'scale-105'); }