- 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
418 B
Text
13 lines
418 B
Text
-- favicon/controller.wo — GET /favicon.svg. The one route that answers
|
|
-- something other than HTML or text, so it builds its own Resp.
|
|
use framework/http
|
|
use layout
|
|
|
|
pub class Favicon {
|
|
fn handle(req: Req) -> Resp {
|
|
let h: map<Text, Text> = {};
|
|
h["content-type"] = "image/svg+xml";
|
|
h["cache-control"] = "public, max-age=86400";
|
|
return Resp { status: 200, headers: h, body: favicon_svg() };
|
|
}
|
|
}
|