Skip to content

Commit c1cb8ed

Browse files
committed
Enhance Navbar component by conditionally rendering the note link with improved styling and animations when on /bar/* path
1 parent a3fe691 commit c1cb8ed

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

components/layout/navbar.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,17 @@ export function Navbar() {
2727
<span className="text-xs">Home</span>
2828
</Link>
2929
{/* Add Note (only show on /bar/*) */}
30-
31-
<Link href="/note" className={cn(
32-
pathname.startsWith('/bar/') ? "bg-gray-500" : "bg-gray-900",
33-
"flex flex-col items-center justify-center p-3 shadow-lg transition-all",
34-
pathname === "/note" ? "scale-110" : ""
35-
)}>
36-
<Plus className="h-7 w-7" />
37-
</Link>
30+
{pathname.startsWith('/bar/') && (
31+
<Link
32+
href="/note"
33+
className={cn(
34+
"flex flex-col items-center justify-center -mt-[60px] rounded-full p-3 shadow-xl border-4 bg-gradient-to-tr from-theme-pink via-theme-purple to-theme-light-pink text-white transition-all duration-200 hover:scale-110 active:scale-95",
35+
pathname === "/note" ? "ring-4 ring-theme-pink scale-110" : ""
36+
)}
37+
>
38+
<Plus className="h-7 w-7" />
39+
</Link>
40+
)}
3841

3942
{/* Me */}
4043
<Link href="/me" className={cn(

0 commit comments

Comments
 (0)