Deploy
This commit is contained in:
@@ -0,0 +1,67 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import { useState, useEffect } from 'react';
|
||||||
|
import { Menu, Scissors, X } from 'lucide-react';
|
||||||
|
import Link from 'next/link';
|
||||||
|
import { cn } from '@/lib/utils';
|
||||||
|
|
||||||
|
export default function Navigation() {
|
||||||
|
const [isOpen, setIsOpen] = useState(false);
|
||||||
|
const [scrolled, setScrolled] = useState(false);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const onScroll = () => setScrolled(window.scrollY > 80);
|
||||||
|
window.addEventListener('scroll', onScroll, { passive: true });
|
||||||
|
return () => window.removeEventListener('scroll', onScroll);
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className="fixed top-4 left-0 right-0 z-50 flex justify-center px-4">
|
||||||
|
<style>{`html { scroll-behavior: smooth; }`}</style>
|
||||||
|
<header className={cn("flex items-center gap-6 px-6 py-3 rounded-full backdrop-blur-md border shadow-lg transition-all duration-300", scrolled ? "bg-white/90 border-border" : "bg-background/10 border-white/20")}>
|
||||||
|
{/* Logo */}
|
||||||
|
<Link href="/" className="flex items-center gap-2 hover:opacity-90 transition-opacity">
|
||||||
|
<div className="w-7 h-7 rounded-lg bg-primary flex items-center justify-center text-primary-foreground flex-shrink-0">
|
||||||
|
<Scissors className="h-4 w-4" />
|
||||||
|
</div>
|
||||||
|
<span className={cn("font-serif text-base font-bold transition-colors", scrolled ? "text-foreground" : "text-white")}>Zama Salon</span>
|
||||||
|
</Link>
|
||||||
|
|
||||||
|
{/* Desktop nav */}
|
||||||
|
<nav className="hidden md:flex items-center gap-5">
|
||||||
|
<Link href="/" className={cn("transition-colors text-sm font-medium", scrolled ? "text-foreground/70 hover:text-foreground" : "text-white/80 hover:text-white")}>Home</Link>
|
||||||
|
<a href="#salon-story" className={cn("transition-colors text-sm font-medium", scrolled ? "text-foreground/70 hover:text-foreground" : "text-white/80 hover:text-white")}>About</a>
|
||||||
|
<a href="#current-offers" className={cn("transition-colors text-sm font-medium", scrolled ? "text-foreground/70 hover:text-foreground" : "text-white/80 hover:text-white")}>Offers</a>
|
||||||
|
<a href="#salon-gallery" className={cn("transition-colors text-sm font-medium", scrolled ? "text-foreground/70 hover:text-foreground" : "text-white/80 hover:text-white")}>Gallery</a>
|
||||||
|
<a href="#salon-insights" className={cn("transition-colors text-sm font-medium", scrolled ? "text-foreground/70 hover:text-foreground" : "text-white/80 hover:text-white")}>Blog</a>
|
||||||
|
<a href="#location-contact" className={cn("transition-colors text-sm font-medium", scrolled ? "text-foreground/70 hover:text-foreground" : "text-white/80 hover:text-white")}>Contact</a>
|
||||||
|
<Link href="/services" className="bg-primary text-primary-foreground px-3 py-1.5 rounded-full hover:bg-primary/90 transition-colors text-sm font-medium">Services</Link>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
{/* Mobile toggle */}
|
||||||
|
<button
|
||||||
|
className={cn("md:hidden p-1.5 rounded-full transition-colors", scrolled ? "text-foreground hover:bg-muted" : "text-white hover:bg-white/10")}
|
||||||
|
onClick={() => setIsOpen(!isOpen)}
|
||||||
|
aria-label="Toggle menu"
|
||||||
|
>
|
||||||
|
{isOpen ? <X className="h-5 w-5" /> : <Menu className="h-5 w-5" />}
|
||||||
|
</button>
|
||||||
|
</header>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{/* Mobile nav */}
|
||||||
|
{isOpen && (
|
||||||
|
<div className="fixed top-[72px] left-4 right-4 z-50 rounded-2xl bg-background/95 backdrop-blur border border-border shadow-lg py-3 md:hidden">
|
||||||
|
<Link href="/" className="block px-3 py-2 rounded-lg text-foreground hover:bg-muted transition-colors" onClick={() => setIsOpen(false)}>Home</Link>
|
||||||
|
<a href="#salon-story" className="block px-3 py-2 rounded-lg text-foreground hover:bg-muted transition-colors" onClick={() => setIsOpen(false)}>About</a>
|
||||||
|
<a href="#current-offers" className="block px-3 py-2 rounded-lg text-foreground hover:bg-muted transition-colors" onClick={() => setIsOpen(false)}>Offers</a>
|
||||||
|
<a href="#salon-gallery" className="block px-3 py-2 rounded-lg text-foreground hover:bg-muted transition-colors" onClick={() => setIsOpen(false)}>Gallery</a>
|
||||||
|
<a href="#salon-insights" className="block px-3 py-2 rounded-lg text-foreground hover:bg-muted transition-colors" onClick={() => setIsOpen(false)}>Blog</a>
|
||||||
|
<a href="#location-contact" className="block px-3 py-2 rounded-lg text-foreground hover:bg-muted transition-colors" onClick={() => setIsOpen(false)}>Contact</a>
|
||||||
|
<Link href="/services" className="block px-3 py-2 rounded-lg bg-primary text-primary-foreground font-medium" onClick={() => setIsOpen(false)}>Services</Link>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user