update index

This commit is contained in:
2025-03-24 22:02:21 +00:00
parent 0f48341ce3
commit ac76809e95

View File

@@ -1,29 +1,25 @@
{{ define "index" }}
<a href="/new">+ Add New Draw</a>
{{ if . }}
<table>
<tr>
<th>Date</th>
<th>Numbers</th>
<th>Spend (£)</th>
<th>Return (£)</th>
<th>Profit/Loss (£)</th>
<th>Machine</th>
<th>Ball Set</th>
<th>Balls</th>
<th>Thunderball</th>
</tr>
{{ if . }}
{{ range . }}
<tr>
<td>{{ .Date }}</td>
<td>{{ .Numbers }}</td>
<td>{{ printf "%.2f" .Spend }}</td>
<td>{{ printf "%.2f" .Return }}</td>
<td>{{ printf "%.2f" .ProfitLoss }}</td>
<td>{{ .Machine }}</td>
<td>{{ .Ballset }}</td>
<td>{{ .Ball1 }}, {{ .Ball2 }}, {{ .Ball3 }}, {{ .Ball4 }}, {{ .Ball5 }}</td>
<td>{{ .Thunderball }}</td>
</tr>
{{ end }}
{{ else }}
<tr><td colspan="5">No draws recorded yet.</td></tr>
{{ end }}
</table>
{{ else }}
<p>No draws recorded yet. <a href="/new">Add your first draw</a></p>
{{ end }}
{{ end }}