feat(signin): use XO 5 style (#394)

Fixes vatesfr/xo-web#1161
This commit is contained in:
Pierre Donias 2016-09-14 17:56:05 +02:00 committed by Julien Fontanet
parent 6d6a630c31
commit 1707cbcb54
2 changed files with 43 additions and 53 deletions

View File

@ -6,55 +6,45 @@ html
meta(name = 'viewport' content = 'width=device-width, initial-scale=1.0') meta(name = 'viewport' content = 'width=device-width, initial-scale=1.0')
title Xen Orchestra title Xen Orchestra
meta(name = 'author' content = 'Vates SAS') meta(name = 'author' content = 'Vates SAS')
link(rel = 'stylesheet' href = 'styles/main.css') link(rel = 'stylesheet' href = 'index.css')
link(rel = 'stylesheet' href = 'v4/styles/main.css') body(style = 'display: flex; height: 100vh;')
body div(style = 'margin: auto; width: 20em;')
.container div.m-b-2(style = 'display: flex;')
.row-login img(src = 'assets/logo.png' style = 'margin: auto;')
.page-header h2.text-xs-center.m-b-2 Xen Orchestra
img(src = 'images/logo_small.png') form(action = 'signin/local' method = 'post')
h2 Xen Orchestra fieldset
form.form-horizontal(action = 'signin/local' method = 'post') if error
fieldset p.text-danger #{error}
legend.login .input-group.m-b-1
h3 Sign in span.input-group-addon
if error i.xo-icon-user.fa-fw
p.text-danger #{error} input.form-control(
.form-group name = 'username'
.col-sm-12 type = 'text'
.input-group placeholder = 'Username'
span.input-group-addon required
i.xo-icon-user.fa-fw )
input.form-control.input-sm( .input-group.m-b-1
name = 'username' span.input-group-addon
type = 'text' i.fa.fa-key.fa-fw
placeholder = 'Username' input.form-control(
required name = 'password'
) type = 'password'
.form-group placeholder = 'Password'
.col-sm-12 required
.input-group )
span.input-group-addon .checkbox
i.fa.fa-key.fa-fw label
input.form-control.input-sm( input(
name = 'password' name = 'remember-me'
type = 'password' type = 'checkbox'
placeholder = 'Password' )
required |  
) | Remember me
.form-group div
.col-sm-5 button.btn.btn-block.btn-info
.checkbox i.fa.fa-sign-in
label | Sign in
input( each label, id in strategies
name = 'remember-me' div: a(href = 'signin/' + id) Sign in with #{label}
type = 'checkbox'
)
| Remember me
.form-group
.col-sm-12
button.btn.btn-login.btn-block.btn-success
i.fa.fa-sign-in
| Sign in
each label, id in strategies
div: a(href = 'signin/' + id) Sign in with #{label}

View File

@ -179,7 +179,7 @@ async function setUpPassport (express, xo) {
next() next()
} else if (req.cookies.token) { } else if (req.cookies.token) {
next() next()
} else if (/favicon|fontawesome|images|styles/.test(url)) { } else if (/favicon|fontawesome|images|styles|\.(?:css|jpg|png)$/.test(url)) {
next() next()
} else { } else {
req.flash('return-url', url) req.flash('return-url', url)