diff --git a/css/level2.css b/css/level2.css index f69b9d2..a30607c 100644 --- a/css/level2.css +++ b/css/level2.css @@ -26,6 +26,15 @@ body:after { padding: 0.2em 1em 1em 1em; color: #777; margin-bottom: 15px; + overflow: hidden; +} + +.panel img { + display: block; + position: absolute; + right: 0; + top: 0; + height: 100%; } h1, h2, h3, h4, h5, h6 { @@ -91,4 +100,4 @@ h1, h2, h3, h4, h5, h6 { text-align: center; font-size: 7em; padding: 0; -} \ No newline at end of file +} diff --git a/index.html b/index.html index 6280929..cad7693 100644 --- a/index.html +++ b/index.html @@ -49,11 +49,12 @@
+
-
+
@@ -65,4 +66,5 @@ - \ No newline at end of file + + diff --git a/js/level2.js b/js/level2.js index 1d7d54b..7a9287e 100644 --- a/js/level2.js +++ b/js/level2.js @@ -30,6 +30,12 @@ l2events(); }, 3600000); + wortLuNews(); + + setInterval( function() { + wortLuNews(); + }, 900000); + }); @@ -251,3 +257,36 @@ function l2events() { console.log( moment().format('YYYY.MM.DD - HH:mm:ss') + ' updated Level2 events' ); } + +function wortLuNews() { + + var request = $.ajax({ + type: 'get', + url: 'http://device.wort.lu/api/v303/sites/en/sections/4f4e59a1e4b056b73debc870', + complete: function( response ) { + + var articles = response.responseJSON.articles; + + console.log( articles ) + + var output = ''; + + for ( var ArticleNR = 0; ArticleNR < 5; ArticleNR++ ) { + + var article = articles[ ArticleNR ]; + + output += '
' + + '

' + article.title + '

' + + article.teaser + + '
'; + + } + + $('.news').html('').append( output ); + + } + }); + + console.log( moment().format('YYYY.MM.DD - HH:mm:ss') + ' updated WortLu News' ); + +}