Style, Time and busses

Changed the style to be a bit more responsive
Time is now 24h
If time difference is under 0 (next day) we don’t change the color to
warning or danger
master
Thierry Degeling 2014-07-20 21:36:13 +02:00
parent 5d28934e94
commit a91d145d04
2 changed files with 6 additions and 6 deletions

View File

@ -18,18 +18,18 @@
<div class="row"> <div class="row">
<div class="col-md-4 logo"> <div class="col-sm-4 logo">
Level2 Level2
</div> </div>
<div class="col-md-4 datetime"> <div class="col-sm-4 datetime">
<h1 class="time"></h1> <h1 class="time"></h1>
<h3 class="date"></h3> <h3 class="date"></h3>
</div> </div>
<div class="col-md-4 weather"> <div class="col-sm-4 weather">
<div class="row"> <div class="row">
<div class="col-xs-6"> <div class="col-xs-6">

View File

@ -26,7 +26,7 @@
function refreshTime() { function refreshTime() {
$('.time').text( moment().format('h:mm') ); $('.time').text( moment().format('HH:mm') );
$('.date').text( moment().format('MMMM Do YYYY') ); $('.date').text( moment().format('MMMM Do YYYY') );
} }
@ -76,11 +76,11 @@ function refreshContent() {
timeLeftMessage = 'departure in ' + timeDifference + 'minutes'; timeLeftMessage = 'departure in ' + timeDifference + 'minutes';
if ( timeDifference <= 5 ) { if ( timeDifference <= 5 && timeDifference > -1 ) {
labelColor = "danger"; labelColor = "danger";
} else if ( timeDifference <= 10) { } else if ( timeDifference <= 10 && timeDifference > -1 ) {
labelColor = "warning"; labelColor = "warning";