diff --git a/pretalx_lower_thirds/static/pretalx_lower_thirds/frontend.css b/pretalx_lower_thirds/static/pretalx_lower_thirds/frontend.css index 074f1dd..a933d42 100644 --- a/pretalx_lower_thirds/static/pretalx_lower_thirds/frontend.css +++ b/pretalx_lower_thirds/static/pretalx_lower_thirds/frontend.css @@ -17,6 +17,7 @@ padding: 15px; box-shadow: 5px 5px 10px 0px rgba(50, 50, 50, 0.75); + background-color: #3aa57c; } #title { diff --git a/pretalx_lower_thirds/static/pretalx_lower_thirds/update.js b/pretalx_lower_thirds/static/pretalx_lower_thirds/update.js index a0b401e..1bd8cb6 100644 --- a/pretalx_lower_thirds/static/pretalx_lower_thirds/update.js +++ b/pretalx_lower_thirds/static/pretalx_lower_thirds/update.js @@ -1,5 +1,6 @@ schedule = null; room_name = null; +event_info = null; $(function() { $('#speaker').text('Content will appear soon.'); @@ -16,8 +17,8 @@ function update_lower_third() { return } - if (!schedule) { - console.warn("There's no schedule yet, exiting ..."); + if (!schedule || !event_info) { + console.warn("There's no schedule or no event info yet, exiting ..."); return } @@ -51,7 +52,7 @@ function update_lower_third() { $('#speaker').text(current_talk['persons'].join(', ')); $('#info_line').text(current_talk['infoline']); } else { - $('#title').text(schedule['conference']['no_talk']); + $('#title').text(event_info['no_talk']); $('#speaker').text(''); $('#info_line').text(''); } @@ -65,6 +66,11 @@ function update_lower_third() { window.setInterval(update_lower_third, 1000); function update_schedule() { + $.getJSON('event.json', function(data) { + event_info = data; + + $('#box').css('background-color', data['color']); + }); $.getJSON('schedule.json', function(data) { console.info('schedule updated with ' + data['talks'].length + ' talks in ' + data['rooms'].length + ' rooms'); diff --git a/pretalx_lower_thirds/templates/pretalx_lower_thirds/lower_thirds.html b/pretalx_lower_thirds/templates/pretalx_lower_thirds/lower_thirds.html index f144458..5b2fdc9 100644 --- a/pretalx_lower_thirds/templates/pretalx_lower_thirds/lower_thirds.html +++ b/pretalx_lower_thirds/templates/pretalx_lower_thirds/lower_thirds.html @@ -10,11 +10,6 @@ {% endcompress %} -