From c62ce6cb3925deaaee66dba0bf60930fa11703ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=99=E5=85=89?= <5248283+lsg15829561090@user.noreply.gitee.com> Date: Sun, 29 Sep 2024 21:46:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BA=86=E9=BB=91=E7=99=BD?= =?UTF-8?q?=E4=B8=BB=E9=A2=98=E5=88=87=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/style.css | 11 +++++++++++ src/components/GlobalHeader.vue | 4 +++- src/layouts/BasicLayout.vue | 2 +- src/main.ts | 2 +- src/views/HomeView.vue | 7 ++++--- src/views/forum/ForumView.vue | 12 ++++++++---- 6 files changed, 28 insertions(+), 10 deletions(-) create mode 100644 src/assets/style.css diff --git a/src/assets/style.css b/src/assets/style.css new file mode 100644 index 0000000..e1b1b5e --- /dev/null +++ b/src/assets/style.css @@ -0,0 +1,11 @@ +:root { + --primary-color: #0055ff; /* 亮色主题主色 */ + --background-color: #ffffff; /* 亮色背景 */ + --text-color: #333333; /* 亮色文字颜色 */ +} + +.dark-theme { + --primary-color: #0a65cc; /* 暗色主题主色 */ + --background-color: #1e1e1e; /* 暗色背景 */ + --text-color: #ffffff; /* 暗色文字颜色 */ +} diff --git a/src/components/GlobalHeader.vue b/src/components/GlobalHeader.vue index 9cde60a..2092a0a 100644 --- a/src/components/GlobalHeader.vue +++ b/src/components/GlobalHeader.vue @@ -1,5 +1,5 @@