diff options
Diffstat (limited to 'internal/webui/html')
-rw-r--r-- | internal/webui/html/root.html | 17 | ||||
-rw-r--r-- | internal/webui/html/specificStop.html | 16 | ||||
-rw-r--r-- | internal/webui/html/stop.html | 11 |
3 files changed, 32 insertions, 12 deletions
diff --git a/internal/webui/html/root.html b/internal/webui/html/root.html index 97441c8..6b7bd6e 100644 --- a/internal/webui/html/root.html +++ b/internal/webui/html/root.html @@ -1,16 +1,9 @@ -{{ define "title"}}Horaires des prochains trains à Crépieux la Pape{{ end }} +{{ define "title"}}Trains!{{ end }} {{ template "base" . }} {{ define "main" }} -<h3>Horaires des prochains trains à Crépieux la Pape</h3> -<table> - <thead> - <tr><th>Arrivée en gare</th><th>Direction</th></tr> - </thead> - <tbody> - {{ range .Departures }} - <tr{{ if .Odd }} style="color:#111111;"{{ end }}><td>{{ .Arrival }}</td><td>{{ .DisplayName }}</td></tr> - {{ end }} - </tbody> -</table> +<h3>Menu</h3> +<ul> + <li><a href="/stop">Stop list</a></li> +</ul> {{ end }} diff --git a/internal/webui/html/specificStop.html b/internal/webui/html/specificStop.html new file mode 100644 index 0000000..5916927 --- /dev/null +++ b/internal/webui/html/specificStop.html @@ -0,0 +1,16 @@ +{{ define "title"}}Horaires des prochains trains à {{ .Stop }}{{ end }} +{{ template "base" . }} + +{{ define "main" }} +<h3>Horaires des prochains trains à {{ .Stop }}</h3> +<table> + <thead> + <tr><th>Arrivée en gare</th><th>Direction</th></tr> + </thead> + <tbody> + {{ range $i, $elt := .Departures }} + <tr{{ if odd $i }} style="color:#111111;"{{ end }}><td>{{ .Arrival }}</td><td>{{ .Direction }}</td></tr> + {{ end }} + </tbody> +</table> +{{ end }} diff --git a/internal/webui/html/stop.html b/internal/webui/html/stop.html new file mode 100644 index 0000000..33a94c6 --- /dev/null +++ b/internal/webui/html/stop.html @@ -0,0 +1,11 @@ +{{ define "title"}}Choisir une gare{{ end }} +{{ template "base" . }} + +{{ define "main" }} +<h3>Choisir une gare</h3> +<ul> + {{ range $i, $elt := .Stops }} + <li {{ if odd $i }}style="background-color:lightgray;"{{ end }}><a href="/stop/{{ $elt.Id }}">{{ $elt.Name }}</a></li> + {{ end }} +</ul> +{{ end }} |