From 98445c9b10ffc4b16cbec0e4a3741546f0ed99e9 Mon Sep 17 00:00:00 2001 From: Jasper Bok Date: Sun, 13 Aug 2023 18:27:30 +0200 Subject: [PATCH] Add some basic styling --- index.html | 30 +++++++++++++++----------- static/css/busdepartures.css | 41 ++++++++++++++++++++++++++++++++++++ 2 files changed, 59 insertions(+), 12 deletions(-) diff --git a/index.html b/index.html index f1e7c62..e5c2942 100644 --- a/index.html +++ b/index.html @@ -12,20 +12,26 @@ Busvertrektijden -{{ range .Quays }} -
-

{{ .Name }}

-

{{ .Town }}

+
+

Busvertrektijden

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

{{ .Name }}

+

{{ .Town }}

+ +
+ {{ range $i, $val := .Departures }} + {{ if lt $i 3 }} +
{{ $val.RouteShortName }} | {{ $val.StopHeadsign }}
+
+ {{ end }} {{ end }} +
+
{{ end }} -
-
-{{ end }} + \ No newline at end of file diff --git a/static/css/busdepartures.css b/static/css/busdepartures.css index 1a743c8..d3fcd7c 100644 --- a/static/css/busdepartures.css +++ b/static/css/busdepartures.css @@ -1,7 +1,48 @@ +html { + font-family: sans-serif; + font-size: 16px; +} + +body { + margin: 0; + padding: 0; +} + +h1 { + margin: 0; +} + h2 { + font-size: 1.4rem; margin-bottom: 2px; } +p { + font-style: italic; + margin-top: 0; +} + dt { + display: inline-block; font-weight: bold; +} + +dd { + display: inline; +} + +dd::after { + content: "\A"; + white-space: pre; +} + +header { + background: #000; + color: #fff; + padding: 1rem 2rem; + text-align: center; +} + +main { + padding: 1rem 2rem; } \ No newline at end of file