Compare commits

..

18 Commits

Author SHA1 Message Date
Petko Bordjukov 839c1afe9d Remove unused methods and optimise current event detection 2014-11-01 05:04:57 +02:00
Petko Bordjukov 60f068c20e Workaround wrong dates in the database 2014-11-01 04:55:30 +02:00
Petko Bordjukov 64bcc6800b Autoupdate the schedule 2014-11-01 04:33:48 +02:00
Petko Bordjukov a8bae839e7 Styling for OpenFest 2014-11-01 04:33:12 +02:00
Petko Bordjukov 88ef6a0ece Hook up interlude with Clarion 2014-11-01 04:00:16 +02:00
Petko Bordjukov c9ceb8407a Add schedule for day 3 for Vitosha 2014-08-24 08:58:07 +03:00
Petko Bordjukov a67e2795b1 Add schedule for Musala 2014-08-23 12:21:17 +03:00
Petko Bordjukov faa536a7d3 Add schedule for Rodopi 2014-08-23 12:09:34 +03:00
Petko Bordjukov 575d359fe3 Second day schedule for Vitosha 2014-08-23 09:48:32 +03:00
Petko Bordjukov 1c4bfa72f3 Schedule fixes 2014-08-22 12:50:59 +03:00
Petko Bordjukov efdab41b1a Add schedules for the other halls 2014-08-22 08:55:42 +03:00
Petko Bordjukov 038b8099fc Add a lightning emoji, too 2014-08-20 16:11:37 +03:00
Petko Bordjukov 0d1322fac4 More emoji!!! 2014-08-20 16:07:00 +03:00
Petko Bordjukov c7ea4fb8a7 Bump the background to full hd 2014-08-20 15:58:01 +03:00
Petko Bordjukov 221258f723 Tweak headings to work with coffee breaks/lunches etc 2014-08-20 14:54:05 +03:00
Petko Bordjukov fc09fef53c Turn on kerning and ligatures 2014-08-20 14:52:34 +03:00
Petko Bordjukov e5ac8c178a Tweak js and css 2014-08-20 14:36:12 +03:00
Petko Bordjukov 06e2a9d2bd Update for YAPC::EU 2014 2014-08-20 14:16:53 +03:00
9 changed files with 46 additions and 113 deletions

Binary file not shown.

Binary file not shown.

View File

