Files
2026-03-19 10:41:35 +01:00

106 lines
2.5 KiB
TypeScript

export function useHeader() {
const route = useRoute()
const desktopLinks = computed(() => [{
label: 'Docs',
to: '/docs',
active: route.path.startsWith('/docs/')
}, {
label: 'Templates',
to: '/templates'
}, {
label: 'Resources',
active: route.path.startsWith('/showcase') || route.path.startsWith('/community') || route.path.startsWith('/blog'),
children: [{
label: 'Showcase',
description: 'Discover websites built with Nuxt UI.',
icon: 'i-lucide-presentation',
to: '/showcase'
}, {
label: 'Community',
description: 'Explore projects built around Nuxt UI.',
icon: 'i-lucide-globe',
to: '/community'
}, {
label: 'Playground',
description: 'Try Nuxt UI components live in your browser.',
icon: 'i-lucide-square-terminal',
to: '/play',
target: '_blank'
}, {
label: 'Blog',
description: 'Read the latest news and updates.',
icon: 'i-lucide-newspaper',
to: '/blog'
}]
}, {
label: 'Figma',
to: '/figma'
}, {
label: 'Releases',
to: '/releases'
}])
const mobileLinks = computed(() => [{
label: 'Get Started',
icon: 'i-lucide-square-play',
to: '/docs/getting-started',
active: route.path.startsWith('/docs/getting-started')
}, {
label: 'Components',
icon: 'i-lucide-square-code',
to: '/docs/components',
active: route.path.startsWith('/docs/components')
}, {
label: 'Composables',
icon: 'i-lucide-square-function',
to: '/docs/composables',
active: route.path.startsWith('/docs/composables')
}, {
label: 'Typography',
icon: 'i-lucide-square-pilcrow',
to: '/docs/typography',
active: route.path.startsWith('/docs/typography')
}, {
label: 'Templates',
icon: 'i-lucide-panels-top-left',
to: '/templates'
}, {
label: 'Showcase',
icon: 'i-lucide-presentation',
to: '/showcase'
}, {
label: 'Community',
icon: 'i-lucide-globe',
to: '/community'
}, {
label: 'Playground',
icon: 'i-lucide-square-terminal',
to: '/play',
target: '_blank'
}, {
label: 'Blog',
icon: 'i-lucide-newspaper',
to: '/blog',
active: route.path.startsWith('/blog')
}, {
label: 'Figma',
icon: 'i-simple-icons-figma',
to: '/figma'
}, {
label: 'Releases',
icon: 'i-lucide-rocket',
to: '/releases'
}, {
label: 'GitHub',
to: 'https://github.com/nuxt/ui',
icon: 'i-simple-icons-github',
target: '_blank'
}])
return {
desktopLinks,
mobileLinks
}
}