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,