From ef3842e8fe481f957e8c00780a7eba1170d7b49b Mon Sep 17 00:00:00 2001 From: Nicos Date: Fri, 18 May 2018 05:43:04 +0100 Subject: [PATCH] login style added Relates #11 --- public/css/basic.css | 83 ++++++++++++++++++++++++++++++++++++++++ src/controllers/login.js | 4 +- src/views/login.hbs | 27 +++++++------ 3 files changed, 100 insertions(+), 14 deletions(-) diff --git a/public/css/basic.css b/public/css/basic.css index f98b69b..3824813 100644 --- a/public/css/basic.css +++ b/public/css/basic.css @@ -131,3 +131,86 @@ body { margin: 0; background-color: #74dfb5; font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; } + +main { + height: 100vh; +} + +.section__login { + max-width: 600px; + margin: auto; + padding: 5%; + text-align: center; +} + +.login__title { + font-family: "Londrina Solid"; + color:#F5F6FA; + font-size: 5em; +} + +.login__title--desc { + font-size: 1.5em; + color: #2D3039; + font-weight: 700; + line-height: 1.7em; + letter-spacing: 2px; +} + +.login__desc { + font-size: 1.2em; + color: #2D3039; + font-weight: 700; + text-align: left; + max-width: 75%; + margin: auto; + line-height: 1.5em; +} + +.login__desc p { + margin: .5em; +} + +.login__form--container { + +} + +.login__form { + +} + +.login__form label { + display: none; +} + + + +.login__form input { + background: #F5F6FA; + box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25); + font-size: 1.2em; + padding: 4%; + width: 60%; + margin: 1%; +} + +.login__form--button { + width: 65%; + background: #7BE6BB; + border: 3px solid #F5F6FA; + box-sizing: border-box; + font-size: 1.5em; + font-weight: 700; + color: #F5F6FA; + margin: 5%; + padding: 3%; + bottom: 4%; +} + +.login__error { + color: #D8000C; + background-color: #FFBABA; + width: 70%; + margin: 0em auto; + padding: 2%; +} \ No newline at end of file diff --git a/src/controllers/login.js b/src/controllers/login.js index 772a303..83796f0 100644 --- a/src/controllers/login.js +++ b/src/controllers/login.js @@ -20,12 +20,12 @@ exports.post = (req, res, next) => { req.session.userName = username; res.redirect('/'); } else { - res.render('login', { error: 'Password is incorrect' }); + res.render('login', { layout: 'basic', error: 'Password is incorrect' }); } }) .catch(e => next(e)); } else { - res.render('login', { error: `User "${inputUser}" does not exist` }); + res.render('login', { layout: 'basic', error: `User "${inputUser}" does not exist` }); } }) .catch(e => next(e)); diff --git a/src/views/login.hbs b/src/views/login.hbs index f8fbd9f..0935176 100644 --- a/src/views/login.hbs +++ b/src/views/login.hbs @@ -1,19 +1,22 @@ -
-

Welcome to Well-Bean

-
-

Login Here

-
+
\ No newline at end of file