diff --git a/css/main.css b/css/main.css index 7ca64aa8..38a2dc6f 100644 --- a/css/main.css +++ b/css/main.css @@ -11,18 +11,62 @@ body, html { font-size: 75px; } -.TopLeft +.top { position: absolute; top: 50px; +} + +.left +{ + position: absolute; left: 50px; } -.TopRight +.right { position: absolute; - top: 50px; right: 50px; + text-align: right; } + +.center-ver +{ + position: absolute; + top: 50%; + height: 200px; + margin-top: -100px; + line-height: 100px; +} + +.center-hor +{ + position: absolute; + right: 50px; + left: 50px; + text-align: center; +} + +.bottom +{ + position: absolute; + bottom: 50px; +} + +.xsmall +{ + font-size: 25px; +} + +.small +{ + font-size: 35px; +} + +.dimmed +{ + color: #999; +} + .icon { position: relative; top :-10px; @@ -31,27 +75,6 @@ body, html { padding-right: 5px; font-weight: 100; margin-right: 10px; - - -} -.Center -{ - position: absolute; - top: 50%; - height: 200px; - margin-top: -100px; - width: 100%; - text-align: center; -} -.Bottom -{ - font-size: 35px; - position: absolute; - bottom: 50px; - right: 50px; - left: 50px; - overflow: hidden; - text-align: center; } @font-face { diff --git a/index.php b/index.php index 40949129..114c1e78 100644 --- a/index.php +++ b/index.php @@ -9,10 +9,10 @@ -
-
-
-
+
+
+
+
diff --git a/js/main.js b/js/main.js index 852b1b29..c9c3d731 100644 --- a/js/main.js +++ b/js/main.js @@ -44,24 +44,31 @@ jQuery(document).ready(function($) { (function updateTime() { + var months = ['januari','februari','maart','april','mei','juni','juli','augustus','september','oktober','november','december']; var now = new Date(); var hh = now.getHours(); var mm = now.getMinutes(); var ss = now.getSeconds(); + var day = now.getDate(); + var month = now.getMonth(); + var year = now.getFullYear(); + hh = (hh < 10) ? '0' + hh : hh; mm = (mm < 10) ? '0' + mm : mm; ss = (ss < 10) ? '0' + ss : ss; + var date = day + ' ' + months[month] + ' ' + year; var time = hh + ":" + mm; + $('.date').html(date); $('.time').html(time); setTimeout(function() { updateTime(); }, 1000); })(); - + /* (function updateCompliment() @@ -112,9 +119,15 @@ jQuery(document).ready(function($) { $.getJSON('http://api.openweathermap.org/data/2.5/weather', params, function(json, textStatus) { var temp = Math.round(json.main.temp * 10) / 10; + var temp_min = Math.round(json.main.temp_min * 10) / 10; + var temp_max = Math.round(json.main.temp_max * 10) / 10; + var iconClass = iconTable[json.weather[0].icon]; var icon = $('').addClass('icon').addClass(iconClass); $('.temp').updateWithText(icon.outerHTML()+temp+'°', 1000); + + var forecast = 'Min: '+temp_min+'°, Max: '+temp_max+'°'; + $('.forecast').updateWithText(forecast, 1000); }); setTimeout(function() { @@ -142,7 +155,7 @@ jQuery(document).ready(function($) { (function showNews() { var newsItem = news[newsIndex]; - $('.Bottom').updateWithText(newsItem,2000); + $('.news').updateWithText(newsItem,2000); newsIndex--; if (newsIndex < 0) newsIndex = news.length - 1;