-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
540 lines (527 loc) · 27.3 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
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
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@300;400&display=swap" rel="stylesheet">
<script src="js/jquery-3.7.0.min.js"></script>
<script src="js/scroll.js"></script>
<script type="text/javascript" src="leaflet/leaflet.js"></script>
<link rel="stylesheet" type="text/css" href="leaflet/leaflet.css" />
<link rel="stylesheet" type="text/css" href="leaflet/leaflet-openweathermap.css" />
<script type="text/javascript" src="leaflet/leaflet-openweathermap.js"></script>
<link rel="apple-touch-icon" sizes="180x180" href="favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="favicon/favicon-16x16.png">
<title>Weather Report</title>
</head>
<body>
<div class="header flex space-evenly align-center">
<div class="burger">
<span></span>
</div>
<div class="logoHolder bold flex">
<div class="logo"></div>
Погода
</div>
<nav>
<ul>
<li><a class="nav-item-mob" href="#">Главная</a></li>
<li><a class="nav-item-mob" href="#detailedTodayReport">Подробный прогноз</a></li>
<li><a class="nav-item-mob" href="#map">Карта осадков</a></li>
</li>
</ul>
</nav>
<form onsubmit="return false" id="searchForm" method="get">
<input id="search" placeholder="Город или район">
<input id="searchSubmit" type="submit" value="">
</form>
</div>
<div class="overlay" onclick="menuToggle()"></div>
<div id='mainBlock' class="stormBg flex align-center space-evenly">
<div class="semiTransperentBg"></div>
<div class="daysBlock">
<div class="daysHolder flex align-end">
<div id='firstDay'class="dayBlock hide blockLoading flex">
<div class="dayHeader flex pd10 mrgb15 align-center">
<!--к блокам с классом todayIcon нужно добавить класс который соответвует иконке сегоднящней погоде (см. css-файл)-->
<div id = 'todayIcon' class="dayIcon"></div>
<!--к блоку с id todayLongDecsription нужно передать длинное описание погоды-->
<div class="dayDiscripion darkFont" id="todayLongDecsription">Сегодня солнечно</div>
</div>
<div class="dayContent">
<div class="cityName daycityName bold darkFont" id="cityName">Дворцовый округ, Санкт-Петербург</div>
<div class="flex lightFont">
<!--в блок с id todayDateName нужно передать длинное название для недели сегодня-->
<div id="todayDateName" class="mrgr10">Понедельник</div>
<!--блок с id currentTime нужно обновлять каждую минуту показывая какое сейчас время-->
<div id="currentTime">21:05</div>
</div>
<div class="flex space-between mrgt20">
<!--в блоки с классом todayTemp нужно передать температуру сегодня сейчас-->
<div class="todayTemp dayTemp bold darkFont" id="todayTempNow">+19°</div>
<div>
<!--в блоки с классом todayFeelsLike нужно передать как ощущается сегодняшнаяя температура-->
<div class="todayFeelsLike lightFont mrgr15" id="todayFeelsLike">Ощущается как +17°</div>
</div>
</div>
<div class="infoBlock flex space-around">
<div class="windBlock lightFont flex align-center">
<div class="infoIcon windIcon"></div>
<div id = todayWind class="bold darkFont"></div>
м/с
</div>
<div class="pressureBlock lightFont flex align-center">
<div class="infoIcon pressureIcon"></div>
<div id ='todayPressure'class="bold darkFont"></div>
</div>
<div class="humidityBlock lightFont flex align-center">
<div class="infoIcon humidityIcon"></div>
<div id ='todayHumidity'class="bold darkFont"></div>
</div>
</div>
</div>
<div class="timeTempHolder flex space-evenly align-center darkFont">
<div class="timeTempBlock bold">
<!--в эти блоки передаем температуру по указанному времени-->
8:00
<div id="todayFirstTemp">+19°</div>
</div>
<div class="timeTempBlock bold">
12:00
<div id="todaySecondTemp">+17°</div>
</div>
<div class="timeTempBlock bold">
17:00
<div id="todayThirdTemp">+16°</div>
</div>
<div class="timeTempBlock bold">
21:00
<div id="todayFourthTemp">+12°</div>
</div>
</div>
</div>
<div id='secondDay'class="dayBlock hide blockLoading flex">
<div class="dayHeader flex pd10 mrgb15 align-center">
<!--к блокам с классом oneDayAfterIcon нужно добавить класс который соответвует иконке погоды через один день (см. css-файл)-->
<div class="oneDayAfterIcon dayIcon" id="oneDayAfterIcon"></div>
<div class="dayDiscripion darkFont" id="OneDayAfterLongDecsription">Сегодня солнечно</div>
</div>
<div class="dayContent">
<div id="longOneDayAfter" class="mrgr10flex lightFont">Вторник</div>
<div class="flex space-around mrgt20 bold darkFont">
<div>
Ночью
<div id="oneDayAfterTempAtNight" class="dayTemp bold">+8°</div>
</div>
<div>
Днём
<div id="oneDayAfterTempAtDay" class="dayTemp bold">+17°</div>
</div>
</div>
<div class="infoBlock flex space-around">
<div class="windBlock lightFont flex align-center">
<div class="infoIcon windIcon"></div>
<div id ='oneDayAfterWind' class="bold darkFont"></div>
м/с
</div>
<div class="pressureBlock lightFont flex align-center">
<div class="infoIcon pressureIcon"></div>
<div id ='oneDayAfterPressure'class="bold darkFont"></div>
</div>
<div class="humidityBlock lightFont flex align-center">
<div class="infoIcon humidityIcon"></div>
<div id ='oneDayAfterHumidity'class="bold darkFont"></div>
</div>
</div>
</div>
<div class="timeTempHolder flex space-evenly align-center darkFont bold">
<div class="timeTempBlock darkFont bold">
8:00
<div id="oneDayAfterFirstTemp">+10°</div>
</div>
<div class="timeTempBlock">
12:00
<div id="oneDayAfterSecondTemp">+15°</div>
</div>
<div class="timeTempBlock">
17:00
<div id="oneDayAfterThirdTemp">+19°</div>
</div>
<div class="timeTempBlock darkFont bold">
21:00
<div id="oneDayAfterFourthTemp">+12°</div>
</div>
</div>
</div>
<div id='thirdDay'class="dayBlock hide blockLoading flex">
<div class="dayHeader flex pd10 mrgb15 align-center">
<div class="dayIcon" id="twoDaysAfterIcon"></div>
<div class="dayDiscripion darkFont" id="twoDaysAfterLongDecsription">Послезавтра солнечно</div>
</div>
<div class="dayContent">
<div id="longTwoDaysAfter" class="mrgr10flex lightFont">Среда</div>
<div class="flex space-around mrgt20 bold darkFont">
<div>
Ночью
<div id="twoDaysAfterTempAtNight" class="dayTemp bold">+4°</div>
</div>
<div>
Днём
<div id="twoDaysAfterTempAtDay" class="dayTemp bold">+14°</div>
</div>
</div>
<div class="infoBlock flex space-around">
<div class="windBlock lightFont flex align-center ">
<div class="infoIcon windIcon"></div>
<div id ='twoDaysAfterWind' class="bold darkFont"></div>
м/с
</div>
<div class="pressureBlock lightFont flex align-center">
<div class="infoIcon pressureIcon"></div>
<div id ='twoDaysAfterPressure'class="bold darkFont"></div>
</div>
<div class="humidityBlock lightFont flex align-ce">
<div class="infoIcon humidityIcon"></div>
<div id ='twoDaysAfterHumidity'class="bold darkFont"></div>
</div>
</div>
</div>
<div class="timeTempHolder flex space-evenly align-center darkFont">
<div class="timeTempBlock darkFont bold">
8:00
<div id="twoDaysAfterFirstTemp">+6°</div>
</div>
<div class="timeTempBlock darkFont bold">
12:00
<div id="twoDaysAfterSecondTemp">+13°</div>
</div>
<div class="timeTempBlock darkFont bold">
17:00
<div id="twoDaysAfterThirdTemp">+14°</div>
</div>
<div class="timeTempBlock darkFont bold">
21:00
<div id="twoDaysAfterFourthTemp">+9°</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="detailedReportHolder flex space-evenly align-center">
<article id='detailedTodayReport' class="flex align-center ">
<div class="detailedHeader hide flex">
<div class='todayNumDate' class='redFont'>1</div>
<div class="detailedHeaderTitle redFont">
<div>сегодня</div>
<div class='todayMothDate'></div>
</div>
</div>
<table class="weatherTable hide blockLoading">
<thead class="tableHeader lightFont">
<th colspan='3'></td>
<td>Давление,<br>мм рт. ст.</td>
<td>Влажность<br>
</td>
<td>Ветер, м/с</td>
<td>Ощущается как</td>
</thead>
<tbody class="darkFont bold">
<tr>
<td>
<div class='partOfday lightFont'>
Утром
</div>
<div class="detailedTodayTemp flex bold">
<div class="morningTemp">
</div>
</div>
</td>
<td>
<div class="morningIcon detailedIcon "></div>
</td>
<td>
<div id="morningDecs" class="bold">Ясно</div>
</td>
<td>
<div class="morningPressure">
</div>
</td>
<td>
<div class="morningHumidity"></div>
</td>
<td>
<div class="flex align-center">
<div class="morningWind"></div>
<div class="morningWindDir windDir lightFont"></div>
</div>
</td>
<td>
<div class="morningFeelsLike"></div>
</td>
</tr>
<tr>
<td>
<div class='partOfday lightFont'>
Днём
</div>
<div class="detailedTodayTemp flex bold">
<div class="afternoonTemp">
</div>
</div>
</td>
<td>
<div class="afternoonIcon detailedIcon "></div>
</td>
<td>
<div id="afternoonDecs" class="bold"></div>
</td>
<td>
<div class="afternoonPressure">
</div>
</td>
<td>
<div class="afternoonHumidity"></div>
</td>
<td>
<div class="flex align-center">
<div class="afternoonWind"></div>
<div class="afternoonWindDir windDir lightFont"></div>
</div>
</td>
<td>
<div class="afternoonFeelsLike"></div>
</td>
</tr>
<tr>
<td>
<div class='partOfday lightFont'>
Вечером
</div>
<div class="detailedTodayTemp flex bold">
<div class="eveningTemp">
</div>
</div>
</td>
<td>
<div class="eveningIcon detailedIcon "></div>
</td>
<td>
<div id="eveningDecs" class="bold">Ясно</div>
</td>
<td>
<div class="eveningPressure">
</div>
</td>
<td>
<div class="eveningHumidity"></div>
</td>
<td>
<div class="flex align-center">
<div class="eveningWind"></div>
<div class="eveningWindDir windDir lightFont">СЗ</div>
</div>
</td>
<td>
<div class="eveningFeelsLike"></div>
</td>
</tr>
<tr>
<td>
<div class='partOfday lightFont'>
Ночью
</div>
<div class="detailedTodayTemp flex bold">
<div class="nightTemp">
</div>
</div>
</td>
<td>
<div class="nightIcon detailedIcon "></div>
</td>
<td>
<div id="nightDecs" class="bold"></div>
</td>
<td>
<div class="nightPressure">
</div>
</td>
<td>
<div class="nightHumidity"></div>
</td>
<td>
<div class="flex align-center">
<div class="nightWind"></div>
<div class="nightWindDir windDir lightFont"></div>
</div>
</td>
<td>
<div class="nightFeelsLike"></div>
</td>
</tr>
</tbody>
</table>
</article>
<div class="sunBlock lightFont hide blockLoading">
<div class="sun">
<img src="icons/sunrise.png" alt="" class="sunIcon sunriseIcon">
<img src="icons/sunset.png" alt="" class="sunIcon sunsetIcon">
<div class="lightDayName lightFont">Световой день</div>
<div class="sunrise"></div>
<div class="sunset"></div>
<div class="dayLong"></div>
</div>
<div class="moon flex align-end">
<img src="icons/moon.png" class="moonIcon">
<div class="moonPhase"></div>
</div>
</div>
</div>
<div id='mobileDetailedReport' class="flex align-center">
<div class="mobileDetailedDate flex hide blockLoading ">
<div class='todayNumDate redFont'>1</div>
<div class="detailedHeaderTitle redFont ">
<div class='todayMothDate'>июня,</div>
<div>сегодня</div>
</div>
</div>
<div class="mobileDetailedHeader bold darkFont flex hide">
<div class="timeOfDay">Утро</div>
<div class="timeOfDay">День</div>
<div class="timeOfDay">Вечер</div>
<div class="timeOfDay">Ночь</div>
</div>
<div class="mobileDetailedBlock hide blockLoading">
<div class="mobileDetailedRow flex">
<div class="mobileDetailedTodayTemp flex bold">
<div class="morningIcon detailedIcon "></div>
<div class="morningTemp"></div>
</div>
<div class="mobileDetailedTodayTemp flex bold">
<div class="afternoonIcon detailedIcon "></div>
<div class="afternoonTemp"></div>
</div>
<div class="mobileDetailedTodayTemp flex bold">
<div class="eveningIcon detailedIcon "></div>
<div class="eveningTemp"></div>
</div>
<div class="mobileDetailedTodayTemp flex bold">
<div class="nightIcon detailedIcon "></div>
<div class="nightTemp"></div>
</div>
</div>
<div class='mobileCaption lightFont'>
Ощущается
</div>
<div class="mobileDetailedRow flex">
<div class="mobileDetailedFeelsTemp flex lightFont">
<div class="morningFeelsLike"></div>
</div>
<div class="mobileDetailedFeelsTemp flex lightFont">
<div class="afternoonFeelsLike"></div>
</div>
<div class="mobileDetailedFeelsTemp flex lightFont">
<div class="eveningFeelsLike"></div>
</div>
<div class="mobileDetailedFeelsTemp flex lightFont">
<div class="nightFeelsLike"></div>
</div>
</div>
</div>
<div class="mobileDetailedBlock hide blockLoading">
<div class="mobileBlockName bold darkFont">Ветер, м/с</div>
<div class="mobileDetailedRow flex">
<div>
<div class="morningWind wind bold"></div>
<div class="morningWindDir windDir lightFont">СЗ</div>
</div>
<div>
<div class="afternoonWind wind bold"></div>
<div class="afternoonWindDir windDir lightFont">СЗ</div>
</div>
<div>
<div class="eveningWind wind bold"></div>
<div class="eveningWindDir windDir lightFont">СЗ</div>
</div>
<div>
<div class="nightWind wind bold"></div>
<div class="nightWindDir windDir lightFont">СЗ</div>
</div>
</div>
</div>
<div class="mobileDetailedBlock hide blockLoading">
<div class="mobileBlockName bold darkFont">Давление, мм рт.ст.</div>
<div class="mobileDetailedRow flex">
<div class="mobilePressureBlock">
<div class="morningPressureDisc"></div>
<div class="morningPressure bold"></div>
</div>
<div class="mobilePressureBlock">
<div class="afternoonPressureDisc"></div>
<div class="afternoonPressure bold"></div>
</div>
<div class="mobilePressureBlock">
<div class="eveningPressureDisc"></div>
<div class="eveningPressure bold"></div>
</div>
<div class="mobilePressureBlock">
<div class="nightPressureDisc"></div>
<div class="nightPressure bold"></div>
</div>
</div>
</div>
<div class="mobileDetailedBlock hide blockLoading">
<div class="mobileBlockName bold darkFont">Влажность</div>
<div class="mobileDetailedRow flex">
<div class="morningHumidity humidity bold"></div>
<div class="afternoonHumidity humidity bold"></div>
<div class="eveningHumidity humidity bold"></div>
<div class="nightHumidity humidity bold"></div>
</div>
</div>
<div class="sunHeader bold darkFont flex hide ">
<div class="timeOfDay">Восход</div>
<div class="timeOfDay">Закат</div>
<div class="timeOfDay">Световой день</div>
<div class="timeOfDay">Фаза луны</div>
</div>
<div class="mobileDetailedBlock hide blockLoading darkFont ">
<div class="mobileDetailedRow flex ">
<div class="sunItem">
<img src="icons/sunrise.png" alt="" class="sunIcon sunriseIcon">
<div class="sunrise"></div>
</div>
<div class="sunItem"><img src="icons/sunset.png" alt="" class="sunIcon sunsetIcon">
<div class="sunset"></div></div>
<div class="sunItem">
<img src="icons/day/113.png" class="sunInfoIcon">
<div class="dayLong"></div>
</div>
<div class="sunItem">
<img src="icons/moon.png" class="moonIcon">
<div class="moonPhase"></div>
</div>
</div>
</div>
</div>
<div class='mapName bold'>Интерактивная карта</div>
<div class="mapBlock">
<div id="mapHolder">
<div id = "map"></div>
</div>
</div>
<div class="footer flex align-center">
<a href="https://github.com/AlexandrSperansky/WeatherReport" target="_blank">Github</a>
</div>
</body>
<script src="js/menu.js"></script>
<script src="js/map.js"></script>
<script src="js/main.js"></script>
<script src="js/search.js"></script>
</html>