-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
409 lines (390 loc) · 19.9 KB
/
index.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
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
406
407
408
409
<?php
const GEOFAITH = true;
//define possible third levels
$thirdLevels = [
"de" => "geographiedesglaubens",
"en" => "geographyofthefaith",
"es" => "geografiadelafe",
"fr" => "geographiedelafoi",
"it" => "geografiadellafede",
"pt" => "geografiadafe"
];
//detect language based on hostname
$hostname = $_SERVER["HTTP_HOST"];
$thirdlevel = explode(".", $hostname)[0];
$lang = "en";
if (in_array($thirdlevel, $thirdLevels)) {
$lang = array_search($thirdlevel, $thirdLevels);
}
// Set language accordingly
putenv('LC_ALL=' . $lang);
setlocale(LC_ALL, $lang);
// Specify location of translation tables
bindtextdomain("geographyofthefaith", "./locale");
// Choose domain
textdomain("geographyofthefaith");
function _e($string)
{
echo _($string);
}
require_once 'geofaith_credentials.php';
?>
<!DOCTYPE html>
<html>
<head>
<title><?php _e("Geography of the Faith - Opera Romana Pellegrinaggi"); ?></title>
<meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta http-equiv="content-language" content="<?php echo $lang; ?>">
<meta name="keywords" content="opera romana, <?php _e("pilgrimage, pilgrimages, pilgrim, travel, trip, route, holy land, via francigena, santiago, compostela, rome, map, maps, itinerary, itineraries, walk, walks, path, paths, walking") ?>">
<meta name="description" content="<?php _e("Geography of the Faith is an interactive globe presenting christian pilgrimage destinations and routes from around the world."); ?>">
<!-- Fonts and icons -->
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Roboto:300,400,500,700|Roboto+Slab:400,700|Material+Icons&display=block" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css" />
<!-- Material Dashboard CSS -->
<link rel="stylesheet" href="node_modules/material-dashboard-dark-edition/assets/css/material-dashboard.min.css" />
<!-- Cesium CSS -->
<!-- <link rel="stylesheet" href="https://cesium.com/downloads/cesiumjs/releases/1.104/Build/Cesium/Widgets/widgets.css" /> -->
<link rel="stylesheet" href="node_modules/cesium/Build/Cesium/Widgets/widgets.css" />
<link rel="stylesheet" href="assets/css/styles.css" />
</head>
<body class="dark-edition">
<div class="wrapper">
<div class="sidebar" data-color="purple" data-background-color="black">
<div class="logo">
<a href="/" class="simple-text logo-normal"><?php _e("The geography of the faith"); ?></a>
</div>
<div class="sidebar-wrapper ps-container ps-theme-default ps-active-y">
<ul class="nav" id="accordion" role="tablist">
<li class="nav-item active">
<a class="nav-link" data-toggle="collapse" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
<i class="material-icons">place</i>
<p><?php _e("Sites"); ?></p>
</a>
<div id="collapseOne" class="collapse show" role="tabpanel" aria-labelledby="headingOne" data-parent="#accordion">
<ul class="nav">
<li class="nav-item">
<a class="nav-link togglebutton">
<label>
<input type="checkbox" data-filter="RELIC">
<span class="toggle"></span>
<span class="label small"><i class="material-icons">health_and_safety</i><?php _e("Relics"); ?></span>
</label>
</a>
</li>
<li class="nav-item">
<a class="nav-link togglebutton">
<label>
<input type="checkbox" data-filter="EUCHARISTIC_MIRACLE">
<span class="toggle"></span>
<span class="label small"><i class="material-icons">account_circle</i><?php _e("Eucharistic miracles"); ?></span>
</label>
</a>
</li>
<li class="nav-item">
<a class="nav-link togglebutton">
<label>
<input type="checkbox" data-filter="APOSTLE">
<span class="toggle"></span>
<span class="label small"><i class="material-icons">manage_accounts</i><?php _e("Apostles"); ?></span>
</label>
</a>
</li>
<li class="nav-item">
<a class="nav-link togglebutton">
<label>
<input type="checkbox" data-filter="EVANGELIST">
<span class="toggle"></span>
<span class="label small"><i class="material-icons">import_contacts</i><?php _e("Evangelists"); ?></span>
</label>
</a>
</li>
<li class="nav-item">
<a class="nav-link togglebutton">
<label>
<input type="checkbox" data-filter="MARTYR">
<span class="toggle"></span>
<span class="label small"><i class="material-icons">local_hospital</i><?php _e("Martyrs"); ?></span>
</label>
</a>
</li>
<li class="nav-item">
<a class="nav-link togglebutton">
<label>
<input type="checkbox" data-filter="CATHEDRAL">
<span class="toggle"></span>
<span class="label small"><i class="material-icons">church</i><?php _e("Cathedrals"); ?></span>
</label>
</a>
</li>
<li class="nav-item">
<a class="nav-link togglebutton">
<label>
<input type="checkbox" data-filter="MARIAN_SHRINE">
<span class="toggle"></span>
<span class="label small"><i class="material-icons">woman</i><?php _e("Marian shrines"); ?></span>
</label>
</a>
</li>
<li class="nav-item">
<a class="nav-link togglebutton">
<label>
<input type="checkbox" data-filter="SHRINE">
<span class="toggle"></span>
<span class="label small"><i class="material-icons">church</i><?php _e("Shrines"); ?></span>
</label>
</a>
</li>
<li class="nav-item">
<a class="nav-link togglebutton">
<label>
<input type="checkbox" data-filter="SAINT_UNIVERSAL">
<span class="toggle"></span>
<span class="label small"><i class="material-icons">face</i><?php _e("Universal Saints"); ?></span>
</label>
</a>
</li>
<li class="nav-item">
<a class="nav-link togglebutton">
<label>
<input type="checkbox" data-filter="SAINT_LOCAL">
<span class="toggle"></span>
<span class="label small"><i class="material-icons">face</i><?php _e("Local Saints"); ?></span>
</label>
</a>
</li>
<li class="nav-item">
<a class="nav-link togglebutton">
<label>
<input type="checkbox" data-filter="BIBLICAL_SITES_ISRAEL">
<span class="toggle"></span>
<span class="label small"><i class="material-icons">import_contacts</i><?php _e("Biblical sites"); ?></span>
</label>
</a>
</li>
</ul>
</div>
</li>
<li class="nav-item">
<a class="nav-link collapsed" data-toggle="collapse" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
<i class="material-icons">hiking</i>
<p><?php _e("Pilgrim Ways"); ?></p>
</a>
<div id="collapseTwo" class="collapse" role="tabpanel" aria-labelledby="headingTwo" data-parent="#accordion">
<ul class="nav">
<li class="nav-item">
<a class="nav-link togglebutton">
<label>
<input type="checkbox" data-filter="FRANCIGENA">
<span class="toggle"></span>
<span class="label small"><?php _e("Via Francigena"); ?></span>
</label>
</a>
</li>
<li class="nav-item">
<a class="nav-link togglebutton">
<label>
<input type="checkbox" data-filter="SANTIAGO">
<span class="toggle"></span>
<span class="label small"><?php _e("Way of Santiago"); ?></span>
</label>
</a>
</li>
<li class="nav-item">
<a class="nav-link togglebutton">
<label>
<input type="checkbox" data-filter="FRANCIS">
<span class="toggle"></span>
<span class="label small"><?php _e("Way of Saint Francis"); ?></span>
</label>
</a>
</li>
<li class="nav-item">
<a class="nav-link togglebutton">
<label>
<input type="checkbox" data-filter="AUGUSTINE">
<span class="toggle"></span>
<span class="label small"><?php _e("Way of Saint Augustine"); ?></span>
</label>
</a>
</li>
<li class="nav-item">
<a class="nav-link togglebutton">
<label>
<input type="checkbox" data-filter="BENEDICT">
<span class="toggle"></span>
<span class="label small"><?php _e("Way of Saint Benedict"); ?></span>
</label>
</a>
</li>
<li class="nav-item">
<a class="nav-link togglebutton">
<label>
<input type="checkbox" data-filter="LORETO">
<span class="toggle"></span>
<span class="label small"><?php _e("Way of Loreto"); ?></span>
</label>
</a>
</li>
<li class="nav-item">
<a class="nav-link togglebutton">
<label>
<input type="checkbox" data-filter="NICHOLAS">
<span class="toggle"></span>
<span class="label small"><?php _e("Way of Saint Nicholas"); ?></span>
</label>
</a>
</li>
</ul>
</div>
</li>
<li class="nav-item">
<a class="nav-link collapsed" data-toggle="collapse" href="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
<i class="material-icons">palette</i>
<p><?php _e("Christian Art"); ?></p>
</a>
<div id="collapseThree" class="collapse" role="tabpanel" aria-labelledby="headingThree" data-parent="#accordion">
<ul class="nav">
<li class="nav-item">
<a class="nav-link togglebutton">
<label>
<input type="checkbox" data-filter="FRESCO">
<span class="toggle"></span>
<span class="label small"><i class="material-icons">format_color_fill</i><?php _e("Frescoes"); ?></span>
</label>
</a>
</li>
<li class="nav-item">
<a class="nav-link togglebutton">
<label>
<input type="checkbox" data-filter="MOSAIC">
<span class="toggle"></span>
<span class="label small"><i class="material-icons">extension</i><?php _e("Mosaics"); ?></span>
</label>
</a>
</li>
<li class="nav-item">
<a class="nav-link togglebutton">
<label>
<input type="checkbox" data-filter="ICON">
<span class="toggle"></span>
<span class="label small"><i class="material-icons">account_box</i><?php _e("Icons"); ?></span>
</label>
</a>
</li>
<li class="nav-item">
<a class="nav-link togglebutton">
<label>
<input type="checkbox" data-filter="PAINTING">
<span class="toggle"></span>
<span class="label small"><i class="material-icons">brush</i><?php _e("Paintings"); ?></span>
</label>
</a>
</li>
<li class="nav-item">
<a class="nav-link togglebutton">
<label>
<input type="checkbox" data-filter="SCULPTURE">
<span class="toggle"></span>
<span class="label small"><i class="material-icons">settings_accessibility</i><?php _e("Sculptures"); ?></span>
</label>
</a>
</li>
</ul>
</div>
</li>
<li class="nav-item">
<a class="nav-link collapsed" data-toggle="collapse" href="#collapseFour" aria-expanded="false" aria-controls="collapseFour">
<i class="material-icons">airplanemode_active</i>
<p><?php _e("Flyovers"); ?></p>
</a>
<div id="collapseFour" class="collapse" role="tabpanel" aria-labelledby="headingFour" data-parent="#accordion">
<ul class="nav">
<li class="nav-item">
<a class="nav-link togglebutton">
<label>
<input type="checkbox">
<span class="toggle"></span>
<span class="label small"><?php _e("Vatican&Rome Open Bus"); ?></span>
</label>
</a>
</li>
<li class="nav-item">
<a class="nav-link togglebutton">
<label>
<input type="checkbox">
<span class="toggle"></span>
<span class="label small"><?php _e("Way of Saint Augustine"); ?></span>
</label>
</a>
</li>
<li class="nav-item">
<a class="nav-link togglebutton">
<label>
<input type="checkbox">
<span class="toggle"></span>
<span class="label small"><?php _e("Way of Saint Francis"); ?></span>
</label>
</a>
</li>
</ul>
</div>
</li>
</ul>
</div>
</div>
<div class="main-panel ps-container ps-theme-default">
<div id="map"></div>
<div id="currentNation"><?php _e("Planet earth"); ?></div>
<div id="credits"></div>
<div class="loader">
<div class="loaderBar"></div>
</div>
</div>
</div>
<div id="loadingModal">
<div id="loadingModalMessage">
<div><?php _e("Multimedia experience is loading..."); ?></div>
<ul>
<li id="MAPS_SOURCE_READY" class="waiting"><i class="material-icons mr-3">check_box_outline_blank</i>MAPS_SOURCE_READY</li>
<li id="TERRAIN_READY" class="waiting"><i class="material-icons mr-3">check_box_outline_blank</i>TERRAIN_READY</li>
<li id="DOCUMENT_READY" class="waiting"><i class="material-icons mr-3">check_box_outline_blank</i>DOCUMENT_READY</li>
<li id="MARKERS_LAYER_READY" class="waiting"><i class="material-icons mr-3">check_box_outline_blank</i>MARKERS_LAYER_READY</li>
<li id="OPENBUS_MARKERS_LAYER" class="waiting"><i class="material-icons mr-3">check_box_outline_blank</i>OPENBUS_MARKERS_LAYER</li>
<li id="MARKERS_CREATED" class="waiting"><i class="material-icons mr-3">check_box_outline_blank</i>MARKERS_CREATED</li>
<li id="COUNTRY_POLYS_READY" class="waiting"><i class="material-icons mr-3">check_box_outline_blank</i>COUNTRY_POLYS_READY</li>
<li id="COUNTRY_BORDERS_READY" class="waiting"><i class="material-icons mr-3">check_box_outline_blank</i>COUNTRY_BORDERS_READY</li>
<li id="OMNIA_VR_READY" class="waiting"><i class="material-icons mr-3">check_box_outline_blank</i>OMNIA_VR_READY</li>
<li id="TILES_LOADED" class="waiting"><i class="material-icons mr-3">check_box_outline_blank</i>TILES_LOADED</li>
<li id="ALL_DRAWN" class="waiting"><i class="material-icons mr-3">check_box_outline_blank</i>ALL_DRAWN</li>
<li id="BACKGROUND_MUSIC_READY" class="waiting"><i class="material-icons mr-3">check_box_outline_blank</i>BACKGROUND_MUSIC_READY</li>
</ul>
</div>
</div>
<footer>
<!-- Core JS files -->
<script src="node_modules/cesium/Build/Cesium/Cesium.js"></script>
<script src="node_modules/material-dashboard-dark-edition/assets/js/core/jquery.min.js"></script>
<script src="node_modules/material-dashboard-dark-edition/assets/js/core/popper.min.js"></script>
<script src="node_modules/material-dashboard-dark-edition/assets/js/core/bootstrap-material-design.min.js"></script>
<!-- Library for adding elements dynamically -->
<!-- TODO: Where did this come from? Is it needed? -->
<script src="node_modules/arrive/minified/arrive.min.js" type="text/javascript"></script>
<!-- Notifications Plugin, full documentation here: http://bootstrap-notify.remabledesigns.com/ -->
<script src="node_modules/material-dashboard-dark-edition/assets/js/plugins/bootstrap-notify.js"></script>
<!-- Charts Plugin, full documentation here: https://gionkunz.github.io/chartist-js/ -->
<script src="node_modules/material-dashboard-dark-edition/assets/js/plugins/chartist.min.js"></script>
<!-- Plugin for Scrollbar documentation here: https://github.com/utatti/perfect-scrollbar -->
<script src="node_modules/material-dashboard-dark-edition/assets/js/plugins/perfect-scrollbar.jquery.min.js"></script>
<script src="node_modules/i18next/dist/umd/i18next.js"></script>
<!-- Material Dashboard Core initialisations of plugins and Bootstrap Material Design Library -->
<script src="node_modules/material-dashboard-dark-edition/assets/js/material-dashboard.js"></script>
<script>
const ION_ACCESS_TOKEN = "<?php echo getenv('ION_ACCESS_TOKEN'); ?>";
const BING_ACCESS_TOKEN = "<?php echo getenv('BING_ACCESS_TOKEN'); ?>";
</script>
<script src="assets/js/index.js" type="module"></script>
</footer>
</body>
</html>