From 1707cbcb5453e3603c4474fcc5f7fdfb46857c04 Mon Sep 17 00:00:00 2001 From: Pierre Donias Date: Wed, 14 Sep 2016 17:56:05 +0200 Subject: [PATCH] feat(signin): use XO 5 style (#394) Fixes vatesfr/xo-web#1161 --- signin.pug | 94 +++++++++++++++++++++++----------------------------- src/index.js | 2 +- 2 files changed, 43 insertions(+), 53 deletions(-) diff --git a/signin.pug b/signin.pug index bbe69ac13..dd3f8fb28 100644 --- a/signin.pug +++ b/signin.pug @@ -6,55 +6,45 @@ html meta(name = 'viewport' content = 'width=device-width, initial-scale=1.0') title Xen Orchestra meta(name = 'author' content = 'Vates SAS') - link(rel = 'stylesheet' href = 'styles/main.css') - link(rel = 'stylesheet' href = 'v4/styles/main.css') - body - .container - .row-login - .page-header - img(src = 'images/logo_small.png') - h2 Xen Orchestra - form.form-horizontal(action = 'signin/local' method = 'post') - fieldset - legend.login - h3 Sign in - if error - p.text-danger #{error} - .form-group - .col-sm-12 - .input-group - span.input-group-addon - i.xo-icon-user.fa-fw - input.form-control.input-sm( - name = 'username' - type = 'text' - placeholder = 'Username' - required - ) - .form-group - .col-sm-12 - .input-group - span.input-group-addon - i.fa.fa-key.fa-fw - input.form-control.input-sm( - name = 'password' - type = 'password' - placeholder = 'Password' - required - ) - .form-group - .col-sm-5 - .checkbox - label - input( - name = 'remember-me' - 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} + link(rel = 'stylesheet' href = 'index.css') + body(style = 'display: flex; height: 100vh;') + div(style = 'margin: auto; width: 20em;') + div.m-b-2(style = 'display: flex;') + img(src = 'assets/logo.png' style = 'margin: auto;') + h2.text-xs-center.m-b-2 Xen Orchestra + form(action = 'signin/local' method = 'post') + fieldset + if error + p.text-danger #{error} + .input-group.m-b-1 + span.input-group-addon + i.xo-icon-user.fa-fw + input.form-control( + name = 'username' + type = 'text' + placeholder = 'Username' + required + ) + .input-group.m-b-1 + span.input-group-addon + i.fa.fa-key.fa-fw + input.form-control( + name = 'password' + type = 'password' + placeholder = 'Password' + required + ) + .checkbox + label + input( + name = 'remember-me' + type = 'checkbox' + ) + |   + | Remember me + div + button.btn.btn-block.btn-info + i.fa.fa-sign-in + | Sign in + each label, id in strategies + div: a(href = 'signin/' + id) Sign in with #{label} diff --git a/src/index.js b/src/index.js index 2b415a382..f03fa29bf 100644 --- a/src/index.js +++ b/src/index.js @@ -179,7 +179,7 @@ async function setUpPassport (express, xo) { next() } else if (req.cookies.token) { next() - } else if (/favicon|fontawesome|images|styles/.test(url)) { + } else if (/favicon|fontawesome|images|styles|\.(?:css|jpg|png)$/.test(url)) { next() } else { req.flash('return-url', url)