mirror of
https://github.com/Lumither/nocturne.git
synced 2026-10-17 10:26: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
@@ -0,0 +1,3 @@
|
|||||||
|
export default function Archives() {
|
||||||
|
return <></>;
|
||||||
|
}
|
||||||
+17
-16
@@ -5,13 +5,16 @@ import { Avatar, AvatarFallback, AvatarImage } from '@/components/ui/avatar';
|
|||||||
import { NavigationMenu, NavigationMenuItem, NavigationMenuList } from '@/components/ui/navigation-menu';
|
import { NavigationMenu, NavigationMenuItem, NavigationMenuList } from '@/components/ui/navigation-menu';
|
||||||
import Link from 'next/link';
|
import Link from 'next/link';
|
||||||
|
|
||||||
const components: { title: string; href: string; description: string }[] = [
|
const entries: { display_name: string; href: string; }[] = [
|
||||||
{
|
{
|
||||||
title: 'title of subpage',
|
display_name: 'About',
|
||||||
href: 'url',
|
href: '/about'
|
||||||
description:
|
},
|
||||||
'a description'
|
{
|
||||||
|
display_name: 'Archive',
|
||||||
|
href: 'archive'
|
||||||
}
|
}
|
||||||
|
|
||||||
];
|
];
|
||||||
export default function Navbar() {
|
export default function Navbar() {
|
||||||
const [ scrolled, setScrolled ] = useState(false);
|
const [ scrolled, setScrolled ] = useState(false);
|
||||||
@@ -54,17 +57,15 @@ export default function Navbar() {
|
|||||||
|
|
||||||
<div></div>
|
<div></div>
|
||||||
|
|
||||||
<NavigationMenuItem>
|
{
|
||||||
<Link href={ '/about' }>
|
entries.map((entry, id) => (
|
||||||
<p className={ 'transition-all duration-300 hover:text-resolution-blue-400' }>{ 'About' }</p>
|
<NavigationMenuItem key={ id }>
|
||||||
</Link>
|
<Link href={ entry.href }>
|
||||||
</NavigationMenuItem>
|
<p className={ 'transition-all duration-300 hover:text-resolution-blue-400' }>{ entry.display_name }</p>
|
||||||
|
</Link>
|
||||||
<NavigationMenuItem>
|
</NavigationMenuItem>
|
||||||
<Link href={ '/archives' }>
|
))
|
||||||
<p className={ 'transition-all duration-300 hover:text-resolution-blue-400' }>{ 'Archives' }</p>
|
}
|
||||||
</Link>
|
|
||||||
</NavigationMenuItem>
|
|
||||||
|
|
||||||
</NavigationMenuList>
|
</NavigationMenuList>
|
||||||
</NavigationMenu>
|
</NavigationMenu>
|
||||||
|
|||||||
Reference in new issue
Block a user