- layout/logo.wo: the mark as inline SVG — dark tile, two-stroke "W" (white then accent blue). One source: nav brand + /favicon.svg - favicon/controller.wo: GET /favicon.svg, image/svg+xml, day cache - install/: GET /install — toolchain tarball, PATH, verify, first project, build/run, adding a dep. Copy from the real install README - packages/: GET /packages + /packages/:name — catalogue with the [deps] line, what each library gives you, and a usage snippet. Index cards are child components (multi Component) - wo-html: page_head(title, head, body) and a `head` slot on Layout — a favicon link or meta tag had nowhere else to go; page() passes "" - header: Install/Tutorial/Packages/GitHub, brand shows the mark - main.wo: SITE_HOST picks the interface (loopback default), bound address printed at startup - site-accept: 11 -> 17 checks (install, packages x2, 404, favicon, inline logo) Verified on 192.168.0.165:8080 — every route, favicon bytes, and the mark rasterised at 256px and 32px. Gates: oop-accept MET, site 17/0, web-app 46/0, fibers 10/0, db-actor 8/0; shop rebuilt clean. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
13 lines
651 B
Text
13 lines
651 B
Text
-- layout/header.wo — the site navigation bar, shared by every page.
|
|
use html
|
|
|
|
pub fn header() -> Text {
|
|
let links = link("/install", "text-gray-700", "Install");
|
|
links = links .. link("/ch/hello", "text-gray-700", "Tutorial");
|
|
links = links .. link("/packages", "text-gray-700", "Packages");
|
|
links = links .. link("https://github.com/shoneyj", "text-gray-700", "GitHub");
|
|
-- The brand is the mark plus the wordmark, one inline-flex row so the
|
|
-- tile and the text share a baseline at any font size.
|
|
let brand = el("span", "flex items-center gap-2", logo_svg(28) .. "<span>writeonce.de</span>");
|
|
return nav_bar("/", brand, links);
|
|
}
|