This commit is contained in:
Vula Builder
2026-06-04 11:25:12 +00:00
parent dfc73d0c86
commit 73d791cece
+55
View File
@@ -0,0 +1,55 @@
'use client';
import { useState } from 'react';
import { Gavel, Menu, X } from 'lucide-react';
import Link from 'next/link';
export default function Navigation() {
const [isOpen, setIsOpen] = useState(false);
return (
<header className="sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
<style>{`html { scroll-behavior: smooth; }`}</style>
<div className="container mx-auto px-4 sm:px-6 lg:px-8">
<div className="flex h-16 items-center justify-between">
{/* Logo */}
<Link href="/" className="flex items-center gap-2 hover:opacity-90 transition-opacity">
<div className="w-8 h-8 rounded-lg bg-primary flex items-center justify-center text-primary-foreground flex-shrink-0">
<Gavel className="h-4 w-4" />
</div>
<span className="font-serif text-xl font-bold text-foreground">Mtungwa & Partners</span>
</Link>
{/* Desktop nav */}
<nav className="hidden md:flex items-center gap-6">
<Link key="Home" href="/" className="text-foreground/80 hover:text-primary transition-colors text-sm font-medium">Home</Link>
<a key="About" href="#about" className="text-foreground/80 hover:text-primary transition-colors text-sm font-medium">About</a>
<a key="Services" href="#services" className="text-foreground/80 hover:text-primary transition-colors text-sm font-medium">Services</a>
<a key="Gallery" href="#gallery" className="text-foreground/80 hover:text-primary transition-colors text-sm font-medium">Gallery</a>
<a key="Contact" href="#contact" className="text-foreground/80 hover:text-primary transition-colors text-sm font-medium">Contact</a>
</nav>
{/* Mobile toggle */}
<button
className="md:hidden p-2 rounded-md text-foreground hover:bg-muted transition-colors"
onClick={() => setIsOpen(!isOpen)}
aria-label="Toggle menu"
>
{isOpen ? <X className="h-6 w-6" /> : <Menu className="h-6 w-6" />}
</button>
</div>
{/* Mobile nav */}
{isOpen && (
<div className="md:hidden border-t py-4 space-y-1 px-2">
<Link key="Home" href="/" className="block px-3 py-2 rounded-lg text-foreground hover:bg-muted transition-colors" onClick={() => setIsOpen(false)}>Home</Link>
<a key="About" href="#about" className="block px-3 py-2 rounded-lg text-foreground hover:bg-muted transition-colors" onClick={() => setIsOpen(false)}>About</a>
<a key="Services" href="#services" className="block px-3 py-2 rounded-lg text-foreground hover:bg-muted transition-colors" onClick={() => setIsOpen(false)}>Services</a>
<a key="Gallery" href="#gallery" className="block px-3 py-2 rounded-lg text-foreground hover:bg-muted transition-colors" onClick={() => setIsOpen(false)}>Gallery</a>
<a key="Contact" href="#contact" className="block px-3 py-2 rounded-lg text-foreground hover:bg-muted transition-colors" onClick={() => setIsOpen(false)}>Contact</a>
</div>
)}
</div>
</header>
);
}