feat(Navbar) update navbar

This commit is contained in:
lumither committed 2024-03-16 02:19:01 +08:00
1 parent 149b5fa7fe
commit 048ce82b2b
3 files changed
+25 -6

No files matched your search

+1 -1
View File
@@ -36,7 +36,7 @@ yarn-error.log*
next-env.d.ts
# bun
./bun.lockb
/bun.lockb
# ide related
.idea
+1
View File
@@ -38,6 +38,7 @@
.dark {
--background: radial-gradient(circle at center bottom, rgb(2, 35, 96) 0%, rgb(14, 26, 91) 25%, rgba(2, 0, 36, 1) 61%);
background: var(--background);
background-attachment: fixed;
--foreground: 210 40% 98%;
+23 -5
View File
@@ -3,6 +3,7 @@
import { useEffect, useState } from 'react';
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 }[] = [
{
@@ -32,12 +33,13 @@ export default function Navbar() {
<div
className={ `flex flex-row fixed top-0 z-10 transition-all duration-300 backdrop-blur
${ scrolled ? 'rounded-3xl w-[95%] ml-[2.5%] mr-[2.5%] mt-[1%] border-resolution-blue-200 border'
: 'w-full border-slate-200/15 border-b shadow h-' }` }>
: 'w-full border-slate-200/15 border-b shadow' }` }>
<div className={ `transition-all duration-300 ${ scrolled ? 'w-0' : 'w-[5%]' }` }></div>
<NavigationMenu>
<NavigationMenuList>
<NavigationMenu className={ `transition-all duration-300 ${ scrolled ? '' : 'my-5' }` }>
<NavigationMenuList
className={ `flex space-x-4 transition-all duration-500 ${ scrolled ? 'space-x-3' : '' }` }>
<NavigationMenuItem>
<Avatar>
<Avatar className={ 'transition-all duration-300 hover:scale-125' }>
<AvatarImage src={ 'https://avatars.githubusercontent.com/u/46409277' } />
<AvatarFallback>Tao</AvatarFallback>
</Avatar>
@@ -45,7 +47,23 @@ export default function Navbar() {
</NavigationMenuItem>
<NavigationMenuItem>
<p className={ 'text-xl' }>{"Lumither\'s Blog"}</p>
<Link href={ '/' }>
<p className={ 'text-xl transition-all duration-300 hover:text-resolution-blue-400' }>{ 'Lumither\'s Blog' }</p>
</Link>
</NavigationMenuItem>
<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>
</NavigationMenuList>