Added Hackerspace state change time
parent
b2d9d1eb60
commit
560ee5e773
|
@ -98,6 +98,10 @@ h1, h2, h3, h4, h5, h6 {
|
|||
|
||||
.status {
|
||||
text-align: center;
|
||||
font-size: 7em;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.status h1 {
|
||||
font-size: 7em;
|
||||
margin: 0;
|
||||
line-height: 1em;
|
||||
}
|
10
js/level2.js
10
js/level2.js
|
@ -218,12 +218,18 @@ function l2status() {
|
|||
|
||||
var status = JSON.parse( response.responseText );
|
||||
|
||||
var timeStamp = moment.unix( status.lastchange ).format( 'HH:mm' );
|
||||
|
||||
$('.status').removeClass('open').removeClass('closed');
|
||||
|
||||
if ( status.state.open ) {
|
||||
$('.status').addClass('open').text('Open');
|
||||
$('.status')
|
||||
.addClass('open')
|
||||
.html('<h1>Open</h1>since ' + timeStamp);
|
||||
} else {
|
||||
$('.status').addClass('closed').text('Closed');
|
||||
$('.status')
|
||||
.addClass('closed')
|
||||
.html('<h1>Closed</h1>since ' + timeStamp);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue