Files
website/templates/index.html

33 lines
781 B
HTML

{{ define "content" }}
<a href="/new">+ Add New Draw</a>
<table>
<tr>
<th>Draw Number</th>
<th>Date</th>
<th>Machine</th>
<th>Ball Set</th>
<th>Balls</th>
<th>Thunderball</th>
</tr>
{{ if .Data }}
{{ range .Data }}
<tr>
<td>{{ .Id }}</td>
<td>{{ .DrawDate }}</td>
<td>{{ .Machine }}</td>
<td>{{ .BallSet }}</td>
<td>
{{ range $i, $n := .SortedBalls }}
{{ if $i }}, {{ end }}{{ $n }}
{{ end }}
</td>
<td>{{ .Thunderball }}</td>
</tr>
{{ end }}
{{ else }}
<tr><td colspan="5">No draws recorded yet.</td></tr>
{{ end }}
</table>
{{ end }}