diff --git a/src/components/PostCard.astro b/src/components/PostCard.astro index a7a7143..db59880 100644 --- a/src/components/PostCard.astro +++ b/src/components/PostCard.astro @@ -7,6 +7,7 @@ import { i18n } from "../i18n/translation"; import { getDir } from "../utils/url-utils"; import ImageWrapper from "./misc/ImageWrapper.astro"; import PostMetadata from "./PostMeta.astro"; +import { umamiConfig } from "../config"; interface Props { class?: string; @@ -64,7 +65,7 @@ const { remarkPluginFrontmatter } = await entry.render(); { description || remarkPluginFrontmatter.excerpt } - +
{remarkPluginFrontmatter.words} {" " + i18n(remarkPluginFrontmatter.words === 1 ? I18nKey.wordCount : I18nKey.wordsCount)} @@ -73,6 +74,10 @@ const { remarkPluginFrontmatter } = await entry.render();
{remarkPluginFrontmatter.minutes} {" " + i18n(remarkPluginFrontmatter.minutes === 1 ? I18nKey.minuteCount : I18nKey.minutesCount)}
+
|
+
+ 加载中... +
@@ -106,5 +111,66 @@ const { remarkPluginFrontmatter } = await entry.render();
+ + + \ No newline at end of file diff --git a/src/components/PostMeta.astro b/src/components/PostMeta.astro index 488e85e..1c92216 100644 --- a/src/components/PostMeta.astro +++ b/src/components/PostMeta.astro @@ -4,6 +4,7 @@ import I18nKey from "../i18n/i18nKey"; import { i18n } from "../i18n/translation"; import { formatDateToYYYYMMDD } from "../utils/date-utils"; import { getCategoryUrl, getTagUrl } from "../utils/url-utils"; +import { umamiConfig } from "../config"; interface Props { class: string; @@ -13,6 +14,7 @@ interface Props { category: string | null; 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; --- @@ -28,8 +31,7 @@ const className = Astro.props.class;
-
+
{formatDateToYYYYMMDD(published)} @@ -38,8 +40,7 @@ const className = Astro.props.class; {!hideUpdateDate && updated && updated.getTime() !== published.getTime() && (
-
+
{formatDateToYYYYMMDD(updated)} @@ -48,8 +49,7 @@ const className = Astro.props.class;
-
+
@@ -63,8 +63,7 @@ const className = Astro.props.class;
-
+
@@ -79,4 +78,71 @@ const className = Astro.props.class; {!(tags && tags.length > 0) &&
{i18n(I18nKey.noTags)}
}
-
\ No newline at end of file + + + {slug && ( +
+
+ +
+ 加载中... +
+ )} +
+ +{slug && ( + +)} \ No newline at end of file diff --git a/src/components/widget/Profile.astro b/src/components/widget/Profile.astro index 4c0897d..cab3527 100644 --- a/src/components/widget/Profile.astro +++ b/src/components/widget/Profile.astro @@ -1,6 +1,6 @@ --- import { Icon } from "astro-icon/components"; -import { profileConfig } from "../../config"; +import { profileConfig, umamiConfig } from "../../config"; import { url } from "../../utils/url-utils"; import ImageWrapper from "../misc/ImageWrapper.astro"; @@ -34,6 +34,63 @@ const config = profileConfig; {config.links[0].name} }
+ + +
+
+ + 加载中... +
+
+ \ No newline at end of file