From 018ad4ab1e78abce33dd9ea26bbefe72c1ecbe34 Mon Sep 17 00:00:00 2001 From: ClovertaTheTrilobita Date: Mon, 13 Apr 2026 22:35:33 +0300 Subject: [PATCH] update animation refactor remark42 components --- src/components/LatestComments.astro | 175 +++++++++++++++++++ src/components/Navigation.astro | 4 +- src/components/Posts/PostItem.astro | 18 +- src/components/Posts/PostList.astro | 1 + src/components/Remark42Embed.astro | 82 +++++++++ src/global.d.ts | 18 ++ src/layouts/BaseLayout.astro | 1 + src/layouts/MarkdownPostLayout.astro | 6 +- src/pages/[lang]/index.astro | 4 +- src/styles/global.css | 247 +++++++++++++++++++++++++++ 10 files changed, 546 insertions(+), 10 deletions(-) create mode 100644 src/components/LatestComments.astro create mode 100644 src/components/Remark42Embed.astro create mode 100644 src/global.d.ts diff --git a/src/components/LatestComments.astro b/src/components/LatestComments.astro new file mode 100644 index 0000000..4566eba --- /dev/null +++ b/src/components/LatestComments.astro @@ -0,0 +1,175 @@ +--- +const { lang = "zh" } = Astro.props; +const host = import.meta.env.PUBLIC_REMARK42_HOST; +const siteId = import.meta.env.PUBLIC_REMARK42_SITE_ID; +const max = 10; +const heading = lang === "zh" ? "最新评论" : "Latest comments"; +--- + +
+

{heading}

+ + + +
+
+ + diff --git a/src/components/Navigation.astro b/src/components/Navigation.astro index 7e21097..d2346e4 100644 --- a/src/components/Navigation.astro +++ b/src/components/Navigation.astro @@ -7,7 +7,7 @@ const t = getTranslations(lang);