diff --git a/docs/app.vue b/docs/app.vue index bdb7512c..f4c7e6eb 100644 --- a/docs/app.vue +++ b/docs/app.vue @@ -3,7 +3,7 @@
- +
@@ -36,35 +36,20 @@ const searchRef = ref() const route = useRoute() const colorMode = useColorMode() -const { branch } = useContentSource() -const { data: nav } = await useAsyncData('navigation', () => fetchContentNavigation()) +const { data: navigation } = await useAsyncData('navigation', () => fetchContentNavigation()) const { data: files } = useLazyFetch('/api/search.json', { default: () => [], server: false }) // Computed -const navigation = computed(() => { - if (branch.value?.name === 'dev') { - const dev = nav.value.find(item => item._path === '/dev')?.children - const pro = nav.value.find(item => item._path === '/pro') - - return [ - ...dev, - ...(pro ? [pro] : []) - ] - } - - return nav.value?.filter(item => item._path !== '/dev') || [] -}) - const color = computed(() => colorMode.value === 'dark' ? '#18181b' : 'white') const links = computed(() => { return [{ label: 'Docs', icon: 'i-heroicons-book-open', - to: branch.value?.name === 'dev' ? '/dev/getting-started' : '/getting-started', - active: branch.value?.name === 'dev' ? (route.path.startsWith('/dev/getting-started') || route.path.startsWith('/dev/components')) : (route.path.startsWith('/getting-started') || route.path.startsWith('/components')) + to: '/getting-started', + active: route.path.startsWith('/getting-started') || route.path.startsWith('/components') }, ...(navigation.value.find(item => item._path === '/pro') ? [{ label: 'Pro', icon: 'i-heroicons-square-3-stack-3d', diff --git a/docs/components/Banner.vue b/docs/components/Banner.vue index 86f08327..e26ec930 100644 --- a/docs/components/Banner.vue +++ b/docs/components/Banner.vue @@ -8,7 +8,7 @@ const hideBanner = () => { document.querySelector('html')?.classList.add('hide-banner') } -if (process.server) { +if (import.meta.server) { useHead({ script: [{ key: 'prehydrate-template-banner', @@ -32,7 +32,7 @@ if (process.server) {