-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
115 lines (110 loc) · 3.71 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
<!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="title" property="og:title" content="Weather JS App" />
<meta property="og:type" content="Website" />
<meta
name="image"
property="og:image"
content="https://hungry-galileo-7e01f2.netlify.app/images/weather-js.jpg"
/>
<meta
name="description"
property="og:description"
content="JavaScript weather app. Uses the Open Weather API. Integrates a serverless function via Netlify for secure use of the API key. Uses browser local storage to save location."
/>
<meta name="author" content="Chris Korsak" />
<title>Weather JS</title>
<link rel="stylesheet" href="bootstrap.min.css" />
</head>
<body>
<div class="container">
<div class="row">
<div
class="col col-md-6 mx-auto bg-primary mt-5 p-5 rounded text-center"
>
<h1 id="w-location"></h1>
<h3 class="text-dark" id="w-description"></h3>
<h3 id="w-string"></h3>
<img id="w-icon" />
<ul class="list-group mt-3" id="w-details">
<li class="list-group-item" id="w-humidity"></li>
<li class="list-group-item" id="w-pressure"></li>
<li class="list-group-item" id="w-feels-like"></li>
<li class="list-group-item" id="w-wind"></li>
</ul>
<hr />
<!-- Button trigger modal -->
<button
type="button"
class="btn btn-primary"
data-bs-toggle="modal"
data-bs-target="#locationModal"
>
Change Location
</button>
</div>
</div>
</div>
<!-- Modal -->
<div
class="modal fade"
id="locationModal"
tabindex="-1"
aria-labelledby="locationModalLabel"
aria-hidden="true"
>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="locationModalLabel">Choose Location</h5>
<button
type="button"
class="btn-close"
data-bs-dismiss="modal"
aria-label="Close"
></button>
</div>
<div class="modal-body">
<form id="w-form">
<div class="form-group">
<label for="city">City</label>
<input class="form-control" type="text" id="city" />
</div>
<div class="form-group">
<label for="state">State</label>
<input class="form-control" type="text" id="state" />
</div>
</form>
</div>
<div class="modal-footer">
<button
type="button"
class="btn btn-secondary"
data-bs-dismiss="modal"
>
Close
</button>
<button type="button" class="btn btn-primary" id="w-change-btn">
Save changes
</button>
</div>
</div>
</div>
</div>
<!-- Option 1: Bootstrap Bundle with Popper -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM"
crossorigin="anonymous"
></script>
<script src="local-storage.js"></script>
<script src="weather.js"></script>
<script src="ui.js"></script>
<script src="app.js"></script>
</body>
</html>