feat: add site header with navigation and theme toggle

This commit is contained in:
2026-06-01 19:50:36 -05:00
parent d65b4f44e6
commit b996ec9279

View File

@@ -0,0 +1,39 @@
"use client";
import Link from "next/link";
import { motion } from "motion/react";
import { ThemeToggle } from "@/components/ui/ThemeToggle";
const navLinks = [
{ label: "Home", href: "/" },
{ label: "Posts", href: "/posts/" },
];
export function Header() {
return (
<motion.nav
initial={{ opacity: 0, y: -12 }}
animate={{ opacity: 1, y: 0 }}
transition={{ duration: 0.4, ease: "easeOut" }}
className="sticky top-0 z-50 bg-canvas/80 backdrop-blur-sm border-b border-border"
>
<div className="max-w-4xl mx-auto px-6 py-4 flex items-center justify-between">
<Link href="/" className="font-sans text-xl font-extrabold tracking-tight text-ink hover:text-accent transition-colors">
blog
</Link>
<div className="flex items-center gap-8">
{navLinks.map((link) => (
<Link
key={link.href}
href={link.href}
className="font-medium text-sm text-ink-soft hover:text-ink transition-colors"
>
{link.label}
</Link>
))}
<ThemeToggle />
</div>
</div>
</motion.nav>
);
}