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 {