38 lines
993 B
HTML
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" .}}
|