Skip to content

Commit 3cb0225

Browse files
authored
Merge pull request #23 from com-480-data-visualization/bug/welcome-page-separation
Bug/welcome page separation
2 parents 60a2ceb + 781262a commit 3cb0225

7 files changed

Lines changed: 300 additions & 465 deletions

File tree

docs/country_timeline.html

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,11 @@
7474
.brand-dim { color: rgba(255,255,255,0.6); font-style: italic; }
7575

7676
.breadcrumb {
77-
position: absolute;
78-
left: 50%;
79-
transform: translateX(-50%);
77+
flex: 1;
78+
min-width: 0;
8079
display: flex;
8180
align-items: center;
81+
justify-content: center;
8282
font-family: 'Inter', sans-serif;
8383
font-size: 11px;
8484
font-style: italic;
@@ -87,6 +87,7 @@
8787
text-transform: uppercase;
8888
color: rgba(255,255,255,0.6);
8989
white-space: nowrap;
90+
overflow: hidden;
9091
}
9192
.breadcrumb a { color: rgba(255,255,255,0.6); text-decoration: none; }
9293
.breadcrumb a:hover { color: rgba(255,255,255,0.9); }
@@ -892,7 +893,7 @@ <h2>No records found.</h2>
892893
<span class="brand-earth">Earth</span> Natural Disaster Museum<span class="brand-dim"> · est. 2026</span>
893894
</div>
894895
<nav class="breadcrumb">
895-
<a href="index.html">The Globe: Earth</a>
896+
<a href="globe.html">The Globe: Earth</a>
896897
<span class="sep">/</span>
897898
<span id="breadcrumbCountry"></span>
898899
</nav>

docs/css/style.css

Lines changed: 43 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -430,11 +430,11 @@ button {
430430
}
431431

