493 lines
14 KiB
HTML
493 lines
14 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Measles Vaccination Coverage vs. Outbreaks (2000-2023)</title>
|
|
<script src='https://api.mapbox.com/mapbox-gl-js/v3.0.1/mapbox-gl.js'></script>
|
|
<link href='https://api.mapbox.com/mapbox-gl-js/v3.0.1/mapbox-gl.css' rel='stylesheet' />
|
|
<style>
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
|
|
background: #0a0a0a;
|
|
color: #ffffff;
|
|
overflow: hidden;
|
|
}
|
|
|
|
#map {
|
|
position: absolute;
|
|
top: 0;
|
|
bottom: 0;
|
|
width: 100%;
|
|
}
|
|
|
|
.header {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
background: linear-gradient(180deg, rgba(10,10,10,0.95) 0%, rgba(10,10,10,0) 100%);
|
|
padding: 20px 30px;
|
|
z-index: 1;
|
|
}
|
|
|
|
.title {
|
|
font-size: 28px;
|
|
font-weight: 700;
|
|
margin-bottom: 8px;
|
|
background: linear-gradient(135deg, #64b5f6 0%, #1e88e5 100%);
|
|
-webkit-background-clip: text;
|
|
-webkit-text-fill-color: transparent;
|
|
background-clip: text;
|
|
}
|
|
|
|
.subtitle {
|
|
font-size: 14px;
|
|
color: #b0bec5;
|
|
font-weight: 400;
|
|
}
|
|
|
|
.controls {
|
|
position: absolute;
|
|
top: 120px;
|
|
left: 30px;
|
|
background: rgba(20, 20, 30, 0.92);
|
|
backdrop-filter: blur(10px);
|
|
border-radius: 12px;
|
|
padding: 20px;
|
|
min-width: 280px;
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
z-index: 1;
|
|
}
|
|
|
|
.control-section {
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.control-section:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.control-label {
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: #90a4ae;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
margin-bottom: 12px;
|
|
display: block;
|
|
}
|
|
|
|
.toggle-group {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
}
|
|
|
|
.toggle-item {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 10px;
|
|
background: rgba(255, 255, 255, 0.05);
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.toggle-item:hover {
|
|
background: rgba(255, 255, 255, 0.08);
|
|
}
|
|
|
|
.toggle-item label {
|
|
font-size: 14px;
|
|
color: #eceff1;
|
|
cursor: pointer;
|
|
flex: 1;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.layer-icon {
|
|
width: 16px;
|
|
height: 16px;
|
|
border-radius: 3px;
|
|
margin-right: 10px;
|
|
display: inline-block;
|
|
}
|
|
|
|
.toggle-switch {
|
|
position: relative;
|
|
width: 44px;
|
|
height: 24px;
|
|
}
|
|
|
|
.toggle-switch input {
|
|
opacity: 0;
|
|
width: 0;
|
|
height: 0;
|
|
}
|
|
|
|
.slider {
|
|
position: absolute;
|
|
cursor: pointer;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background-color: rgba(255, 255, 255, 0.2);
|
|
transition: 0.3s;
|
|
border-radius: 24px;
|
|
}
|
|
|
|
.slider:before {
|
|
position: absolute;
|
|
content: "";
|
|
height: 18px;
|
|
width: 18px;
|
|
left: 3px;
|
|
bottom: 3px;
|
|
background-color: white;
|
|
transition: 0.3s;
|
|
border-radius: 50%;
|
|
}
|
|
|
|
input:checked + .slider {
|
|
background-color: #1e88e5;
|
|
}
|
|
|
|
input:checked + .slider:before {
|
|
transform: translateX(20px);
|
|
}
|
|
|
|
.legend {
|
|
position: absolute;
|
|
bottom: 30px;
|
|
right: 30px;
|
|
background: rgba(20, 20, 30, 0.92);
|
|
backdrop-filter: blur(10px);
|
|
border-radius: 12px;
|
|
padding: 20px;
|
|
min-width: 240px;
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
z-index: 1;
|
|
}
|
|
|
|
.legend-title {
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: #90a4ae;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.legend-section {
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.legend-section:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.legend-section-title {
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
color: #b0bec5;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.legend-gradient {
|
|
height: 20px;
|
|
border-radius: 4px;
|
|
margin-bottom: 6px;
|
|
}
|
|
|
|
.legend-labels {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
font-size: 11px;
|
|
color: #78909c;
|
|
}
|
|
|
|
.legend-circles {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 15px;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.legend-circle {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
font-size: 11px;
|
|
color: #b0bec5;
|
|
}
|
|
|
|
.circle-sample {
|
|
border-radius: 50%;
|
|
background: rgba(239, 83, 80, 0.7);
|
|
border: 2px solid #ef5350;
|
|
}
|
|
|
|
.stats {
|
|
position: absolute;
|
|
top: 120px;
|
|
right: 30px;
|
|
background: rgba(20, 20, 30, 0.92);
|
|
backdrop-filter: blur(10px);
|
|
border-radius: 12px;
|
|
padding: 20px;
|
|
min-width: 280px;
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
z-index: 1;
|
|
}
|
|
|
|
.stat-item {
|
|
margin-bottom: 15px;
|
|
padding-bottom: 15px;
|
|
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
|
}
|
|
|
|
.stat-item:last-child {
|
|
margin-bottom: 0;
|
|
padding-bottom: 0;
|
|
border-bottom: none;
|
|
}
|
|
|
|
.stat-value {
|
|
font-size: 28px;
|
|
font-weight: 700;
|
|
color: #ffffff;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.stat-label {
|
|
font-size: 12px;
|
|
color: #78909c;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.stat-trend {
|
|
font-size: 13px;
|
|
margin-top: 6px;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.trend-up {
|
|
color: #ef5350;
|
|
}
|
|
|
|
.trend-down {
|
|
color: #66bb6a;
|
|
}
|
|
|
|
.mapboxgl-popup {
|
|
z-index: 2;
|
|
}
|
|
|
|
.mapboxgl-popup-content {
|
|
background: rgba(20, 20, 30, 0.95);
|
|
backdrop-filter: blur(10px);
|
|
color: #ffffff;
|
|
border-radius: 8px;
|
|
padding: 16px;
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
|
|
border: 1px solid rgba(255, 255, 255, 0.15);
|
|
min-width: 240px;
|
|
}
|
|
|
|
.popup-title {
|
|
font-size: 16px;
|
|
font-weight: 700;
|
|
margin-bottom: 12px;
|
|
color: #64b5f6;
|
|
}
|
|
|
|
.popup-section {
|
|
margin-bottom: 12px;
|
|
}
|
|
|
|
.popup-section:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.popup-label {
|
|
font-size: 11px;
|
|
color: #78909c;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.popup-value {
|
|
font-size: 14px;
|
|
color: #eceff1;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.popup-grid {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 10px;
|
|
}
|
|
|
|
.coverage-bar {
|
|
height: 6px;
|
|
background: rgba(255, 255, 255, 0.1);
|
|
border-radius: 3px;
|
|
margin-top: 6px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.coverage-fill {
|
|
height: 100%;
|
|
border-radius: 3px;
|
|
transition: width 0.3s;
|
|
}
|
|
|
|
.mapboxgl-popup-close-button {
|
|
color: #ffffff;
|
|
font-size: 20px;
|
|
padding: 8px;
|
|
}
|
|
|
|
.mapboxgl-popup-close-button:hover {
|
|
background: rgba(255, 255, 255, 0.1);
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div id="map"></div>
|
|
|
|
<div class="header">
|
|
<div class="title">Measles Vaccination Coverage vs. Disease Outbreaks</div>
|
|
<div class="subtitle">Global Analysis 2000-2023 | 60M Lives Saved Through Vaccination</div>
|
|
</div>
|
|
|
|
<div class="controls">
|
|
<div class="control-section">
|
|
<span class="control-label">Map Layers</span>
|
|
<div class="toggle-group">
|
|
<div class="toggle-item">
|
|
<label>
|
|
<span class="layer-icon" style="background: linear-gradient(90deg, #1565c0, #64b5f6);"></span>
|
|
Vaccination Coverage
|
|
</label>
|
|
<label class="toggle-switch">
|
|
<input type="checkbox" id="toggle-coverage" checked>
|
|
<span class="slider"></span>
|
|
</label>
|
|
</div>
|
|
<div class="toggle-item">
|
|
<label>
|
|
<span class="layer-icon" style="background: rgba(239, 83, 80, 0.7); border: 2px solid #ef5350;"></span>
|
|
Outbreak Locations
|
|
</label>
|
|
<label class="toggle-switch">
|
|
<input type="checkbox" id="toggle-outbreaks" checked>
|
|
<span class="slider"></span>
|
|
</label>
|
|
</div>
|
|
<div class="toggle-item">
|
|
<label>
|
|
<span class="layer-icon" style="background: rgba(255, 255, 255, 0.2); border: 1px solid #90a4ae;"></span>
|
|
Country Borders
|
|
</label>
|
|
<label class="toggle-switch">
|
|
<input type="checkbox" id="toggle-borders" checked>
|
|
<span class="slider"></span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="stats">
|
|
<div class="stat-item">
|
|
<div class="stat-value">83%</div>
|
|
<div class="stat-label">First Dose Coverage (2023)</div>
|
|
<div class="stat-trend trend-down">
|
|
↓ Below 95% herd immunity threshold
|
|
</div>
|
|
</div>
|
|
<div class="stat-item">
|
|
<div class="stat-value">74%</div>
|
|
<div class="stat-label">Second Dose Coverage (2023)</div>
|
|
</div>
|
|
<div class="stat-item">
|
|
<div class="stat-value">+20%</div>
|
|
<div class="stat-label">Cases Increase (2022-2023)</div>
|
|
<div class="stat-trend trend-up">
|
|
↑ Outbreaks: 36 → 57 countries
|
|
</div>
|
|
</div>
|
|
<div class="stat-item">
|
|
<div class="stat-value">4.1M</div>
|
|
<div class="stat-label">Cases in 2023</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="legend">
|
|
<div class="legend-title">Legend</div>
|
|
|
|
<div class="legend-section">
|
|
<div class="legend-section-title">Vaccination Coverage (1st Dose)</div>
|
|
<div class="legend-gradient" style="background: linear-gradient(90deg,
|
|
#1565c0 0%,
|
|
#1976d2 25%,
|
|
#42a5f5 50%,
|
|
#ffb74d 75%,
|
|
#ff6f00 100%);"></div>
|
|
<div class="legend-labels">
|
|
<span><60%</span>
|
|
<span>70%</span>
|
|
<span>80%</span>
|
|
<span>90%</span>
|
|
<span>95%+</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="legend-section">
|
|
<div class="legend-section-title">Outbreak Size</div>
|
|
<div class="legend-circles">
|
|
<div class="legend-circle">
|
|
<div class="circle-sample" style="width: 8px; height: 8px;"></div>
|
|
<span>100</span>
|
|
</div>
|
|
<div class="legend-circle">
|
|
<div class="circle-sample" style="width: 16px; height: 16px;"></div>
|
|
<span>1,000</span>
|
|
</div>
|
|
<div class="legend-circle">
|
|
<div class="circle-sample" style="width: 24px; height: 24px;"></div>
|
|
<span>10,000+</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Load shared Mapbox configuration BEFORE main script -->
|
|
<script type="module">
|
|
import { MAPBOX_CONFIG } from '../shared/mapbox-config.js';
|
|
MAPBOX_CONFIG.applyToken(); // Validates and applies token
|
|
</script>
|
|
|
|
<!-- Load main application -->
|
|
<script type="module" src="src/index.js"></script>
|
|
</body>
|
|
</html>
|