From 6f2b96366c5abd1f43f28bb948cbdd8e3803892d Mon Sep 17 00:00:00 2001 From: Ad-closeNN <1709301095@qq.com> Date: Sat, 25 Apr 2026 17:25:45 +0800 Subject: [PATCH] =?UTF-8?q?style:=20=E5=B7=B2=E5=A4=B1=E6=95=88=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/PostCard.astro | 10 ++++++++-- src/pages/posts/[...slug].astro | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/components/PostCard.astro b/src/components/PostCard.astro index 609a482..6116c3e 100644 --- a/src/components/PostCard.astro +++ b/src/components/PostCard.astro @@ -40,6 +40,7 @@ const className = Astro.props.class; const hasCover = image !== undefined && image !== null && image !== ""; const coverWidth = "28%"; +const isOutdated = entry.data.outdated; const { remarkPluginFrontmatter } = await render(entry); --- @@ -67,13 +68,18 @@ const { remarkPluginFrontmatter } = await render(entry); -
+
{remarkPluginFrontmatter.words} {" " + i18n(I18nKey.wordsCount)}
|
{remarkPluginFrontmatter.minutes} {" " + i18n(I18nKey.minutesCount)}
|
-
+
加载中... + {isOutdated && ( + + 已失效 + + )}
diff --git a/src/pages/posts/[...slug].astro b/src/pages/posts/[...slug].astro index 3a3d332..6fffa48 100644 --- a/src/pages/posts/[...slug].astro +++ b/src/pages/posts/[...slug].astro @@ -128,7 +128,7 @@ const isOutdated = entry.data.outdated; >
{isOutdated ? ( - <>本文内容部分或全部可能已失效,请谨慎参考。 + <>本文部分内容可能已失效,请谨慎参考。 ) : ( <> 本文最后更新于 {lastUpdatedLabel},距今 计算中...