mirror of
https://gitlab.silvrtree.co.uk/martind2000/old-silvrgit.git
synced 2025-02-04 09:40:14 +00:00
added clock
This commit is contained in:
parent
527dd8ce9c
commit
66e60b233d
@ -1,8 +1,8 @@
|
|||||||
|
@media (min-width:800px) {
|
||||||
body {
|
body {
|
||||||
font-family: 'Roboto Slab', "Helvetica Neue", Helvetica, Arial;
|
font-family: 'Roboto Slab', "Helvetica Neue", Helvetica, Arial;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#clock {
|
#clock {
|
||||||
font-family: 'Share Tech Mono';
|
font-family: 'Share Tech Mono';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@ -49,3 +49,62 @@ body {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
text-transform: capitalize;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -45,13 +45,12 @@
|
|||||||
$('#wTtext').empty().html(storedData.data.weather.today);
|
$('#wTtext').empty().html(storedData.data.weather.today);
|
||||||
// $('#wDaily').empty();
|
// $('#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 m = 'icon' + (t + 1).toString();
|
||||||
var d = '#d' + (t + 1).toString();
|
var d = '#d' + (t + 1).toString();
|
||||||
var ts = parseInt(storedData.data.weather.data.daily.data[t].time) * 1000;
|
var ts = parseInt(storedData.data.weather.data.daily.data[t].time) * 1000;
|
||||||
var n = Date.create(ts).format('{weekday}');
|
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);
|
skycons.add(m, storedData.data.weather.data.daily.data[t].icon);
|
||||||
$(d).empty().html(n);
|
$(d).empty().html(n);
|
||||||
}
|
}
|
||||||
@ -98,7 +97,14 @@
|
|||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function refresh() {
|
||||||
|
setInterval(function () {
|
||||||
|
getData()
|
||||||
|
}, 900000);
|
||||||
|
}
|
||||||
|
|
||||||
startClock();
|
startClock();
|
||||||
getData();
|
getData();
|
||||||
|
refresh();
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user