aboutsummaryrefslogtreecommitdiffhomepage
path: root/template/html/login.html
diff options
context:
space:
mode:
authorGravatar Frédéric Guillot <fred@miniflux.net>2018-01-02 22:04:48 -0800
committerGravatar Frédéric Guillot <fred@miniflux.net>2018-01-02 22:04:48 -0800
commit320d1b016747ba4501da9417d9ce5f99368a5768 (patch)
tree1054d96afde6022951b76cc4a09b78e1e3f05058 /template/html/login.html
parentc39f2e1a8d2de6d412bcc673d29eb0f7a2d1f5f7 (diff)
Refactor packages to have more idiomatic code base
Diffstat (limited to 'template/html/login.html')
-rw-r--r--template/html/login.html28
1 files changed, 28 insertions, 0 deletions
diff --git a/template/html/login.html b/template/html/login.html
new file mode 100644
index 0000000..906458a
--- /dev/null
+++ b/template/html/login.html
@@ -0,0 +1,28 @@
+{{ define "title"}}{{ t "Sign In" }}{{ end }}
+
+{{ define "content"}}
+<section class="login-form">
+ <form action="{{ route "checkLogin" }}" method="post">
+ <input type="hidden" name="csrf" value="{{ .csrf }}">
+
+ {{ if .errorMessage }}
+ <div class="alert alert-error">{{ t .errorMessage }}</div>
+ {{ end }}
+
+ <label for="form-username">{{ t "Username" }}</label>
+ <input type="text" name="username" id="form-username" value="{{ .form.Username }}" required autofocus>
+
+ <label for="form-password">{{ t "Password" }}</label>
+ <input type="password" name="password" id="form-password" value="{{ .form.Password }}" required>
+
+ <div class="buttons">
+ <button type="submit" class="button button-primary" data-label-loading="{{ t "Loading..." }}">{{ t "Sign in" }}</button>
+ </div>
+ </form>
+ {{ if hasOAuth2Provider "google" }}
+ <div class="oauth2">
+ <a href="{{ route "oauth2Redirect" "provider" "google" }}">{{ t "Sign in with Google" }}</a>
+ </div>
+ {{ end }}
+</section>
+{{ end }}