forked from tochev/interlude
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
208 lines (175 loc) · 7.65 KB
/
index.html
File metadata and controls
208 lines (175 loc) · 7.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<html>
<head>
<title>OpenFest</title>
<meta charset="utf-8">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.2.1/reveal.min.css" integrity="sha512-ZIo9ivf88U0L1S+0D/npMNTTkjez5B9cK5xIecN4IA2OmtbTNBbPAZo/0cBC195sq7FU7cEOVPwtit37f/+1rQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.2.1/theme/black.min.css" integrity="sha512-8xTQdrxFqvj1S4G+pM5d0AwjjKm5vHbi6gZwDX2FDq8HHvfPDf1BEIjBC0fvIh/EFiPeGdDVJZtx66b+4veM9g==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<link href="https://fonts.googleapis.com/css2?family=Sofia+Sans+Condensed:ital,wght@0,1..1000;1,1..1000&family=Sofia+Sans:ital,wght@0,1..1000;1,1..1000&display=swap" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="styles.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/reveal.js/5.2.1/reveal.min.js" integrity="sha512-lRYVCjdH7dCPCzqLL6eBn78p6WGK5pZxgYBgzTQfWlfX7yiZFLt/qHOMSETHUIz2aZIU/KbjwYHiMsmrcVgJnA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/16.3.0/lib/marked.umd.min.js" integrity="sha512-V6rGY7jjOEUc7q5Ews8mMlretz1Vn2wLdMW/qgABLWunzsLfluM0FwHuGjGQ1lc8jO5vGpGIGFE+rTzB+63HdA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.30.1/moment.min.js" integrity="sha512-QoJS4DOhdmG8kbbHkxmB/rtPdN62cGWXAdAFWWJPvUFF1/zxcPSdAnn4HhYZSIlVoLVEJ0LesfNlusgm2bPfnA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.30.1/locale/bg.min.js" integrity="sha512-yO+EE07mmW251gz7RW8ih8qhLz9slH0B60GnePsff2FP7hj5KfvyMBSYfmPDsZknqdsJoxBRWgmIadUuUGmP7w==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/ractive/1.4.4/ractive.min.js" integrity="sha512-XdBEYvgEQ8+dyXVSJ1rl6z/chkpUcaUxzHwv+XiS9DTvPILEOTFDCQ24yWGp1aAct2e1ff/2fXT9CMFmQatLXA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
</head>
<body>
<div class="reveal">
<div class="slides">
</div>
</div>
<video id="background_video" src="background.webm" loop autoplay muted />
<!-- TODO: fix display of speakers -->
<script id="agenda_template" type="text/ractive">
<section id="agenda" data-autoslide="10000">
<h2>{{room}}</h2>
<table class="reveal">
<tbody>
{{#pastEvents}}
<tr class="past_event">
<td>{{startTime.format('HH:mm')}}</td>
<td>{{title}}</td>
<td>
{{#persons}}
{{public_name}}<br/>
{{/persons}}
</td>
</tr>
{{/pastEvents}}
{{#nextEvent}}
<tr class="next_event">
<td>{{startTime.format('HH:mm')}}</td>
<td>{{title}}</td>
<td>
{{#persons}}
{{public_name}}<br/>
{{/persons}}
</td>
</tr>
{{/nextEvent}}
{{#futureEvents}}
<tr class="future_event">
<td>{{startTime.format('HH:mm')}}</td>
<td>{{title}}</td>
<td>
{{#persons}}
{{public_name}}<br/>
{{/persons}}
</td>
</tr>
{{/futureEvents}}
</tbody>
</table>
</section>
</script>
<script id="current_talk_template" type="text/ractive">
<section id="current_talk" data-autoslide="10000">
<h4>В момента</h4>
<h2>{{currentEvent.title}}</h2>
<div class="wall">{{{marked(currentEvent.abstract)}}}</div>
</section>
</script>
<script id="speaker_template" type="text/ractive">
<section data-autoslide="10000">
<h4>Лектор</h4>
<h2>{{public_name}}</h2>
<div class="wall">{{{marked(biography)}}}</div>
</section>
</script>
<script id="next_talk_template" type="text/ractive">
<section id="next_talk" data-autoslide="10000">
<h4>Следва</h4>
<h2>{{nextEvent.title}}</h2>
<div class="wall">{{{marked(nextEvent.abstract)}}}</div>
<h5><i>({{nextEvent.startTime.from(now)}})</i></h5>
</section>
</script>
<script id="slides_template" type="text/ractive">
<section data-autoslide="50">
</section>
<section data-state="update-safe" data-autoslide="{{waitTime}}">
<img src="logo.svg">
</section>
{{#each events}}
{{#eventCount}}
<section>
{{> agenda_template}}
{{#currentEvent}}
{{> current_talk_template}}
{{/currentEvent}}
{{#currentEvent.persons}}
{{> speaker_template}}
{{/currentEvent.persons}}
{{#nextEvent}}
{{> next_talk_template}}
{{/nextEvent}}
{{#nextEvent.persons}}
{{> speaker_template}}
{{/nextEvent.persons}}
</section>
{{/eventCount}}
{{/each}}
<section id="agenda" data-autoslide="5000">
<img src="sponsors.svg">
</section>
<section id="agenda" data-autoslide="5000">
<img src="socials.svg">
</section>
<section data-autoslide="5000">
<img src="fin.svg">
</section>
</script>
<script src="schedule.js"></script>
<script type="text/javascript">
// we need to get undefined instead of null for a lot of stuff
URLSearchParams.prototype.nget = function(n) { return this.get(n) ?? undefined; }
const urlParams = new URLSearchParams(document.location.search);
async function refreshEvent(schedule, waitTime = 5000) {
await schedule.update();
return {
waitTime: waitTime,
events: schedule.rooms.map(r => ({
pastEvents: r.pastEvents(),
currentEvent: r.currentEvent(),
nextEvent: r.nextEvent(),
futureEvents: r.futureEvents(),
eventCount: r.allEvents().length,
now: r.now(),
room: r.roomName()
})),
};
}
window.onload = () => {
const schedule = new Schedule(
urlParams.nget("room"),
urlParams.nget("date"),
() => moment(urlParams.nget('now')),
);
const helpers = Ractive.defaults.data;
helpers.marked = x => x ? marked.parse(x) : '';
refreshEvent(schedule, urlParams.nget('wait-on-startup')).then(d => {
const reactive = new Ractive({
el: '.slides',
template: '#slides_template',
data: d,
});
Reveal.initialize({
controls: false,
progress: false,
loop: true,
autoSlide: true,
autoSlideStoppable: !urlParams.has('noskip'), // needed to hide the play button
width: 1920,
height: 1080,
margin: 0.1,
minScale: 0.2,
maxScale: 5.0,
});
Reveal.on('update-safe', async () => await refreshEvent(schedule).then(d => reactive.set(d)));
});
}
</script>
<script type="text/javascript">
document.querySelector('body').style.backgroundColor = urlParams.nget('background');
</script>
</body>
</html>