From 43f57c7e14a6731b5ed3738f226e34e9e9c203fc Mon Sep 17 00:00:00 2001
From: Ad-closeNN <1709301095@qq.com>
Date: Fri, 1 May 2026 20:27:31 +0800
Subject: [PATCH] =?UTF-8?q?feat(theme):=20=E4=B8=BB=E9=A2=98=E7=9B=B8?=
=?UTF-8?q?=E5=85=B3=E5=90=88=E5=B9=B6=E4=B8=80=E8=B5=B7=E3=80=81=E6=9F=A5?=
=?UTF-8?q?=E7=9C=8B=E6=BA=90=E4=BB=A3=E7=A0=81=E6=8C=89=E9=92=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/LightDarkSwitch.svelte | 79 ----
src/components/Navbar.astro | 44 +--
src/components/PostCard.astro | 12 +-
src/components/PostMeta.astro | 16 +-
src/components/control/BackToTop.astro | 2 +-
src/components/control/Pagination.astro | 6 +-
src/components/misc/License.astro | 2 +-
src/components/widget/DisplaySettings.svelte | 93 -----
src/components/widget/NavMenuPanel.astro | 4 +-
src/components/widget/Profile.astro | 10 +-
.../widget/ThemeSettingsBlock.svelte | 349 ++++++++++++++++++
src/components/widget/TotalWords.astro | 4 +-
src/components/widget/WidgetLayout.astro | 2 +-
src/config.ts | 1 +
src/layouts/Layout.astro | 5 +-
src/layouts/MainGridLayout.astro | 4 +-
src/pages/friends.astro | 20 +-
src/pages/posts/[...slug].astro | 77 +++-
src/types/config.ts | 1 +
src/utils/setting-utils.ts | 80 +++-
20 files changed, 539 insertions(+), 272 deletions(-)
delete mode 100644 src/components/LightDarkSwitch.svelte
delete mode 100644 src/components/widget/DisplaySettings.svelte
create mode 100644 src/components/widget/ThemeSettingsBlock.svelte
diff --git a/src/components/LightDarkSwitch.svelte b/src/components/LightDarkSwitch.svelte
deleted file mode 100644
index b676c7b..0000000
--- a/src/components/LightDarkSwitch.svelte
+++ /dev/null
@@ -1,79 +0,0 @@
-
-
-
-
-
+
加载中...
diff --git a/src/components/widget/ThemeSettingsBlock.svelte b/src/components/widget/ThemeSettingsBlock.svelte
new file mode 100644
index 0000000..c7053c2
--- /dev/null
+++ b/src/components/widget/ThemeSettingsBlock.svelte
@@ -0,0 +1,349 @@
+
+
+
+
+
+
+
+
+
+
+
+ {#if showThemeColor}
+
+
+ {i18n(I18nKey.themeColor)}
+
+
+
+
+
+
+
+ {/if}
+
+
+
+ 字体系列
+
+
+
+
+
+
+
+
+
+ 字体系列 会在 自定义 CSS 之后注入,所以字体设置优先级更高。
+
+
+
+
+
+
diff --git a/src/components/widget/TotalWords.astro b/src/components/widget/TotalWords.astro
index 03ce201..19f5213 100644
--- a/src/components/widget/TotalWords.astro
+++ b/src/components/widget/TotalWords.astro
@@ -1,15 +1,15 @@
---
-import { Icon } from "astro-icon/components";
import I18nKey from "@i18n/i18nKey";
import { i18n } from "@i18n/translation";
import { getTotalWords } from "@utils/content-utils";
+import { Icon } from "astro-icon/components";
const totalWords = await getTotalWords();
const formattedTotalWords = totalWords.toLocaleString("zh-CN");
---
-
+
总计 {formattedTotalWords} {i18n(I18nKey.wordsCount)}
diff --git a/src/components/widget/WidgetLayout.astro b/src/components/widget/WidgetLayout.astro
index 870dcfb..3f223c5 100644
--- a/src/components/widget/WidgetLayout.astro
+++ b/src/components/widget/WidgetLayout.astro
@@ -24,7 +24,7 @@ const className = Astro.props.class;
{isCollapsed &&
}
diff --git a/src/config.ts b/src/config.ts
index 53800a3..ec537fb 100644
--- a/src/config.ts
+++ b/src/config.ts
@@ -11,6 +11,7 @@ import { LinkPreset } from "./types/config";
export const siteConfig: SiteConfig = {
title: "Ad_closeNN 的小站",
subtitle: "Ad_closeNN の 小站,时不时会刷新一些野生东西 | ✨ 欢迎友链 ✨",
+ githubRepo: "https://github.com/Ad-closeNN/blog-fuwari",
lang: "zh_CN", // Language code, e.g. 'en', 'zh-CN', 'ja', etc.
themeColor: {
hue: 160, // Default hue for the theme color, from 0 to 360. e.g. red: 0, teal: 200, cyan: 250, pink: 345
diff --git a/src/layouts/Layout.astro b/src/layouts/Layout.astro
index 6c9baf4..4af5b1a 100644
--- a/src/layouts/Layout.astro
+++ b/src/layouts/Layout.astro
@@ -276,7 +276,7 @@ const bannerOffset =
-
+
本站近期遭到反诈部门 DNS 污染,可能无法正常访问。如有需要可开启代理或使用国外 DNS 服务器。