-
Notifications
You must be signed in to change notification settings - Fork 19
/
weather_info.html
314 lines (283 loc) · 11.6 KB
/
weather_info.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link
rel="icon"
href="https://i.pinimg.com/originals/87/9e/00/879e002a9082b4d32901840cb70c0929.gif"
/>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="./css/information.css" />
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css"
/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.5.0/css/ol.css" type="text/css">
<script src="https://cdn.jsdelivr.net/gh/openlayers/openlayers.github.io@master/en/v6.5.0/build/ol.js"></script>
<title>Weather Information</title>
</head>
<body>
<div class="weather-container">
<div id="weather-data" class="visible">
<div class="city-info">
<h2 id="city-name"></h2>
<p id="current-date"></p>
</div>
<main>
<section class="current-weather">
<h3><i class="fas fa-temperature-high"></i> Current Weather</h3>
<div id="weather-info" class="weather-details">
<div class="weather-icon">
<img alt="Weather Icon" class="icons main-icon">
</div>
<div class="weather-text">
<p id="temperature" class="temperature"></p>
<p><b id="weather-desc" class="description"></b></p>
<!-- add wind speed and humidity -->
<i class="fas fa-tint"></i>
<b>Humidity:</b> <span id="humidity"> -- %</span>
<br />
<i class="fas fa-wind"></i>
<b>Wind Speed: </b> <span id="wind-speed"> -- m/s</span>
<div class="suntime" style="display: flex; margin-top:.7rem;">
<span>
<img src="images/sunrise.png" alt="Sunrise" style="width: 31px; height:31px;">
</span>
<b>Sunrise: </b> <span class="sunrise-time"> --</span>
</div>
<div class="suntime" style="display: flex; margin-left:.2rem">
<span>
<img src="images/sunset.png" alt="Sunset" style="width: 31px; height:31px;">
</span>
<b>Sunset: </b> <span class="sunset-time"> --</span>
</div>
</div>
<div class="wind-direction">
<i id="wind-direction-icon" class="fas fa-long-arrow-alt-up"></i>
<span id="wind-direction-text"></span>
</div>
</div>
</section>
<section id="health-impact" class="weather-section"></section>
<div style="display: flex; justify-content: space-between">
<section class="air-quality">
<div id="aqi-info" class="weather-details">
<div class="detail-item">
<i class="fas fa-lungs"></i>
<div class="aqi-text">
<p id="aqi-value">AQI: --</p>
<p id="aqi-status">Quality: --</p>
<p id="aqi-description">--</p>
</div>
</div>
</div>
</section>
<!-- Add this section after the air-quality section -->
<section class="uv-index" >
<div id="uv-info" class="weather-details">
<div class="detail-item">
<i class="fas fa-radiation"></i>
<div class="uv-text">
<p id="uv-value">UV Index: --</p>
<p id="uv-level">Level: --</p>
<p id="uv-advice">--</p>
<div id="uv-progress" class="uv-progress-bar">
<div id="uv-progress-fill"></div>
</div>
</div>
</div>
</div>
</section>
</div>
<section class="forecast">
<h3><i class="fas fa-calendar-alt"></i> 5-Day Forecast</h3>
<div id="forecast-info" class="forecast-container">
<div id="forecasts" class="forecasts-row">
<div class="forecast-card sunny">
<h4 class="day">Monday, October 21</h4>
<div class="weather-content">
<div class="temp">24°C</div>
<img alt="Weather Icon" class="icon forcast-images">
</div>
<p class="status">Partly Cloudy</p>
<!-- New Humidity and Wind Speed Information -->
<i class="fas fa-tint"></i>
<span class="humidity">Humidity: -- %</span>
<br />
<i class="fas fa-wind"></i>
<span class="wind-speed">Wind Speed: -- m/s</span>
</div>
<div class="forecast-card cloudy">
<h4 class="day">Tuesday, October 21</h4>
<div class="weather-content">
<div class="temp">22°C</div>
<img alt="Weather Icon" class="icon forcast-images">
</div>
<p class="status">Cloudy</p>
<!-- New Humidity and Wind Speed Information -->
<i class="fas fa-tint"></i>
<span class="humidity">Humidity: -- %</span>
<br />
<i class="fas fa-wind"></i>
<span class="wind-speed">Wind Speed: -- m/s</span>
</div>
<div class="forecast-card rainy">
<h4 class="day">Wednesday, October 21</h4>
<div class="weather-content">
<div class="temp">20°C</div>
<img alt="Weather Icon" class="icon forcast-images">
</div>
<p class="status">Rainy</p>
<!-- New Humidity and Wind Speed Information -->
<i class="fas fa-tint"></i>
<span class="humidity">Humidity: -- %</span>
<br />
<i class="fas fa-wind"></i>
<span class="wind-speed">Wind Speed: -- m/s</span>
</div>
<div class="forecast-card snowy">
<h4 class="day">Thursday, October 21</h4>
<div class="weather-content">
<div class="temp">-2°C</div>
<img alt="Weather Icon" class="icon forcast-images">
</div>
<p class="status">Snowy</p>
<!-- New Humidity and Wind Speed Information -->
<i class="fas fa-tint"></i>
<span class="humidity">Humidity: -- %</span>
<br />
<i class="fas fa-wind"></i>
<span class="wind-speed">Wind Speed: -- m/s</span>
</div>
<div class="forecast-card stormy">
<h4 class="day">Friday, October 21</h4>
<div class="weather-content">
<div class="temp">18°C</div>
<img alt="Weather Icon" class="icon forcast-images">
</div>
<p class="status">Stormy</p>
<!-- New Humidity and Wind Speed Information -->
<i class="fas fa-tint"></i>
<span class="humidity">Humidity: -- %</span>
<br />
<i class="fas fa-wind"></i>
<span class="wind-speed">Wind Speed: -- m/s</span>
</div>
</div>
</div>
</section>
<section>
<h3>
<i
class="fa-solid fa-feather-pointed"
style="
height: 30px;
width: 30px;
font-size: x-large;
margin-right: 5px;
"
></i>
Gas Quantities (per meter<sup>3</sup>)
</h3>
<div id="airCards">
<div style="display: flex; justify-content: space-around">
<div class="airCard">
<p>CO :</p>
<p id="co"></p>
</div>
<div class="airCard">
<p>NO :</p>
<p id="no"></p>
</div>
<div class="airCard">
<p>NO<sub>2</sub> :</p>
<p id="no2"></p>
</div>
<div class="airCard">
<p>O<sub>3</sub> :</p>
<p id="o3"></p>
</div>
</div>
<div style="display: flex; justify-content: space-around">
<div class="airCard">
<p>SO<sub>2</sub> :</p>
<p id="so2"></p>
</div>
<div class="airCard">
<p>PM<sub>2.5</sub> :</p>
<p id="pm2"></p>
</div>
<div class="airCard">
<p>PM<sub>10</sub> :</p>
<p id="pm10"></p>
</div>
<div class="airCard">
<p>NH<sub>3</sub> :</p>
<p id="nh3"></p>
</div>
</div>
</div>
</section>
<section class="forecast">
<h3>
<i
class="fa-solid fa-chart-line"
style="
height: 30px;
width: 30px;
font-size: x-large;
margin-right: 5px;
"
></i>
Timeline Of Forecast
</h3>
<div id="chart" style="width: 100%">
<canvas id="myChart"></canvas>
</div>
</section>
<section class="rain-humidity">
<h2><i class="fas fa-cloud-rain"></i> Rain</h2>
<div
id="rain-humidity-info
"
class="weather-details"
>
<div class="detail-item">
<img src="images/rainChance.png" alt="Chance Of Rain" style="height: 60px; width:60px";>
<p id="chance-of-rain"> -- </p>
</div>
<!-- not required because we have humidity in the current weather section -->
<!-- </div>
<div class="detail-item">
<i class="fas fa-tint"></i>
<span id="humidity">Humidity: -- %</span>
</div> -->
</div>
</section>
<section class="weather-map">
<h3>
<i class="fas fa-map-marked-alt" style="height: 30px; width: 30px; font-size: x-large; margin-right: 5px;"></i>
Weather Map
</h3>
<div id="map" style="height: 400px; width: 100%; border-radius: 10px;"></div>
<div class="map-controls">
<select id="map-layer" class="map-control">
<option value="temp">Temperature</option>
<option value="clouds">Clouds</option>
<option value="precipitation">Precipitation</option>
<option value="wind">Wind Speed</option>
</select>
</div>
</section>
</main>
</div>
<footer>
<p>© 2024 Weather.io. All rights reserved.</p>
</footer>
</div>
<script src="./index.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="./chart.js"></script>
<script src="./weathermap.js"></script>
</body>
</html>