-
Notifications
You must be signed in to change notification settings - Fork 1
/
home.html
454 lines (405 loc) · 15.8 KB
/
home.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
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
<!DOCTYPE html/css/javascript>
<html>
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-169285999-1"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'UA-169285999-1');
</script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<title>Explore the Museum</title>
<style>
@font-face {
font-family: Gotham-Bold;
src: url(Gotham-Bold.otf);
}
@font-face {
font-family: Gotham-Book;
src: url(Gotham-Book.otf);
}
body {
background-color: #003066;
}
h3 {
font-family: Gotham-Bold;
font-size: 70px;
margin-top: 10px;
margin-bottom: 10px;
}
h5 {
font-family: Gotham-Bold;
font-size: 50px;
margin-top: 10px;
margin-bottom: 10px;
}
#header {
display: flex;
justify-content: center;
height: 16vh;
position: fixed;
top: 0px;
background-color: #003066;
}
#galleryList{
/*padding-top: 16vh;*/
}
#space {
}
#history {
}
#science {
}
#project-planet {
}
#puzzle {
display: none;
}
.gallery {
width: 100%;
font-size: 60px;
color: white;
/*min-height: 10%;*/
text-align: left;
font-family: Gotham-Book;
margin-top: 0px;
margin-bottom: 0px;
margin-left: 20px;
margin-right: 20px;
background-color: #6e298d;
border: 0px;
outline: none;
padding: 18px;
/*border-radius: 100px;*/
}
.galleryDetails {
width: 95%;
display: none;
font-size: 45px;
color: white;
/*min-height: 10%;*/
text-align: left;
font-family: Gotham-Book;
margin-left: 40px;
margin-top: 10px;
transition: display 0.2s ease-out;
}
.exploreButton {
font-size: 50px;
color: white;
/*min-height: 10%;*/
text-align: left;
font-family: Gotham-Book;
margin-top: 10px;
margin-bottom: 10px;
margin-right: 20px;
background-color: #db0961;
border: 0px;
padding: 18px;
/*border-radius: 100px;*/
}
.generalButton {
font-size: 50px;
color: white;
/*min-height: 10%;*/
text-align: left;
font-family: Gotham-Book;
margin-top: 10px;
margin-bottom: 10px;
margin-right: 20px;
background-color: #db0961;
border: 0px;
padding: 18px;
/*border-radius: 100px;*/
}
.accordion {
background-color: #eee;
color: #444;
padding: 18px;
width: 100%;
border: none;
text-align: left;
outline: none;
font-size: 65px;
transition: 0.4s;
font-family: Gotham-Bold;
}
.accordionPanel {
padding: 0 18px;
background-color: #003066;
overflow: hidden;
display: none;
transition: max-height 0.2s ease-out;
}
#galleryAccordion {
margin-top: 16vh;
}
#galleryAccordionPanel {
display: block;
}
.schedule {
font-size: 45px;
color: white;
/*min-height: 10%;*/
text-align: left;
font-family: Gotham-Book;
margin-top: 10px;
margin-bottom: 10px;
margin-right: 20px;
}
#scaverngerAccordionPanel {
font-size: 45px;
color: white;
/*min-height: 10%;*/
text-align: left;
font-family: Gotham-Book;
margin-top: 10px;
margin-bottom: 10px;
margin-right: 20px;
}
#rotationWarning {
position: fixed;
display: none;
width: 100%;
height: 100%;
top: 0;
bottom: 0;
left: 0;
right: 0;
z-index: 0;
margin-left: auto;
margin-right: auto;
background-color: rgba(0,0,0,0.9);
font-size: 60px;
color: white;
font-family: Gotham-Book;
text-align: center;
padding-top: 10%;
}
* {
-webkit-text-size-adjust: none;
touch-action: manipulation;
}
button:active {
outline: none;
border: none;
}
</style>
</head>
<body>
<div id='header'><img src='FWMSH_logo.png' style='object-fit: cover; width: 100%;'></div>
<button class="accordion" id='galleryAccordion' onclick='toggleAccordion("galleryAccordionPanel")'>Galleries</button>
<div class="accordionPanel" id='galleryAccordionPanel'>
<div id='galleryList'>
<button class='gallery' id='space' onclick='toggleDetails("spaceDetails")'>Launchpad</button>
<div class='galleryDetails' id='spaceDetails'>
<div id='spaceDetailText'>50 years ago, we landed on the Moon. Where will we be 50 years from now?<br></div>
<button class='exploreButton' onclick='switchPage("space/space.html")'>Explore</button>
</div>
<button class='gallery' id='history' onclick='toggleDetails("historyDetails")'>Beads</button>
<div class='galleryDetails' id='historyDetails'>
<div id='historyDetailText'>Uncover the hidden history of beads.<br></div>
<button class='exploreButton' onclick='switchPage("beads/beads.html")'>Explore</button>
</div>
<button class='gallery' id='project-planet' onclick='toggleDetails("ppDetails")'>Project Planet</button>
<div class='galleryDetails' id='ppDetails'>
<div id='ppDetailText'>Our world is changing. What will you do?<br></div>
<button class='exploreButton' onclick='switchPage("project_planet/project_planet.html")'>Explore</button>
</div>
<button class='gallery' id='innovation' onclick='toggleDetails("wheelsDetails")'>Rolling Forward</button>
<div class='galleryDetails' id='wheelsDetails'>
<div id='wheelsDetailText'> What's your favorite thing with wheels?<br></div>
<button class='exploreButton' onclick='switchPage("wheels/wheels.html")'>Explore</button>
</div>
<button class='gallery' id='energy' onclick='toggleDetails("energyDetails")'>Energy Blast</button>
<div class='galleryDetails' id='energyDetails'>
<div id='energyDetailText'>How do we create electricity here in Texas?<br></div>
<button class='exploreButton' onclick='switchPage("energy/energy.html")'>Explore</button>
</div>
<button class='gallery' id='DinoDig' onclick='toggleDetails("DinoDigDetails")'>DinoDig®</button>
<div class='galleryDetails' id='DinoDigDetails'>
<div id='DinoDigDetailText'>What can you uncover at this ancient fossil site?<br></div>
<button class='exploreButton' onclick='switchPage("DinoDig/DinoDig.html")'>Explore</button>
</div>
<button class='gallery' id='heritage' onclick='toggleDetails("heritageDetails")'>Changemakers</button>
<div class='galleryDetails' id='heritageDetails'>
<div id='heritageDetailText'>Discover pioneering women from Texas.<br></div>
<button class='exploreButton' onclick='switchPage("heritage/heritage.html")'>Explore</button>
</div>
</div>
</div>
<button id='steamLabAccordion' class="accordion" onclick='toggleAccordion("steamLabAccordionPanel")'>STEAM Lab Schedule</button>
<div class="accordionPanel schedule" id='steamLabAccordionPanel'>
</div>
<button id='scienceTheaterAccordion' class="accordion" onclick='toggleAccordion("scienceTheaterAccordionPanel")'>Science Theater Schedule</button>
<div class="accordionPanel schedule" id='scienceTheaterAccordionPanel'>
</div>
<button id='scavengerAccordion' class="accordion" onclick='toggleAccordion("scaverngerAccordionPanel")'>Scavenger hunt</button>
<div class="accordionPanel" id='scaverngerAccordionPanel'>
<H5>Test your knowledge in our fun quiz!</H5>
<button class='exploreButton' onclick='switchPage("scav_hunt/scav_hunt.html")'>Play the game</button>
</div>
<!-- <button id='mapAccordion' class="accordion" onclick='toggleAccordion("mapAccordionPanel")'>Map</button>
<div class="accordionPanel" id='mapAccordionPanel'>
<img src='map_en.jpg'></img>
</div> -->
<div id='rotationWarning'>Please rotate your device</div>
</body>
<script type="text/javascript" src="content.js"></script>
<script>
// User preferences to pass back and forth with the other pages
var lang = 'en';
var mediaType = 'text';
var fontSize = 45;
// Check for options passed from previous page
var queryString = decodeURIComponent(window.location.search);
var searchParams = new URLSearchParams(queryString);
if (searchParams.has('lang')) {
lang = searchParams.get('lang');
if (lang == 'es') {
$('#galleryAccordion').html('Galerías');
$('#spaceDetailText').html('Hace 50 años, aterrizamos en la Luna. ¿Dónde estaremos dentro de 50 años?');
$('#science').html('Ecosistemas de Texas');
$('#scienceDetailText').html('Descubra la increíble diversidad de la vida silvestre de Texas.');
$('#history').html('Rosario');
$('#historyDetailText').html('Descubre la historia oculta de las cuentas.');
$('#project-planet').html('Proyecto Planeta');
$('#ppDetailText').html('Nuestro mundo está cambiando. ¿Qué harás?');
$('#innovation').html('Ruedas');
$('#wheelsDetailText').html('¿Cuál es tu cosa favorita con las ruedas?');
$('.exploreButton').html('Explorar');
$('#mapAccordion').html('Mapa');
$('#activitiesAccordion').html('Actividades de hoy');
$('#scavengerAccordion').html('Búsqueda de tesoros');
$('#rotationWarning').html('Por favor gire su dispositivo');
}
}
if (searchParams.has('mediaType')) {
mediaType = searchParams.get('mediaType');
}
if (searchParams.has('fontSize')) {
fontSize = searchParams.get('fontSize');
formatText();
}
function formatText() {
// Function to set all the necessary text sizes based on the user's preference.
$('.galleryDetails').css('font-size',fontSize);
$('.exploreButton').css('font-size',fontSize);
$('.schedule').css('font-size',fontSize);
$('.accordion').css('font-size',parseInt(fontSize) + 20);
$('.gallery').css('font-size',parseInt(fontSize) + 10);
$('H3').css('font-size',parseInt(fontSize) + 15);
$('H5').css('font-size',parseInt(fontSize) + 5);
}
function switchPage(page) {
// Function to switch pages while appending the user preferences
var link = page + '?lang='+lang+'&mediaType='+mediaType+'&fontSize='+fontSize;
window.location.href = link;
}
function toggleAccordion(id) {
// Expand/collapse accordion panels
var touched = document.getElementById(id);
var items = document.getElementsByClassName("accordionPanel");
if ($('#'+id).css('display') == 'none') {
$("#"+id).css("display", "block").hide().animate({'height':'show'}, 200)
} else $("#"+id).css("display", "none").show().animate({'height':'hide'}, 200)
// Loop through all the galleries to hide any active ones
for (i = 0; i < items.length; i++) {
if (items[i] != touched && $("#"+items[i].id).css('display') == 'block'){
$("#"+items[i].id).css("display", "none").show().animate({'height':'hide'}, 200)
}
}
hideDetails();
}
function toggleDetails(id) {
// Expand/collapse the details list for one gallery and collapse any others
var touched = document.getElementById(id);
var galDetails = document.getElementsByClassName("galleryDetails");
if ($('#'+id).css('display') == 'none') {
$("#"+id).css("display", "block").hide().animate({'height':'show'}, 200)
} else $("#"+id).css("display", "none").show().animate({'height':'hide'}, 200)
// Loop through all the galleries to hide any active ones
for (i = 0; i < galDetails.length; i++) {
if (galDetails[i] != touched && $("#"+galDetails[i].id).css('display') == 'block'){
$("#"+galDetails[i].id).css("display", "none").show().animate({'height':'hide'}, 200)
}
}
}
function hideDetails() {
// Function to hide the details view for every gallery
$(".galleryDetails").css("display", "none");
}
function createSteamLabSchedule() {
// Function to filter the schedule for events on the current day and build the scheudle HTML
// Select the correct language
var list_to_use = steamLabActivityList_en
// Select the correct day of the week
var today = new Date();
var today_day= new Date();
today_day.setHours(0,0,0,0);
var filteredList = list_to_use.filter(d => {var time = new Date(d.date).getTime();
return (time == today_day.getTime());
});
if (filteredList.length > 0) {
var html = '<H3>STEAM Lab</H3>Stay safe while going hands-on with these socially-distant activities.';
for (i=0; i<filteredList.length; i++) {
var entry = filteredList[i];
var endDateTime = new Date(today.toDateString() + ' ' + entry['endTime']);
if (endDateTime.getTime() > today.getTime()) { // Only add events that aren't in the past.
html += '<H5>' + entry['name'] + '</H5>';
html += '<strong>' + entry['startTime'] + ' - ' + entry['endTime'] + '</strong>';
html += '<br>' + entry['desc'];
}
}
} else {
var html = '<H3>STEAM Lab</H3>The STEAM Lab is closed, but make sure to come back for our socially-distant hands-on activities in the future!';
}
$('#steamLabAccordionPanel').append(html);
formatText();
}
function createScienceTheaterSchedule() {
// Function to filter the schedule for events on the current day and build the scheudle HTML
// Select the correct language
var list_to_use = scienceTheaterActivityList_en
// Select the correct day of the week
var today = new Date();
var today_day= new Date();
today_day.setHours(0,0,0,0);
var filteredList = list_to_use.filter(d => {var time = new Date(d.date).getTime();
return (time == today_day.getTime());
});
if (filteredList.length > 0) {
var html = '<H3>Science Theater</H3>The Science Theater features daily live demonstrations, talks, and stories with Museum staff. Socially-distant seating is provided.';
for (i=0; i<filteredList.length; i++) {
var entry = filteredList[i];
var endDateTime = new Date(today.toDateString() + ' ' + entry['endTime']);
if (endDateTime.getTime() > today.getTime()) { // Only add events that aren't in the past.
html += '<H5>' + entry['name'] + '</H5>';
html += '<strong>' + entry['startTime'] + ' - ' + entry['endTime'] + '</strong>';
html += '<br>' + entry['desc'];
}
}
html += "<br>Generous support for the Science Theater provided by Amegy Bank."
} else {
var html = '<H3>Science Theater</H3>The Science Theater is closed, but make sure to come back for our socially-distant demos, talks, and stories in the future!<br>Generous support for the Science Theater provided by Amegy Bank.';
}
$('#scienceTheaterAccordionPanel').append(html);
formatText();
}
// Detect landscape and warn
$(window).resize(function() {
var screenAspect = $(this).width()/$(this).height();
var overlay = document.getElementById('rotationWarning');
if (screenAspect > 1) {
overlay.style.display = 'block';
} else {
overlay.style.display = 'none';
}
});
// Populate the schedules
createSteamLabSchedule();
createScienceTheaterSchedule();
</script>
</html>