diff --git a/components/layout/Footer.vue b/components/layout/Footer.vue
index 1b7971a..4f63e8e 100644
--- a/components/layout/Footer.vue
+++ b/components/layout/Footer.vue
@@ -12,11 +12,11 @@ const psBeian = config.public.psBeian
© {{ new Date().getFullYear() }} {{ siteConfig.siteName }}
·
- {{ icp }}
+ {{ icp }}
·
-
+
川公网安备{{ psBeian }}号
diff --git a/components/layout/StarField.client.vue b/components/layout/StarField.client.vue
new file mode 100644
index 0000000..a7e4033
--- /dev/null
+++ b/components/layout/StarField.client.vue
@@ -0,0 +1,151 @@
+
+
+
+
+
diff --git a/components/layout/ThemeToggle.vue b/components/layout/ThemeToggle.vue
index 479c12e..9a7a717 100644
--- a/components/layout/ThemeToggle.vue
+++ b/components/layout/ThemeToggle.vue
@@ -2,29 +2,33 @@
import { Icon } from '@iconify/vue'
const colorMode = useColorMode()
-
-const modes = ['light', 'dark', 'system'] as const
-type Mode = typeof modes[number]
+type Mode = 'system' | 'dark' | 'light'
const iconMap: Record = {
- light: 'mdi:weather-sunny',
- dark: 'mdi:weather-night',
system: 'mdi:monitor',
+ dark: 'mdi:weather-night',
+ light: 'mdi:weather-sunny',
}
const labelMap: Record = {
- light: '浅色模式',
- dark: '深色模式',
system: '跟随系统',
+ dark: '深色模式',
+ light: '浅色模式',
}
+const cycleOrder = computed(() => {
+ const isDark = colorMode.value === 'dark'
+ return isDark ? ['system', 'light', 'dark'] : ['system', 'dark', 'light']
+})
+
const currentMode = computed(() => colorMode.preference as Mode)
const currentIcon = computed(() => iconMap[currentMode.value] || iconMap.system)
const currentLabel = computed(() => labelMap[currentMode.value] || labelMap.system)
function cycle() {
- const idx = modes.indexOf(currentMode.value)
- colorMode.preference = modes[(idx + 1) % modes.length]
+ const order = cycleOrder.value
+ const idx = order.indexOf(currentMode.value)
+ colorMode.preference = order[(idx + 1) % order.length]
}
diff --git a/config/site.ts.example b/config/site.ts.example
index f4a80f0..97f2874 100644
--- a/config/site.ts.example
+++ b/config/site.ts.example
@@ -48,8 +48,4 @@ export const siteConfig = {
repoId: '',
category: 'Announcements',
categoryId: '',
- },
-
- // ICP 备案号(留空则不显示)
- icp: '',
-}
+ },}
diff --git a/layouts/default.vue b/layouts/default.vue
index 10d14c9..965b9ce 100644
--- a/layouts/default.vue
+++ b/layouts/default.vue
@@ -24,9 +24,10 @@ useSeoMeta({
-