Files
DAO_DE_JING/.vitepress/theme/index.ts
T
dekun a8907d6cc0 Improve mobile reading layout and typography
Make classic text chapters easier to read on phones with responsive styles, collapsed sidebar groups, and less intrusive install prompts on doc pages.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-05 17:57:57 +08:00

20 lines
433 B
TypeScript

import DefaultTheme from 'vitepress/theme'
import { h } from 'vue'
import InstallApp from './InstallApp.vue'
import './custom.css'
if (typeof window !== 'undefined') {
import('virtual:pwa-register').then(({ registerSW }) => {
registerSW({ immediate: true })
})
}
export default {
extends: DefaultTheme,
Layout: () => {
return h(DefaultTheme.Layout, null, {
'layout-bottom': () => h(InstallApp),
})
},
}