2025-11-07 11:35:05 +01:00
|
|
|
'use client';
|
|
|
|
|
|
|
|
|
|
import Link from 'next/link';
|
|
|
|
|
import { usePathname } from 'next/navigation';
|
|
|
|
|
import { ThemeToggle } from './ThemeToggle';
|
|
|
|
|
import { cn } from '@/lib/utils/cn';
|
|
|
|
|
import { Palette } from 'lucide-react';
|
|
|
|
|
|
|
|
|
|
const navigation = [
|
|
|
|
|
{ name: 'Home', href: '/' },
|
|
|
|
|
{ name: 'Playground', href: '/playground' },
|
|
|
|
|
{ name: 'Palettes', href: '/palettes' },
|
|
|
|
|
{ name: 'Accessibility', href: '/accessibility' },
|
|
|
|
|
{ name: 'Named Colors', href: '/names' },
|
|
|
|
|
{ name: 'Batch', href: '/batch' },
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
export function Navbar() {
|
|
|
|
|
const pathname = usePathname();
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<nav className="sticky top-0 z-50 w-full border-b bg-background/95 backdrop-blur supports-[backdrop-filter]:bg-background/60">
|
2025-11-07 16:20:59 +01:00
|
|
|
<div className="max-w-7xl mx-auto px-8">
|
2025-11-07 11:35:05 +01:00
|
|
|
<div className="flex h-16 items-center justify-between">
|
|
|
|
|
{/* Logo */}
|
|
|
|
|
<Link href="/" className="flex items-center space-x-2 font-bold text-xl">
|
|
|
|
|
<Palette className="h-6 w-6 text-primary" />
|
|
|
|
|
<span className="bg-gradient-to-r from-pink-500 via-purple-500 to-blue-500 bg-clip-text text-transparent">
|
|
|
|
|
Pastel UI
|
|
|
|
|
</span>
|
|
|
|
|
</Link>
|
|
|
|
|
|
|
|
|
|
{/* Desktop Navigation */}
|
|
|
|
|
<div className="hidden md:flex items-center space-x-1">
|
|
|
|
|
{navigation.map((item) => (
|
|
|
|
|
<Link
|
|
|
|
|
key={item.href}
|
|
|
|
|
href={item.href}
|
|
|
|
|
className={cn(
|
|
|
|
|
'px-3 py-2 rounded-md text-sm font-medium transition-colors',
|
|
|
|
|
pathname === item.href
|
|
|
|
|
? 'bg-accent text-accent-foreground'
|
|
|
|
|
: 'text-muted-foreground hover:bg-accent hover:text-accent-foreground'
|
|
|
|
|
)}
|
|
|
|
|
>
|
|
|
|
|
{item.name}
|
|
|
|
|
</Link>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/* Right side */}
|
|
|
|
|
<div className="flex items-center space-x-2">
|
|
|
|
|
<ThemeToggle />
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{/* Mobile Navigation */}
|
|
|
|
|
<div className="md:hidden pb-3 space-y-1">
|
|
|
|
|
{navigation.map((item) => (
|
|
|
|
|
<Link
|
|
|
|
|
key={item.href}
|
|
|
|
|
href={item.href}
|
|
|
|
|
className={cn(
|
|
|
|
|
'block px-3 py-2 rounded-md text-sm font-medium transition-colors',
|
|
|
|
|
pathname === item.href
|
|
|
|
|
? 'bg-accent text-accent-foreground'
|
|
|
|
|
: 'text-muted-foreground hover:bg-accent hover:text-accent-foreground'
|
|
|
|
|
)}
|
|
|
|
|
>
|
|
|
|
|
{item.name}
|
|
|
|
|
</Link>
|
|
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</nav>
|
|
|
|
|
);
|
|
|
|
|
}
|