generated from Code-Institute-Org/gitpod-full-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsightings.html
328 lines (319 loc) · 11.1 KB
/
sightings.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
<!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" />
<title>Sightings | fledgling</title>
<meta
name="description"
content="Find bird sightings near you using the eBird API."
/>
<meta
name="keywords"
content="bird, birdwatching, bird game, eBird, bird sightings, bird identification game"
/>
<meta name="author" content="fledgling" />
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
integrity="sha384-zCbKRCUGaJDkqS1kPbPd7TveP5iyJE0EjAuZQTgFLD2ylzuqKfdKlfG/eSrtxUkn"
crossorigin="anonymous"
/>
<script
src="https://kit.fontawesome.com/e4ffee1eee.js"
crossorigin="anonymous"
></script>
<link rel="stylesheet" href="assets/css/style.css" type="text/css" />
</head>
<body>
<!--Modal- Sourced from Bootstrap Library-->
<div
class="modal fade"
id="learnMoreModal"
tabindex="-1"
aria-labelledby="learnMoreModalLabel"
aria-hidden="true"
>
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="learnMoreModalLabel">Learn More</h5>
<button
type="button"
class="close"
data-dismiss="modal"
aria-label="Close"
>
<span aria-hidden="true">×</span>
</button>
</div>
<div class="modal-body text-left">
<ul>
<li>
Find bird sightings near you (or any address in the world). You
can search by street address, town, city or region.
</li>
<li>
If there is no data for your search query, then please expand
the radius or try again with a different address.
</li>
</ul>
<h5>About eBird</h5>
<ul>
<li>
eBird is an online database of bird observations. It was
launched 2002 by the Cornell Lab of Ornithology at Cornell
University.
</li>
<li>
eBird is among the world’s largest biodiversity-related science
projects, with more than 100 million bird sightings contributed
annually by eBirders around the world
</li>
<li>
This website uses the eBird API to retrieve data from the
<a href="https://ebird.org/home" target="_blank"
>eBird website.</a
>
</li>
</ul>
<h5>Further Bird Watching Resources</h5>
<ul>
<li>
<a
href="https://www.rspb.org.uk/birds-and-wildlife/wildlife-guides/bird-a-z/"
target="_blank"
>RSPB A-Z Bird Guide</a
>
- Browse and Search UK birds by name to find pictures and more
information.
</li>
<li>
<a
href="https://www.rspb.org.uk/birds-and-wildlife/wildlife-guides/identify-a-bird/"
target="_blank"
>RSPB Bird Identifier</a
>
- An interactive bird identifier to help you work out what bird
you've seen.
</li>
</ul>
</div>
<div class="modal-footer">
<button
type="button"
class="btn btn-secondary"
data-dismiss="modal"
>
Close
</button>
</div>
</div>
</div>
</div>
<!--Nav - Sourced From Bootstrap Library-->
<nav class="navbar navbar-expand-lg navbar-light">
<div class="container">
<a class="navbar-brand" id="navbar-logo" href="index.html">fledgling</a>
<button
class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target="#navbarTogglerDemo02"
aria-controls="navbarTogglerDemo02"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<div
class="collapse navbar-collapse justify-content-end"
id="navbarTogglerDemo02"
>
<ul class="navbar-nav">
<li class="nav-item" id="how-to-play-box">
<button
type="button"
class="btn btn-outline-dark btn-margin"
data-toggle="modal"
data-target="#learnMoreModal"
>
Learn More
</button>
</li>
<li class="nav-item">
<a
role="button"
class="btn btn-outline-dark btn-margin"
href="game.html"
>Play The Game</a
>
</li>
<li class="nav-item">
<a
role="button"
class="btn btn-outline-dark btn-margin"
href="clock.html"
>Bird Song Clock</a
>
</li>
</ul>
</div>
</div>
</nav>
<!--Find Recent Sightings Container-->
<div class="container">
<div class="row centered-row pt-4 pt-md-5">
<div class="col-12">
<h2 class="sightings-title">
Find recent bird sightings near you (or anywhere in the world)
</h2>
<h3 class="sightings-title">
Data is provided by
<a href="https://ebird.org/home" target="_blank">eBird</a>
</h3>
</div>
</div>
<!--Find Recent Sightings Form. Sourced From Bootstrap Library -->
<div class="row">
<div class="col-12 text-sm-left">
<form id="location-form" class="pt-3 pt-lg-4">
<div class="form-row">
<div class="form-group col-lg-6">
<label for="location-input">Enter An Address</label>
<input type="text" id="location-input" class="form-control" />
</div>
<div class="form-group col-md-6 col-lg-3">
<label for="distance-select">Select a Radius (KM)</label>
<select class="form-control" id="distance-select">
<option value="5">5</option>
<option value="10">10</option>
<option value="15">15</option>
<option value="25">25</option>
<option value="50">50</option>
</select>
</div>
<div class="form-group col-md-6 col-lg-3">
<label for="see-sightings">View Recent Sightings</label>
<button
type="submit"
class="btn btn-success btn-block"
id="see-sightings"
>
Submit
</button>
</div>
</div>
</form>
</div>
</div>
<!--Address Provided Feedback-->
<div class="row">
<div class="col-12">
<div id="address-entered-box" class="user-input-box d-none">
<ul class="list-group">
<li class="list-group-item">
<strong>Address Entered: </strong
><span id="formatted-address"></span>
</li>
</ul>
</div>
</div>
</div>
<!--Alerts that show if there are API issues-->
<div class="row">
<div class="col-12">
<p id="alert" class="d-none alerts">Alert</p>
<p id="alert-request-error" class="d-none alerts">
Oops...Something went wrong. Please try again or contact the website
administrator
</p>
<p id="alert-address-error" class="d-none alerts">
That address is not recognised. Please try again with a different
address.
</p>
<p id="alert-results-error" class="d-none alerts">
There are no results for that address. Please try again with a
different address or increase your search radius
</p>
</div>
</div>
<!--Table for eBird Data-->
<div class="row">
<div class="col-12">
<table
id="my-table"
class="table table-borderless table-striped d-none user-input-box"
>
<thead>
<tr>
<th>Bird Observed</th>
<th>Location Observed</th>
<th>No. Observed</th>
<th>Date Observed</th>
</tr>
</thead>
<tbody id="tableBody"></tbody>
</table>
</div>
</div>
</div>
<!--Footer-->
<footer class="mt-auto d-flex align-self-end">
<div class="container">
<div class="row">
<div class="col-sm-6 text-sm-left">
<h3>fledgling</h3>
<p class="small mb-md-2">
An interactive website designed to engage people in birdwatching
</p>
</div>
<div class="col-sm-6 text-sm-right">
<ul class="list-inline social-links">
<li class="list-inline-item">
<a target="_blank" href="https://www.facebook.com">
<i
class="fa-brands fa-facebook-square"
aria-hidden="true"
></i>
<span class="sr-only">Facebook</span>
</a>
</li>
<li class="list-inline-item">
<a target="_blank" href="https://twitter.com">
<i class="fa fa-twitter" aria-hidden="true"></i>
<span class="sr-only">Twitter</span>
</a>
</li>
<li class="list-inline-item">
<a target="_blank" href="https://www.instagram.com">
<i class="fa fa-instagram" aria-hidden="true"></i>
<span class="sr-only">Instagram</span>
</a>
</li>
</ul>
</div>
<div class="col-sm-6 text-sm-left">
<p class="small">Copyright © 2022 fledgling</p>
</div>
</div>
</div>
</footer>
<!--Script for Geocoding-->
<script src="https://unpkg.com/axios/dist/axios.min.js"></script>
<!--Bootstrap scripts-->
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.slim.min.js"
integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
crossorigin="anonymous"
></script>
<script
src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"
integrity="sha384-fQybjgWLrvvRgtW6bFlB7jaZrFsaBXjsOMm/tB9LTS58ONXgqbR9W8oWht/amnpF"
crossorigin="anonymous"
></script>
<!--My script-->
<script src="assets/scripts/ebird.js"></script>
</body>
</html>