docs: fix navigation menu example link

This commit is contained in:
warmthsea 2024-10-16 16:49:54 +08:00
parent a01a1bd94d
commit 27d2340d95
2 changed files with 19 additions and 18 deletions

View File

@ -12,36 +12,36 @@ import {
const components: { title: string, href: string, description: string }[] = [ const components: { title: string, href: string, description: string }[] = [
{ {
title: 'Alert Dialog', title: 'Alert Dialog',
href: '/docs/primitives/alert-dialog', href: '/docs/components/alert-dialog',
description: description:
'A modal dialog that interrupts the user with important content and expects a response.', 'A modal dialog that interrupts the user with important content and expects a response.',
}, },
{ {
title: 'Hover Card', title: 'Hover Card',
href: '/docs/primitives/hover-card', href: '/docs/components/hover-card',
description: description:
'For sighted users to preview content available behind a link.', 'For sighted users to preview content available behind a link.',
}, },
{ {
title: 'Progress', title: 'Progress',
href: '/docs/primitives/progress', href: '/docs/components/progress',
description: description:
'Displays an indicator showing the completion progress of a task, typically displayed as a progress bar.', 'Displays an indicator showing the completion progress of a task, typically displayed as a progress bar.',
}, },
{ {
title: 'Scroll-area', title: 'Scroll-area',
href: '/docs/primitives/scroll-area', href: '/docs/components/scroll-area',
description: 'Visually or semantically separates content.', description: 'Visually or semantically separates content.',
}, },
{ {
title: 'Tabs', title: 'Tabs',
href: '/docs/primitives/tabs', href: '/docs/components/tabs',
description: description:
'A set of layered sections of content—known as tab panels—that are displayed one at a time.', 'A set of layered sections of content—known as tab panels—that are displayed one at a time.',
}, },
{ {
title: 'Tooltip', title: 'Tooltip',
href: '/docs/primitives/tooltip', href: '/docs/components/tooltip',
description: description:
'A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.', 'A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.',
}, },
@ -76,7 +76,7 @@ const components: { title: string, href: string, description: string }[] = [
<li> <li>
<NavigationMenuLink as-child> <NavigationMenuLink as-child>
<a <a
href="/docs" href="/docs/introduction"
class="block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground" class="block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"
> >
<div class="text-sm font-medium leading-none">Introduction</div> <div class="text-sm font-medium leading-none">Introduction</div>
@ -102,7 +102,7 @@ const components: { title: string, href: string, description: string }[] = [
<li> <li>
<NavigationMenuLink as-child> <NavigationMenuLink as-child>
<a <a
href="/docs/primitives/typography" href="/docs/typography"
class="block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground" class="block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"
> >
<div class="text-sm font-medium leading-none">Typography</div> <div class="text-sm font-medium leading-none">Typography</div>
@ -136,7 +136,7 @@ const components: { title: string, href: string, description: string }[] = [
</NavigationMenuContent> </NavigationMenuContent>
</NavigationMenuItem> </NavigationMenuItem>
<NavigationMenuItem> <NavigationMenuItem>
<NavigationMenuLink href="/docs" :class="navigationMenuTriggerStyle()"> <NavigationMenuLink href="/docs/introduction" :class="navigationMenuTriggerStyle()">
Documentation Documentation
</NavigationMenuLink> </NavigationMenuLink>
</NavigationMenuItem> </NavigationMenuItem>

View File

@ -12,36 +12,36 @@ import {
const components: { title: string, href: string, description: string }[] = [ const components: { title: string, href: string, description: string }[] = [
{ {
title: 'Alert Dialog', title: 'Alert Dialog',
href: '/docs/primitives/alert-dialog', href: '/docs/components/alert-dialog',
description: description:
'A modal dialog that interrupts the user with important content and expects a response.', 'A modal dialog that interrupts the user with important content and expects a response.',
}, },
{ {
title: 'Hover Card', title: 'Hover Card',
href: '/docs/primitives/hover-card', href: '/docs/components/hover-card',
description: description:
'For sighted users to preview content available behind a link.', 'For sighted users to preview content available behind a link.',
}, },
{ {
title: 'Progress', title: 'Progress',
href: '/docs/primitives/progress', href: '/docs/components/progress',
description: description:
'Displays an indicator showing the completion progress of a task, typically displayed as a progress bar.', 'Displays an indicator showing the completion progress of a task, typically displayed as a progress bar.',
}, },
{ {
title: 'Scroll-area', title: 'Scroll-area',
href: '/docs/primitives/scroll-area', href: '/docs/components/scroll-area',
description: 'Visually or semantically separates content.', description: 'Visually or semantically separates content.',
}, },
{ {
title: 'Tabs', title: 'Tabs',
href: '/docs/primitives/tabs', href: '/docs/components/tabs',
description: description:
'A set of layered sections of content—known as tab panels—that are displayed one at a time.', 'A set of layered sections of content—known as tab panels—that are displayed one at a time.',
}, },
{ {
title: 'Tooltip', title: 'Tooltip',
href: '/docs/primitives/tooltip', href: '/docs/components/tooltip',
description: description:
'A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.', 'A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.',
}, },
@ -72,10 +72,11 @@ const components: { title: string, href: string, description: string }[] = [
</a> </a>
</NavigationMenuLink> </NavigationMenuLink>
</li> </li>
<li> <li>
<NavigationMenuLink as-child> <NavigationMenuLink as-child>
<a <a
href="/docs" href="/docs/introduction"
class="block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground" class="block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"
> >
<div class="text-sm font-medium leading-none">Introduction</div> <div class="text-sm font-medium leading-none">Introduction</div>
@ -101,7 +102,7 @@ const components: { title: string, href: string, description: string }[] = [
<li> <li>
<NavigationMenuLink as-child> <NavigationMenuLink as-child>
<a <a
href="/docs/primitives/typography" href="/docs/typography"
class="block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground" class="block select-none space-y-1 rounded-md p-3 leading-none no-underline outline-none transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground"
> >
<div class="text-sm font-medium leading-none">Typography</div> <div class="text-sm font-medium leading-none">Typography</div>
@ -135,7 +136,7 @@ const components: { title: string, href: string, description: string }[] = [
</NavigationMenuContent> </NavigationMenuContent>
</NavigationMenuItem> </NavigationMenuItem>
<NavigationMenuItem> <NavigationMenuItem>
<NavigationMenuLink href="/docs" :class="navigationMenuTriggerStyle()"> <NavigationMenuLink href="/docs/introduction" :class="navigationMenuTriggerStyle()">
Documentation Documentation
</NavigationMenuLink> </NavigationMenuLink>
</NavigationMenuItem> </NavigationMenuItem>