diff --git a/TODO b/TODO index b984412..4a98afa 100644 --- a/TODO +++ b/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). diff --git a/index.html b/index.html index da8553a..da5e22f 100644 --- a/index.html +++ b/index.html @@ -16,12 +16,14 @@

{{ .Name }}

{{ .Town }}

- {{ range .Departures }}
-
{{ .RouteShortName }} | {{ .StopHeadsign }}
-
-
+ {{ range $i, $val := .Departures }} + {{ if lt $i 3 }} +
{{ $val.RouteShortName }} | {{ $val.StopHeadsign }}
+
+ {{ end }} {{ end }} + {{ end }}