mirror of
https://github.com/Lumither/nocturne.git
synced 2026-10-17 18:36:21 +00:00
feat(Navbar) update navbar
This commit is contained in:
1 parent
048ce82b2b
commit
a6e7a71d42
2 files changed
+20
-16
No files matched your search
+17
-16
@@ -5,13 +5,16 @@ import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
|
||||
import { NavigationMenu, NavigationMenuItem, NavigationMenuList } from '@/components/ui/navigation-menu';
|
||||
import Link from 'next/link';
|
||||
|
||||
const components: { title: string; href: string; description: string }[] = [
|
||||
const entries: { display_name: string; href: string; }[] = [
|
||||
{
|
||||
title: 'title of subpage',
|
||||
href: 'url',
|
||||
description:
|
||||
'a description'
|
||||
display_name: 'About',
|
||||
href: '/about'
|
||||
},
|
||||
{
|
||||
display_name: 'Archive',
|
||||
href: 'archive'
|
||||
}
|
||||
|
||||
];
|
||||
export default function Navbar() {
|
||||
const [ scrolled, setScrolled ] = useState(false);
|
||||
@@ -54,17 +57,15 @@ export default function Navbar() {
|
||||
|
||||
<div></div>
|
||||
|
||||
<NavigationMenuItem>
|
||||
<Link href={ '/about' }>
|
||||
<p className={ 'transition-all duration-300 hover:text-resolution-blue-400' }>{ 'About' }</p>
|
||||
</Link>
|
||||
</NavigationMenuItem>
|
||||
|
||||
<NavigationMenuItem>
|
||||
<Link href={ '/archives' }>
|
||||
<p className={ 'transition-all duration-300 hover:text-resolution-blue-400' }>{ 'Archives' }</p>
|
||||
</Link>
|
||||
</NavigationMenuItem>
|
||||
{
|
||||
entries.map((entry, id) => (
|
||||
<NavigationMenuItem key={ id }>
|
||||
<Link href={ entry.href }>
|
||||
<p className={ 'transition-all duration-300 hover:text-resolution-blue-400' }>{ entry.display_name }</p>
|
||||
</Link>
|
||||
</NavigationMenuItem>
|
||||
))
|
||||
}
|
||||
|
||||
</NavigationMenuList>
|
||||
</NavigationMenu>
|
||||
|
||||
Reference in new issue
Block a user