- 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>
28 lines
888 B
HTML
28 lines
888 B
HTML
<!-- 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>
|