writeonce/docs/examples/shop/orders/view.html
shoney.arickathil 9532116243 feat(shop): story-37 target templates beside the hand-lowering
- view.html per feature + layout app/header/footer.html: the markup-
  first form woc will compile ({{}} auto-escaped, w:if/w:for,
  {!! !!} slots, w:component sections); inert today, verified not to
  disturb the build
- README: pair is the DX referendum — .html is the target feel,
  view.wo is today's cost; doctrine line reworded (templates compile
  or don't exist)

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

28 lines
888 B
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- orders/view.html — STORY 37's TARGET (see product_list/view.html for
the convention). view.wo is the hand-lowered equivalent. -->
<template w:component="OrderOk">
<div class="card">
<h1>Order placed</h1>
<p>{{ self.qty }} × {{ self.name }} — total € {{ self.total }}</p>
<p><a href="/orders">See all orders</a> · <a href="/">Keep shopping</a></p>
</div>
</template>
<template w:component="OrderRow">
<tr>
<td>{{ self.name }}</td>
<td>{{ self.qty }}</td>
<td>€ {{ self.total }}</td>
<td>{{ self.status }}</td>
</tr>
</template>
<template w:component="OrdersPage">
<h1>Orders</h1>
<p w:if="self.rows == ''">No orders yet — <a href="/">go buy something</a>.</p>
<table w:if="self.rows != ''" class="orders">
<tr><th>Product</th><th>Qty</th><th>Total</th><th>Status</th></tr>
{!! self.rows !!}
</table>
</template>