Files
pamietnik/backend/internal/api/templates/days.html
Christoph K. 8eef933573
All checks were successful
Deploy to NAS / deploy (push) Successful in 1m47s
menu added
2026-04-09 22:28:02 +02:00

38 lines
993 B
HTML

{{define "title"}}Tage — Reisejournal{{end}}
{{define "content"}}
<main class="container">
<form method="get" action="/days/redirect" class="gps-row">
<input type="date" name="date" id="nav-date" required>
<button type="submit">Tag öffnen</button>
</form>
<table>
<thead><tr><th>Datum</th><th>Punkte</th><th>Von</th><th>Bis</th></tr></thead>
<tbody>
{{range .Days}}
<tr>
<td><a href="/days/{{.Date}}">{{.Date}}</a></td>
<td>{{.Count}}</td>
<td><small>{{if .FirstTS}}{{.FirstTS.Format "15:04"}}{{end}}</small></td>
<td><small>{{if .LastTS}}{{.LastTS.Format "15:04"}}{{end}}</small></td>
</tr>
{{else}}
<tr><td colspan="4"><small>// Keine Daten vorhanden</small></td></tr>
{{end}}
</tbody>
</table>
</main>
{{end}}
{{define "scripts"}}
<script>
var d = document.getElementById('nav-date');
if (d && !d.value) {
d.value = new Date().toISOString().slice(0, 10);
}
</script>
{{end}}
{{template "base" .}}