All files / components SiteHeader.tsx

100% Statements 3/3
100% Branches 0/0
100% Functions 2/2
100% Lines 3/3

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43        1x               2x                             8x                              
import type { Route } from "next";
import Link from "next/link";
import { Container } from "./Container";
 
const nav = [
  { href: "/#work", label: "Work" },
  { href: "/engineering", label: "Engineering" },
  { href: "/studio", label: "Studio" },
  { href: "/contact", label: "Contact" },
] as const;
 
export function SiteHeader() {
  return (
    <header className="border-b border-line">
      <a
        href="#main"
        className="sr-only focus:not-sr-only focus:absolute focus:left-4 focus:top-4 focus:z-10 focus:bg-paper focus:px-3 focus:py-2"
      >
        Skip to content
      </a>
      <Container className="flex flex-wrap items-center justify-between gap-x-6 gap-y-2 py-4">
        <Link href="/" className="display text-2xl font-extrabold tracking-wide no-underline">
          Eric Blanchard
        </Link>
        <nav aria-label="Main">
          <ul className="flex flex-wrap gap-x-5 gap-y-1 text-[0.95rem]">
            {nav.map((item) => (
              <li key={item.href}>
                <Link
                  href={item.href as Route}
                  className="py-2 text-ink no-underline hover:text-spruce hover:underline"
                >
                  {item.label}
                </Link>
              </li>
            ))}
          </ul>
        </nav>
      </Container>
    </header>
  );
}