event-time-tracking/webpage.tmpl
kekskurse 2d1157131b
All checks were successful
continuous-integration/drone/push Build is passing
Template
2022-01-16 00:41:43 +01:00

40 lines
No EOL
823 B
Cheetah

<style type="text/css">
table, th, td {
border: 1px solid black;
}
</style>
<h1>Time Tracking</h1>
<p>Currently doing {{ .lastEvent.Name }} since {{ .lastEvent.EventTimestamp }}</p>
<h3>Per Day</h3>
<table>
<tr>
<td>Tag</td>
{{ range .daylist }}
<td>{{ . }}</td>
{{ end }}
</tr>
{{ range $val := .taglist }}
<tr>
<td>{{ $val }}</td>
{{ range $v := $.daylist }}
{{ $secounds := index $.currentState $val $v }}
<td>{{tominute $secounds }}</td>
{{ end }}
</tr>
{{ end }}
</table>
<h3>Last 7 Days</h3>
{{ range $a, $b := .weeklist }}
<li>{{ $a }}: {{ $b }}</li>
{{ end }}
<h3>Start</h3>
<form method="get" action="/event">
<select name="name">
{{ range $val := .taglist }}
<option>{{$val}}</option>
{{ end }}
</select>
<br/>
<input type="submit"></input>
</form>