|
|
|
@ -6,13 +6,10 @@ import './styles/components/custom-block.css'
|
|
|
|
|
import './styles/components/vp-code.css'
|
|
|
|
|
import './styles/components/vp-doc.css'
|
|
|
|
|
import './styles/components/vp-sponsor.css'
|
|
|
|
|
import 'nprogress/nprogress.css'
|
|
|
|
|
import './styles/lib-override/nprogress.css'
|
|
|
|
|
|
|
|
|
|
import { Theme, inBrowser } from 'vitepress'
|
|
|
|
|
import { Theme } from 'vitepress'
|
|
|
|
|
import Layout from './Layout.vue'
|
|
|
|
|
import NotFound from './NotFound.vue'
|
|
|
|
|
import nprogress from 'nprogress'
|
|
|
|
|
|
|
|
|
|
export { default as VPHomeHero } from './components/VPHomeHero.vue'
|
|
|
|
|
export { default as VPHomeFeatures } from './components/VPHomeFeatures.vue'
|
|
|
|
@ -25,30 +22,7 @@ export { default as VPTeamMembers } from './components/VPTeamMembers.vue'
|
|
|
|
|
|
|
|
|
|
const theme: Theme = {
|
|
|
|
|
Layout,
|
|
|
|
|
NotFound,
|
|
|
|
|
enhanceApp: ({ router }) => {
|
|
|
|
|
if (inBrowser) {
|
|
|
|
|
let timeoutId: NodeJS.Timeout
|
|
|
|
|
let called = false
|
|
|
|
|
|
|
|
|
|
router.onBeforeRouteChange = () => {
|
|
|
|
|
timeoutId = setTimeout(() => {
|
|
|
|
|
nprogress.start()
|
|
|
|
|
called = true
|
|
|
|
|
}, 500)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
router.onAfterRouteChanged = () => {
|
|
|
|
|
if (timeoutId) {
|
|
|
|
|
clearTimeout(timeoutId)
|
|
|
|
|
}
|
|
|
|
|
if (called) {
|
|
|
|
|
nprogress.done(true)
|
|
|
|
|
called = false
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
NotFound
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export default theme
|
|
|
|
|