Made bigger social logi buttons for desktops/tablets

master
Keith Irwin 2017-04-16 17:23:15 -04:00
parent 21df06aa62
commit e222b62f82
No known key found for this signature in database
GPG Key ID: 378933C743E2BBC0
3 changed files with 74 additions and 40 deletions

View File

@ -27,26 +27,26 @@ router.route('/')
//TODO: Validate everything!
User.findByIdAndUpdate(req.user.id, {$set:{
name: xss(req.body.name),
slug: slug(xss(req.body.slug)),
email: req.body.email,
settings: {
units: req.body.units,
defaultMap: req.body.map,
defaultZoom: req.body.zoom,
showSpeed: (req.body.showSpeed)?true:false,
showAlt: (req.body.showAlt)?true:false,
showStreetview: (req.body.showStreet)?true:false
}
}})
.then( (user)=>{
req.flash('success', 'Settings updated. ');
res.redirect('/settings');
})
.catch( (err)=>{
mw.throwErr(err,req);
res.redirect('/settings');
});
name: xss(req.body.name),
slug: slug(xss(req.body.slug)),
email: req.body.email,
settings: {
units: req.body.units,
defaultMap: req.body.map,
defaultZoom: req.body.zoom,
showSpeed: (req.body.showSpeed)?true:false,
showAlt: (req.body.showAlt)?true:false,
showStreetview: (req.body.showStreet)?true:false
}
}})
.then( (user)=>{
req.flash('success', 'Settings updated. ');
res.redirect('/settings');
})
.catch( (err)=>{
mw.throwErr(err,req);
res.redirect('/settings');
});
} )
@ -140,7 +140,8 @@ router.route('/password/:token')
if (daysToCrack<10) {
mw.throwErr(new Error(`That password could be cracked in ${daysToCrack} days! Come up with a more complex password that would take at least 10 days to crack. `));
res.redirect(`/settings/password/${req.params.token}`);
} else {
}
else {
// Delete token
res.locals.passwordUser.auth.passToken = undefined;

View File

@ -13,37 +13,57 @@ form #social-login {
}
#social-login .btn {
padding: 0;
font-size: 1.3em;
height: 60px;
padding: 2%;
text-align: center;
width: 60px;
margin: 0 3%;
color: #FFF;
} #social-login .btn .fa {
margin: 0;
}
#social-login .btn .fa {
position: relative;
padding-top: 20px;
} #social-login .btn.gp {
}
#social-login .btn .text {
font-size: .8em;
}
#social-login .btn.gp {
background: rgb(206,77,57);
} #social-login .btn.gp:hover {
}
#social-login .btn.gp:hover {
background: rgb(251,122,102);
} #social-login .btn.fb {
}
#social-login .btn.fb {
background: rgb(48,88,145);
} #social-login .btn.fb:hover {
}
#social-login .btn.fb:hover {
background: rgb(93,133,190);
} #social-login .btn.tw {
}
#social-login .btn.tw {
background: rgb(44,168,210);
} #social-login .btn.tw:hover {
}
#social-login .btn.tw:hover {
background: rgb(89,213,255);
}
@media (max-width: 600px) {
#social-login .btn {
padding: 0;
width: 60px;
height: 60px;
}
#social-login .btn .text {
display: none;
}
#social-login .btn .fa {
margin: 18px auto;
}
}
@media (max-width: 800px) {
section > .flex {
flex-direction: column;
}
section > .flex > div {
width: 100%;
}
hr.hide { display:block; }
}
hr { display: block; }
}

View File

@ -25,9 +25,22 @@
<form method="post">
<div id='social-login' class='flex form-group' style="justify-content:space-around">
<a href="/login/google" class='gp btn'><i class="fa fa-google-plus"></i></a>
<a href="/login/facebook" class='fb btn'><i class="fa fa-facebook"></i></a>
<a href="/login/twitter" class='tw btn'><i class="fa fa-twitter"></i></a>
<a href="/login/google" class='gp btn'>
<i class="fa fa-google-plus"></i>
<span class='text'>Login with Google</span>
</a>
<a href="/login/facebook" class='fb btn'>
<i class="fa fa-facebook"></i>
<span class='text'>Login with Facebook</span>
</a>
<a href="/login/twitter" class='tw btn'>
<i class="fa fa-twitter"></i>
<span class='text'>Login with Twitter</span>
</a>
</div>
<div class='form-group' style="flex-wrap:wrap">
@ -41,7 +54,7 @@
</form>
</div>
<hr class='hide'>
<hr style="display:none">
<div id='signup'>
<h3>Create account</h3>