site-footer.tsx 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import { Shortcut } from "@/components/nav/shortcut";
  2. import { siteConfig } from "@/config/site";
  3. const links = [
  4. { label: "GitHub", href: siteConfig.links.github },
  5. { label: "LinkedIn", href: siteConfig.links.linkedin },
  6. { label: "Email", href: siteConfig.links.email },
  7. ];
  8. /**
  9. * One step below the page, spanning its column with the text on the column's
  10. * text edge (see .site-footer). On phones it ends just clear of the floating nav.
  11. */
  12. export function SiteFooter() {
  13. return (
  14. <footer className="site-footer relative z-10 mx-auto w-full max-w-[1240px] px-3 pb-[calc(max(14px,env(safe-area-inset-bottom))+72px)] sm:px-6 sm:pb-9">
  15. <div className="mx-auto flex max-w-(--footer-col) flex-col gap-2.5 px-(--footer-inset) text-[12.5px] text-muted min-[480px]:flex-row min-[480px]:items-center min-[480px]:justify-between">
  16. <p>
  17. © {new Date().getFullYear()} {siteConfig.author} ·{" "}
  18. {siteConfig.location}
  19. <span className="max-sm:hidden">
  20. {" "}
  21. ·{" "}
  22. <kbd className="rounded-md border border-line px-1.5 py-0.5 font-sans text-[11px]">
  23. <Shortcut />
  24. </kbd>{" "}
  25. to explore
  26. </span>
  27. </p>
  28. <ul className="flex items-center gap-5">
  29. {links.map((l) => (
  30. <li key={l.label}>
  31. {/* Padding cancelled by margin: a bigger tap target, same layout. */}
  32. <a
  33. className="-mx-1.5 -my-2 inline-block px-1.5 py-2 transition-colors hover:text-ink"
  34. data-cursor={l.label}
  35. href={l.href}
  36. rel="noopener noreferrer"
  37. target={l.href.startsWith("http") ? "_blank" : undefined}
  38. >
  39. {l.label}
  40. </a>
  41. </li>
  42. ))}
  43. </ul>
  44. </div>
  45. </footer>
  46. );
  47. }