-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathindex.html
More file actions
236 lines (183 loc) · 8.38 KB
/
index.html
File metadata and controls
236 lines (183 loc) · 8.38 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>>GBIF Soundscape</title>
<!-- Bootstrap -->
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="bower_components/leaflet/dist/leaflet.css">
<link rel="stylesheet" href="css/style.css">
<link rel="css/wavesurfer/css/ribbon.css">
<link rel="css/wavesurfer/css/style.css">
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<nav class="navbar navbar-inverse navbar-fixed-top">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">GBIF Soundscape</a>
<p class="navbar-text"><a class="navbar-link" href="about.html">About</a></p>
</div>
<div id="navbar" class="collapse navbar-collapse">
<ul class="nav navbar-nav navbar-right">
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Choose an area <span class="caret"></span></a>
<ul id="area_choose" class="dropdown-menu" role="menu">
</ul>
</li>
</ul>
</div>
</div><!--/.nav-collapse -->
</div>
</nav>
<div id="container" class="container-fluid">
<div id="toprow" class="row">
<div id="info" class="col-md-4 col-xs-7 col-lg-4">
<h1>Welcome to the GBIF Soundscape.</h1>
<p>This is an entry in round 2 of the <a href="http://gbif2.devpost.com/">2015 Ebbe Nielsen Challenge</a> by Ben Raymond and Peter Neish.</p>
<p>Here you can listen to sounds sourced from GBIF records. Read more about this project <a href="about.html">here</a>.</p>
<p class="lead">To get started, please choose a locality from the map or the drop-down list above.</p>
</div>
<div id="map" class="col-md-8 col-xs-5 col-lg-8">
</div>
</div>
<div class="row">
<div id="playme" class="col-md-4 col-xs-5" style="display:none;">
<div class="panel panel-primary">
<div class="panel-heading">
Click to add species to soundscape
</div>
<div class="panel-body">
<div id="toomany" style="display:none;" class="alert alert-danger">Sorry, you can't add more than 20 sounds (try removing some).
</div>
<div id="waitinglist">
</div>
</div>
</div>
</div>
<div id="sscape" class="col-md-8 col-xs-7">
<div id="playbuttons" class="text-center" style="display:none;">
<button id="cplayall" type="button" class="play btn btn-primary"><span class="glyphicon glyphicon-play"></span> Play
</button>
<button id="cplaypause" type="button" class="btn btn-danger navbar-btn">
<span class="glyphicon glyphicon-pause"></span>Pause
</button>
<div id="noresults" class="alert alert-warning" style="display:none;">
<p>There is nothing to play! Try creating a new random soundscape, or click the species on the right to add.
</p>
</div>
</div>
<div id="critterlist">
</div>
</div>
</div>
</div><!-- /.container -->
</script>
<!-- templates -->
<script id="critterwaiting-template" type="text/template">
<div class="media">
<a href="#" class="list-group-item <%= (critter.get('type') == 'frog') ? 'list-group-item-success' : 'list-group-item-warning' %> <%= critter.get('type') %>">
<div class="media-left">
<% if(typeof(critter.get('image'))!='undefined') { %>
<img class="img-rounded" src="<%= critter.get('image') %>"
alt="<% critter.get('name') %>">
<% } %>
</div>
<div class="media-body">
<span class="pull-right glyphicon glyphicon-arrow-right"></span>
<h5><em><%=critter.get('name')%></em></h5>
<%=critter.get('vernacularName')%>
</div>
</a>
</div>
</script>
<script id="critterplaying-template" type="text/template">
<div class="col-md-3 col-sm-6 col-xs-12 item critter <%= critter.get('type') %>" id="critter<%=critter.cid%>">
<div class="thumbnail">
<% if(typeof(critter.get('image'))!='undefined') { %>
<img class="img-rounded" src="<%= critter.get('image') %>" alt="<% critter.get('name') %>">
<% } else { %>
<p class="text-center"><span class="glyphicon glyphicon-lg glyphicon-remove"></span></p>
<% } %>
<div class="caption">
<p class="clearfix">
<h4><em><%= critter.get('name') %></em></h4>
<h5><%= critter.get('vernacularName') %></h5>
<audio controls loop style="display:none">
<source src="<%= critter.get('audio') %>" type="audio/mpeg">
Sorry your browser does not support this audio format
</audio>
<small>Source:
<% if (typeof(critter.get('image_reference'))!== 'undefined'){ %>
<a href="<%=critter.get('image_reference') %>">image</a>
<% } %>
<% if (typeof(critter.get('audio_reference'))!== 'undefined'){ %>
<a href="<%=critter.get('audio_reference') %>">audio</a>
<% } %>
</small>
<div style="margin-bottom:5px;">
<button type="button" class="remove btn btn-default btn-xs pull-right">
<span class="glyphicon glyphicon-remove"></span> remove
</button>
</div>
</p>
</div>
</div>
</script>
<!-- and one for the infoBox -->
<script id="cinfobox-template" type="text/template">
<div class="cinfobox">
<h1><%= title %></h1>
<div>
<p>In this area there are <%= total %> species that have sounds recorded in GBIF, including <%= numbirds %> birds and <%= numfrogs %> frog<%= numfrogs == 1 ? '' : 's'%>.</p>
<% if(total > 12){%>
<p> We have shown a random selection (we can't show too many at once because most browsers can't handle it - and it sounds awful!). </p>
<%}%>
</div>
<div class="panel panel-primary">
<div class="panel-heading">Create a new random soundscape for this area</div>
<div class="panel-body">
<div>
<button id="cplayrandom" type=button class="btn btn-default">All
</button>
<button id="playbirds" type=button class="btn btn-default">Birds
</button>
<button id="playfrogs" type=button class="btn btn-default">Frogs
</button>
<button id="playsummer" type=button class="btn btn-default">Summer
</button>
<button id="playwinter" type=button class="btn btn-default">Winter
</button>
<button id="clear" type=button class="btn btn-danger">Clear
<span class="glyphicon glyphicon-remove"></span>
</button>
</div><!-- end of new buttons -->
<div class="btn-group" role="group">
<div>
</div>
</div>
</div>
<div>
</div>
</div>
</script>
<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="bower_components/leaflet/dist/leaflet.js"></script>
<script src="bower_components/masonry/masonry.js"></script>
<script src="bower_components/underscore/underscore.js"></script>
<script src="bower_components/backbone/backbone.js"></script>
<script src="js/app.js"></script>
</body>
</html>