mirror of
https://github.com/EyeTrackVR/EyeTrackVR-Docs.git
synced 2025-11-04 14:49:44 +08:00
21 lines
624 B
TypeScript
21 lines
624 B
TypeScript
//https://vitepress.vuejs.org/guide/theme-introduction#customizing-css
|
|
import { ThemeSettings } from '../../src/custom/theme'
|
|
import { inBrowser, useData } from 'vitepress'
|
|
import DefaultTheme from 'vitepress/theme'
|
|
import '../../src/styles/imports.css'
|
|
import { watchEffect } from 'vue'
|
|
|
|
const CustomTheme = {
|
|
...DefaultTheme,
|
|
setup() {
|
|
const { lang } = useData()
|
|
watchEffect(() => {
|
|
if (inBrowser) {
|
|
document.cookie = `nf_lang=${lang.value}; expires=Mon, 1 Jan 2024 00:00:00 UTC; path=/`
|
|
}
|
|
})
|
|
},
|
|
...ThemeSettings
|
|
}
|
|
|
|
export default CustomTheme |