You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
1.0 KiB
TypeScript
33 lines
1.0 KiB
TypeScript
import { type Router, inBrowser, useData } from 'vitepress'
|
|
import { type App, watch, defineComponent, watchEffect } from 'vue'
|
|
import { createZoom } from './composables/zoom'
|
|
import { enhanceAppWithTabs } from "vitepress-plugin-tabs/client"
|
|
import analytics from "./plugins/analytics"
|
|
import DefaultTheme from 'vitepress/theme-without-fonts'
|
|
import Layout from './components/Layout.vue'
|
|
import './styles/global.css'
|
|
import './styles/glightbox.css'
|
|
import 'uno.css'
|
|
|
|
export default {
|
|
extends: DefaultTheme,
|
|
Layout: Layout,
|
|
|
|
setup() {
|
|
const { lang } = useData()
|
|
watchEffect(() => {
|
|
if (inBrowser) {
|
|
document.cookie = `nf_lang=${lang.value}; expires=Mon, 1 Jan 2024 00:00:00 UTC; path=/`
|
|
if (document.location = "https://kotatsu.app/manga/") {
|
|
document.location = `kotatsu://manga?${window.location.toString().split("manga/?").pop()}`
|
|
}
|
|
}
|
|
})
|
|
},
|
|
|
|
enhanceApp({ app, router }: { app: App, router: Router }) {
|
|
enhanceAppWithTabs(app)
|
|
createZoom(app, router)
|
|
analytics({ id: "G-X37JGMJE4R" })
|
|
},
|
|
} |