From fdd55fb068495f0006782e4e1f712f425ef95c0e Mon Sep 17 00:00:00 2001 From: ClovertaTheTrilobita Date: Mon, 13 Apr 2026 23:02:21 +0300 Subject: [PATCH] refactored counter --- src/components/Posts/PostItem.astro | 4 +- src/components/Remark42Counter.astro | 66 ++++++++++++++++++++++++++++ 2 files changed, 68 insertions(+), 2 deletions(-) create mode 100644 src/components/Remark42Counter.astro diff --git a/src/components/Posts/PostItem.astro b/src/components/Posts/PostItem.astro index 053457d..309422b 100644 --- a/src/components/Posts/PostItem.astro +++ b/src/components/Posts/PostItem.astro @@ -1,6 +1,6 @@ --- import "@/styles/global.css"; -import Remark42Count from "@/components/remark42-counter.svelte"; +import Remark42Counter from "@/components/Remark42Counter.astro"; import { getLangFromUrl } from "@/i18n"; const lang = getLangFromUrl(Astro.url); @@ -33,7 +33,7 @@ const tags = data.tags; {data.date} - 💬 + 💬 diff --git a/src/components/Remark42Counter.astro b/src/components/Remark42Counter.astro new file mode 100644 index 0000000..e576d13 --- /dev/null +++ b/src/components/Remark42Counter.astro @@ -0,0 +1,66 @@ +--- +const { url } = Astro.props; +const host = import.meta.env.PUBLIC_REMARK42_HOST; +const siteId = import.meta.env.PUBLIC_REMARK42_SITE_ID; +--- + + + +