2026-02-27 08:53:14 +01:00
|
|
|
"use client";
|
2026-04-12 10:11:23 +02:00
|
|
|
import Image from "next/image";
|
|
|
|
|
import { useState } from "react";
|
|
|
|
|
import Link from "next/link";
|
2026-02-27 08:53:14 +01:00
|
|
|
|
|
|
|
|
export default function Header() {
|
|
|
|
|
const [isOpen, setIsOpen] = useState(false);
|
2026-04-12 10:11:23 +02:00
|
|
|
const navItems = [
|
|
|
|
|
{ href: "/", label: "Hjem" },
|
|
|
|
|
{ href: "/golfbaner", label: "Golfbaner" },
|
|
|
|
|
];
|
2026-02-27 08:53:14 +01:00
|
|
|
|
|
|
|
|
return (
|
2026-04-12 10:11:23 +02:00
|
|
|
<header className="sticky top-0 z-[100] border-b border-white/10 bg-[#25312A]/95 text-white shadow-sm backdrop-blur-md">
|
|
|
|
|
<div className="mx-auto flex h-20 max-w-[1400px] items-center justify-between px-4 sm:px-6 lg:px-8">
|
|
|
|
|
<Link href="/" className="h-10 transition-transform hover:scale-[1.02] active:scale-95 md:h-12">
|
|
|
|
|
<Image
|
|
|
|
|
src="/TeeOff-logo-Retina-1.png"
|
|
|
|
|
alt="TeeOff.no"
|
|
|
|
|
width={336}
|
|
|
|
|
height={102}
|
|
|
|
|
priority
|
|
|
|
|
className="h-full w-auto object-contain"
|
|
|
|
|
/>
|
2026-02-27 08:53:14 +01:00
|
|
|
</Link>
|
|
|
|
|
|
2026-04-12 10:11:23 +02:00
|
|
|
<nav className="hidden items-center gap-8 text-[12px] font-extrabold uppercase tracking-[0.14em] text-white/90 md:flex">
|
|
|
|
|
{navItems.map((item) => (
|
|
|
|
|
<Link key={item.href} href={item.href} className="transition hover:text-[#8BC34A]">
|
|
|
|
|
{item.label}
|
|
|
|
|
</Link>
|
|
|
|
|
))}
|
2026-02-27 08:53:14 +01:00
|
|
|
</nav>
|
|
|
|
|
|
2026-04-12 10:11:23 +02:00
|
|
|
<button onClick={() => setIsOpen(!isOpen)} className="p-2 text-white md:hidden" aria-label="Meny">
|
|
|
|
|
<div className="mb-1.5 h-0.5 w-6 bg-current transition-all"></div>
|
|
|
|
|
<div className="mb-1.5 h-0.5 w-6 bg-current"></div>
|
|
|
|
|
<div className="h-0.5 w-6 bg-current"></div>
|
2026-02-27 08:53:14 +01:00
|
|
|
</button>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{isOpen && (
|
2026-04-12 10:11:23 +02:00
|
|
|
<div className="absolute left-0 top-20 flex w-full flex-col gap-5 border-b border-white/10 bg-[#25312A] px-6 py-6 shadow-2xl md:hidden">
|
|
|
|
|
{navItems.map((item) => (
|
|
|
|
|
<Link
|
|
|
|
|
key={item.href}
|
|
|
|
|
onClick={() => setIsOpen(false)}
|
|
|
|
|
href={item.href}
|
|
|
|
|
className="text-lg font-extrabold uppercase tracking-[0.08em] text-white"
|
|
|
|
|
>
|
|
|
|
|
{item.label}
|
|
|
|
|
</Link>
|
|
|
|
|
))}
|
2026-02-27 08:53:14 +01:00
|
|
|
</div>
|
|
|
|
|
)}
|
|
|
|
|
</header>
|
|
|
|
|
);
|
2026-04-11 09:54:54 +02:00
|
|
|
}
|