refactor: use @nuxtjs/color-mode
to manage ssr (#612)
This commit is contained in:
parent
6fdcc558fc
commit
7a36fb8efd
14 changed files with 43 additions and 215 deletions
10
plugins/color-mode.ts
Normal file
10
plugins/color-mode.ts
Normal file
|
@ -0,0 +1,10 @@
|
|||
export default defineNuxtPlugin(() => {
|
||||
const colorMode = useColorMode()
|
||||
useHead({
|
||||
meta: [{
|
||||
id: 'theme-color',
|
||||
name: 'theme-color',
|
||||
content: () => colorMode.value === 'dark' ? '#111111' : '#ffffff',
|
||||
}],
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue