From: Luigi Pinca Date: Sat, 31 May 2014 09:41:26 +0000 (+0200) Subject: adjusted the style of the ban message X-Git-Url: https://git.saalbach.dev/?a=commitdiff_plain;h=8aade802d8604f60d292d5afd8e45d41a1c7a4e3;p=binbsis50.git adjusted the style of the ban message --- diff --git a/lib/middleware/ban-handler.js b/lib/middleware/ban-handler.js index 0b9bdc4..4af0efc 100644 --- a/lib/middleware/ban-handler.js +++ b/lib/middleware/ban-handler.js @@ -24,9 +24,11 @@ module.exports = function(req, res, next) { return next(); } + ttl = Math.round(ttl / 60); + res.render('banned', { slogan: utils.randomSlogan(), - ttl: Math.round(ttl / 60) + ttl: (ttl || 'less than a') + ' minute' + (ttl < 2 ? '' : 's') }); }); }; diff --git a/public/css/style.css b/public/css/style.css index efad561..e6d83b5 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -92,11 +92,13 @@ form .clearfix { } .well { background-color: #DDDDDD; - margin-bottom: 18px; } .alert { margin-bottom: 9px; } +.ban, .leaderboard-wrapper, .well, #summary { + margin-bottom: 18px; +} .submit-button { margin-left: 120px; margin-top: 9px; @@ -194,7 +196,6 @@ form .clearfix { .leaderboard-wrapper { height: 349px; overflow: auto; - margin-bottom: 18px; -webkit-border-radius: 4px; -moz-border-radius: 4px; border-radius: 4px; @@ -554,7 +555,6 @@ form .clearfix { } #summary { text-align: center; - margin-bottom: 18px; } #users-wrapper { margin-left: 120px; diff --git a/views/banned.jade b/views/banned.jade index 6adde56..1556b60 100644 --- a/views/banned.jade +++ b/views/banned.jade @@ -7,10 +7,10 @@ block sections section .row .span12.offset2 - .alert.alert-error.alert-block + .alert.alert-error.alert-block.ban h4.alert-heading Error! | Yuo have been banned. br - | Your ban will expire in #{ttl} minutes. + | Your ban will expire in #{ttl}. block scripts