@luhtech/site-template 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,28 @@
1
+ ---
2
+ // sectionKind: proof -- evidence: standards, published contracts, citations,
3
+ // and (only when a citable public record exists) customers/pilots/projects.
4
+ // claims[].text is the marketed-capability prose itself (the honesty rail
5
+ // that luhtech-page-claims enforces against real feature status); figures
6
+ // are cited, provenance.public numbers, never customer-use statements.
7
+ import Block from '../Block.astro';
8
+ import Figure from '../Figure.astro';
9
+
10
+ export interface Props { section: any }
11
+ const { section } = Astro.props;
12
+ ---
13
+ <section id={section.sectionId} class="py-8" data-reveal>
14
+ {section.eyebrow && <p class="text-sm font-mono uppercase tracking-wide text-accent-primary mb-3">{section.eyebrow}</p>}
15
+ {section.heading && <h2 class="font-display text-2xl font-bold mb-3">{section.heading}</h2>}
16
+ {section.subheading && <p class="text-ink/80 max-w-2xl mb-4">{section.subheading}</p>}
17
+ {section.blocks?.map((b: any) => <Block block={b} class="mb-3" />)}
18
+ {section.claims?.length > 0 && (
19
+ <ul class="space-y-2 mb-6">
20
+ {section.claims.map((c: any) => <li class="leading-relaxed">{c.text}</li>)}
21
+ </ul>
22
+ )}
23
+ {section.figures?.length > 0 && (
24
+ <div class="grid grid-cols-2 sm:grid-cols-3 gap-6 mt-4">
25
+ {section.figures.map((f: any) => <Figure figure={f} />)}
26
+ </div>
27
+ )}
28
+ </section>
@@ -0,0 +1,17 @@
1
+ ---
2
+ // sectionKind: sources -- citations for every figure used on the page,
3
+ // each figure's provenance.sourceRef rendered as a full citation.
4
+ export interface Props { section: any }
5
+ const { section } = Astro.props;
6
+ ---
7
+ <section id={section.sectionId} class="py-8 border-t border-ink/10" data-reveal>
8
+ {section.heading && <h2 class="font-display text-xl font-bold mb-4">{section.heading}</h2>}
9
+ <ol class="space-y-2 text-sm text-ink/70">
10
+ {section.figures?.map((f: any) => (
11
+ <li>
12
+ <strong>{f.value}{f.unit ? ` ${f.unit}` : ''}</strong> — {f.provenance.sourceRef}
13
+ {f.provenance.observedAt && ` (observed ${f.provenance.observedAt})`}
14
+ </li>
15
+ ))}
16
+ </ol>
17
+ </section>
@@ -0,0 +1,15 @@
1
+ ---
2
+ // sectionKind: status -- the honest stage statement (pre-formation, on
3
+ // hold, design phase). Register rule (BRAND-LANGUAGE-LOCK-2026-09-07):
4
+ // one status section per page, no hedges ("designed to"/"intended to")
5
+ // permitted here -- state the stage once, plainly.
6
+ import Block from '../Block.astro';
7
+
8
+ export interface Props { section: any }
9
+ const { section } = Astro.props;
10
+ ---
11
+ <section id={section.sectionId} class="py-8 border-t border-ink/10" data-reveal>
12
+ {section.eyebrow && <p class="text-sm font-mono uppercase tracking-wide text-ink/50 mb-2">{section.eyebrow}</p>}
13
+ {section.heading && <h2 class="font-display text-xl font-bold mb-2">{section.heading}</h2>}
14
+ {section.blocks?.map((b: any) => <Block block={b} class="text-ink/80" />)}
15
+ </section>
@@ -0,0 +1,91 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://schemas.luh.tech/content/capability-claim.schema.json",
4
+ "title": "Capability Claim",
5
+ "version": "0.2.0",
6
+ "description": "A statement about what the platform does, carried by any rendered surface. Marked method or built. A claim marked built must resolve to a register entry; one that does not fails CI. Reconciled with content/article.schema.json's older, distinct claim shape (v2.0.0): article's own claims now $ref this schema rather than an embedded, incompatible definition. kind and sourcedStatus are different axes, not restated forms of each other -- kind names WHAT TYPE of statement this is (method: how the system works; built: this exists and runs), sourcedStatus names WHAT MATURITY the referenced feature has reached, per its real register entry. Widening kind's two values down into sourcedStatus's four (or vice versa) would lose a real distinction either schema already depends on, so both fields coexist.",
7
+ "type": "object",
8
+ "additionalProperties": false,
9
+ "required": [
10
+ "claimId",
11
+ "kind",
12
+ "text"
13
+ ],
14
+ "properties": {
15
+ "claimId": {
16
+ "type": "string",
17
+ "pattern": "^[a-z][a-z0-9-]*$"
18
+ },
19
+ "kind": {
20
+ "type": "string",
21
+ "enum": [
22
+ "method",
23
+ "built"
24
+ ],
25
+ "description": "method: this is how the model works. built: this exists and runs today."
26
+ },
27
+ "text": {
28
+ "type": "string",
29
+ "minLength": 1
30
+ },
31
+ "featureRef": {
32
+ "type": [
33
+ "string",
34
+ "null"
35
+ ],
36
+ "pattern": "^urn:luhtech:[a-z][a-z0-9-]*:feature:[a-z0-9-]+$",
37
+ "description": "Required when kind is built. The register entry the claim resolves to."
38
+ },
39
+ "sourcedStatus": {
40
+ "type": [
41
+ "string",
42
+ "null"
43
+ ],
44
+ "enum": [
45
+ "operational",
46
+ "partial",
47
+ "planned",
48
+ "concept",
49
+ null
50
+ ],
51
+ "description": "Optional graduated maturity, matching content/article.schema.json's original claim vocabulary. Independent of kind -- a method claim can be sourcedStatus:concept (describes an approach not yet built at all) just as easily as a built claim can be sourcedStatus:partial (exists, not complete). Absent when the claim doesn't need finer graduation than kind alone provides (e.g. a claim mechanically derived from a single roadmap feature's status field, per the pipeline that emits content/deck-record.schema.json instances)."
52
+ },
53
+ "observedAt": {
54
+ "type": [
55
+ "string",
56
+ "null"
57
+ ],
58
+ "format": "date"
59
+ },
60
+ "note": {
61
+ "type": [
62
+ "string",
63
+ "null"
64
+ ]
65
+ }
66
+ },
67
+ "allOf": [
68
+ {
69
+ "if": {
70
+ "properties": {
71
+ "kind": {
72
+ "const": "built"
73
+ }
74
+ },
75
+ "required": [
76
+ "kind"
77
+ ]
78
+ },
79
+ "then": {
80
+ "required": [
81
+ "featureRef"
82
+ ],
83
+ "properties": {
84
+ "featureRef": {
85
+ "type": "string"
86
+ }
87
+ }
88
+ }
89
+ }
90
+ ]
91
+ }
@@ -0,0 +1,62 @@
1
+ import type { LoadedPage } from './loadPage.js';
2
+ import type { LoadedBrand } from './loadBrand.js';
3
+
4
+ /**
5
+ * GTM-L3 G1.1/G1.2: on the page whose route is "/", the hero heading and
6
+ * lede are the brand's locked tagline/oneLiner, not whatever the page
7
+ * instance authored -- an authored value is overridden with a build
8
+ * warning, matching the dispatch's own "ignored" language. <head> seo on
9
+ * "/" is likewise brand-derived (page.schema.json requires seo.title and
10
+ * seo.description to be non-empty strings, so an authored placeholder is
11
+ * expected there and is overridden the same way). Interior pages keep
12
+ * their own heading and seo verbatim -- G1.2's "<page heading> --
13
+ * <brand.name>" formula is a content-authoring convention for those page
14
+ * instances, not a runtime override, for the same schema-required-field
15
+ * reason the "/" override can't be a conditional "if empty" check either.
16
+ */
17
+ export function applyBrandDefaults(page: LoadedPage, brand: LoadedBrand): LoadedPage {
18
+ const route = page.route as string;
19
+ const pageLabel = (page.pageId ?? page.$id ?? '(page)') as string;
20
+ const sections = ((page.sections as any[]) ?? []).map((s) => ({ ...s }));
21
+ const bound: LoadedPage = { ...page, sections };
22
+
23
+ if (route !== '/') return bound;
24
+
25
+ const heroIdx = sections.findIndex((s) => s.sectionKind === 'hero');
26
+ if (heroIdx !== -1) {
27
+ const hero = { ...sections[heroIdx] };
28
+ if (hero.heading && hero.heading !== brand.identity.tagline) {
29
+ console.warn(
30
+ `[site-template] ${pageLabel}: sections[hero].heading ("${hero.heading}") ignored on route "/" -- using brand.identity.tagline instead.`
31
+ );
32
+ }
33
+ hero.heading = brand.identity.tagline;
34
+
35
+ const blocks = [...(hero.blocks ?? [])];
36
+ const ledeIdx = blocks.findIndex((b: any) => b.blockType === 'lede');
37
+ const ledeBlock = { blockType: 'lede', text: brand.identity.oneLiner };
38
+ if (ledeIdx !== -1) blocks[ledeIdx] = ledeBlock;
39
+ else blocks.unshift(ledeBlock);
40
+ hero.blocks = blocks;
41
+
42
+ sections[heroIdx] = hero;
43
+ }
44
+
45
+ const seo = { ...(bound.seo as { title?: string; description?: string }) };
46
+ const computedTitle = `${brand.identity.name} -- ${brand.identity.oneLiner}`;
47
+ if (seo.title && seo.title !== computedTitle) {
48
+ console.warn(
49
+ `[site-template] ${pageLabel}: seo.title ("${seo.title}") overridden on route "/" -- using brand-derived default.`
50
+ );
51
+ }
52
+ seo.title = computedTitle;
53
+ if (seo.description && seo.description !== brand.identity.oneLiner) {
54
+ console.warn(
55
+ `[site-template] ${pageLabel}: seo.description ("${seo.description}") overridden on route "/" -- using brand.identity.oneLiner.`
56
+ );
57
+ }
58
+ seo.description = brand.identity.oneLiner;
59
+ bound.seo = seo;
60
+
61
+ return bound;
62
+ }
@@ -0,0 +1,7 @@
1
+ export { loadPage } from './loadPage.js';
2
+ export type { LoadedPage } from './loadPage.js';
3
+ export { loadSite } from './loadSite.js';
4
+ export type { LoadedSite } from './loadSite.js';
5
+ export { loadBrand } from './loadBrand.js';
6
+ export type { LoadedBrand } from './loadBrand.js';
7
+ export { applyBrandDefaults } from './bindBrand.js';
@@ -0,0 +1,60 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import Ajv from 'ajv';
3
+ import addFormats from 'ajv-formats';
4
+ import { fetchSchema, fetchSupportSchema } from './schemaFetch.js';
5
+
6
+ const BRAND_PIN = '1.2.0';
7
+
8
+ let validatorPromise: ReturnType<typeof buildValidator> | null = null;
9
+
10
+ async function buildValidator() {
11
+ const ajv = new Ajv({ strict: false, allErrors: true });
12
+ addFormats(ajv);
13
+
14
+ const [brandSchema, definitionsSchema, graphSchema, ventureEnum, luhtechEnums] =
15
+ await Promise.all([
16
+ fetchSchema('portfolio/brand-identity.schema.json', BRAND_PIN),
17
+ fetchSupportSchema('_definitions/definitions.schema.json'),
18
+ fetchSupportSchema('_definitions/graph.schema.json'),
19
+ fetchSupportSchema('_enums/venture.enum.json'),
20
+ fetchSupportSchema('_enums/luhtech-enums.schema.v2.json'),
21
+ ]);
22
+
23
+ ajv.addSchema(definitionsSchema as object);
24
+ ajv.addSchema(graphSchema as object);
25
+ ajv.addSchema(ventureEnum as object);
26
+ ajv.addSchema(luhtechEnums as object);
27
+
28
+ return ajv.compile(brandSchema as object);
29
+ }
30
+
31
+ export interface LoadedBrand {
32
+ brandId: string;
33
+ identity: { name: string; tagline?: string; oneLiner: string; [key: string]: unknown };
34
+ [key: string]: unknown;
35
+ }
36
+
37
+ /**
38
+ * Reads a portfolio/brand-identity.schema.json instance from disk and
39
+ * ajv-validates it against the pinned live schema (+ its real $ref chain).
40
+ * Mirrors loadPage/loadSite -- throws on validation failure rather than
41
+ * returning an unvalidated instance.
42
+ */
43
+ export async function loadBrand(path: string): Promise<LoadedBrand> {
44
+ const raw = readFileSync(path, 'utf-8');
45
+ const instance = JSON.parse(raw);
46
+
47
+ if (!validatorPromise) validatorPromise = buildValidator();
48
+ const validate = await validatorPromise;
49
+
50
+ if (!validate(instance)) {
51
+ const errors = (validate.errors ?? [])
52
+ .map((e) => ` ${e.instancePath || '/'} ${e.message}`)
53
+ .join('\n');
54
+ throw new Error(
55
+ `${path} failed portfolio/brand-identity.schema.json@${BRAND_PIN} validation:\n${errors}`
56
+ );
57
+ }
58
+
59
+ return instance as LoadedBrand;
60
+ }
@@ -0,0 +1,61 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import Ajv from 'ajv';
3
+ import addFormats from 'ajv-formats';
4
+ import { fetchSchema, fetchSupportSchema } from './schemaFetch.js';
5
+
6
+ const PAGE_PIN = '1.0.0';
7
+ const CAPABILITY_CLAIM_PIN = '0.2.0';
8
+
9
+ let validatorPromise: ReturnType<typeof buildValidator> | null = null;
10
+
11
+ async function buildValidator() {
12
+ const ajv = new Ajv({ strict: false, allErrors: true });
13
+ addFormats(ajv);
14
+
15
+ const [pageSchema, capabilityClaimSchema, cellSchema, definitionsSchema, graphSchema, ventureEnum] =
16
+ await Promise.all([
17
+ fetchSchema('content/page.schema.json', PAGE_PIN),
18
+ fetchSchema('content/capability-claim.schema.json', CAPABILITY_CLAIM_PIN),
19
+ fetchSupportSchema('_definitions/cell.schema.json'),
20
+ fetchSupportSchema('_definitions/definitions.schema.json'),
21
+ fetchSupportSchema('_definitions/graph.schema.json'),
22
+ fetchSupportSchema('_enums/venture.enum.json'),
23
+ ]);
24
+
25
+ ajv.addSchema(capabilityClaimSchema as object);
26
+ ajv.addSchema(cellSchema as object);
27
+ ajv.addSchema(definitionsSchema as object);
28
+ ajv.addSchema(graphSchema as object);
29
+ ajv.addSchema(ventureEnum as object);
30
+
31
+ return ajv.compile(pageSchema as object);
32
+ }
33
+
34
+ export interface LoadedPage {
35
+ [key: string]: unknown;
36
+ }
37
+
38
+ /**
39
+ * Reads a content/page.schema.json instance from disk and ajv-validates it
40
+ * against the pinned live schema (+ its real $ref chain). Throws on any
41
+ * validation failure -- callers should let this fail the build, not catch
42
+ * and continue with an unvalidated instance.
43
+ */
44
+ export async function loadPage(path: string): Promise<LoadedPage> {
45
+ const raw = readFileSync(path, 'utf-8');
46
+ const instance = JSON.parse(raw);
47
+
48
+ if (!validatorPromise) validatorPromise = buildValidator();
49
+ const validate = await validatorPromise;
50
+
51
+ if (!validate(instance)) {
52
+ const errors = (validate.errors ?? [])
53
+ .map((e) => ` ${e.instancePath || '/'} ${e.message}`)
54
+ .join('\n');
55
+ throw new Error(
56
+ `${path} failed content/page.schema.json@${PAGE_PIN} validation:\n${errors}`
57
+ );
58
+ }
59
+
60
+ return instance as LoadedPage;
61
+ }
@@ -0,0 +1,55 @@
1
+ import { readFileSync } from 'node:fs';
2
+ import Ajv from 'ajv';
3
+ import addFormats from 'ajv-formats';
4
+ import { fetchSchema, fetchSupportSchema } from './schemaFetch.js';
5
+
6
+ const SITE_PIN = '1.0.0';
7
+
8
+ let validatorPromise: ReturnType<typeof buildValidator> | null = null;
9
+
10
+ async function buildValidator() {
11
+ const ajv = new Ajv({ strict: false, allErrors: true });
12
+ addFormats(ajv);
13
+
14
+ const [siteSchema, definitionsSchema, graphSchema, ventureEnum] = await Promise.all([
15
+ fetchSchema('content/site.schema.json', SITE_PIN),
16
+ fetchSupportSchema('_definitions/definitions.schema.json'),
17
+ fetchSupportSchema('_definitions/graph.schema.json'),
18
+ fetchSupportSchema('_enums/venture.enum.json'),
19
+ ]);
20
+
21
+ ajv.addSchema(definitionsSchema as object);
22
+ ajv.addSchema(graphSchema as object);
23
+ ajv.addSchema(ventureEnum as object);
24
+
25
+ return ajv.compile(siteSchema as object);
26
+ }
27
+
28
+ export interface LoadedSite {
29
+ [key: string]: unknown;
30
+ }
31
+
32
+ /**
33
+ * Reads a content/site.schema.json instance from disk and ajv-validates it
34
+ * against the pinned live schema (+ its real $ref chain). Throws on any
35
+ * validation failure -- callers should let this fail the build, not catch
36
+ * and continue with an unvalidated instance.
37
+ */
38
+ export async function loadSite(path: string): Promise<LoadedSite> {
39
+ const raw = readFileSync(path, 'utf-8');
40
+ const instance = JSON.parse(raw);
41
+
42
+ if (!validatorPromise) validatorPromise = buildValidator();
43
+ const validate = await validatorPromise;
44
+
45
+ if (!validate(instance)) {
46
+ const errors = (validate.errors ?? [])
47
+ .map((e) => ` ${e.instancePath || '/'} ${e.message}`)
48
+ .join('\n');
49
+ throw new Error(
50
+ `${path} failed content/site.schema.json@${SITE_PIN} validation:\n${errors}`
51
+ );
52
+ }
53
+
54
+ return instance as LoadedSite;
55
+ }
@@ -0,0 +1,70 @@
1
+ // Fetches the live, version-pinned schemas this package validates against.
2
+ // Pins live in package.json's luhtech.schemaPins -- the immutable
3
+ // https://schemas.luh.tech/v/{version}/{path} convention (d-2026-08-28-eb-
4
+ // versioned-schema-serving), not the floating "latest" alias, so a schema
5
+ // change upstream never silently changes what an already-shipped site
6
+ // build validates against.
7
+ //
8
+ // content/capability-claim.schema.json is a known, flagged gap: it 404s at
9
+ // both its bare and versioned live URLs (a schema-registry publish-pipeline
10
+ // issue, out of scope for this package -- see the site-template README).
11
+ // This loader falls back to a vendored local copy for that one schema only,
12
+ // fetched from the real schema-registry source (not fabricated), and never
13
+ // silently swallows a 404 for any other schema.
14
+ //
15
+ // The fallback is a static JSON import, not a runtime readFileSync -- a
16
+ // bundled build (Vite/Rollup, which Astro uses) relocates compiled chunks
17
+ // without knowing to also copy an fs-read sidecar file, producing an ENOENT
18
+ // at build time (found live during the first real consumer build, GTM-L2
19
+ // C3). A static import lets the bundler inline the JSON content itself,
20
+ // sidestepping the asset-copy problem entirely.
21
+
22
+ import capabilityClaimFallback from './_vendored-schema-fallback/capability-claim.schema.json';
23
+
24
+ const VENDORED_FALLBACK: Record<string, unknown> = {
25
+ 'content/capability-claim.schema.json': capabilityClaimFallback,
26
+ };
27
+
28
+ const cache = new Map<string, unknown>();
29
+
30
+ export async function fetchSchema(pinnedPath: string, version: string): Promise<unknown> {
31
+ const cacheKey = `${pinnedPath}@${version}`;
32
+ if (cache.has(cacheKey)) return cache.get(cacheKey);
33
+
34
+ const url = `https://schemas.luh.tech/v/${version}/${pinnedPath}`;
35
+ let schema: unknown;
36
+ try {
37
+ const res = await fetch(url);
38
+ if (!res.ok) throw new Error(`HTTP ${res.status}`);
39
+ schema = await res.json();
40
+ } catch (err) {
41
+ const fallback = VENDORED_FALLBACK[pinnedPath];
42
+ if (!fallback) {
43
+ throw new Error(
44
+ `Failed to fetch pinned schema ${pinnedPath}@${version} from ${url}: ${(err as Error).message}. ` +
45
+ `No vendored fallback exists for this schema -- this is a real failure, not a known gap.`
46
+ );
47
+ }
48
+ console.warn(
49
+ `[site-template] ${pinnedPath}@${version} unreachable at ${url} (known publish-pipeline gap) -- using vendored fallback.`
50
+ );
51
+ schema = fallback;
52
+ }
53
+ cache.set(cacheKey, schema);
54
+ return schema;
55
+ }
56
+
57
+ /** Unversioned support schemas (definitions, enums) the pinned schemas $ref -- these
58
+ * are stable, shared vocabulary, not independently versioned/pinned. */
59
+ export async function fetchSupportSchema(path: string): Promise<unknown> {
60
+ const cacheKey = `support:${path}`;
61
+ if (cache.has(cacheKey)) return cache.get(cacheKey);
62
+ const url = `https://schemas.luh.tech/${path}`;
63
+ const res = await fetch(url);
64
+ if (!res.ok) {
65
+ throw new Error(`Failed to fetch support schema ${path} from ${url}: HTTP ${res.status}`);
66
+ }
67
+ const schema = await res.json();
68
+ cache.set(cacheKey, schema);
69
+ return schema;
70
+ }
@@ -0,0 +1,107 @@
1
+ ---
2
+ // Renders every LuhTech venture site from validated content/page.schema.json
3
+ // + content/site.schema.json instances (see ../content/loadPage.ts,
4
+ // ../content/loadSite.ts). Nav from site.nav, footer from
5
+ // site.footer.legalLine + parentHref, <head> from page.seo.
6
+ //
7
+ // page.seo.ogImage's "must not be a staging host" rule is enforced by the
8
+ // schema itself (a regex pattern rejecting any host containing "staging"),
9
+ // not by this layout -- loadPage() already fails the build on a violation
10
+ // before this component ever renders.
11
+ import type { LoadedPage } from '../content/loadPage.js';
12
+ import type { LoadedSite } from '../content/loadSite.js';
13
+
14
+ export interface Props {
15
+ site: LoadedSite;
16
+ page: LoadedPage;
17
+ }
18
+ const { site, page } = Astro.props as Props;
19
+
20
+ const seo = page.seo as { title: string; description: string; ogImage?: string; noindex?: boolean };
21
+ const footer = site.footer as { legalLine: string; parentHref?: string };
22
+
23
+ // GTM-L3 G1.3: every non-holding-company site links back to luh.tech from
24
+ // its own nav -- the layout appends it rather than every content author
25
+ // remembering to, and skips it if the instance already carries it (fixes
26
+ // the Replique regression where this link was missing entirely).
27
+ const HOLDING_NAV_ITEM = { label: 'LuhTech Holdings', href: 'https://luh.tech' };
28
+ const rawNav = site.nav as Array<{ label: string; href: string }>;
29
+ const ventureRef = site.ventureRef as string | undefined;
30
+ const nav =
31
+ ventureRef && ventureRef !== 'luhtech-business' && !rawNav.some((item) => item.href === HOLDING_NAV_ITEM.href)
32
+ ? [...rawNav, HOLDING_NAV_ITEM]
33
+ : rawNav;
34
+ ---
35
+ <html lang="en">
36
+ <head>
37
+ <meta charset="utf-8" />
38
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
39
+ <title>{seo.title}</title>
40
+ <meta name="description" content={seo.description} />
41
+ {seo.noindex && <meta name="robots" content="noindex, nofollow" />}
42
+
43
+ <meta property="og:type" content="website" />
44
+ <meta property="og:title" content={seo.title} />
45
+ <meta property="og:description" content={seo.description} />
46
+ {seo.ogImage && <meta property="og:image" content={seo.ogImage} />}
47
+ <meta name="twitter:card" content="summary_large_image" />
48
+ <meta name="twitter:title" content={seo.title} />
49
+ <meta name="twitter:description" content={seo.description} />
50
+ {seo.ogImage && <meta name="twitter:image" content={seo.ogImage} />}
51
+
52
+ <link rel="preconnect" href="https://fonts.googleapis.com" />
53
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
54
+ <link
55
+ href="https://fonts.googleapis.com/css2?family=Sora:wght@400;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap"
56
+ rel="stylesheet"
57
+ />
58
+ <slot name="head" />
59
+ </head>
60
+ <body class="bg-canvas text-ink min-h-screen flex flex-col font-body">
61
+ <a href="#main-content" class="sr-only focus:not-sr-only focus:absolute focus:z-50 focus:top-2 focus:left-2 focus:px-4 focus:py-2 focus:bg-accent-primary focus:text-canvas focus:rounded-md">
62
+ Skip to content
63
+ </a>
64
+ <header class="bg-ink text-canvas">
65
+ <nav class="max-w-4xl mx-auto flex items-center justify-between px-6 py-4">
66
+ <a href="/" class="font-display font-semibold tracking-tight transition-opacity hover:opacity-80 focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-primary focus-visible:rounded">
67
+ <slot name="logo" />
68
+ </a>
69
+ <ul class="flex items-center gap-6 text-sm">
70
+ {nav.map((item) => (
71
+ <li><a href={item.href} class="hover:text-accent-primary transition-colors focus-visible:outline focus-visible:outline-2 focus-visible:outline-accent-primary focus-visible:rounded">{item.label}</a></li>
72
+ ))}
73
+ </ul>
74
+ </nav>
75
+ </header>
76
+ <main id="main-content" class="flex-1 max-w-4xl mx-auto w-full px-6 py-16">
77
+ <slot />
78
+ </main>
79
+ <footer class="bg-ink text-canvas">
80
+ <div class="max-w-4xl mx-auto px-6 py-8 text-sm text-canvas/60 flex items-center justify-between flex-wrap gap-3">
81
+ {!footer.parentHref && <span>{footer.legalLine}</span>}
82
+ {footer.parentHref && (
83
+ <a href={footer.parentHref} class="hover:text-canvas/90 transition-colors">{footer.legalLine}</a>
84
+ )}
85
+ </div>
86
+ </footer>
87
+ <script>
88
+ const revealTargets = document.querySelectorAll('[data-reveal]');
89
+ if ('IntersectionObserver' in window && revealTargets.length) {
90
+ const observer = new IntersectionObserver(
91
+ (entries) => {
92
+ for (const entry of entries) {
93
+ if (entry.isIntersecting) {
94
+ entry.target.classList.add('is-visible');
95
+ observer.unobserve(entry.target);
96
+ }
97
+ }
98
+ },
99
+ { threshold: 0.2, rootMargin: '0px 0px -10% 0px' }
100
+ );
101
+ revealTargets.forEach((el) => observer.observe(el));
102
+ } else {
103
+ revealTargets.forEach((el) => el.classList.add('is-visible'));
104
+ }
105
+ </script>
106
+ </body>
107
+ </html>