From a8073d5f0af923583916f6fd3aa5f1504907c3b6 Mon Sep 17 00:00:00 2001 From: mossa-Sammer Date: Wed, 28 Aug 2019 15:33:30 +0300 Subject: [PATCH] forms styling done relates #33 --- public/css/style.css | 81 ++++++++++++++++++++++++++++++++++++ src/controllers/postLogin.js | 4 +- src/views/emailLogin.hbs | 25 +++++++++++ src/views/layouts/main.hbs | 3 ++ src/views/login.hbs | 39 ++++++++++------- src/views/signup.hbs | 68 ++++++++++++++++-------------- 6 files changed, 170 insertions(+), 50 deletions(-) create mode 100644 src/views/emailLogin.hbs diff --git a/public/css/style.css b/public/css/style.css index 839891f9..e501d83e 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -1,3 +1,84 @@ +@import url('https://fonts.googleapis.com/css?family=Raleway'); + +*{ + box-sizing:border-box; + margin:0px; + padding:0px; + } + +body{ + font-family:'Raleway'; + line-height:1.8; +} + +a{ + text-decoration:none; +} + +#container{ + background:#344a72; + margin:30px auto; + max-width:400px; + padding:20px; +} + +.form-wrap{ + background:#fff; + padding:15px 25px; +} + +.form-wrap h1,.form-wrap p{ + text-align:center; +} + +.form-wrap .form-group{ + margin-top:15px; +} + +.form-wrap .form-group label{ + display:block; +} + +.form-wrap .form-group input{ + width:100%; + padding:10px; + border:1px solid #ddd; + border-radius:5px; +} + +.form-wrap .btn{ + background:#49c1a2; + color:#fff; + width:100%; + display:block; + padding:10px; + margin-top:10px; + cursor:pointer; + border-radius:5px; +} + +.form-wrap .btn:hover{ + background:#37a08e; +} +.form-wrap .bottom-text{ + font-size:13px; + margin-top:20px; +} + +.form-footer{ + text-align:center; + margin-top:10px; +} + +.form-footer p{ + color:#fff; +} + +.form-footer a{ +color:#49c1a2; +} + + .error { display: flex; justify-content: center; diff --git a/src/controllers/postLogin.js b/src/controllers/postLogin.js index 2fa618e8..4523f7fb 100644 --- a/src/controllers/postLogin.js +++ b/src/controllers/postLogin.js @@ -18,11 +18,11 @@ exports.postLogin = (req, res, next) => { res.cookie('login', token); // console.log(req.cookies.login); - res.redirect('/'); + res.redirect('/profile'); }) .catch((err) => { console.log('sdfjlsdjflsd'); - if (err.message === 'user not found') { res.send('

not kfnhkn

'); } + if (err.message === 'user not found') { res.send('

Go Home

'); } }); diff --git a/src/views/emailLogin.hbs b/src/views/emailLogin.hbs new file mode 100644 index 00000000..0bb923b1 --- /dev/null +++ b/src/views/emailLogin.hbs @@ -0,0 +1,25 @@ +
+
+

Sign In

+

don't have an account? Sign up

+ +
+
+ + +
+ + +
+ + +
+ + + + +

sign in with username insted | use username +

+
+
+
\ No newline at end of file diff --git a/src/views/layouts/main.hbs b/src/views/layouts/main.hbs index ca62f638..9f75995b 100644 --- a/src/views/layouts/main.hbs +++ b/src/views/layouts/main.hbs @@ -4,10 +4,13 @@ + Tweet Your Opinion {{{body}}} {{> footer}} + + \ No newline at end of file diff --git a/src/views/login.hbs b/src/views/login.hbs index fa610e52..3a2957da 100644 --- a/src/views/login.hbs +++ b/src/views/login.hbs @@ -1,18 +1,25 @@ -
-
-
- - -
+
+
+

Sign In

+

don't have an account? Sign up

+ + +
+ + +
-
- - -
- -
- -
- - + +
+ + +
+ + + + +

sign in with email insted | use email +

+ +
\ No newline at end of file diff --git a/src/views/signup.hbs b/src/views/signup.hbs index 997cd1cc..b5ccadc2 100644 --- a/src/views/signup.hbs +++ b/src/views/signup.hbs @@ -1,38 +1,42 @@ -
-
-
- - -
+
+
+

Sign Up

+

do you already have an account? Login

+ + +
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - -
+
+ + +
-
- - +
+ + +
+ +
+ + +
-
- -
- - -
- -
- -
- + +

By clicking the sign up button you agree to our Terms & Conditions + and Privacy Policy

+ +
\ No newline at end of file