From 4a2fb7e82d5d617298cb28b66485fc6f30c55781 Mon Sep 17 00:00:00 2001
From: Julien Dessaux
Date: Wed, 21 Apr 2021 17:23:07 +0200
Subject: Reworked the webui package, added authentication feature and tests
---
internal/webui/html/base.html | 18 ++++++++++++++++++
internal/webui/html/index.html | 24 ------------------------
internal/webui/html/login.html | 13 +++++++++++++
internal/webui/html/root.html | 15 +++++++++++++++
4 files changed, 46 insertions(+), 24 deletions(-)
create mode 100644 internal/webui/html/base.html
delete mode 100644 internal/webui/html/index.html
create mode 100644 internal/webui/html/login.html
create mode 100644 internal/webui/html/root.html
(limited to 'internal/webui/html')
diff --git a/internal/webui/html/base.html b/internal/webui/html/base.html
new file mode 100644
index 0000000..7522e94
--- /dev/null
+++ b/internal/webui/html/base.html
@@ -0,0 +1,18 @@
+{{ define "base" }}
+
+
+
+
+ {{ .Title }}
+
+
+
+
+
+
+
+ {{ template "main" . }}
+
+
+
+{{ end }}
diff --git a/internal/webui/html/index.html b/internal/webui/html/index.html
deleted file mode 100644
index a0a7d82..0000000
--- a/internal/webui/html/index.html
+++ /dev/null
@@ -1,24 +0,0 @@
-
-
-
-
- {{ .Title }}
-
-
-
-
-
-
- Horaires des prochains trains à Crépieux la Pape
-
-
- Arrivée en gare | Direction |
-
-
- {{ range .Departures }}
- {{ .Arrival }} | {{ .DisplayName }} |
- {{ end }}
-
-
-
-
diff --git a/internal/webui/html/login.html b/internal/webui/html/login.html
new file mode 100644
index 0000000..33e9f02
--- /dev/null
+++ b/internal/webui/html/login.html
@@ -0,0 +1,13 @@
+{{ template "base" . }}
+
+{{ define "main" }}
+
+{{ end }}
diff --git a/internal/webui/html/root.html b/internal/webui/html/root.html
new file mode 100644
index 0000000..a293ee7
--- /dev/null
+++ b/internal/webui/html/root.html
@@ -0,0 +1,15 @@
+{{ template "base" . }}
+
+{{ define "main" }}
+Horaires des prochains trains à Crépieux la Pape
+
+
+ Arrivée en gare | Direction |
+
+
+ {{ range .Departures }}
+ {{ .Arrival }} | {{ .DisplayName }} |
+ {{ end }}
+
+
+{{ end }}
--
cgit v1.2.3