From f3c78442ba841552c4daa2133a009dd414529a5d Mon Sep 17 00:00:00 2001 From: Kisechan Date: Fri, 7 Mar 2025 19:20:12 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=A0=B7=E5=BC=8F=EF=BC=8C?= =?UTF-8?q?=E8=B0=83=E6=95=B4=E9=97=B4=E8=B7=9D=E5=92=8C=E9=A2=9C=E8=89=B2?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E4=BB=A5=E6=8F=90=E5=8D=87=E5=8F=AF=E8=AF=BB?= =?UTF-8?q?=E6=80=A7=E5=92=8C=E4=B8=80=E8=87=B4=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/NavBar.vue | 2 +- src/style.css | 4 ++++ src/views/HomeView.vue | 2 ++ src/views/LinksView.vue | 7 ++++--- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/components/NavBar.vue b/src/components/NavBar.vue index 4c6f54a..93a168d 100644 --- a/src/components/NavBar.vue +++ b/src/components/NavBar.vue @@ -91,7 +91,7 @@ initializeDarkMode(); .el-menu-item { font-size: 16px; - gap: 7.5px; + gap: 6px; cursor: pointer; /* 添加手型光标 */ } diff --git a/src/style.css b/src/style.css index 952b6b3..43188c3 100644 --- a/src/style.css +++ b/src/style.css @@ -9,6 +9,8 @@ --background-color: #242424; --text-color: #3d3d3d; + --code-background-color: #f5f5f5; + --code-text-color: #333; font-synthesis: none; text-rendering: optimizeLegibility; @@ -29,6 +31,8 @@ a:hover { .dark { --background-color: #242424; --text-color: rgb(228, 228, 228); + --code-background-color: #2d2d2d; + --code-text-color: #cccccc; } body { diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index aa40e46..1549a26 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -290,6 +290,7 @@ onUnmounted(() => { .blog-meta { display: flex; + gap: 8px; align-items: center; font-size: 0.9em; color: var(--text-color); @@ -310,6 +311,7 @@ onUnmounted(() => { .tag { margin-left: 5px; + color: var(--code-text-color); } .read-more-container { diff --git a/src/views/LinksView.vue b/src/views/LinksView.vue index f5d8f8c..e5a6154 100644 --- a/src/views/LinksView.vue +++ b/src/views/LinksView.vue @@ -131,11 +131,12 @@ export default { .add-link-content { font-size: 1em; - color: #333; + color: var(--text-color); } .add-link-content pre { - background-color: #f5f5f5; + background-color: var(--code-background-color); + color: var(--code-text-color); padding: 10px; border-radius: 4px; overflow-x: auto; @@ -197,7 +198,7 @@ export default { .link-description { font-size: 0.9em; - color: #666; + color: var(--code-text-color); } .loading-container {