From 6a8818b9e976f795d89e81ca337c6605b340eb0b Mon Sep 17 00:00:00 2001 From: MCKero6423 Date: Tue, 12 Aug 2025 21:37:21 +0800 Subject: [PATCH] Add files via upload --- src/components/PostMeta.astro | 81 ++++++++++++++++++++++++++++++++--- 1 file changed, 75 insertions(+), 6 deletions(-) diff --git a/src/components/PostMeta.astro b/src/components/PostMeta.astro index 488e85e..2e8070e 100644 --- a/src/components/PostMeta.astro +++ b/src/components/PostMeta.astro @@ -2,17 +2,19 @@ import { Icon } from "astro-icon/components"; import I18nKey from "../i18n/i18nKey"; import { i18n } from "../i18n/translation"; +import { getDir, url } from "../utils/url-utils"; import { formatDateToYYYYMMDD } from "../utils/date-utils"; -import { getCategoryUrl, getTagUrl } from "../utils/url-utils"; +import { umamiConfig } from "../config"; interface Props { class: string; published: Date; updated?: Date; tags: string[]; - category: string | null; + category: string; hideTagsForMobile?: boolean; hideUpdateDate?: boolean; + slug?: string; } const { published, @@ -21,6 +23,7 @@ const { category, hideTagsForMobile = false, hideUpdateDate = false, + slug, } = Astro.props; const className = Astro.props.class; --- @@ -53,7 +56,7 @@ const className = Astro.props.class;
- {category || i18n(I18nKey.uncategorized)} @@ -70,13 +73,79 @@ const className = Astro.props.class;
{(tags && tags.length > 0) && tags.map((tag, i) => (
/
-
- {tag.trim()} + {tag} ))} {!(tags && tags.length > 0) &&
{i18n(I18nKey.noTags)}
}
- \ No newline at end of file + + + {slug && ( +
+
+ +
+ 加载中... +
+ )} + + +{slug && ( + +)} \ No newline at end of file