-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathweather_map.html
More file actions
104 lines (104 loc) · 5.99 KB
/
weather_map.html
File metadata and controls
104 lines (104 loc) · 5.99 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css"
integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.14.0/css/all.css"
integrity="sha384-HzLeBuhoNPvSl5KYnjx0BT+WB0QEEqLprO+NBkkk5gbc67FTaL7XIGa2w1L0Xbgc" crossorigin="anonymous">
<script src='https://api.mapbox.com/mapbox-gl-js/v1.12.0/mapbox-gl.js'></script>
<link href='https://api.mapbox.com/mapbox-gl-js/v1.12.0/mapbox-gl.css' rel='stylesheet'/>
<link rel="stylesheet" href="css/weather_map_style.css">
<title>Weather Map</title>
</head>
<body>
<!------------------------------------------- nav bar ------------------------------------------------------------>
<nav class="navbar navbar-expand-lg navbar-light shadow-sm mb-2">
<h1 class="navbar-brand font-weight-bold mr-auto">Weather & Map</h1>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav ml-auto">
<li class="nav-item active font-weight-bold d-flex align-items-center" id="date"></li>
<li class="nav-item mx-3 mt-2" id="icon"></li>
<li class="nav-item dropdown" id="dropdownCity">
<a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-toggle="dropdown">Menu</a>
<div class="dropdown-menu text-center">
<div class="text-left text-muted pl-3">Cities</div>
<a class="dropdown-item city-toggle" href="#">San Antonio</a>
<a class="dropdown-item city-toggle" href="#">Berlin</a>
<a class="dropdown-item city-toggle" href="#">New York</a>
<a class="dropdown-item city-toggle" href="#">San Francisco</a>
<a class="dropdown-item city-toggle" href="#">Xi'an</a>
<div class="dropdown-divider"></div>
<div class="text-left text-muted pl-3">Unit</div>
<a class="dropdown-item unit-toggle" href="#">Metric</a>
<a class="dropdown-item unit-toggle" href="#">Imperial</a>
<div class="dropdown-divider"></div>
<div class="text-left text-muted pl-3">Map Style</div>
<a class="dropdown-item map-toggle" href="#">Light</a>
<a class="dropdown-item map-toggle" href="#">Dark</a>
<a class="dropdown-item map-toggle" href="#">Streets</a>
<a class="dropdown-item map-toggle" href="#">Outdoors</a>
<a class="dropdown-item map-toggle" href="#">Satellite-Streets</a>
</div>
</li>
</ul>
<form class="form-inline my-2 my-lg-0">
<input class="form-control mr-sm-2" type="search" placeholder="search cities..." id="cityInput">
<button class="btn btn-outline-secondary my-2 my-sm-0 font-weight-bold" type="submit" id="citySearch">Search
</button>
</form>
</div>
</nav>
<!------------------------------------------- cards and map ------------------------------------------------------>
<div class="container-xl">
<div class="row d-flex justify-content-around">
<div class="card my-3 col-sm-9 col-md-4 shadow">
<div class="card-header h5">Current Weather</div>
<div class="card-body py-4">
<!-- <h5 class="card-title">title</h5>-->
<div class="card-text d-flex flex-column align-items-center justify-content-around h-100 h6 border rounded p-1 bg-white"
id="current"></div>
</div>
</div>
<div class="card my-3 col-sm-10 col-md-7 shadow">
<div class="card-header h5">5-Day Forecast <span id="cityName"></span></div>
<div class="card-body py-2">
<p class="card-text">
<ul id="forecast" class="list-group"></ul>
</p>
</div>
</div>
<!------------------------------------------- map ------------------------------------------------------->
<div class="col-sm-10 col-md-12 my-4">
<div id='map' class="rounded mx-auto shadow"></div>
</div>
</div>
<div id="time"></div>
</div>
<div id="popover-box" class="invisible shadow text-center"></div>
<!--<div id="local-info" class="d-inline-block shadow"></div>-->
<!------------------------------------------- footer ------------------------------------------------------------->
<footer class="footer mt-auto py-3 shadow">
<div class="container d-flex justify-content-end mr-0">
<span class="font-weight-bold footer-info"> © 2020 OpenWeather & Mapbox project Li Wang</span>
</div>
</footer>
<!------------------------------------------- javascript --------------------------------------------------------->
<script src="js/jquery-3.5.1.js"></script>
<script src="js/keys.js"></script>
<script src="js/weather_map_main.js"></script>
<!------------------------------------------- bootstrap ---------------------------------------------------------->
<script src="https://code.jquery.com/jquery-3.5.1.js"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js"
integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"
integrity="sha384-OgVRvuATP1z7JjHLkuOU7Xw704+h835Lr+6QL9UvYjZE3Ipu6Tp75j7Bh/kR0JKI"
crossorigin="anonymous"></script>
</body>
</html>