432432
.breadcrumb {
433-
position: absolute;
434-
left: 50%;
435-
transform: translateX(-50%);
433+
flex: 1;
434+
min-width: 0;
436435
display: flex;
437436
align-items: center;
437+
justify-content: center;
438438
gap: 0;
439439
font-family: 'Inter', sans-serif;
440440
font-size: 11px;
@@ -444,6 +444,7 @@ button {
444444
text-transform: uppercase;
445445
color: rgba(255, 255, 255, 0.6);
446446
white-space: nowrap;
447+
overflow: hidden;
447448
}
448449

449450
.breadcrumb .sep {
@@ -482,6 +483,32 @@ button {
482483
.pill-btn .arrow { transition: transform .3s ease; }
483484
.pill-btn:hover .arrow { transform: translateX(3px); }
484485

486+
@media (max-width: 640px) {
487+
.top-bar {
488+
height: auto;
489+
padding: 12px 16px;
490+
flex-direction: column;
491+
align-items: center;
492+
gap: 10px;
493+
}
494+
.brand {
495+
text-align: center;
496+
white-space: normal;
497+
}
498+
.breadcrumb {
499+
display: none;
500+
}
501+
.top-bar-action {
502+
min-width: 0;
503+
justify-content: center;
504+
}
505+
/* direct pill-btn child (country_timeline.html) */
506+
.top-bar > .pill-btn {
507+
font-size: 14px;
508+
padding: 7px 20px;
509+
}
510+
}
511+
485512
#museum-nav {
486513
position: fixed;
487514
bottom: 30px;
@@ -537,7 +564,7 @@ button {
537564
============================================ */
538565

539566
#scene-globe {
540-
background: var(--void);
567+
background: var(--bgcolor);
541568
}
542569

543570
#globeCanvas {
@@ -1250,30 +1277,19 @@ button {
12501277
SCENE 2: 3D GLOBE WITH SPACE BACKGROUND
12511278
============================================ */
12521279

1253-
#globeContainer {
1280+
#starfieldCanvas {
12541281
position: absolute;
12551282
inset: 0;
1256-
background: radial-gradient(ellipse at center, #0a0e27 0%, #020308 100%);
1257-
overflow: hidden;
1258-
z-index: 1;
1283+
z-index: 0;
1284+
pointer-events: none;
12591285
}
12601286

1261-
/* Starfield background */
1262-
#globeContainer::before {
1263-
content: '';
1287+
#globeContainer {
12641288
position: absolute;
12651289
inset: 0;
1266-
background-image:
1267-
radial-gradient(2px 2px at 20px 30px, white, transparent),
1268-
radial-gradient(2px 2px at 60px 70px, white, transparent),
1269-
radial-gradient(1px 1px at 50px 50px, white, transparent),
1270-
radial-gradient(1px 1px at 130px 80px, white, transparent),
1271-
radial-gradient(2px 2px at 90px 10px, white, transparent);
1272-
background-repeat: repeat;
1273-
background-size: 200px 200px;
1274-
opacity: 0.5;
1275-
animation: twinkle 100s linear infinite;
1276-
pointer-events: none;
1290+
background: transparent;
1291+
overflow: hidden;
1292+
z-index: 2;
12771293
}
12781294

12791295
@keyframes twinkle {
@@ -1290,7 +1306,7 @@ button {
12901306

12911307
.globe-filter-panel {
12921308
position: absolute;
1293-
top: 18px;
1309+
top: calc(74px + 18px);
12941310
left: 22px;
12951311
bottom: auto;
12961312
width: 285px;
@@ -1302,7 +1318,7 @@ button {
13021318
border: 1px solid #353738;
13031319
border-radius: 20px;
13041320
color: var(--text);
1305-
max-height: calc(100vh - 36px);
1321+
max-height: calc(100vh - 74px - 36px);
13061322
overflow-x: hidden;
13071323
overflow-y: auto;
13081324
z-index: 80;
@@ -1614,7 +1630,7 @@ button {
16141630
@media (max-width: 900px) {
16151631
.globe-filter-panel {
16161632
left: 16px;
1617-
top: 16px;
1633+
top: calc(74px + 16px);
16181634
width: min(285px, calc(100vw - 32px));
16191635
}
16201636

@@ -1627,7 +1643,8 @@ button {
16271643

16281644
@media (max-width: 640px) {
16291645
.globe-filter-panel {
1630-
max-height: calc(100vh - 32px);
1646+
top: calc(92px + 16px);
1647+
max-height: calc(100vh - 92px - 32px);
16311648
overflow-y: auto;
16321649
}
16331650

docs/earth_story.html

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Natural Disaster Museum · Earth Story</title>
7+
8+
<!-- Fonts -->
9+
<link href="https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&family=Inter:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=Special+Elite&family=Source+Sans+3:wght@300;400;600&display=swap" rel="stylesheet">
10+
11+
<!-- Styles -->
12+
<link rel="stylesheet" href="css/style.css">
13+
14+
<!-- D3 -->
15+
<script src="https://cdnjs.cloudflare.com/ajax/libs/d3/7.8.5/d3.min.js"></script>
16+
</head>
17+
18+
<body>
19+
<header class="top-bar" id="top-bar">
20+
<div class="brand">
21+
<span class="brand-earth">Earth</span> Natural Disaster Museum<span class="brand-dim"> · est. 2026</span>
22+
</div>
23+
<nav class="breadcrumb" id="top-breadcrumb">
24+
<a class="crumb crumb-link" href="globe.html">The Globe: Earth</a>
25+
<span class="sep">/</span>
26+
<span class="crumb">Earth Story</span>
27+
</nav>
28+
<div class="top-bar-action" id="top-bar-action"></div>
29+
</header>
30+
31+
<div id="app">
32+
<div id="scene-story" class="scene active">
33+
<div class="story-header">
34+
<h2 class="story-title">EARTH STORY</h2>
35+
<p class="story-subtitle">Analysing 50 years of global disaster trends</p>
36+
</div>
37+
38+
<!-- 4 exhibit frames in a 2x2 grid -->
39+
<div class="exhibits-hall" id="overviewHall">
40+
<div class="wall-exhibit" id="exhibit-frequency">
41+
<div class="exhibit-spotlight"></div>
42+
<div class="exhibit-label">EXHIBIT I</div>
43+
<div class="exhibit-wall-title">THE RISING TIDE</div>
44+
<div class="exhibit-wall-subtitle">Disaster frequency by subgroup, 1975-2025</div>
45+
<div class="exhibit-viz-area" id="viz-frequency"></div>
46+
<div class="exhibit-caption">This stacked area chart reveals a dramatic increase in disaster frequency over five decades. Climate-related disasters (Meteorological, Hydrological, Climatological) show the steepest rise, while Geophysical events remain relatively stable, underscoring the growing impact of climate change.</div>
47+
</div>
48+
49+
<div class="wall-exhibit" id="exhibit-mortality">
50+
<div class="exhibit-spotlight"></div>
51+
<div class="exhibit-label">EXHIBIT II</div>
52+
<div class="exhibit-wall-title">THE MORTALITY CRISIS</div>
53+
<div class="exhibit-wall-subtitle">Annual death toll from natural disasters, 1975-2025</div>
54+
<div class="exhibit-viz-area" id="viz-mortality"></div>
55+
<div class="exhibit-caption">Disaster mortality shows extreme variability over five decades, with devastating spikes marking catastrophic events like the 2004 Indian Ocean Tsunami and 2010 Haiti Earthquake. Despite advances in early warning systems, these peaks demonstrate the persistent vulnerability of populations in high-risk regions.</div>
56+
</div>
57+
58+
<div class="wall-exhibit" id="exhibit-economic">
59+
<div class="exhibit-spotlight"></div>
60+
<div class="exhibit-label">EXHIBIT III</div>
61+
<div class="exhibit-wall-title">THE HUMAN TOLL</div>
62+
<div class="exhibit-wall-subtitle">Affected populations over time, 1975-2025</div>
63+
<div class="exhibit-viz-area" id="viz-economic"></div>
64+
<div class="exhibit-caption">The number of people affected by natural disasters has grown substantially, reflecting both population growth in hazard-prone areas and improved disaster reporting. Peak years show hundreds of millions impacted, underscoring the scale of displacement, injury, and disruption caused by major events.</div>
65+
</div>
66+
67+
<div class="wall-exhibit" id="exhibit-geography">
68+
<div class="exhibit-spotlight"></div>
69+
<div class="exhibit-label">EXHIBIT IV</div>
70+
<div class="exhibit-wall-title">REGIONAL VULNERABILITY</div>
71+
<div class="exhibit-wall-subtitle">Disaster burden across continents</div>
72+
<div class="exhibit-viz-area" id="viz-geography"></div>
73+
<div class="exhibit-caption">Asia bears the brunt of global disaster impacts, experiencing over half of all natural disasters and the majority of casualties. This regional disparity reflects both geographic exposure to hazards and socioeconomic vulnerabilities that amplify disaster consequences in developing nations.</div>
74+
</div>
75+
</div>
76+
</div>
77+
</div>
78+
79+
<script src="js/data.js"></script>
80+
<script src="js/scene4_story.js"></script>
81+
<script>
82+
document.addEventListener('DOMContentLoaded', async () => {
83+
await initData();
84+
Scene4.init();
85+
});
86+
</script>
87+
</body>
88+
</html>

0 commit comments

Comments
 (0)