This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
import { profile } from "@/content/site";
|
||||
|
||||
const links = [
|
||||
{ href: "#introduction", label: "Introduction" },
|
||||
{ href: "#lab", label: "The Lab" },
|
||||
{ href: "#travel", label: "Travel" },
|
||||
];
|
||||
|
||||
export function Header() {
|
||||
const initials = profile.name
|
||||
.split(" ")
|
||||
.map((w) => w[0])
|
||||
.join("");
|
||||
|
||||
return (
|
||||
<header className="sticky top-0 z-40 border-b border-white/10 bg-slate-950/70 backdrop-blur-md">
|
||||
<div className="mx-auto flex h-14 w-full max-w-6xl items-center justify-between px-6">
|
||||
<a
|
||||
href="#top"
|
||||
className="flex items-center gap-2.5 rounded-md text-sm font-semibold text-white focus-visible:ring-2 focus-visible:ring-sky-300 focus-visible:outline-none"
|
||||
>
|
||||
<span className="flex size-7 items-center justify-center rounded-md bg-linear-to-br from-sky-400 to-indigo-500 text-xs font-bold text-slate-950">
|
||||
{initials}
|
||||
</span>
|
||||
<span className="sr-only sm:not-sr-only">{profile.name}</span>
|
||||
</a>
|
||||
<nav aria-label="Primary">
|
||||
<ul className="flex items-center gap-1 text-sm">
|
||||
{links.map((l) => (
|
||||
<li key={l.href}>
|
||||
<a
|
||||
href={l.href}
|
||||
className="rounded-md px-2.5 py-1.5 whitespace-nowrap text-slate-300 transition-colors sm:px-3 hover:bg-white/10 hover:text-white focus-visible:ring-2 focus-visible:ring-sky-300 focus-visible:outline-none"
|
||||
>
|
||||
{l.label}
|
||||
</a>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</header>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user