Files
simplexcalc/templates/index.html
T
clawbot f8ce8cef83 Seed from go-template-repo, renamed to simplexcalc
The template's files at a77fd30, without its history or LICENSE, after
script/rename simplexcalc.

Model: opus-5-5
2026-09-26 21:38:57 +00:00

50 lines
1.0 KiB
HTML

{{define "title"}}widgets{{end}}
{{define "content"}}
<h1>{{.AppName}}</h1>
<p>
This page is rendered from an embedded template. The stylesheet, the
partials in the navigation and footer, and the schema behind the
table below all ship inside the binary.
</p>
<h2>widgets ({{.WidgetCount}})</h2>
<form method="POST" action="/widgets">
{{.CSRFField}}
<label>
name
<input type="text" name="name" required maxlength="200" />
</label>
<label>
size
<input type="text" name="size" placeholder="4KiB" />
</label>
<button type="submit">create</button>
</form>
{{if .Widgets}}
<table>
<thead>
<tr>
<th>name</th>
<th>size</th>
<th>created</th>
</tr>
</thead>
<tbody>
{{range .Widgets}}
<tr>
<td>{{.Name}}</td>
<td>{{bytes .SizeBytes}}</td>
<td>{{since .CreatedAt}}</td>
</tr>
{{end}}
</tbody>
</table>
{{else}}
<p class="empty">No widgets yet.</p>
{{end}}
{{end}}