forked from melizeche/AireLibre
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
233 lines (198 loc) · 7.91 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
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
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Aire Libre</title>
<link rel="stylesheet" href="./style/normalize.css">
<link rel="stylesheet" href="./style/master.css">
<link rel="stylesheet" href="./style/custom-map-marker-icon.css">
<style type="text/css">
.reading-info--is-good .leaflet-popup-content-wrapper,
.reading-info--is-good .leaflet-popup-tip,
.leaflet-tooltip.reading-info--is-good {
background-color: #A2DC61;
}
.reading-info--is-moderate .leaflet-popup-content-wrapper,
.reading-info--is-moderate .leaflet-popup-tip,
.leaflet-tooltip.reading-info--is-moderate {
background-color: #FBD651;
}
.reading-info--is-sensitive .leaflet-popup-content-wrapper,
.reading-info--is-sensitive .leaflet-popup-tip,
.leaflet-tooltip.reading-info--is-sensitive {
background-color: #FD9A57;
}
.reading-info--is-unhealthy .leaflet-popup-content-wrapper,
.reading-info--is-unhealthy .leaflet-popup-tip,
.leaflet-tooltip.reading-info--is-unhealthy {
background-color: #FF6A6E;
}
.reading-info--is-very-unhealthy .leaflet-popup-content-wrapper,
.reading-info--is-very-unhealthy .leaflet-popup-tip,
.leaflet-tooltip.reading-info--is-very-unhealthy {
background-color: #A97BBC;
}
.reading-info--is-dangerous .leaflet-popup-content-wrapper,
.reading-info--is-dangerous .leaflet-popup-tip,
.leaflet-tooltip.reading-info--is-dangerous {
background-color: #9B5974;
}
.reading-info--is-good.leaflet-tooltip {
border: #639c22 solid 1px !important;
}
.reading-info--is-good.leaflet-tooltip-left:before {
border-left-color: #639c22 !important;
}
.reading-info--is-good.leaflet-tooltip-right:before {
border-right-color: #639c22 !important;
}
.reading-info--is-moderate.leaflet-tooltip {
border: #C39A04 solid 1px !important;
}
.reading-info--is-moderate.leaflet-tooltip-left:before {
border-left-color: #C39A04 !important;
}
.reading-info--is-moderate.leaflet-tooltip-right:before {
border-right-color: #C39A04 !important;
}
.reading-info--is-sensitive.leaflet-tooltip {
border: #CB5202 solid 1px !important;
}
.reading-info--is-sensitive.leaflet-tooltip-left:before {
border-left-color: #CB5202 !important;
}
.reading-info--is-sensitive.leaflet-tooltip-right:before {
border-right-color: #CB5202 !important;
}
.reading-info--is-unhealthy.leaflet-tooltip {
border: #D90007 solid 1px !important;
}
.reading-info--is-unhealthy.leaflet-tooltip-left:before {
border-left-color: #D90007 !important;
}
.reading-info--is-unhealthy.leaflet-tooltip-right:before {
border-right-color: #D90007 !important;
}
.reading-info--is-very-unhealthy.leaflet-tooltip {
border: #6A3F7C solid 1px !important;
}
.reading-info--is-very-unhealthy.leaflet-tooltip-left:before {
border-left-color: #6A3F7C !important;
}
.reading-info--is-very-unhealthy.leaflet-tooltip-right:before {
border-right-color: #6A3F7C !important;
}
.reading-info--is-dangerous.leaflet-tooltip {
background-color: #9B5974 !important;
border: #5D3646 solid 1px !important;
}
.reading-info--is-dangerous.leaflet-tooltip-left:before {
border-left-color: #5D3646 !important;
}
.reading-info--is-dangerous.leaflet-tooltip-right:before {
border-right-color: #5D3646 !important;
}
.leaflet-tooltip h1 {
font-weight: bold;
}
</style>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/css/bulma.min.css">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css"
integrity="sha512-xodZBNTC5n17Xt2atTPuE1HxjVMSvLVW9ocqUKLsCC5CXdbqCmblAshOMAS6/keqq/sMZMZ19scR4PsZChSR7A=="
crossorigin="" />
<script async src="https://www.googletagmanager.com/gtag/js?id=G-0EQ0STJ1E5"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'G-0EQ0STJ1E5');
</script>
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"
integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA=="
crossorigin=""></script>
<script src="./js/fetch.js"></script>
</head>
<body>
<div class="wrapper">
<section class="container">
<header class="head">
<h1 class="anchor anchor__for-desktop">
<a href="/">Aire|Libre</a>
</h1>
<h1 class="anchor anchor__for-mobile">
<a href="/">A|L</a>
</h1>
</header>
<div id="map" class="map"></div>
</section>
<section class="info">
<section>
<h2 class="info__title">Qué es AQI?</h2>
<p class="info__desc">Es un índice utilizado por agencias ambientales para medir la calidad del aire, cuanto más
alto su valor, el nivel de contaminación es mayor.</p>
</section>
<section id="scale">
<span class="info__title">Escala AQI</span>
<div class="reading-info reading-info--is-good">
<span class="reading-info__title">0-50 | Libre</span>
<p class="reading-info__desc">Escaso riesgo de contaminación atmosférica, calidad de aire satisfactoria.</p>
</div>
<div class="reading-info reading-info--is-moderate">
<span class="reading-info__title">51-100 | Maso</span>
<p class="reading-info__desc">Calidad de aire aceptable, riesgo moderado para la salud de personas sensibles a
la contaminación ambiental.</p>
</div>
<div class="reading-info reading-info--is-sensitive">
<span class="reading-info__title">101-150 | No tan bien</span>
<p class="reading-info__desc">Insalubre para personas sensibles.</p>
</div>
<div class="reading-info reading-info--is-unhealthy">
<span class="reading-info__title">121-200 | Insalubre</span>
<p class="reading-info__desc">Riesgo general para las personas, efectos más graves en personas sensibles.</p>
</div>
<div class="reading-info reading-info--is-very-unhealthy">
<span class="reading-info__title">201-300 | Muy insalubre</span>
<p class="reading-info__desc">Condición de emergencia.</p>
</div>
<div class="reading-info reading-info--is-dangerous">
<span class="reading-info__title">300+ | Peligroso</span>
<p class="reading-info__desc">Alerta sanitaria, efectos graves para toda la población.</p>
</div>
<p><b>Fuente:</b> <a href="https://www.airnow.gov/aqi/aqi-basics-in-spanish/">AirNow</a></p>
</section>
<div class="separator"></div>
<footer class="">
<span>Aire libre es un proyecto libre y de código abierto, si querés saber más escribinos <a
href="https://github.com/melizeche/AireLibre">acá</a></span>
</footer>
</section>
</div>
</body>
<script>
WebFontConfig = {
google: { families: ['Rubik:400,700,900:latin'] }
};
(function () {
setTimeout(function () {
document.getElementsByTagName('body')[0].classList.add('beautiful');
}, 1000);
var wf = document.createElement('script');
wf.src = ('https:' == document.location.protocol ? 'https' : 'http') +
'://ajax.googleapis.com/ajax/libs/webfont/1/webfont.js';
wf.type = 'text/javascript';
wf.async = 'true';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(wf, s);
})();
</script>
<script>
var map = L.map('map').setView(DEFAULT_CENTER, DEFAULT_ZOOM);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: '© <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
requestGeoData();
</script>
</html>