@ -1,6 +1,6 @@
<html> <html>
<head> <head>
<title>OpenFest 2021</title> <title>OpenFest 2014 Interlude</title>
<meta charset="utf-8"> <meta charset="utf-8">
@ -13,9 +13,9 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/2.6.2/lib/js/head.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/2.6.2/lib/js/head.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/2.6.2/js/reveal.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/2.6.2/js/reveal.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.6.0/moment.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.6.0/moment.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.6.0/lang/bg.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ractive.js/0.3.7/ractive.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/ractive.js/0.3.7/ractive.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore-min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.6.0/underscore-min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.6.0/lang/bg.min.js"></script>
<script src="schedule.js"></script> <script src="schedule.js"></script>
</head> </head>
<body> <body>
@ -24,12 +24,8 @@
</div> </div>
</div> </div>
<!-- <video id="background_video" src="background.mp4" loop autoplay /> -->
<!-- TODO: fix display of speakers -->
<script id="agenda_template" type="text/ractive"> <script id="agenda_template" type="text/ractive">
<section id="agenda"> <section id="agenda">
<h3>{{room}}</h3>
<table class="reveal"> <table class="reveal">
<tbody> <tbody>
{{#pastEvents}} {{#pastEvents}}
@ -74,32 +70,41 @@
<script id="current_talk_template" type="text/ractive"> <script id="current_talk_template" type="text/ractive">
<section id="current_talk"> <section id="current_talk">
<h4>В момента</h4> <h3>В момента</h3>
<h2>{{currentEvent.title}}</h2> <h1>{{currentEvent.title}}</h1>
<p>{{currentEvent.abstract}}</p> <p>{{currentEvent.description}}</p>
</section> </section>
</script> </script>
<script id="speaker_template" type="text/ractive"> <script id="current_speaker_template" type="text/ractive">
<section> <section>
<h4>Лектор</h4> <h3>Лектор</h3>
<h2>{{name}}</h2> <h1>{{name}}</h1>
<p>{{description}}</p>
</section>
</script>
<script id="next_speaker_template" type="text/ractive">
<section>
<h3>Следващ лектор</h3>
<h1>{{name}}</h1>
<p>{{description}}</p> <p>{{description}}</p>
</section> </section>
</script> </script>
<script id="next_talk_template" type="text/ractive"> <script id="next_talk_template" type="text/ractive">
<section id="next_talk"> <section id="next_talk">
<h4>Следва</h4> <h3>Следва</h3>
<h2>{{nextEvent.title}}</h2> <h1>{{nextEvent.title}}</h1>
<p>{{nextEvent.abstract}}</p> <p>{{nextEvent.description}}</p>
<h5><i>({{nextEvent.startTime.from(now)}})</i></h5> <h4>({{nextEvent.startTime.fromNow()}})</h4>
</section> </section>
</script> </script>
<script id="slides_template" type="text/ractive"> <script id="slides_template" type="text/ractive">
<section data-state="update-safe"> <section data-state="update-safe">
<img src="logo.png"> <h1>OpenFest</h1>
<h2>2014</h2>
</section> </section>
{{#eventCount}} {{#eventCount}}
@ -111,7 +116,7 @@
{{/currentEvent}} {{/currentEvent}}
{{#currentEvent.speakers}} {{#currentEvent.speakers}}
{{> speaker_template}} {{> current_speaker_template}}
{{/currentEvent.speakers}} {{/currentEvent.speakers}}
{{#nextEvent}} {{#nextEvent}}
@ -119,24 +124,18 @@
{{/nextEvent}} {{/nextEvent}}
{{#nextEvent.speakers}} {{#nextEvent.speakers}}
{{> speaker_template}} {{> next_speaker_template}}
{{/nextEvent.speakers}} {{/nextEvent.speakers}}
</section> </section>
{{/eventCount}} {{/eventCount}}
<section> <section>
<h1>#OpenFest2021</h1> <h2>Tweet</h2>
<h2>в Twitter</h2> <h1>#OpenFest</h1>
</section> </section>
</script> </script>
<script type="text/javascript" src="ractive-init.js"></script> <script type="text/javascript" src="ractive-init.js"></script>
<script type="text/javascript" src="reveal-init.js"></script> <script type="text/javascript" src="reveal-init.js"></script>
<script type="text/javascript">
// use for green screen background
if ($.urlParam('background')) {
$('body').css('background-color', $.urlParam('background'));
}
</script>
</body> </body>
</html> </html>

BIN
logo.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

BIN
openfest.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

View File

@ -20,7 +20,5 @@ function refreshEvent() {
currentEvent: schedule.currentEvent(), currentEvent: schedule.currentEvent(),
nextEvent: schedule.nextEvent(), nextEvent: schedule.nextEvent(),
futureEvents: schedule.futureEvents(), futureEvents: schedule.futureEvents(),
eventCount: schedule.allEvents().length, eventCount: schedule.allEvents().length});
now: schedule.now(),
room: schedule.room()});
} }

View File

@ -42,7 +42,7 @@ Reveal.initialize({
autoSlide: 10000, autoSlide: 10000,
// Stop auto-sliding after user input // Stop auto-sliding after user input
autoSlideStoppable: true, autoSlideStoppable: false,
// Enable slide navigation via mouse wheel // Enable slide navigation via mouse wheel
mouseWheel: false, mouseWheel: false,
@ -72,7 +72,10 @@ Reveal.initialize({
// Bounds for smallest/largest possible scale to apply to content // Bounds for smallest/largest possible scale to apply to content
minScale: 0.2, minScale: 0.2,
maxScale: 8.0 maxScale: 8.0,
parallaxBackgroundImage: 'openfest.png',
parallaxBackgroundSize: '1920px 1080px'
}); });
Reveal.addEventListener('update-safe', function() { Reveal.addEventListener('update-safe', function() {

View File

@ -1,53 +1,20 @@
function Schedule(hallId, date, setPageTitle) { function Schedule(hallId) {
var events = []; var events = [];
var apiEndpointPrefix = 'https://cfp.openfest.org/api/conferences/8';
var pageTitle = 'OpenFest';
var room = '';
var nextLectureDelayMinutes = 4; // show the current lecture as next for the first N minutes
$.getJSON(apiEndpointPrefix + '/halls.json', function(data) {
room = data[hallId]['name']['bg'];
if (room === undefined) {
room = '';
}
});
this.update = function() { this.update = function() {
$.getJSON(apiEndpointPrefix + '/events.json', function(eventsData) { $.getJSON("https://cfp.openfest.org/schedule.json", function(data) {
$.getJSON(apiEndpointPrefix + '/slots.json', function(slotsData) { var scheduleEvents = $.map(data[hallId], function(event) {
$.each(slotsData, function(slotId, slot) { event['startTime'] = moment(event['startTime']).subtract(2, 'hours');
$.extend(eventsData[slot['event_id'].toString()], slot); event['endTime'] = moment(event['endTime']).subtract(2, 'hours');
$.extend(eventsData[slot['event_id'].toString()], {"slotId": slotId});
});
var scheduleEvents = $.map(eventsData, function(event, eventId) {
event['id'] = eventId;
event['startTime'] = moment(event['starts_at']);
event['endTime'] = moment(event['ends_at']);
event['hallId'] = event['hall_id'];
if (event['startTime'].date() !== date) {
return null;
}
if (event['hallId'] !== hallId) {
return null;
}
return event; return event;
}); });
events = scheduleEvents;
events = scheduleEvents.sort(function (a,b) {return a['startTime'].isBefore(b['startTime']) ? -1 : 1});
}); });
});
this.setPageTitle();
} }
this.upcomingEvents = function() { this.upcomingEvents = function() {
var now = this.referenceTime();
return _.select(events, function(event) { return _.select(events, function(event) {
return event.startTime.isAfter(now); return event.startTime.isAfter(moment());
}); });
} }
@ -57,7 +24,7 @@ function Schedule(hallId, date, setPageTitle) {
this.currentEvent = function() { this.currentEvent = function() {
var latestEvent = _.last(this.pastEvents()); var latestEvent = _.last(this.pastEvents());
if (typeof(latestEvent) != 'undefined' && latestEvent.endTime.isAfter(this.now())) { if (typeof(latestEvent) != 'undefined' && latestEvent.endTime.isAfter(moment())) {
return latestEvent; return latestEvent;
} else { } else {
return undefined; return undefined;
@ -69,38 +36,14 @@ function Schedule(hallId, date, setPageTitle) {
} }
this.pastEvents = function() { this.pastEvents = function() {
var now = this.referenceTime();
return _.select(events, function(event) { return _.select(events, function(event) {
return event.startTime.isBefore(now); return event.startTime.isBefore(moment());
}); });
} }
this.allEvents = function() { this.allEvents = function() {
return events; return events;
} }
this.now = function() {
now = $.urlParam("now");
if (now) {
return moment(now);
} else {
return moment();
}
}
this.referenceTime = function() {
return this.now().subtract(nextLectureDelayMinutes, 'minutes');
}
this.room = function() {
return room;
}
this.setPageTitle = function() {
if (setPageTitle) {
$('title').text(pageTitle + " room=" + room + " date=" + date);
}
}
} }
$.urlParam = function(name){ $.urlParam = function(name){
@ -113,4 +56,4 @@ $.urlParam = function(name){
} }
} }
var schedule = new Schedule(parseInt($.urlParam('roomId')), parseInt($.urlParam('date')), true); var schedule = new Schedule(parseInt($.urlParam('roomId')));

View File

@ -2,7 +2,6 @@ body {
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
/* background-color: #06172A; */ /* BigBlueButton background */
} }
body, body,
@ -14,16 +13,7 @@ body,
.reveal h5, .reveal h5,
.reveal h6 { .reveal h6 {
font-family: "Roboto Condensed", tahoma, verdana, arial, sans-serif; font-family: "Roboto Condensed", tahoma, verdana, arial, sans-serif;
font-weight: bold; text-rendering: optimizeLegibility;
-webkit-text-stroke: 0.01em black;
}
#background_video {
position: absolute;
top: 0;
left: 0;
z-index: -10000;
opacity: 0.4;
} }
.reveal section img { .reveal section img {
@ -37,7 +27,7 @@ tr.past_event {
} }
tr.next_event { tr.next_event {
color: #FFFF00; color: #EEEEEE;
} }
tr.future_event { tr.future_event {