-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
62 lines (62 loc) · 2.35 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<link rel="stylesheet" href="style.css">
<title>Geoquakes</title>
</head>
<body>
<input autocomplete="off" id="search" class="search" type="text" placeholder="Search thru list of quakes (e.g. Alaska or 2.3)">
<div class="wrapper">
<h1>Geoquakes</h1>
<div class="heading">
<input type="checkbox" class="toggle" id="toggle" />
<label for="toggle">
<span class="off" id="off">Recent Quakes</span>
<span class="on" id="on">Local Quakes</span>
</label>
<div class="getRecent" id="showRecentButton">
<h2>Global quakes in the past 24 hours</h2>
<button id="getRecent">Get all recent quakes</button>
</div>
<div class="getLocation" id="showLocationButton" style="display:none;">
<h2>Earthquakes near me</h2>
<button id="getLocation">Get quakes near me</button>
<br></br>
<div id="locating" class="loc"></div>
<div id="locating2" class="loc"></div>
<div id="coordinates" class="coordinates"></div>
<br>
<a id="map" class="map"></a>
</div>
</div>
</div>
<div id="searchTerms" class="searchTerms populate">
<div class="postRecent" id="mostRecent">
</div>
<div class="postLocation" id="fetchIt">
</div>
</div>
<script>
function onButton() {
showRecentButton.style.display = 'none';
showLocationButton.style.display = 'block';
mostRecent.style.display = 'none';
fetchIt.style.display = 'block';
}
function offButton() {
showRecentButton.style.display = 'block';
showLocationButton.style.display = 'none';
mostRecent.style.display = 'block';
fetchIt.style.display = 'none';
}
off.addEventListener('click', onButton);
on.addEventListener('click', offButton)
</script>
<script src="recentQuakes.js"></script>
<script src="localQuakes.js"></script>
<script src="search.js"></script>
</body>
</html>