-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
198 lines (165 loc) · 7.45 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
<!doctype html>
<html itemscope itemtype="http://schema.org/Event" lang="en">
<head>
<base href="{$ basepath $}">
<meta charset="utf-8">
<meta content="IE=edge" http-equiv="X-UA-Compatible">
<meta content="width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes" name="viewport">
<meta content="{$ description $}" name="description">
<meta content="{$ keywords $}" name="keywords">
<meta content="{$ organizer.name $}" name="author">
<meta content="Project Hoverboard" name="generator">
<title>{$ title $}</title>
<link href="{$ url $}" rel="canonical">
<link href="images/favicon.ico" rel="icon">
<meta content="{$ webapp.themeColor $}" name="theme-color">
<link href="manifest.json" rel="manifest">
<!-- Add to homescreen for Chrome on Android -->
<meta content="yes" name="mobile-web-app-capable">
<!-- fallback for manifest.json -->
<meta content="{$ title $}" name="application-name">
<!-- fallback for manifest.json -->
<!-- Add to homescreen for Safari on iOS -->
<meta content="yes" name="apple-mobile-web-app-capable">
<meta content="black-translucent" name="apple-mobile-web-app-status-bar-style">
<meta content="{$ title $}" name="apple-mobile-web-app-title">
<!-- Homescreen icons. -->
<link href="images/manifest/icon-48.png" rel="apple-touch-icon">
<link href="images/manifest/icon-72.png" rel="apple-touch-icon" sizes="72x72">
<link href="images/manifest/icon-96.png" rel="apple-touch-icon" sizes="96x96">
<link href="images/manifest/icon-144.png" rel="apple-touch-icon" sizes="144x144">
<link href="images/manifest/icon-192.png" rel="apple-touch-icon" sizes="192x192">
<!-- Tile icon for Win8 (144x144 + tile color) -->
<meta content="images/manifest/icon-144.png" name="msapplication-TileImage">
<meta content="#00aba9" name="msapplication-TileColor">
<meta content="no" name="msapplication-tap-highlight">
<!-- G+ sharing meta data -->
<meta content="{$ title $}" itemprop="name">
<meta content="{$ description $}" itemprop="description">
<meta content="{$ image if image.startsWith('http') else (url + image) $}" itemprop="image">
<meta content="{$ startDate $}" itemprop="startDate">
<meta content="{$ endDate $}" itemprop="endDate">
<!-- Facebook sharing meta data -->
<meta content="{$ title $}" property="og:title">
<meta content="{$ title $}" property="og:site_name">
<meta content="website" property="og:type">
<meta content="{$ url $}" property="og:url">
<meta content="{$ description $}" property="og:description">
<meta content="Event" property="og:type">
<meta content="{$ image if image.startsWith('http') else (url + image) $}" property="og:image">
<meta content="image/jpeg" property="og:image:type" />
<!-- Twitter meta data -->
<meta content="summary_large_image" name="twitter:card">
<meta content="@{$ organizer.twitter $}" name="twitter:creator">
<meta content="{$ title $}" name="twitter:title">
<meta content="{$ description $}" name="twitter:description">
<meta content="{$ image if image.startsWith('http') else (url + image) $}" name="twitter:image">
<meta name="twitter:label1" value="{$ location.label $}">
<meta name="twitter:data1" value="{$ location.name $}">
<meta name="twitter:label2" value="">
<meta name="twitter:data2" value="">
<link href="https://apis.google.com" rel="dns-prefetch">
<link href="https://www.google-analytics.com" rel="preconnect">
<link href="https://fcm.googleapis.com" rel="preconnect">
<link href="https://firestore.googleapis.com" rel="preconnect">
<link crossorigin href="https://fonts.gstatic.com" rel="preconnect">
<script>
window.Polymer = { rootPath: '{$ basepath $}' };
window.HOVERBOARD = { Elements: {} };
function loadFirebaseModules(modules) {
return Promise.all(
modules.map((module) => new Promise((resolve, reject) => {
const script = document.createElement('script');
script.src = `node_modules/firebase/${module}.js`;
script.async = false;
script.onload = () => resolve();
script.onerror = (error) => reject(error);
document.head.appendChild(script);
})));
}
loadFirebaseModules([
'firebase-app',
'firebase-firestore',
'firebase-auth',
'firebase-messaging',
'firebase-performance',
])
.then(() => {
firebase.initializeApp({
appId: '{$ firebase.appId $}',
apiKey: '{$ firebase.apiKey $}',
authDomain: '{$ firebase.authDomain $}',
databaseURL: '{$ firebase.databaseURL $}',
projectId: '{$ firebase.projectId $}',
storageBucket: '{$ firebase.storageBucket $}',
messagingSenderId: '{$ firebase.messagingSenderId $}',
});
firebase.performance();
firebase.firestore()
.enablePersistence({ tabSynchronization: true })
.catch(() => {
console.warn('DB offline support not available'); // eslint-disable-line no-console
});
// eslint-disable-next-line no-console
console.log('Firebase App is ready!');
});
</script>
<script>
// First Input Delay polyfill https://github.com/GoogleChromeLabs/first-input-delay
// eslint-disable-next-line
!function(n,e){var t,o,i,c=[],f={passive:!0,capture:!0},r=new Date,a="pointerup",u="pointercancel";function p(n,c){t||(t=c,o=n,i=new Date,w(e),s())}function s(){o>=0&&o<i-r&&(c.forEach(function(n){n(o,t)}),c=[])}function l(t){if(t.cancelable){var o=(t.timeStamp>1e12?new Date:performance.now())-t.timeStamp;"pointerdown"==t.type?function(t,o){function i(){p(t,o),r()}function c(){r()}function r(){e(a,i,f),e(u,c,f)}n(a,i,f),n(u,c,f)}(o,t):p(o,t)}}function w(n){["click","mousedown","keydown","touchstart","pointerdown"].forEach(function(e){n(e,l,f)})}w(n),self.perfMetrics=self.perfMetrics||{},self.perfMetrics.onFirstInputDelay=function(n){c.push(n),s()}}(addEventListener,removeEventListener);
</script>
<script src="node_modules/@webcomponents/webcomponentsjs/webcomponents-loader.js"></script>
<link href="src/hoverboard-app.html" rel="import">
<script async defer src="scripts/service-worker-registration.js"></script>
<style>
html, body {
min-height: 100%;
height: 100%;
}
body {
margin: 0;
font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
font-size: 16px;
line-height: 1.5;
}
*,
*:before,
*:after {
box-sizing: border-box;
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: antialiased;
}
/* styling for render while resources are loading */
hoverboard-app[unresolved] {
padding: 0 16px;
display: block;
line-height: 68px;
text-align: center;
font-weight: 600;
letter-spacing: 0.3em;
color: #202020;
overflow: visible;
}
</style>
</head>
<body>
<hoverboard-app unresolved>{$ title $}</hoverboard-app>
<noscript>
Please enable JavaScript to view this website.
</noscript>
<script>
window.performance && performance.mark && performance.mark('index.html');
window.onload = function () {
const indexRenderTime = window.measureDuration && window.measureDuration('index.html');
if (indexRenderTime) {
ga('send', 'timing', 'index.html', 'render', indexRenderTime);
}
};
window.addEventListener('beforeinstallprompt', (e) => {
e.preventDefault();
uiActions.setAddToHomeScreen(e);
});
</script>
</body>
</html>