50 lines
1.8 KiB
TypeScript
50 lines
1.8 KiB
TypeScript
'use client';
|
|
|
|
import * as React from 'react';
|
|
import Link from 'next/link';
|
|
import { usePathname } from 'next/navigation';
|
|
|
|
export const Header: React.FC = () => {
|
|
const pathname = usePathname();
|
|
|
|
const isActive = (path: string) => pathname === path;
|
|
|
|
return (
|
|
<header className="bg-white/80 backdrop-blur-md sticky top-0 z-50">
|
|
<div className="narrow-container py-8 flex items-center justify-between">
|
|
<Link href="/" className="flex items-center gap-3 group">
|
|
<div className="w-10 h-10 bg-slate-900 flex items-center justify-center group-hover:bg-slate-700 transition-colors">
|
|
<span className="text-white text-lg font-bold">M</span>
|
|
</div>
|
|
<span className="text-slate-900 font-bold tracking-tighter text-2xl">Marc Mintel</span>
|
|
</Link>
|
|
|
|
<nav className="flex items-center gap-8">
|
|
<Link
|
|
href="/websites"
|
|
className={`text-xs font-bold uppercase tracking-widest transition-colors ${
|
|
isActive('/websites') ? 'text-slate-900' : 'text-slate-400 hover:text-slate-900'
|
|
}`}
|
|
>
|
|
Websites
|
|
</Link>
|
|
<Link
|
|
href="/blog"
|
|
className={`text-xs font-bold uppercase tracking-widest transition-colors ${
|
|
isActive('/blog') || pathname?.startsWith('/blog/') ? 'text-slate-900' : 'text-slate-400 hover:text-slate-900'
|
|
}`}
|
|
>
|
|
Blog
|
|
</Link>
|
|
<Link
|
|
href="/contact"
|
|
className="text-[10px] font-bold uppercase tracking-[0.2em] text-slate-900 border-2 border-slate-900 px-5 py-2.5 hover:bg-slate-900 hover:text-white transition-all duration-300"
|
|
>
|
|
Anfrage
|
|
</Link>
|
|
</nav>
|
|
</div>
|
|
</header>
|
|
);
|
|
};
|