From 4d3b6e4ce20dc4fdcef9463b841ba76ba5de39bb Mon Sep 17 00:00:00 2001 From: xy <10816187@qq.com> Date: Fri, 24 Jul 2026 22:05:03 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=8C=E5=96=84=E6=9A=97=E8=89=B2?= =?UTF-8?q?=E4=B8=BB=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/IndexSidebar.astro | 4 ++-- src/components/PostList.astro | 5 ++--- src/styles/global.css | 6 ++++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/components/IndexSidebar.astro b/src/components/IndexSidebar.astro index 7345252..6915d71 100644 --- a/src/components/IndexSidebar.astro +++ b/src/components/IndexSidebar.astro @@ -114,8 +114,8 @@ const { data: categories } = .tag { font-size: 12px; - color: #4f6df5; - background: #eef1fe; + color: var(--primary); + background: var(--tag-bg); padding: 3px 10px; border-radius: 999px; transition: background 0.2s; diff --git a/src/components/PostList.astro b/src/components/PostList.astro index 4805a3a..9fddab0 100644 --- a/src/components/PostList.astro +++ b/src/components/PostList.astro @@ -169,8 +169,8 @@ posts.map((post) => { .tag { font-size: 12px; - color: #4f6df5; - background: #eef1fe; + color: var(--primary); + background: var(--tag-bg); padding: 3px 10px; border-radius: 999px; transition: background 0.2s; @@ -180,7 +180,6 @@ posts.map((post) => { background: #dfe6fd; } - /* ========== 分页 ========== */ .pagination { display: flex; diff --git a/src/styles/global.css b/src/styles/global.css index 511b6bc..6d69aaa 100644 --- a/src/styles/global.css +++ b/src/styles/global.css @@ -7,10 +7,11 @@ --shadow: 0 2px 8px rgba(0, 0, 0, 0.06); --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.10); --card-bg: #ffffff; + --tag-bg: #eef1fe; --text-color: #2b2f36; --text-secondary: #6b7280; --border: #e5e7eb; - --primary: #2b2f36; + --primary: #4f6df5; } .dark { @@ -19,7 +20,8 @@ --text-color: #ffffff; --text-secondary: #e5e7eb; --border: #e5e7eb; - --primary: #3d414a; + --primary: #1e293b; + --tag-bg: #e0f2fe;; } html,