feat(site): phase 1 — the foundation
Some checks failed
PR checks / checks (pull_request) Failing after 4m19s
Some checks failed
PR checks / checks (pull_request) Failing after 4m19s
Astro 7 with the Node adapter, Starlight mounted at /docs, the token file, both self-hosted typefaces, the layout shell, and the two build-time checks from §12. The palette's gold and cyan are sampled from runic-emblem.png rather than guessed, per §11: 494,059 opaque pixels binned by hue, each value annotated with its measured contrast against the ground, and restricted rather than brightened where a ratio fails. - checkTokens.mjs fails the build on any colour literal outside tokens.css, which is what keeps §7's "recolouring is a file copy" promise true. - checkFacts.mjs re-reads all 14 externally-sourced facts from their authorities over the Gitea API and fails on disagreement. It also enforces D13: no email address in the source outside brand-default/brand.json. - Both were negative-tested; neither has ever been allowed to pass by default. §6 asks for output:'server' with per-page prerender=true. Astro 7 expresses the same runtime shape as output:'static' with an adapter, opting individual routes out — so the default is static rather than accidentally server-rendered. Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
32
src/pages/404.astro
Normal file
32
src/pages/404.astro
Normal file
@@ -0,0 +1,32 @@
|
||||
---
|
||||
import Base from '../layouts/Base.astro';
|
||||
|
||||
/**
|
||||
* Ours rather than Starlight's (`disable404Route: true` in astro.config.mjs). A reader who
|
||||
* mistypes a marketing URL should not land in documentation chrome with a sidebar of pages
|
||||
* they were not looking for.
|
||||
*/
|
||||
---
|
||||
|
||||
<Base title="Page not found" description="That page does not exist on this site.">
|
||||
<section class="page notfound">
|
||||
<p class="eyebrow">404</p>
|
||||
<h1>That page does not exist</h1>
|
||||
<p class="prose">
|
||||
The link may be out of date, or the page may not be written yet — this site is being
|
||||
built in phases.
|
||||
</p>
|
||||
<p><a href="/">Back to the homepage</a> · <a href="/docs/">Documentation</a></p>
|
||||
</section>
|
||||
</Base>
|
||||
|
||||
<style>
|
||||
.notfound {
|
||||
padding-block: clamp(3rem, 9vw, 6rem);
|
||||
}
|
||||
|
||||
.notfound h1 {
|
||||
margin: 0 0 1rem;
|
||||
color: var(--gold);
|
||||
}
|
||||
</style>
|
||||
79
src/pages/index.astro
Normal file
79
src/pages/index.astro
Normal file
@@ -0,0 +1,79 @@
|
||||
---
|
||||
import Base from '../layouts/Base.astro';
|
||||
import { brand } from '../lib/brand.mjs';
|
||||
import platform from '../data/platform.json';
|
||||
|
||||
/**
|
||||
* Phase 1 is the foundation, not the homepage — phase 3 builds the real one (hero, the
|
||||
* data-path diagram as inline SVG, the grouped capability sections, the reserved demo
|
||||
* slot). This page exists so the shell is provably assembled: layout, header, footer,
|
||||
* tokens, both typefaces, and a fact read from platform.json rather than typed.
|
||||
*
|
||||
* Everything it claims is from §2's verified state. Nothing here is marketing copy yet.
|
||||
*/
|
||||
---
|
||||
|
||||
<Base
|
||||
title={`${brand.siteName} — ${brand.tagline}`}
|
||||
description={brand.tagline}
|
||||
bareTitle
|
||||
>
|
||||
<section class="page hero">
|
||||
<p class="eyebrow">Foundation</p>
|
||||
<h1>{brand.siteName}</h1>
|
||||
<p class="hero__tagline prose">{brand.tagline}</p>
|
||||
|
||||
<div class="chips">
|
||||
<span class="chip chip--version">Protocol {platform.protocol}</span>
|
||||
<span class="chip chip--version">Module API {platform.moduleApi}</span>
|
||||
<span class="chip chip--version">Bundle {platform.bundle.tag}</span>
|
||||
<span class="chip chip--live">Verified {platform.verifiedOn}</span>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="page">
|
||||
<div class="panel prose">
|
||||
<h2>This is the phase 1 scaffold</h2>
|
||||
<p>
|
||||
The layout shell, the token file, the self-hosted typefaces, the documentation
|
||||
theme and the two build-time checks are in place. The homepage itself is phase 3;
|
||||
the marketing pages are phase 4; the documentation — the installation path, which
|
||||
is the priority of the whole project — is phase 7.
|
||||
</p>
|
||||
<p>
|
||||
Every version above was read from <code>src/data/platform.json</code>, and{' '}
|
||||
<code>scripts/checkFacts.mjs</code> re-reads each one from its authority on every
|
||||
build. No version number is written in prose anywhere on this site.
|
||||
</p>
|
||||
<p>
|
||||
<a href="/docs/">Read the documentation</a> ·{' '}
|
||||
<a href={brand.giteaOrg} rel="noopener noreferrer">Browse the source</a>
|
||||
</p>
|
||||
</div>
|
||||
</section>
|
||||
</Base>
|
||||
|
||||
<style>
|
||||
.hero {
|
||||
padding-block: clamp(3rem, 9vw, 6rem) 2rem;
|
||||
}
|
||||
|
||||
.hero h1 {
|
||||
margin: 0;
|
||||
font-size: clamp(2.4rem, 7vw, 4rem);
|
||||
color: var(--gold);
|
||||
}
|
||||
|
||||
.hero__tagline {
|
||||
margin: 1rem 0 0;
|
||||
color: var(--muted);
|
||||
font-size: clamp(1.05rem, 2.2vw, 1.3rem);
|
||||
}
|
||||
|
||||
.chips {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5rem;
|
||||
margin-top: 1.75rem;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user