writeonce/docs/examples/shop/layout/header.wo
shoney.arickathil a4743edcc6 fix(shop): views markup-first within today's grammar
- render() bodies: one HTML line per 'h = h ..' statement, single-
  quoted attributes, ${} holes, esc() on data — el() chains gone
- discovered + recorded gap #3: no multi-line expressions or literals
  (leading/trailing .. and paren grouping all reject at NEWLINE) —
  exactly the tax story 37's raw literal deletes
- 37-target comment blocks dropped (bodies now self-explanatory; the
  README states the delta); rebuilt + full buy-flow re-smoked (178.0
  total, stock 12->10, 409, traversal 404)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-24 00:23:39 +02:00

8 lines
329 B
Text

-- layout/header.wo — the header fragment (header.html's analog).
pub fn header() -> Text {
let h = "<header class='site-header'>";
h = h .. "<a href='/' class='brand'>writeonce shop</a>";
h = h .. "<nav class='site-nav'><a href='/'>Products</a> <a href='/orders'>Orders</a></nav>";
h = h .. "</header>";
return h;
}