sync/templates/login.pug

55 lines
2.0 KiB
Plaintext
Raw Normal View History

2013-12-26 03:04:26 +00:00
doctype html
html(lang="en")
head
include head
+head()
body
#wrap
nav.navbar.navbar-inverse.navbar-fixed-top(role="navigation")
include nav
+navheader()
#nav-collapsible.collapse.navbar-collapse
ul.nav.navbar-nav
+navdefaultlinks("/login")
if loggedIn
+navlogoutform("/")
section#mainpage.container
if wasAlreadyLoggedIn
.col-lg-6.col-lg-offset-3.col-md-6.col-md-offset-3
.alert.alert-info.messagebox.center
h3(style="margin: 5px auto") Logged in as #{loginName}
else if !loggedIn
.col-lg-6.col-lg-offset-3.col-md-6.col-md-offset-3
if loginError
.alert.alert-danger.messagebox.center
strong Login Failed
p= loginError
h2 Login
form(role="form", action="/login", method="post")
2015-02-23 00:15:22 +00:00
input(type="hidden", name="_csrf", value=csrfToken)
2013-12-27 16:08:03 +00:00
if redirect
2015-02-16 03:56:00 +00:00
input(type="hidden", name="dest", value=redirect)
.form-group
label(for="username") Username
input#username.form-control(type="text", name="name")
.form-group
label(for="password") Password
input#password.form-control(type="password", name="password")
2014-02-01 19:03:08 +00:00
a(href="/account/passwordreset") Forgot password?
.form-group
.checkbox
label
input(type="checkbox", name="remember")
| Remember me
button.btn.btn-success.btn-block(type="submit") Login
else
.col-lg-6.col-lg-offset-3.col-md-6.col-md-offset-3
.alert.alert-success.messagebox.center
strong Login Successful
p Logged in as #{loginName}
if redirect
br
a(href=redirect) Return to previous page
include footer
+footer()