Unify signin and signup with lesser clicks

This commit is contained in:
Mrugesh Mohapatra
2016-11-30 23:52:11 +05:30
committed by Berkeley Martinez
parent fd442c55bb
commit e941545d2e
4 changed files with 21 additions and 12 deletions

View File

@ -15,6 +15,9 @@ block content
a.btn.btn-lg.btn-block.btn-social.btn-twitter(href='/auth/twitter') a.btn.btn-lg.btn-block.btn-social.btn-twitter(href='/auth/twitter')
i.fa.fa-twitter i.fa.fa-twitter
| Sign in with Twitter | Sign in with Twitter
br
p
a(href="/signin") Or click here to go back.
script. script.
$(document).ready(function() { $(document).ready(function() {

View File

@ -10,7 +10,7 @@ block content
#flash-content #flash-content
.row .row
.text-center .text-center
h2 Sign in with your Email here: h2 Sign in with an Email here:
.button-spacer .button-spacer
.col-sm-6.col-sm-offset-3 .col-sm-6.col-sm-offset-3
form(method='POST', action='/passwordless-auth') form(method='POST', action='/passwordless-auth')
@ -25,7 +25,13 @@ block content
.col-sm-6.col-sm-offset-3 .col-sm-6.col-sm-offset-3
br br
p.text-center p.text-center
a(href="/signup") Or Click here if you want to sign up. | Free Code Camp uses passwordless authentication.
br
| If you are a new camper use any email, and sign up instantly,
| or use your existing email with us, if you already have an account.
br
p.text-center
a(href="/signin") Or click here if you want to sign in with other options.
script. script.
$(document).ready(function() { $(document).ready(function() {

View File

@ -1,19 +1,19 @@
extends ../layout extends ../layout
block content block content
.text-center .text-center
h2 Are you a returning camper? h2 Welcome to Free Code Camp.
br br
.button-spacer .button-spacer
| Sign in with one of these options: | Sign in or Sign up with one of these options:
a.btn.btn-lg.btn-block.btn-social.btn-primary(href='/email-signin') a.btn.btn-lg.btn-block.btn-social.btn-primary(href='/email-signin')
i.fa.fa-envelope i.fa.fa-envelope
| Sign in with Email | Continue with Email
a.btn.btn-lg.btn-block.btn-social.btn-github(href='/auth/github') a.btn.btn-lg.btn-block.btn-social.btn-github(href='/auth/github')
i.fa.fa-github i.fa.fa-github
| Sign in with GitHub | Continue with GitHub
br br
p p
a(href="/deprecated-signin") Click here if you previously signed in using a different method. a(href="/deprecated-signin") Or click here if you previously signed up using a different method.
script. script.
$(document).ready(function() { $(document).ready(function() {
@ -43,7 +43,7 @@ block content
$(this).removeClass('active'); $(this).removeClass('active');
obj.methodClass = $(this).attr('class').split(' ').pop(); obj.methodClass = $(this).attr('class').split(' ').pop();
obj.method = $(this).text(); obj.method = $(this).text();
if(obj.method === "Sign in with Email" || obj.method === "Sign in with GitHub") { if(obj.method === "Continue with Email" || obj.method === "Continue in with GitHub") {
localStorage.setItem('lastSigninMethod', JSON.stringify(obj)); localStorage.setItem('lastSigninMethod', JSON.stringify(obj));
} else { } else {
localStorage.removeItem('lastSigninMethod'); localStorage.removeItem('lastSigninMethod');

View File

@ -28,7 +28,7 @@ nav.navbar.navbar-default.navbar-static-top.nav-height
a(href='https://www.freecodecamp.org/donate') Donate a(href='https://www.freecodecamp.org/donate') Donate
if !user if !user
li li
a(href='/signup') Sign Up a(href='/signin') Sign In
else else
li.avatar-points li.avatar-points
a(href='/settings') a(href='/settings')