From 180ee025824d80b4ad0e1f83c1c66724eb0a8e98 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Sun, 25 Oct 2020 12:05:47 +0100 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8=20Implemented=20admin=20authenticatio?= =?UTF-8?q?n?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- templates/base.html | 26 ++-- templates/index.html | 2 +- templates/login.html | 24 +++ templates/shares.html | 2 +- templates/users.html | 2 +- webadmin.go | 340 ++++++++++++++++++++++++++++++++---------- 6 files changed, 308 insertions(+), 88 deletions(-) create mode 100644 templates/login.html diff --git a/templates/base.html b/templates/base.html index 5e4779c..37d5967 100644 --- a/templates/base.html +++ b/templates/base.html @@ -7,17 +7,20 @@ thead { font-weight: bold; } + #content { float: right; width: 100%; background-color: #F0F0F0; } + #menu { float: left; width: 200px; margin-left: -200px; background-color: #CCCCCC; } + #menu span { display: block; } @@ -29,14 +32,19 @@ {{ block "page-styles" . }}{{ end }} -
- {{ block "page-content" . }}{{ end }} -
- -
+
+ {{ block "page-content" . }}{{ end }} +
+ +
\ No newline at end of file diff --git a/templates/index.html b/templates/index.html index 12669f6..9f37c40 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,3 +1,3 @@ {{ define "page-content" }} - Test {{.foo}} + Startpage. {{ end }} \ No newline at end of file diff --git a/templates/login.html b/templates/login.html new file mode 100644 index 0000000..a204152 --- /dev/null +++ b/templates/login.html @@ -0,0 +1,24 @@ + + + + + ShareDAV Login + + +
+
+ + +
+ Beware! You need to have cookies enabled for the login to work.
+ The cookie will be used solely for keeping the session alive. +
+ +
+
+ + \ No newline at end of file diff --git a/templates/shares.html b/templates/shares.html index 1231ebc..4b4d846 100644 --- a/templates/shares.html +++ b/templates/shares.html @@ -21,7 +21,7 @@ {{ define "page-content" }}
- {{ range $share := . }} + {{ range $share := .ShareInfos }}