From 175df8b8146447aab0f8ab1a42a49bdd257ecead Mon Sep 17 00:00:00 2001 From: Ad-closeNN <1709301095@qq.com> Date: Sun, 22 Mar 2026 14:03:18 +0800 Subject: [PATCH] =?UTF-8?q?friends(new):=20=E9=9B=AA=E8=AF=BA=E7=9A=84?= =?UTF-8?q?=E5=B0=8F=E5=8D=9A=E5=AE=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 2. feat(analytics): 加入 Google Analytics 3. fix(style): 修复 Umami 请求重复多次请求的问题 --- src/components/Navbar.astro | 2 +- src/components/PostCard.astro | 56 ++++++++------------- src/components/PostMeta.astro | 55 ++++++++------------- src/components/widget/Profile.astro | 64 ++++++++++-------------- src/layouts/Layout.astro | 75 +++++++++++++++++++++++++++-- src/layouts/MainGridLayout.astro | 2 +- src/pages/friends.astro | 8 +++ src/pages/posts/[...slug].astro | 2 +- 8 files changed, 148 insertions(+), 116 deletions(-) diff --git a/src/components/Navbar.astro b/src/components/Navbar.astro index 5895af6..6223d5c 100644 --- a/src/components/Navbar.astro +++ b/src/components/Navbar.astro @@ -24,7 +24,7 @@ let links: NavBarLink[] = navBarConfig.links.map(
+ "card-base !overflow-visible max-w-[var(--page-width)] h-[4.5rem] !rounded-t-none mx-auto flex items-center justify-between px-4 !bg-[var(--card-bg-transparent)] backdrop-blur-lg"]}>
diff --git a/src/components/PostCard.astro b/src/components/PostCard.astro index a765304..36f9d4b 100644 --- a/src/components/PostCard.astro +++ b/src/components/PostCard.astro @@ -7,7 +7,6 @@ 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; @@ -43,7 +42,7 @@ const coverWidth = "28%"; const { remarkPluginFrontmatter } = await entry.render(); --- -
+
{slug && ( - -)} \ No newline at end of file +)} diff --git a/src/components/widget/Profile.astro b/src/components/widget/Profile.astro index 3edeec1..dabe5ba 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, umamiConfig } from "../../config"; +import { profileConfig } from "../../config"; import { url } from "../../utils/url-utils"; import ImageWrapper from "../misc/ImageWrapper.astro"; @@ -85,55 +85,43 @@ fetch("https://v1.hitokoto.cn") }); - \ No newline at end of file + diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro index 7fe1c1e..4a902a2 100644 --- a/src/layouts/Layout.astro +++ b/src/layouts/Layout.astro @@ -1,6 +1,6 @@ --- import ConfigCarrier from "@components/ConfigCarrier.astro"; -import { profileConfig, siteConfig } from "@/config"; +import { profileConfig, siteConfig, umamiConfig } from "@/config"; import { AUTO_MODE, BANNER_HEIGHT, @@ -195,9 +195,78 @@ const bannerOffset = + + - + + + \ No newline at end of file + diff --git a/src/layouts/MainGridLayout.astro b/src/layouts/MainGridLayout.astro index b9bafab..d774fd9 100644 --- a/src/layouts/MainGridLayout.astro +++ b/src/layouts/MainGridLayout.astro @@ -122,4 +122,4 @@ const mainPanelTop = siteConfig.banner.enable {!siteConfig.toc.enable &&
}
- \ No newline at end of file + diff --git a/src/pages/friends.astro b/src/pages/friends.astro index b684c42..dbb75aa 100644 --- a/src/pages/friends.astro +++ b/src/pages/friends.astro @@ -226,6 +226,14 @@ import { Icon } from "astro-icon/components";
艾拉酱世界第一可爱!
+ +
+ +
雪诺的小博客
+
+
分享关于网络的众多有趣的小知识
+
+
diff --git a/src/pages/posts/[...slug].astro b/src/pages/posts/[...slug].astro index 0bd0066..490bfcc 100644 --- a/src/pages/posts/[...slug].astro +++ b/src/pages/posts/[...slug].astro @@ -178,4 +178,4 @@ const customcover = entry.data.customcover; crossorigin="anonymous" async> - \ No newline at end of file +