1
0
mirror of https://github.com/elk-zone/elk synced 2024-11-30 15:58:06 +09:00
elk/plugins/color-mode.ts
2024-03-07 19:15:35 +00:00

13 lines
312 B
TypeScript

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,
}],
})
})