-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
executable file
·405 lines (338 loc) · 13.7 KB
/
index.html
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
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="description" content="AreaFiftyLAN gaming event">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>AreaFiftyLAN - Gaming Event</title>
<!-- Social media sharing Open Graph Protocol -->
<meta property="og:title" content="AreaFiftyLAN - Gaming Event" />
<meta property="og:description" content="Area FiftyLAN is the hottest gaming event of Delft. For the third year in a row over 200 gamers will gather and play their favourite on- and off-line games together for three days (and nights)!" />
<meta property="og:type" content="website" />
<meta property="og:url" content="https://areafiftylan.nl/" />
<meta property="og:image" content="images-optimized/lancie/logo_without_date_with_background.png" />
<!-- Place favicon.ico in the root directory -->
<!-- Chrome for Android theme color -->
<meta name="theme-color" content="#1A2B43">
<!-- Web Application Manifest -->
<link rel="manifest" href="manifest.json">
<!-- Tile color for Win8 -->
<meta name="msapplication-TileColor" content="#3372DF">
<!-- Add to homescreen for Chrome on Android -->
<meta name="mobile-web-app-capable" content="yes">
<meta name="application-name" content="AreaFiftyLAN">
<link rel="icon" sizes="192x192" href="images-optimized/touch/icon-192x192.png">
<!-- Add to homescreen for Safari on iOS (152x152)-->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="apple-mobile-web-app-title" content="AreaFiftyLAN">
<link rel="apple-touch-icon" href="images-optimized/touch/icon-152x152.png">
<!-- Tile icon for Win8 (144x144) -->
<meta name="msapplication-TileImage" content="images-optimized/touch/icon-144x144.png">
<style>
body {
background: #fafafa;
font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
color: #333;
background-color: #eeecec;
margin: 0;
--primary-color: #1a2b43;
--secondary-color: #ffe574;
--base-bg-color: #fafafa;
}
app-toolbar {
background-color: var(--primary-color);
height: 64px;
justify-content: space-between;
display: flex;
align-items: center;
}
app-drawer {
display: none;
}
iron-selector a {
display: flex;
height: 48px;
align-items: center;
padding-left: 16px;
}
.navigation-drawer a.iron-selected {
font-weight: bold;
}
main {
display: flex;
flex-direction: column;
justify-content: space-between;
height: 100%;
}
nav > iron-selector > a {
text-decoration: none;
color: inherit;
}
.navigation-wrapper {
display: flex;
}
.navigation-tabs {
height: 100%;
}
.navigation-tabs iron-selector {
min-height: 100%;
display: flex;
}
.navigation-tabs a {
text-decoration: none;
color: var(--secondary-color);
font-size: 16px;
font-weight: 400;
line-height: 24px;
min-height: 48px;
padding: 0 16px;
height: inherit;
display: flex;
align-items: center;
}
.navigation-tabs a.iron-selected {
border-bottom: 2px solid var(--secondary-color);
}
.headerLogo {
margin-left: 16px;
}
app-toolbar paper-icon-button {
color: var(--secondary-color);
height: 48px;
width: 48px;
}
.menu-button, lancie-logout-button {
display: none;
}
lancie-logout-button.signed-in {
display: block;
}
body:not(imported) .wait-import {
display: none;
}
body.imported .wait-import {
display: block;
}
#reload-toast {
--paper-toast-color: white;
}
#reload-toast a {
display: inline-block;
font-weight: 500;
margin-left: 16px;
color: var(--secondary-color);
}
@media (max-width: 800px) {
.navigation-wrapper {
display: none;
}
.menu-button {
display: block;
}
}
</style>
<base href="/">
<link rel="import" href="ce-fix.html">
<script src="bower_components/webcomponentsjs/webcomponents-loader.js"></script>
</head>
<body>
<lancie-auth-storage></lancie-auth-storage>
<app-location></app-location>
<app-route pattern="/:page"></app-route>
<!-- force-narrow prevents the drawer from ever being displayed in persistent mode -->
<app-drawer-layout force-narrow fullbleed>
<app-drawer slot="drawer" id="drawer">
<nav>
<!-- Nav on mobile: side nav menu -->
<iron-selector class="navigation-drawer" attr-for-selected="data-route">
<a data-route="" href="/">Home</a>
<a data-route="tickets" href="/tickets">Tickets</a>
<a data-route="my-area" href="/my-area">My Area</a>
<a data-route="seatmap" href="/seatmap">Seatmap</a>
</iron-selector>
</nav>
<lancie-logout-button label></lancie-logout-button>
</app-drawer>
<app-header-layout fullbleed>
<app-header fixed effects="waterfall">
<!-- Nav on mobile: side nav menu -->
<app-toolbar>
<paper-icon-button class="menu-button" icon="lancie:menu" drawer-toggle aria-label="Drawer navigation menu"></paper-icon-button>
<a href="/" aria-label="Homepage">
<img
class="headerLogo"
height="32" width="200"
src="images-optimized/lancie/logo_without_date.png"
alt="Area FiftyLAN logo" />
</a>
<div class="navigation-wrapper">
<nav class="navigation-tabs">
<iron-selector attr-for-selected="data-route">
<a data-route="" href="/">Home</a>
<a data-route="tickets" href="/tickets">Tickets</a>
<a data-route="my-area" href="/my-area">My Area</a>
<a data-route="seatmap" href="/seatmap">Seatmap</a>
</iron-selector>
</nav>
<lancie-logout-button></lancie-logout-button>
</div>
</app-toolbar>
</app-header>
<main>
<iron-lazy-pages attr-for-selected="data-route" fallback-selection="404">
<lancie-home-page data-route="" data-path="src/lancie-home-page/lancie-home-page.html"></lancie-home-page>
<lancie-login-check data-requires-user data-route="my-area" data-path="src/lancie-my-area/lancie-my-area.html">
<template>
<lancie-my-area user="[[user]]"></lancie-my-area>
</template>
</lancie-login-check>
<lancie-login-check data-requires-user data-route="transfer-accept" data-path="src/lancie-ticket-transfer/lancie-ticket-transfer-accept.html">
<template>
<lancie-ticket-transfer-accept></lancie-ticket-transfer-accept>
</template>
</lancie-login-check>
<lancie-ticket-transfer-success data-route="transfer-success" data-path="src/lancie-ticket-transfer/lancie-ticket-transfer-success.html"></lancie-ticket-transfer-success>
<lancie-login-check data-requires-user data-route="tickets" data-path="src/lancie-ticket-page/lancie-ticket-page.html" nologin>
<template>
<lancie-ticket-page user="[[user]]"></lancie-ticket-page>
</template>
</lancie-login-check>
<lancie-login-check data-requires-user data-route="seatmap" data-path="src/lancie-seatmap/lancie-seatmap.html">
<template>
<lancie-seatmap user="[[user]]"></lancie-seatmap>
</template>
</lancie-login-check>
<lancie-register-confirm data-route="register-confirm" data-path="src/lancie-login/lancie-register-confirm.html"></lancie-register-confirm>
<lancie-login-check data-requires-user data-route="order-check" data-path="src/lancie-order-check.html">
<template>
<lancie-order-check></lancie-order-check>
</template>
</lancie-login-check>
<lancie-check-email data-route="check-email" data-path="src/lancie-login/lancie-check-email.html"></lancie-check-email>
<lancie-password-reset data-route="password-reset" data-path="src/lancie-password/lancie-password-reset.html"></lancie-password-reset>
<lancie-password-reset-success data-route="password-reset-success" data-path="src/lancie-password/lancie-password-reset-success.html"></lancie-password-reset-success>
<lancie-password-reset-request data-route="password-reset-request" data-path="src/lancie-password/lancie-password-reset-request.html"></lancie-password-reset-request>
<lancie-password-reset-request-success data-route="password-reset-request-success" data-path="src/lancie-password/lancie-password-reset-request-success.html"></lancie-password-reset-request-success>
<lancie-contact data-route="contact" data-path="src/lancie-contact/lancie-contact.html"></lancie-contact>
<lancie-contact-success data-route="contact-success" data-path="src/lancie-contact/lancie-contact-success.html"></lancie-contact-success>
<lancie-construction data-route="construction" data-path="src/lancie-construction.html"></lancie-construction>
<lancie-404 data-route="404" data-path="src/lancie-404.html"></lancie-404>
</iron-lazy-pages>
<lancie-section type="secondary">
<wisvch-footer></wisvch-footer>
</lancie-section>
</main>
</app-header-layout>
</app-drawer-layout>
<paper-toast id="msg-toast"></paper-toast>
<paper-toast id="reload-toast" class="wait-import">
<a href="javascript:window.location.reload(true)">Reload</a>
</paper-toast>
<script>
'use strict';
(() => {
const requireUsers = document.querySelectorAll('[data-requires-user]');
const selectors = document.querySelectorAll('iron-selector, paper-tabs');
const logoutButtons = document.querySelectorAll('lancie-logout-button');
const drawer = document.querySelector('app-drawer');
const msgToast = document.getElementById('msg-toast');
const reloadToast = document.getElementById('reload-toast');
const authStorage = document.querySelector('lancie-auth-storage');
const appLocation = document.querySelector('app-location');
const appRoute = document.querySelector('app-route');
const ironLazyPages = document.querySelector('iron-lazy-pages');
const constructionPages = [];
function showMsgToast(properties) {
if (msgToast.opened) {
msgToast.close();
setTimeout(() => {
msgToast.show(properties);
}, 100);
} else {
msgToast.show(properties);
}
}
document.addEventListener('toast', (e) => {
showMsgToast(e.detail);
});
document.addEventListener('navigate', (e) => {
appLocation.path = e.detail.page;
});
document.addEventListener('refresh-toast', () => {
reloadToast.show({text: 'Unable to connect to server. Try refreshing the page.'});
});
document.addEventListener('update-toast', () => {
reloadToast.show({text: 'New version available!', duration: 0});
});
function updateUserBindings(user) {
for (const el of requireUsers) {
el.user = user;
}
}
function showLogoutButtons() {
for (const node of logoutButtons) {
node.classList.add('signed-in');
}
}
document.addEventListener('store-token', (e) => {
authStorage.storeToken(e.detail.token);
updateUserBindings(e.detail.user);
showLogoutButtons();
});
document.addEventListener('user-changed', (e) => {
updateUserBindings(e.detail);
showLogoutButtons();
});
document.addEventListener('logout', () => {
authStorage.clear();
// Note: some extensions block this
location.reload();
appLocation.path = '/';
});
appLocation.addEventListener('route-changed', (e) => {
appRoute.route = checkConstruction(e.detail.value);
});
appRoute.addEventListener('route-changed', (e) => {
appLocation.route = checkConstruction(e.detail.value);
});
appRoute.addEventListener('data-changed', (e) => {
ironLazyPages.selected = e.detail.value.page;
drawer.close && drawer.close();
for (const selector of selectors) {
selector.selected = e.detail.value.page;
}
});
// Filters out the pages that are under construction
function checkConstruction(page) {
if (constructionPages.indexOf(page.path) > -1) {
page.path = "/construction"
}
return page;
}
window.Polymer = {rootPath: '/'};
// We can't use async import, as that screws up the loading mechanism :(
const linkElement = document.createElement('link');
linkElement.rel = 'import';
linkElement.href = 'src/index-imports.html';
linkElement.onload = function() {
customElements.whenDefined('app-drawer').then(() => {
drawer.style.display = 'block';
document.body.classList.add('imported');
});
};
document.head.appendChild(linkElement);
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-60209049-1', 'auto');
ga('send', 'pageview');
})();
</script>
<script src="scripts/sw-register.js"></script>
<noscript>
Please enable JavaScript to view this website.
</noscript>
</body>
</html>