Show only three departures per stop
parent
a28e406985
commit
48697c5fc9
2
TODO
2
TODO
|
@ -4,7 +4,7 @@
|
|||
|
||||
[x] *.. Print times in human-readable format.
|
||||
[x] **. Always parse times in Dutch timezone.
|
||||
[ ] *.. Show max three departures per stop.
|
||||
[x] *.. Show max three departures per stop.
|
||||
[ ] **. Show max two departures per line per stop.
|
||||
[ ] **. Add Connexxion departures.
|
||||
[ ] **. Make the page look nice (also on mobile).
|
||||
|
|
10
index.html
10
index.html
|
@ -16,12 +16,14 @@
|
|||
<h2>{{ .Name }}</h2>
|
||||
<p>{{ .Town }}</p>
|
||||
|
||||
{{ range .Departures }}
|
||||
<dl>
|
||||
<dt>{{ .RouteShortName }} | {{ .StopHeadsign }}</dt>
|
||||
<dd><time>{{ formatTime .DepartureTime }}</time></dd>
|
||||
</dl>
|
||||
{{ range $i, $val := .Departures }}
|
||||
{{ if lt $i 3 }}
|
||||
<dt>{{ $val.RouteShortName }} | {{ $val.StopHeadsign }}</dt>
|
||||
<dd><time>{{ formatTime $val.DepartureTime }}</time></dd>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
</dl>
|
||||
</article>
|
||||
{{ end }}
|
||||
</body>
|
||||
|
|
Loading…
Reference in New Issue