💄 美化侧边栏

This commit is contained in:
BTMuli
2023-06-21 10:27:11 +08:00
parent 49aa34457b
commit b54c7dc110
3 changed files with 11 additions and 19 deletions

View File

@@ -2,7 +2,7 @@
* @file assets themes light.css * @file assets themes light.css
* @description 主题样式文件 * @description 主题样式文件
* @author BTMuli <bt-muli@outlook.com> * @author BTMuli <bt-muli@outlook.com>
* @since Alpha v0.2.0 * @since Alpha v0.2.1
*/ */
/* 主题色 */ /* 主题色 */
@@ -16,8 +16,6 @@ html.dark {
--common-text-2: var(--common-color-white); /* text */ --common-text-2: var(--common-color-white); /* text */
--common-text-3: var(--common-color-grey); /* quote */ --common-text-3: var(--common-color-grey); /* quote */
--sidebar-bg: #1e1e1e;
--sidebar-icon: #e1e1e1;
--page-bg:#2a2a2a; --page-bg:#2a2a2a;
--scroll-bg: rgba(0, 0, 0, 0.5); --scroll-bg: rgba(0, 0, 0, 0.5);
--calendar-btn-bg: #1e1e1e; --calendar-btn-bg: #1e1e1e;

View File

@@ -2,7 +2,7 @@
* @file assets themes dark.css * @file assets themes dark.css
* @description 主题样式文件 * @description 主题样式文件
* @author BTMuli <bt-muli@outlook.com> * @author BTMuli <bt-muli@outlook.com>
* @since Alpha v0.2.0 * @since Alpha v0.2.1
*/ */
/* 主题色 */ /* 主题色 */
@@ -16,8 +16,6 @@ html.default {
--common-text-2: var(--common-color-blue-2); /* text */ --common-text-2: var(--common-color-blue-2); /* text */
--common-text-3: var(--common-color-blue-3); /* quote */ --common-text-3: var(--common-color-blue-3); /* quote */
--sidebar-bg: #485466;
--sidebar-icon: #ece5d8;
--page-bg:#ece5d8; --page-bg:#ece5d8;
--scroll-bg: rgba(0, 0, 0, 0.2); --scroll-bg: rgba(0, 0, 0, 0.2);
--calendar-btn-bg: #393b40; --calendar-btn-bg: #393b40;

View File

@@ -5,16 +5,12 @@
<v-list-item @click="collapse()"> <v-list-item @click="collapse()">
<template v-if="rail" #prepend> <template v-if="rail" #prepend>
<v-list-item-action> <v-list-item-action>
<v-icon style="color:var(--sidebar-icon)"> <v-icon>mdi-chevron-right</v-icon>
mdi-chevron-right
</v-icon>
</v-list-item-action> </v-list-item-action>
</template> </template>
<template v-else #append> <template v-else #append>
<v-list-item-action> <v-list-item-action>
<v-icon style="color:var(--sidebar-icon)"> <v-icon>mdi-chevron-left</v-icon>
mdi-chevron-left
</v-icon>
</v-list-item-action> </v-list-item-action>
</template> </template>
</v-list-item> </v-list-item>
@@ -108,10 +104,10 @@
</v-list-item-title> </v-list-item-title>
</template> </template>
</v-list-item> </v-list-item>
<v-list-item :title="themeTitle" value="theme" @click="switchTheme()"> <v-list-item :title="themeTitle" @click="switchTheme()">
<template #prepend> <template #prepend>
<v-icon style="color:var(--sidebar-icon)"> <v-icon>
{{ themeGet === 'default' ? 'mdi-weather-night' : 'mdi-weather-sunny' }} {{ themeGet === "default" ? "mdi-weather-night" : "mdi-weather-sunny" }}
</v-icon> </v-icon>
</template> </template>
</v-list-item> </v-list-item>
@@ -127,7 +123,7 @@
<script lang="ts" setup> <script lang="ts" setup>
// vue // vue
import { computed, ref, onMounted } from "vue"; import { computed, onMounted, ref } from "vue";
// tauri // tauri
import { event } from "@tauri-apps/api"; import { event } from "@tauri-apps/api";
// store // store
@@ -155,7 +151,7 @@ const themeGet = computed({
}, },
}); });
const themeTitle = computed(() => { const themeTitle = computed(() => {
return themeGet.value === "default" ? "切换为夜间模式" : "切换为日间模式"; return themeGet.value === "default" ? "夜间模式" : "日间模式";
}); });
const open = computed({ const open = computed({
@@ -199,8 +195,8 @@ async function switchTheme () {
} }
.side-list { .side-list {
font-family: Genshin-Light, serif; font-family: var(--font-title);
height: 100vh; height: 100%;
} }
.bottom-menu { .bottom-menu {