-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
150 lines (133 loc) · 5.59 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,
initial-scale=1" />
<!-- Bootstrap 5.1.3 -->
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<!-- jQuery UI 1.13.1 -->
<link rel="stylesheet" href="https://code.jquery.com/ui/1.13.1/themes/base/jquery-ui.css" />
<link rel="stylesheet" href="./assets/css/style.css" />
<title>Weather Dashboard</title>
</head>
<body>
<header class="container-fluid">
<h1 class="text-center">
Weather Dashboard
</h1>
</header>
<main class="container-fluid">
<section class="row">
<div class="col-12 col-md-6 col-lg-2"> <!-- city name search field -->
<form id="city_form">
<label class="form-label" for="city_name">
Search for a City:</label>
<input class="form-control" type="text" id="city_name"
name="city_name" required>
<button class="btn btn-primary" type="submit">
Search</button>
</form>
<hr>
<div id="city_buttons" class="btn-group-vertical" role="group">
<!-- list of previous city names, clickable -->
<button class="btn btn-outline-info" id="city_row_00"></button>
<button class="btn btn-outline-info" id="city_row_01"></button>
<button class="btn btn-outline-info" id="city_row_02"></button>
<button class="btn btn-outline-info" id="city_row_03"></button>
<button class="btn btn-outline-info" id="city_row_04"></button>
<button class="btn btn-outline-info" id="city_row_05"></button>
<button class="btn btn-outline-info" id="city_row_06"></button>
<button class="btn btn-outline-info" id="city_row_07"></button>
</div>
</div>
<div class="col-12 col-md-6 col-lg-10"> <!-- conditions -->
<div class="card border-secondary">
<div class="card-body border-secondary"> <!-- current conditions -->
<h5 class="card-title">
<span id="display_city_name"></span>
<span id="display_date"></span>
<span id="display_conditions"></span>
</h5>
<p class="card-text">
Temp: <span id="display_temperature"></span>
</p>
<p class="card-text">
Wind: <span id="display_wind_speed"></span>
</p>
<p class="card-text">
Humidity: <span id="display_humidity"></span>
</p>
<p>
UV index: <span id="display_UV_index"></span>
</p>
</div>
</div>
<!-- Note that forecasts start with tomorrow, which
is day 1 in the data returned. It might be
worthwhile to show the forecast for the rest
of today, but the image in the assignment
doesn't, so I don't. -->
<section class="container"> <!-- 5-day forecast -->
<div class="row justify-content-between">
<h5> Five-day forecast</h5>
<div id="forecast_1" class="card col-lg-2 text-white bg-secondary">
<div class="card-body">
<h5 class="card-title"></h5>
<p class="card-text"></p>
</div>
</div> <!-- card -->
<div id="forecast_2" class="card col-lg-2 text-white bg-secondary">
<div class="card-body">
<h5 class="card-title"></h5>
<p class="card-text"></p>
</div>
</div> <!-- card -->
<div id="forecast_3" class="card col-lg-2 text-white bg-secondary">
<div class="card-body">
<h5 class="card-title"></h5>
<p class="card-text"></p>
</div>
</div> <!-- card -->
<div id="forecast_4" class="card col-lg-2 text-white bg-secondary">
<div class="card-body">
<h5 class="card-title"></h5>
<p class="card-text"></p>
</div>
</div> <!-- card -->
<div id="forecast_5" class="card col-lg-2 text-white bg-secondary">
<div class="card-body">
<h5 class="card-title"></h5>
<p class="card-text"></p>
</div>
</div> <!-- card -->
</div> <!-- row -->
</section> <!-- forecast area -->
</div>
</section> <!-- row -->
</main> <!-- container -->
</body>
<!-- jQuery 3.6 -->
<script
src="https://code.jquery.com/jquery-3.6.0.min.js"
integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4="
crossorigin="anonymous"></script>
<!-- Jquery UI 1.13.1 -->
<script
src="https://code.jquery.com/ui/1.13.1/jquery-ui.min.js"
integrity="sha256-eTyxS0rkjpLEo16uXTS0uVCS4815lc40K2iVpWDvdSY="
crossorigin="anonymous"></script>
<!-- bootstrap 5.1.3 -->
<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js"
integrity="sha384-7+zCNj/IqJ95wo16oMtfsKbZ9ccEh31eOz1HGyDuCQ6wgnyJNSYdrPa03rtR1zdB"
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"
integrity="sha384-QJHtvGhmr9XOIpI6YVutG+2QOK9T+ZnN4kzFN1RtK3zEFEIsxhlmWl5/YESvpZ13"
crossorigin="anonymous"></script>
<!-- moment 2.29.3 -->
<script
type="text/javascript"
src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.3/moment.min.js">
</script>
<script src="./assets/js/script.js"></script>
</html>