mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-02-02 13:17:57 +01:00
docs: consistent app.vue and error.vue
This commit is contained in:
@@ -51,7 +51,7 @@ const navigation = computed(() => {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
return nav.value.filter(item => item._path !== '/dev')
|
return nav.value?.filter(item => item._path !== '/dev') || []
|
||||||
})
|
})
|
||||||
|
|
||||||
const color = computed(() => colorMode.value === 'dark' ? '#18181b' : 'white')
|
const color = computed(() => colorMode.value === 'dark' ? '#18181b' : 'white')
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
<!-- eslint-disable vue/no-v-html -->
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<NuxtLoadingIndicator />
|
<NuxtLoadingIndicator />
|
||||||
@@ -12,11 +13,18 @@
|
|||||||
</UMain>
|
</UMain>
|
||||||
</UContainer>
|
</UContainer>
|
||||||
|
|
||||||
|
<Footer />
|
||||||
|
|
||||||
<ClientOnly>
|
<ClientOnly>
|
||||||
<LazyUDocsSearch :files="files" :navigation="navigation" :links="links" :fuse="{ resultLimit: 1000 }" />
|
<LazyUDocsSearch :files="files" :navigation="navigation" :links="links" :fuse="{ resultLimit: 1000 }" />
|
||||||
</ClientOnly>
|
</ClientOnly>
|
||||||
|
|
||||||
<UNotifications />
|
<UNotifications>
|
||||||
|
<template #title="{ title }">
|
||||||
|
<span v-html="title" />
|
||||||
|
</template>
|
||||||
|
</UNotifications>
|
||||||
|
<UModals />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -34,6 +42,7 @@ defineProps<{
|
|||||||
}>()
|
}>()
|
||||||
|
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
|
const colorMode = useColorMode()
|
||||||
const { branch } = useContentSource()
|
const { branch } = useContentSource()
|
||||||
|
|
||||||
const { data: nav } = await useAsyncData('navigation', () => fetchContentNavigation())
|
const { data: nav } = await useAsyncData('navigation', () => fetchContentNavigation())
|
||||||
@@ -52,9 +61,11 @@ const navigation = computed(() => {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
return nav.value.filter(item => item._path !== '/dev')
|
return nav.value?.filter(item => item._path !== '/dev') || []
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const color = computed(() => colorMode.value === 'dark' ? '#18181b' : 'white')
|
||||||
|
|
||||||
const links = computed(() => {
|
const links = computed(() => {
|
||||||
return [{
|
return [{
|
||||||
label: 'Docs',
|
label: 'Docs',
|
||||||
@@ -65,7 +76,7 @@ const links = computed(() => {
|
|||||||
label: 'Pro',
|
label: 'Pro',
|
||||||
icon: 'i-heroicons-square-3-stack-3d',
|
icon: 'i-heroicons-square-3-stack-3d',
|
||||||
to: '/pro',
|
to: '/pro',
|
||||||
active: route.path.startsWith('/pro/getting-started') || route.path.startsWith('/pro/components')
|
active: route.path.startsWith('/pro/getting-started') || route.path.startsWith('/pro/components') || route.path.startsWith('/pro/prose')
|
||||||
}, {
|
}, {
|
||||||
label: 'Pricing',
|
label: 'Pricing',
|
||||||
icon: 'i-heroicons-credit-card',
|
icon: 'i-heroicons-credit-card',
|
||||||
@@ -81,6 +92,21 @@ const links = computed(() => {
|
|||||||
}].filter(Boolean)
|
}].filter(Boolean)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// Head
|
||||||
|
|
||||||
|
useHead({
|
||||||
|
meta: [
|
||||||
|
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
|
||||||
|
{ key: 'theme-color', name: 'theme-color', content: color }
|
||||||
|
],
|
||||||
|
link: [
|
||||||
|
{ rel: 'icon', type: 'image/svg+xml', href: '/icon.svg' }
|
||||||
|
],
|
||||||
|
htmlAttrs: {
|
||||||
|
lang: 'en'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
// Provide
|
// Provide
|
||||||
|
|
||||||
provide('navigation', navigation)
|
provide('navigation', navigation)
|
||||||
|
|||||||
Reference in New Issue
Block a user