2016-04-18 15:43:35 +00:00
|
|
|
extends ../layout
|
|
|
|
block content
|
|
|
|
.text-center
|
|
|
|
h2 Sign in with one of these options if you used them as your original login methods :
|
|
|
|
br
|
|
|
|
a.btn.btn-lg.btn-block.btn-social.btn-facebook(href='/auth/facebook')
|
|
|
|
i.fa.fa-facebook
|
|
|
|
| Sign in with Facebook
|
|
|
|
a.btn.btn-lg.btn-block.btn-social.btn-google(href='/auth/google')
|
|
|
|
i.fa.fa-google
|
|
|
|
| Sign in with Google
|
|
|
|
a.btn.btn-lg.btn-block.btn-social.btn-linkedin(href='/auth/linkedin')
|
|
|
|
i.fa.fa-linkedin
|
|
|
|
| Sign in with LinkedIn
|
|
|
|
a.btn.btn-lg.btn-block.btn-social.btn-twitter(href='/auth/twitter')
|
|
|
|
i.fa.fa-twitter
|
|
|
|
| Sign in with Twitter
|
|
|
|
|
|
|
|
script.
|
|
|
|
$(document).ready(function() {
|
2016-05-06 14:37:48 +00:00
|
|
|
var method = localStorage.getItem('lastSigninMethodDeprecated'),
|
2016-04-18 15:43:35 +00:00
|
|
|
btnSelector = 'a.btn.btn-lg.btn-block.btn-social';
|
|
|
|
if (method) {
|
|
|
|
try {
|
|
|
|
var obj = JSON.parse(method);
|
|
|
|
} catch(e) {
|
|
|
|
console.error('Invalid sign in object stored', method);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
$.each($(btnSelector), function(i, item) {
|
|
|
|
if (
|
|
|
|
$(item).attr('href') === obj.methodLink &&
|
|
|
|
$(item).hasClass(obj.methodClass)
|
|
|
|
) {
|
|
|
|
$(item).addClass('active');
|
|
|
|
$(item).attr('title', 'This is your last signin method');
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|
|
|
|
|
|
|
|
$(btnSelector).click(function() {
|
|
|
|
var obj = {};
|
|
|
|
$(this).removeClass('active');
|
|
|
|
obj.methodClass = $(this).attr('class').split(' ').pop();
|
|
|
|
obj.methodLink = $(this).attr('href');
|
2016-05-06 14:37:48 +00:00
|
|
|
localStorage.setItem('lastSigninMethodDeprecated', JSON.stringify(obj));
|
2016-04-18 15:43:35 +00:00
|
|
|
});
|
|
|
|
});
|