-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
202 lines (167 loc) · 7.89 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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>Bigfoot Locator</title>
<link href="https://fonts.googleapis.com/css?family=Lato:400,700|Open+Sans:400,600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css" integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay" crossorigin="anonymous">
<link rel="stylesheet" type="text/css" href="styles.css">
<link rel="icon" href="favicon.ico" type="image/x-icon" />
<script src="inc/jquery-3.4.1.min.js"></script>
<script src="inc/[email protected]"></script>
<script src="src/charts.js"></script>
<script src="src/map.js"></script>
</head>
<body>
<!--Add Sighting block-->
<div id="add_sighting">
<h3>Tell Us About Your Sighting</h3>
<p class="subheader">*Please login to submit Alien Sightings</p>
<div class="add_sighting--form">
<!-- Form -->
<form method='post' enctype='multipart/form-data'>
<label for="type">Sighting Type</label>
<input type="radio" name="type" value="Alien"> Alien
<input type="radio" name="type" value="Bigfoot" checked> Bigfoot<br><br>
<label for="state">State</label>
<input type="text" name="state" value="Tennessee"><br>
<label for="season">season</label>
<input type="text" name="season" value="Summer"><br>
<label for="title">title</label>
<input type="text" name="title" value="Short Description"><br>
<label for="latitude">latitude</label>
<input type="text" name="latitude" value="36.105"><br>
<label for="longitude">longitude</label>
<input type="text" name="longitude" value="-84.38335"><br>
<label for="date">date</label>
<input type="text" name="date" value="8/26/2018"><br>
<label for="year">year</label>
<input type="text" name="year" value="2018"><br>
<label for="number">number</label>
<input type="text" name="number" value="58126"><br>
<label for="moon_phase">moon_phase</label>
<input type="text" name="moon_phase" value="0.51"><br>
<label for="image">Upload Picture</label>
<input type='file' name='file'><br><br>
<input type='submit' name='submit' value='Submit'>
</form>
</div>
</div>
<div class="wrapper">
<!--Profile block-->
<div id="bigfoot">
<div class="bigfoot--image"></div>
<i class="fas fa-plus"></i>
</div>
<!--Map block-->
<div id="bigfoot_mapping" class="col col-4-5">
<div id="bigfoot_mapping--proximity">
<i class="fas fa-info-circle"></i>
<p>Geo Message | </p>
<p>You have a <span>0.000%</span> of seeing a Bigfoot based on your currect location.</p>
<i class="chartMenuButton fas fa-arrow-right" title="Hide Chart Menu"></i>
</div>
<div id="bigfoot_mapping--map"></div>
<!--Google Map API-->
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBcFPiPU-iDyfrTqqkbgDv5_zJmMv5dHow&callback=initMap" async defer></script>
</div>
<!--Chart block-->
<div id="bigfoot_enviroment" class="col col-1-5 active">
<h3>Bigfoot's Optimal Enviroment</h3>
<p class="subheader">Based on Bigfoot Sighting Data</p>
<nav>
<ul>
<li class="bigfoot_enviroment--search active">Map Controls</li>
<li class="bigfoot_enviroment--charts">Charts</li>
<li class="bigfoot_enviroment--tables">Tables</li>
</ul>
</nav>
<div id="bigfoot_search" class="active">
<!--Input Popup-->
<div class="bigfoot--map_controls">
<p>By Selecting a location on the map, the <strong>Geo Message</strong> at the top of the page will display your chances of seeing a Bigfoot at that location.</p>
<form>
<label>Radius</label><br>
<input id="iradius" type="range" step="10000" min="10000" max="100000" value="10000"onchange="updateRadius(iradius.value)">
</form>
<form>
<label>Search by Zip Code</label><br>
<input id="izip" type="number" name="zip" >
</form>
<p>or</p>
<form>
<label>Latitude</label>
<input id="ilat" type="number" name="lat" max="70" min="22" step="0.00000000000001" /><br><br>
<label>Longitude</label>
<input id="ilng" type="number" name="long" smax="-65" min="-170" step="0.00000000000001" />
<input type="submit" value="Submit">
</form>
</div>
</div>
<div id="bigfoot_charts">
<div class="bigfoot_charts_container">
<canvas id="bigfoot_charts--state" width="300" height="300"></canvas>
</div>
<div class="bigfoot_charts_container">
<canvas id="bigfoot_charts--year" width="300" height="300"></canvas>
</div>
</div>
<div id="bigfoot_tables">
<div class="bigfoot_tables--season">
<table>
<tr>
<th>Season</th>
<th># of Sightings</th>
</tr>
</table>
</div>
<div class="bigfoot_tables--moon_phase">
<table>
<tr>
<th>Moon Phase</th>
<th># of Sightings</th>
</tr>
</table>
</div>
</div>
</div>
</div><!-- end wrapper -->
</body>
<script>
$(document).ready(function() {
//ChartJS chart implementation
Chart.defaults.global.defaultFontFamily = "Open Sans";
Chart.defaults.scale.gridLines.display = false;
//Call function that pushes objects to array
chartQuery("state", "count", "DESC", 10);
chartQuery("year", "year", "ASC", 100);
//Loop throgh each of the HTML #bigfoot_tables
$("#bigfoot_tables div").each(function(index) {
//Split this class. Use split as parameter for charts function
var searchValue = $(this).prop("class").split("bigfoot_tables--");
chartQuery(searchValue[1], searchValue[1], "ASC", 10);
});
//Chart or table navigation in right panel
$("nav ul li").click(function() {
//remove active class from all
$("nav ul li, #bigfoot_search, #bigfoot_charts, #bigfoot_tables").removeClass("active");
//get active parameter
var activeValue = $(this).prop("class").split("bigfoot_enviroment--");
//set icon and nav button as active
$(this).addClass("active");
$("#bigfoot_" + activeValue[1]).addClass("active");
});
//Hide Chart Menu
$(".chartMenuButton").click(function() {
$("#bigfoot_enviroment, #bigfoot_mapping--proximity").toggleClass("active");
$(this).toggleClass("fa-arrow-right").toggleClass("fa-arrow-left");
});
//Open Add Sighting Menu
$("#bigfoot .fa-plus").click(function() {
$("#add_sighting").toggle();
//$(this).toggleClass("fa-arrow-right").toggleClass("fa-arrow-left");
});
});
</script>
</html>