-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathprogram.php
executable file
·254 lines (239 loc) · 10.7 KB
/
program.php
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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<!DOCTYPE html>
<html lang="en">
<head>
<?php // The header includes the head tag and start of body
require "includes/head.php";
?>
<meta property="og:title" content="<?php echo $META['shortName']; ?> program" />
<meta name="twitter:title" content="<?php echo $META['shortName']; ?> program" />
<!-- This allows the referrer field to be sent to links linked from this page. -->
<meta name="referrer" content="unsafe-url">
<title>
<?php echo $META['shortName']; ?> Program
</title>
<style>
#progContain {
@media (min-width: 992px) {
max-width: 96%;
}
}
#scrollButtons {
width: 2rem;
position: sticky;
left: 0;
bottom: 1.3rem;
}
#scrollSessionButton {
display: none;
}
div.userTime {
font-size: 80%;
}
</style>
</head>
<body>
<?php require "includes/nav.php"; ?>
<main id="progContain" class="container">
<h2 class="indPageTitle">
Program
</h2>
<div class="row">
<div class="col-12 col-md-6">
<p class="alert customAlert-cool">
Links to papers, videos, and live sessions will be added as they become available.
We encourage you to check the program frequently.
</p>
</div>
<div class="col-12 col-md-6">
<p class="alert customAlert-cool">
Your timezone appears to be <span id="timezone"></span>. Times in
the schedule are shown in both <?php echo $META['city']; ?> time and your local timezone.
</p>
</div>
<div id="renderedProgram" class="px-2 px-md-3 px-xl-4">
<h4 class="text-center">
Loading...
</h4>
</div>
</div>
<div id="scrollButtons">
<img alt="Scroll to current session" title="current session" id="scrollSessionButton" onclick="scrollToSession();" src="images/icons/clock.svg">
<img alt="Scroll to top" onclick="window.scrollTo({top: 0,left: 0, behavior: 'smooth'})" src="images/icons/arrow-up-circle.svg">
</div>
<!-- Handlebars script that will render the program template based on the
program.json file -->
<script id="program-template" type="text/x-handlebars-template">
<div role="navigation">
<ul class="nav nav-tabs nav-justified days-nav mb-4">
{{#each days}}
<li role="presentation" class="nav-item">
<a href="#day-{{date}}" class="nav-link">
{{{formatDate date}}}
</a>
</li>
{{/each}}
</ul>
</div>
{{#each days}}
<div class="row" id="day-{{date}}">
<div class="col-12">
{{#if @first}}
{{else}}
<hr />
{{/if}}
<h3 class="pageSubtitle">
{{{fullDate date}}} ({{@root/config/timezone/shortName}})
</h3>
</div>
</div>
{{#each timeslots}}
<div class="row" id="{{id}}">
<!-- tabbedSessions is set in program.js if it's narrow or has >2 parallel tracks -->
{{#if tabbedSessions}}
<div class="col-12 col-md-3 pe-0">
<p class="timeSlot text-center" title="{{@root/config/timezone/shortName}}: {{../date}} {{starttime}}-{{endtime}}">
<div class="text-center localTime">
{{@root/config/timezone/shortName}}: {{starttime}}-{{endtime}}
</div>
<div class="text-center userTime">{{localstarttime}} <br class="d-none d-md-inline">to<br class="d-none d-md-inline"> {{localendtime}}</div>
</p>
<div class="trackMenu nav flex-md-column nav-pills align-items-end" id="ts-{{@../index}}-{{@index}}-tab" role="tablist" aria-orientation="vertical">
{{#each sessions}}
<a title="{{session_title}}" class="nav-link {{#if @first}} active{{/if}}" id="session-{{@../../index}}-{{@../index}}-{{@index}}-tab" data-bs-toggle="pill" href="#session-{{@../../index}}-{{@../index}}-{{@index}}" role="tab" href="#session-{{@../../index}}-{{@../index}}-{{@index}}" aria-controls="session-{{@../../index}}-{{@../index}}-{{@index}}" aria-selected="{{#if @first}}true{{else}}false{{/if}}">Track {{#addOne @index}}{{/addOne}}</a>
{{/each}}
</div>
</div>
{{else}} <!-- not tabbed_sessions -->
<div class="col-12 col-md-3">
<p class="timeSlot text-center" title="{{@root/config/timezone/shortName}}: {{../date}} {{starttime}}-{{endtime}}">
<div class="text-center localTime">
{{@root/config/timezone/shortName}}: {{starttime}}-{{endtime}}
</div>
<div class="text-center userTime">{{localstarttime}} <br class="d-none d-md-inline">to<br class="d-none d-md-inline"> {{localendtime}}</div>
</p>
</div>
{{/if}}
<div class="ps-md-0 col-12 col-md-9">
<div class="{{#if tabbedSessions}}sessionList tab-content pb-3 tabbedSessions{{else}}sessionList d-flex inlineSessions pb-3{{/if}}"
{{#if tabbedSessions}}id="ts-{{@../index}}-{{@index}}-tabContent"{{/if}}>
{{#each sessions}}
<div {{#if ../tabbedSessions}}class="session tab-pane fade {{#if @first}} show active{{/if}}" id="session-{{@../../index}}-{{@../index}}-{{@index}}" role="tabpanel" aria-labelledby="session-{{@../../index}}-{{@../index}}-{{@index}}-tab"{{else}}class="session"{{/if}}>
<h5 class="text-center">
{{session_title}}
{{#if session_url}}
<a href="{{session_url}}"><img class="sessionInfoIcon" src="images/icons/info.svg" title="Session Info"></a>
{{/if}}
</h5>
{{#if location.name}}
<p class="trackDescr">
{{{location.name}}}
</p>
{{/if}}
{{#if moderator}}
<p class="trackDescr">
{{moderator}}
</p>
{{/if}}
{{#if youtubeUrl}}
<a class="btn customBtn-cool m-3" target="_blank" href="{{youtubeUrl}}">YouTube</a>
{{/if}}
{{#if zoomUrl}}
<a class="btn customBtn-cool m-3" target="_blank" href="{{zoomUrl}}">Zoom room</a>
{{/if}}
{{#if chatUrl}}
<a class="btn customBtn-cool m-3" target="_blank" href="{{chatUrl}}">Chat</a>
{{/if}}
{{#each talks}}
<p class="talkTitle">
{{title}}{{#if starttime}} ({{starttime}}-{{endtime}}){{/if}}
{{#if zoom}}
<a class="btn customBtn-cool m-3" target="_blank" href="{{zoom}}">Zoom room</a>
{{/if}}
</p>
{{# if talkNote}}
<small class="fw-light">{{talkNote}}</small>
{{/if}}
<div class="authorList">
{{#each authors}}
<span class="authorName">{{this}}</span>
{{/each}}
</div>
{{#if affiliations}}
<small class="trackDescr">
<span class="fst-italic affiliation">{{{affiliations}}}</span>
</small><br>
{{/if}}
{{#if speakers}}
<p class="trackDescr">Speaker(s): {{speakers}}{{#if attendance}} ({{attendance}}){{/if}}</p>
{{/if}}
{{#if abstract}}
<div class="talkAbstract">
<a class="toggle-closed" data-bs-toggle="collapse" data-type="abstract" href="#abstract-{{id}}" role="button" aria-expanded="false" aria-controls="abstract-{{id}}">Show abstract</a>
</div>
<div id="abstract-{{id}}" class="collapse mb-2 text-start paper-abstract">
{{~abstract~}}
</div>
{{/if}}
{{#if hasMedia}}<span class="talkMedia"></span>{{/if}}
{{#if paperUrl}}
<span class="talkMedia">
<a href="{{paperUrl}}" target="_blank"><img class="talkMediaIcon" src="images/icons/file.svg" title="Paper"></a>
</span>
{{/if}}
{{#if eprint}}
<span class="talkMedia">
<a href="{{eprint}}" target="_blank"><img class="talkMediaIcon" src="images/icons/lock-open-outline.svg" title="eprint"></a>
</span>
{{else}}
{{#if search}}
<span class="talkMedia">
<a href="{{search}}" target="_blank"><img class="talkMediaIcon" src="images/icons/search-outline.svg" title="Search for paper"></a>
</span>
{{/if}}
{{/if}}
{{#if videoUrl}}
<span class="talkMedia">
<a href="{{videoUrl}}" target="_blank"><img class="talkMediaIcon" src="images/icons/video.svg" title="YouTube video"></a>
</span>
{{/if}}
{{#if slidesUrl}}
<span class="talkMedia">
<a href="{{slidesUrl}}" target="_blank"><img class="talkMediaIcon" src="images/icons/presentation.svg" title="Slides"></a>
</span>
{{/if}}
{{/each}}
</div>
{{/each}} <!-- sessions -->
</div>
</div> <!-- col-8 -->
</div> <!-- end of timeslot row -->
{{/each}} <!-- end of timeslots -->
{{/each}} <!-- end of days -->
</script>
</main>
<?php include "includes/footer.php"; ?>
<!-- Handlebars and Luxon -->
<script src="https://iacr.org/libs/js/handlebars/handlebars-v4.1.0.js"></script>
<script src="https://iacr.org/libs/js/luxon/luxon.js"></script>
<!-- Personal scripts -->
<script src="js/tooltips.js"></script>
<script src="js/program.js?v=2"></script>
<script>
var DateTime = luxon.DateTime;
let now = DateTime.local();
document.getElementById('timezone').innerText = now.zoneName;
$(document).ready(function() {
var theTemplateScript = $("#program-template").html();
var theTemplate = Handlebars.compile(theTemplateScript);
// In case the portal crashes, use this line instead: ';
<?php
if (isset($_GET['badfirewall'])) {
echo " installProgram('currentProgram.php?allplease=yes&v=' + Date.now(), theTemplate, 'renderedProgram');";
} else {
// echo "installProgram('currentProgram.php?v=' + Date.now(), theTemplate, 'renderedProgram');";
echo "installProgram('json/program.json?v=' + Date.now(), theTemplate, 'renderedProgram');";
} ?>
});
</script>
</body>
</html>