From 652fa0b57b9a71d2615a897c6c4e13137e80e4f7 Mon Sep 17 00:00:00 2001 From: Sahat Yalkabov Date: Wed, 4 Dec 2013 14:07:58 -0500 Subject: [PATCH] Signup page now has a similar design as login page --- config/passport.js | 1 + public/css/ios7.less | 9 ++++++++ views/contact.jade | 8 +++---- views/signup.jade | 50 ++++++++++++++++++++++++++++++-------------- 4 files changed, 47 insertions(+), 21 deletions(-) diff --git a/config/passport.js b/config/passport.js index 3a0d8316af..6263ffe872 100755 --- a/config/passport.js +++ b/config/passport.js @@ -20,6 +20,7 @@ passport.deserializeUser(function(id, done) { passport.use(new LocalStrategy({ usernameField: 'usernameEmail' }, + // TODO: findOne by email or username function(email, password, done) { User.findOne({ email: email }, function(err, user) { if (err) return done(err); diff --git a/public/css/ios7.less b/public/css/ios7.less index 35d595121f..b1faf11ed5 100644 --- a/public/css/ios7.less +++ b/public/css/ios7.less @@ -60,6 +60,11 @@ a { } +// Alerts ====================================================================== +.alert { + border-radius: 0px; +} + // Buttons ==================================================================== .btn { font-weight: 300; @@ -330,6 +335,10 @@ input[type="radio"]:checked + span:after { left: 50%; margin: -190px 0 15px -190px; + &.signup { + height: 430px; + margin-top: -215px; + } .form-group { position: relative; margin-bottom: 0; diff --git a/views/contact.jade b/views/contact.jade index 512c47f4ac..b2646aefe0 100644 --- a/views/contact.jade +++ b/views/contact.jade @@ -3,7 +3,7 @@ extends layout block content .panel.panel-default .panel-heading - i.fa.fa-envelope + i.fa.fa-envelope-o | Contact Form .panel-body form.form-horizontal(role='form', method='POST') @@ -15,12 +15,10 @@ block content label(class='col-sm-2 control-label', for='contactBody') Body .col-sm-10 textarea.form-control(type='text', name='contactBody', id='contactBody', rows='7') + p.help-block Powered by SendGrid .form-group .col-sm-offset-2.col-sm-10 - button.btn.btn-primary(type='submit') - i.fa.fa-location-arrow - | Send - button.btn.btn-link(disabled='') Powered by SendGrid + button.btn.btn-primary(type='submit') Send if error.length .alert.alert-danger diff --git a/views/signup.jade b/views/signup.jade index 3afb378183..11afe17e8f 100644 --- a/views/signup.jade +++ b/views/signup.jade @@ -1,28 +1,46 @@ extends layout block content - .main - h3 Signup Form - form(role='form', method='POST') + if messages.length + .alert.alert-danger + strong= messages + .login-container.signup + h3.text-center + span.text-primary PROJECT + span.text-muted NAME + form(method='POST') .form-group - .row - .col-xs-6.col-sm-6.col-md-6 - label.control-label(for='firstName') First Name - input.form-control(type='text', name='firstName', id='firstName', placeholder='First Name', autofocus='') - .col-xs-6.col-sm-6.col-md-6 - label.control-label(for='lastName') Last Name - input.form-control(type='text', name='lastName', id='lastName', placeholder='Last Name') - .form-group - label.control-label(for='email') Email input.form-control(type='email', name='email', id='email', placeholder='Email') .form-group - label.control-label(for='password') Password input.form-control(type='password', name='password', id='password', placeholder='Password') .form-group - label.control-label(for='confirmPassword') Confirm Password input.form-control(type='password', name='confirmPassword', id='confirmPassword', placeholder='Confirm Password') - .form-group - button.btn.btn.btn-primary(type='submit') Signup + button(type='submit') + i.fa.fa-chevron-right + .form-options.clearfix + label.checkbox + input(type='checkbox') + span I agree to terms and conditions + .row + .col-xs-6.col-sm-6.col-md-6 + a.btn.btn-primary.btn-block.facebook(href='/auth/facebook') + i.fa.fa-facebook + | Facebook + .col-xs-6.col-sm-6.col-md-6 + a.btn.btn-danger.btn-block.google(href='/auth/google') + i.fa.fa-google-plus + | Google + .row + .col-xs-6.col-sm-6.col-md-6 + a.btn.btn-info.btn-block.twitter(href='/auth/twitter') + i.fa.fa-twitter + | Twitter + .col-xs-6.col-sm-6.col-md-6 + a.btn.btn-default.btn-block.github(href='/auth/github') + i.fa.fa-github + | GitHub + p Already have an account?  + a(href='/login') Login now if messages.length .alert.alert-danger