Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/thatdeveloperguy-website / app/components/layout/SiteHeader.tsx |
| Date | Not specified in source |
| Repository | Janady13/thatdeveloperguy-website |
| Revision | 2bea2ebdff0e34494bff597d4fa9c8422a0c3a94 |
| Branch | main |
| Path or archive member | app/components/layout/SiteHeader.tsx |
| Original SHA-256 | 0c96b68b81688d803023b49027466137f107a4e5f989956a58834134df98eaa8 |
| Git blob SHA | 8127951983f06faaf4491f2210c7c6f247c90de3 |
| Reading-copy SHA-256 | 0c96b68b81688d803023b49027466137f107a4e5f989956a58834134df98eaa8 |
Recovered source transcript
Download complete source text ↓20 lines · 0.9 KB
import { Link, NavLink } from 'react-router';
import navigation from '../../../content/site/navigation.json';
import { pagesById } from '../../../src/generated';
import { truth } from '../../../src/authority/select-public-facts';
/** Navigation references page ids; URLs come from the registry. A missing id (draft page) is simply not shown. */
export function SiteHeader() {
const items = navigation.primary.flatMap(id => pagesById[id] ? [pagesById[id]!] : []);
const cta = pagesById[navigation.cta];
return (
<header className="site-header">
<Link to="/" className="site-brand" aria-label={`${truth.org.name} — lobby`}>thatdeveloper<span>guy</span>.com</Link>
<nav aria-label="Primary" className="site-nav">
{items.map(page => <NavLink key={page.id} to={page.path}>{page.heading}</NavLink>)}
{cta && <NavLink to={cta.path} className="site-nav-cta">{cta.heading}</NavLink>}
</nav>
</header>
);
}