"use client"; import { useEffect, useState } from "react"; import Link from "next/link"; import Image from "next/image"; const NAVBAR_HEIGHT = 100; // px — matches h-[6.25rem] const SCROLL_DURATION = 800; // ms function smoothScrollTo(targetY: number) { const startY = window.scrollY; const distance = targetY - startY; const startTime = performance.now(); function step(now: number) { const elapsed = now - startTime; const progress = Math.min(elapsed / SCROLL_DURATION, 1); // ease-in-out cubic const ease = progress < 0.5 ? 4 * progress ** 3 : 1 - (-2 * progress + 2) ** 3 / 2; window.scrollTo(0, startY + distance * ease); if (progress < 1) requestAnimationFrame(step); } requestAnimationFrame(step); } const navLinks = [ { label: "Werkzeuge", href: "#werkzeuge" }, { label: "Blog", href: "#blog" }, { label: "Über Björn", href: "#ueber-bjoern" }, { label: "Shop", href: "/shop" }, ]; export function Navbar() { const [scrolled, setScrolled] = useState(false); useEffect(() => { const onScroll = () => setScrolled(window.scrollY > 8); window.addEventListener("scroll", onScroll, { passive: true }); return () => window.removeEventListener("scroll", onScroll); }, []); return (
{/* Logo — exported directly from Figma */} einfach produktiv {/* Nav links */} {/* CTA buttons */}
Newsletter 7-Tage-Challenge
); }