import { useState } from "react"; import { motion, useScroll, useMotionValueEvent } from "framer-motion"; import { Menu, X, ExternalLink } from "lucide-react"; export function Navbar() { const [isScrolled, setIsScrolled] = useState(false); const [mobileOpen, setMobileOpen] = useState(false); const { scrollY } = useScroll(); useMotionValueEvent(scrollY, "change", (latest) => { setIsScrolled(latest > 20); }); const navLinks = [ { name: "Kompetenzen", href: "#competencies" }, { name: "Stärken", href: "#strengths" }, { name: "Projekte", href: "#projects" }, { name: "Über mich", href: "#bio" }, { name: "Kontakt", href: "#contact" }, ]; const blogLinks = [ { name: "Tech-Blog", href: "https://blog.unixweb.de" }, { name: "KI-Blog", href: "https://ki-blog.unixweb.de" }, ]; return (
JH Joachim Hummel
Kontakt
{mobileOpen && ( {navLinks.map((link) => ( setMobileOpen(false)} className="px-4 py-3 text-sm font-medium text-muted-foreground hover:text-foreground hover:bg-secondary rounded-lg transition-all" > {link.name} ))}
{blogLinks.map((link) => ( {link.name} ))} setMobileOpen(false)} className="mt-2 px-4 py-3 bg-primary text-white text-sm font-semibold rounded-lg text-center" > Kontakt aufnehmen )} ); }