-
Notifications
You must be signed in to change notification settings - Fork 5
/
index.html
363 lines (355 loc) · 11.4 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
http-equiv="X-UA-Compatible"
content="IE=edge" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0" />
<meta
name="author"
content="Aniqa" />
<meta
name="description"
content="A minimalistic weather dashboard that gives you a complete overview of current weather conditions in your location and beyond. Dashboard with light/dark functionality was built with Bootstrap & CSS for styling, JavaScript for functionality, and API for live weather data." />
<meta
property="og:title"
content="Weather Dashboard" />
<meta
property="og:description"
content="A minimalistic weather dashboard that gives you a complete overview of current weather conditions in your location and beyond." />
<meta
property="og:image"
content="https://raw.githubusercontent.com/aniqatc/weather/main/assets/og-img.png" />
<meta
name="twitter:card"
content="summary_large_image" />
<meta
name="twitter:site"
content="@aniqatc" />
<meta
name="twitter:image"
content="https://raw.githubusercontent.com/aniqatc/weather/main/assets/og-img.png" />
<meta
name="twitter:image:alt"
content="Hero section of website" />
<title>Weather Dashboard</title>
<link
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
rel="stylesheet"
integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi"
crossorigin="anonymous" />
<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=DM+Sans:wght@400;500;700&display=swap"
rel="stylesheet" />
<link
href="/assets/favicon.png"
type="image/x-icon"
rel="icon" />
<link
href="/css/styles.css"
rel="stylesheet"
type="text/css" />
<script
src="https://kit.fontawesome.com/50cde61edc.js"
crossorigin="anonymous"></script>
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<script
defer
src="/src/main.js"></script>
<link
rel="manifest"
href="/manifest.json" />
</head>
<body>
<div class="container">
<header class="container text-md-start my-2 mt-3">
<div class="row align-items-center">
<h1 class="col-md-6">Weather Dashboard</h1>
<div class="w-100 d-md-none d-block"></div>
<form class="input-group col p-1 search-form">
<button
class="btn btn-outline-primary"
id="geolocation-btn"
type="button">
<i class="fa-solid fa-location-arrow"></i>
</button>
<input
type="search"
placeholder="Search City..."
class="form-control"
id="search-input"
autocapitalize="on"
autocomplete="off" />
<ul class="search-suggestions"></ul>
<button
type="submit"
class="btn btn-outline-primary me-2 search-btn">
<i class="fa-solid fa-magnifying-glass-location"></i>
</button>
</form>
<div class="form-check form-switch ps-2 align-self-center col-1 me-4 me-md-1">
<input
class="form-check-input"
type="checkbox"
id="flexSwitchCheckChecked"
role="switch" />
</div>
</div>
</header>
<div class="row d-flex">
<div class="local-overview col ms-lg-4 mt-4">
<div class="mx-3 my-4">
<h2>Forecast in <span id="location"></span></h2>
<h3 id="today"></h3>
</div>
<div class="container flex-md-row flex-column">
<div class="row">
<section class="temp-overview col-lg-5">
<div class="current-weather card">
<div class="card-body">
<div class="d-flex">
<h1 class="flex-grow-1">
<span id="temp-now"></span>°<span class="fahrenheit">F </span>
<span class="toggle-temps"
>/
<a
href="#"
class="celsius"
>C</a
></span
>
</h1>
<h3 class="text-end pt-2">
<small>High</small>
<span
class="temps"
id="high-temp"></span
>°<span class="fahrenheit">F</span>
<br />
<small>Low </small>
<span
class="temps"
id="low-temp"
>30</span
>°<span class="fahrenheit">F</span>
</h3>
</div>
<br /><br />
<div class="d-flex">
<div class="flex-grow-1">
<p>
<span id="description-temp">Mostly Sunny</span><br />
Feels like
<span
class="temps"
id="feels-like"></span
>°<span class="fahrenheit">F</span>
<br />
<small id="condition-msg"></small>
</p>
</div>
<div>
<img
src="/assets/loading.svg"
width="85"
class="weather-icon default-main-icon"
alt="Loading icon" />
</div>
</div>
</div>
</div>
</section>
<div class="w-100 d-lg-none d-block"></div>
<section class="temp-details col-lg-4 col-md-5 mt-3 mt-md-2 mt-lg-0">
<div class="card p-1 initial">
<ul class="list-group list-group-flush">
<li class="list-group-item d-flex">
<strong class="flex-grow-1">Visibility </strong>
<span id="visibility">0</span>km
<i class="fa-solid fa-eye-slash align-self-center"></i>
</li>
<li class="list-group-item d-flex">
<strong class="flex-grow-1">Dew Point </strong
><span
id="dew-point"
class="temps"></span
>°<span class="fahrenheit">F</span>
<i class="fa-solid fa-droplet align-self-center"></i>
</li>
<li class="list-group-item d-flex">
<strong class="flex-grow-1">Wind </strong>
<span id="wind">0</span>
<span id="wind-unit">mph</span>
<i class="fa-solid fa-wind align-self-center"></i>
</li>
<li class="list-group-item d-flex">
<strong class="flex-grow-1"> Humidity</strong>
<span id="humidity">0</span>%
<i class="fa-solid fa-water align-self-center"></i>
</li>
<li class="list-group-item d-flex">
<strong class="flex-grow-1">Cloudiness </strong>
<span id="clouds"></span>%
<i class="fa-solid fa-cloud align-self-center"></i>
</li>
</ul>
</div>
</section>
<div class="w-100 d-md-none d-block"></div>
<section class="sun-time col-md mt-3 mt-md-2 mt-lg-0">
<div class="card">
<img
src="/assets/day-landscape.png"
class="card-img w-100"
id="scenery"
alt="Landscape scenery" />
<div class="card-img-overlay text-center">
<i class="fa-solid fa-sun"></i>
<h3>Sunrise</h3>
<h2 id="sunrise-time"></h2>
<br />
<i class="fa-solid fa-moon"></i>
<h3>Sunset</h3>
<h2 id="sunset-time"></h2>
</div>
</div>
</section>
</div>
</div>
<section class="full-forecast d-flex justify-content-md-around my-4"></section>
</div>
<div class="w-100 d-lg-none d-block mb-2"></div>
<section class="global-overview mx-lg-4 col-xl-3 mt-4 flex-lg-shrink-1 me-lg-0 pb-1">
<div class="p-1 mt-3">
<h2 class="mx-1 mb-3">Forecast in Other <strong>Cities</strong></h2>
<hr />
<div class="global-items-wrapper d-flex flex-column">
<div class="container global-item align-items-center">
<div class="row align-items-center flex-nowrap justify-content-center">
<p class="col">
<b class="global-name"></b><br /><small class="country-name"></small>
</p>
<img
src="/assets/loading.svg"
height="50"
class="col-3 weather-icon global-icon"
alt="Loading icon" />
<p class="text-end col">
<strong
><span class="temps global-temps"></span>°<span class="fahrenheit"
>F
</span></strong
><br /><small class="global-descriptions"></small>
</p>
</div>
</div>
<hr />
<div class="container global-item align-items-center">
<div class="row align-items-center flex-nowrap justify-content-center">
<p class="col">
<b class="global-name"></b><br /><small class="country-name"></small>
</p>
<img
src="/assets/loading.svg"
height="50"
class="col-3 weather-icon global-icon"
alt="Loading icon" />
<p class="text-end col">
<strong
><span class="temps global-temps"></span>°<span class="fahrenheit"
>F
</span></strong
><br /><small class="global-descriptions"></small>
</p>
</div>
</div>
<hr />
<div class="container global-item align-items-center">
<div class="row align-items-center flex-nowrap justify-content-center">
<p class="col">
<b class="global-name"></b><br /><small class="country-name"></small>
</p>
<img
src="/assets/loading.svg"
height="50"
class="col-3 weather-icon global-icon"
alt="Loading icon" />
<p class="text-end col">
<strong
><span class="temps global-temps"></span>°<span class="fahrenheit"
>F
</span></strong
><br /><small class="global-descriptions"></small>
</p>
</div>
</div>
<hr />
<div class="container global-item align-items-center">
<div class="row align-items-center flex-nowrap justify-content-center">
<p class="col">
<b class="global-name"></b><br /><small class="country-name"></small>
</p>
<img
src="/assets/loading.svg"
height="50"
class="col-3 weather-icon global-icon"
alt="Loading icon" />
<p class="text-end col">
<strong
><span class="temps global-temps"></span>°<span class="fahrenheit"
>F
</span></strong
><br /><small class="global-descriptions"></small>
</p>
</div>
</div>
<hr />
<div class="container global-item align-items-center">
<div class="row align-items-center flex-nowrap justify-content-center">
<p class="col">
<b class="global-name"></b><br /><small class="country-name"></small>
</p>
<img
src="/assets/loading.svg"
height="50"
class="col-3 weather-icon global-icon"
alt="Loading icon" />
<p class="text-end col">
<strong
><span class="temps global-temps"></span>°<span class="fahrenheit"
>F
</span></strong
><br /><small class="global-descriptions"></small>
</p>
</div>
</div>
</div>
</div>
</section>
</div>
<footer class="text-center my-3">
<i class="fa-solid fa-code"></i>
Designed & Coded by
<strong
><a
href="https://twitter.com/aniqatc"
target="_blank"
rel="noreferrer"
id="credits"
>Aniqa</a
>
</strong>
</footer>
</div>
</body>
</html>