refactor: migrate to nuxt compatibilityVersion: 4 (#3298)
This commit is contained in:
parent
46e4433e1c
commit
a3fbc056a9
342 changed files with 1200 additions and 2932 deletions
12
app/plugins/color-mode.ts
Normal file
12
app/plugins/color-mode.ts
Normal file
|
@ -0,0 +1,12 @@
|
|||
import { THEME_COLORS } from '~/constants'
|
||||
|
||||
export default defineNuxtPlugin(() => {
|
||||
const colorMode = useColorMode()
|
||||
useHead({
|
||||
meta: [{
|
||||
id: 'theme-color',
|
||||
name: 'theme-color',
|
||||
content: () => colorMode.value === 'dark' ? THEME_COLORS.themeDark : THEME_COLORS.themeLight,
|
||||
}],
|
||||
})
|
||||
})
|
Loading…
Add table
Add a link
Reference in a new issue