1
0
Fork 1
mirror of https://github.com/elk-zone/elk.git synced 2024-11-15 05:19:58 +00:00
elk/plugins/color-mode.ts

13 lines
312 B
TypeScript
Raw Permalink Normal View History

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