added clock

This commit is contained in:
martind2000 2016-03-01 00:43:34 +00:00
parent 527dd8ce9c
commit 66e60b233d
2 changed files with 118 additions and 53 deletions

View File

@ -1,8 +1,8 @@
@media (min-width:800px) {
body {
font-family: 'Roboto Slab', "Helvetica Neue", Helvetica, Arial;
}
#clock {
font-family: 'Share Tech Mono';
position: absolute;
@ -49,3 +49,62 @@ body {
text-align: center;
text-transform: capitalize;
}
}
@media (min-width:1024px){
body {
font-family: 'Roboto Slab', "Helvetica Neue", Helvetica, Arial;
background-color: #212121;
color: #fff;
}
#clock {
font-family: 'Share Tech Mono';
position: absolute;
top: 0;
left: 0;
width: 1024px;
height: 384px;
background-color: #212121;
font-size: 180px;
text-align: center;
vertical-align: middle;
color: #fff;
}
#clockDisplay {
margin-top: 50;
}
#weather {
position: absolute;
top: 384px;
left: 0;
width: 1024px;
height: 192px;
background-color: #312121;
}
#misc {
position: absolute;
top: 576px;
left: 0;
width: 1024px;
height: 192px;
background-color: #213121;
}
.weatherBit {
color: #fff;
font-size: 36px;
}
.wday {
color: #fff;
text-align: center;
text-transform: capitalize;
}
}

View File

@ -45,13 +45,12 @@
$('#wTtext').empty().html(storedData.data.weather.today);
// $('#wDaily').empty();
for( var t=0; t<storedData.data.weather.data.daily.data.length;t++)
{
for (var t = 0; t < storedData.data.weather.data.daily.data.length; t++) {
var m = 'icon' + (t + 1).toString();
var d = '#d' + (t + 1).toString();
var ts = parseInt(storedData.data.weather.data.daily.data[t].time) * 1000;
var n = Date.create(ts).format('{weekday}');
// var m = '<td>' + storedData.data.weather.data.daily.data[t].icon + '</td>';
skycons.add(m, storedData.data.weather.data.daily.data[t].icon);
$(d).empty().html(n);
}
@ -98,7 +97,14 @@
}, 1000);
}
function refresh() {
setInterval(function () {
getData()
}, 900000);
}
startClock();
getData();
refresh();
})();