-
Notifications
You must be signed in to change notification settings - Fork 48
/
index.html
486 lines (464 loc) · 30.2 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
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
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="initial-scale=1,user-scalable=no,maximum-scale=1,width=device-width">
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="description" content="Openbeermap, an open map for draft beers">
<meta name="author" content="@nlehuby">
<title>OpenBeerMap</title>
<link rel="localization" href="locales/manifest.json">
<link rel="stylesheet" href="assets/3rdparty/bootstrap-3.1.1/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/3rdparty/font-awesome-4.2.0/css/font-awesome.min.css">
<style>
/*Fix for Font Awesome ApplicatonManifest offline Cache */
@font-face {
font-family: 'FontAwesome';
src: url('assets/3rdparty/font-awesome-4.2.0/fonts/fontawesome-webfont.eot');
src: url('assets/3rdparty/font-awesome-4.2.0/fonts/fontawesome-webfont.eot') format('embedded-opentype'), url('assets/3rdparty/font-awesome-4.2.0/fonts/fontawesome-webfont.woff2') format('woff2'), url('assets/3rdparty/font-awesome-4.2.0/fonts/fontawesome-webfont.woff') format('woff'), url('assets/3rdparty/font-awesome-4.2.0/fonts/fontawesome-webfont.ttf') format('truetype'), url('assets/3rdparty/font-awesome-4.2.0/fonts/fontawesome-webfont.svg') format('svg');
font-weight: normal;
font-style: normal;
}
</style>
<link rel="stylesheet" href="assets/3rdparty/leaflet-sidebar/L.Control.Sidebar.css">
<link rel="stylesheet" href="assets/3rdparty/leaflet-0.7.3/leaflet.css">
<link rel="stylesheet" href="assets/3rdparty/css/jquery-ui.css">
<link rel="stylesheet" href="assets/3rdparty/css/leaflet-search.css">
<link rel="stylesheet" href="assets/3rdparty/css/leaflet-search.mobile.css">
<link rel="stylesheet" href="assets/3rdparty/leaflet-locate/L.Control.Locate.min.css">
<link rel="stylesheet" href="assets/css/main.css">
<link rel="stylesheet" href="assets/css/layers-selector.css">
<link rel="stylesheet" href="assets/css/setup-modal.css">
<link rel="stylesheet" href="assets/css/edit-modal.css">
<link rel="apple-touch-icon" href="assets/img/application/favicon-152.png">
<link rel="shortcut icon" sizes="196x196" href="assets/img/application/favicon-196.png">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="assets/3rdparty/js/html5shiv.js"></script>
<script src="assets/3rdparty/js/respond.min.js"></script>
<![endif]-->
<script src="assets/3rdparty/js/l20n.min.js"></script>
</head>
<body>
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="#">OpenBeerMap</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li><a class="modal-about-toggle" href="#" data-toggle="collapse" data-target=".navbar-collapse.in"
data-l10n-id="nav_link_about"><i class="fa fa-fw fa-lg fa-question-circle"></i> About</a></li>
<li><a href="https://www.openstreetmap.org/user/OpenBeerMapContributor/diary" target='_blank'
data-l10n-id="nav_link_news"><i class="fa fa-fw fa-lg fa-rss"></i> News</a></li>
<li class="navbar-pulled">
<ul class="nav navbar-nav">
<li><a href="#" onclick="social_share('diaspora');"><i
class="fa fa-fw fa-lg fa-asterisk"></i></a></li>
<li><a href="#" onclick="social_share('twitter');"><i class="fa fa-fw fa-lg fa-twitter"></i></a>
</li>
<li><a href="#" onclick="social_share('facebook');"><i
class="fa fa-fw fa-lg fa-facebook"></i></a></li>
</ul>
</li>
</ul>
</div>
</div>
<div id="map"></div>
<div id="sidebar">
<a class="close">×</a>
<h2 data-l10n-id="edit_title">Bar edition</h2>
<div class="alert alert-danger" role="alert" id="alert_no_auth" data-l10n-id="oauth_alert_no_auth">You need to
authenticate with your OSM account to edit this bar. <button id='OSM_authenticate'>Login</button></div>
<div class="alert alert-success" role="alert" id="alert_auth">
<span data-l10n-id="oauth_alert_auth">You are logged as </span>
<span id=OSM_user>...</span>.
<span data-l10n-id="oauth_alert_logout"><a id='OSM_logout'>Log out</a></span>.
</div>
<div id="editLoading" data-l10n-id="edit_loading">
<i class="fa fa-spinner fa-spin"></i> Loading bar information
</div>
<form class="form-horizontal" name="editForm" id="editForm">
<!-- Debug information -->
<div class="form-group hidden">
<input id="editOsmType" name="editOsmType" class="form-control" type="text">
<input id="editOsmId" name="editOsmId" class="form-control" type="text">
</div>
<!-- Name -->
<div class="form-group">
<label class="col-md-4 control-label" for="editName" data-l10n-id="edit_label_name">Name</label>
<div class="col-md-8">
<input id="editName" name="editName" class="form-control" type="text">
</div>
</div>
<!-- Available beers -->
<div class="form-group">
<label class="col-md-4 control-label" data-l10n-id="edit_label_beers">Available beers</label>
<div id="editBeersList" class="col-md-8">
<div id="editBeersListOSM">
<!-- Javascript populated : OSM_js_editor.js -->
</div>
<div id="editBeersListLocal">
<!-- Javascript populated : localStorage.js -->
</div>
<div id="editBeersListManual">
<!-- Manually populated : BeerSearch.js -->
</div>
</div>
</div>
<!-- Add available beer -->
<div class="form-group">
<label class="col-md-4 control-label" for="editAddBeerInput" data-l10n-id="edit_label_add_beer">Add
beer</label>
<div class="col-md-8">
<div class="input-group">
<input id="editAddBeerInput" name="editAddBeerInput" class="form-control" type="text">
<span class="input-group-btn">
<button id="editAddBeerButton" class="btn btn-default" type="button"><i
class="fa fa-plus"></i></button>
</span>
</div>
</div>
</div>
<!-- Wifi Radios -->
<div class="form-group">
<label class="col-md-4 control-label" data-l10n-id="edit_label_wifi">Wifi</label>
<div class="col-md-8">
<div class="btn-group" data-toggle="buttons">
<label class="btn btn-default" data-l10n-id="edit_label_wifi_yes">
<input name="editWifi" value="yes" type="radio" autocomplete="off"> Yes
</label>
<label class="btn btn-default" data-l10n-id="edit_label_wifi_no">
<input name="editWifi" value="no" type="radio" autocomplete="off"> No
</label>
<label class="btn btn-default" data-l10n-id="edit_label_wifi_unknown">
<input name="editWifi" value="unknown" type="radio" autocomplete="off"> Unknown
</label>
</div>
</div>
</div>
<!-- Opening_hours input-->
<div class="form-group">
<label class="col-md-4 control-label" for="editOpeningHours"
data-l10n-id="edit_label_opening_hours">Opening hours</label>
<div class="col-md-8">
<input id="editOpeningHours" name="editOpeningHours" class="form-control input-md" type="text"
disabled>
</div>
</div>
<!-- Happy_hours input-->
<div class="form-group">
<label class="col-md-4 control-label" for="editHappyHours" data-l10n-id="edit_label_happy_hours">Happy
hours</label>
<div class="col-md-8">
<input id="editHappyHours" name="editHappyHours" class="form-control input-md" type="text" disabled>
</div>
</div>
<!-- Buttons -->
<div class="form-group">
<div class="col-md-8 col-md-offset-4">
<a href="#" class="btn btn-default discard" data-l10n-id="edit_button_discard">Discard</a>
<a href="#" id="editButtonSave" class="btn btn-primary" data-l10n-id="edit_button_save">Save</a>
<button id="editButtonMore" class="btn btn-default pull-right" type="button"
data-l10n-id="edit_button_more"><i class="fa fa-cog"></i> More</button>
</div>
</div>
<div class="form-group" id="editMoreOptions">
<div class="col-md-8 col-md-offset-4">
<a id="editOsmLink" href="http://www.openstreetmap.org/" target="_blank"
class="btn btn-default btn-block" data-l10n-id="edit_button_osm">Edit via OpenStreetMap</a>
</div>
</div>
</form>
</div>
<!-- Setup Modal -->
<div class="modal fade" id="modalSetup" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button class="close" type="button" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" data-l10n-id="modal_setup_title">Display settings</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-3">
<ul class="nav nav-pills nav-stacked" id="SetupTabs">
<li class="active"><a href="#modalSetupBeersTab" data-toggle="tab"
data-l10n-id="modal_setup_title_beers"><i class="fa fa-beer"></i> Beers</a></li>
<li><a href="#modalSetupTileLayerTab" data-toggle="tab"
data-l10n-id="modal_setup_title_tilelayer"><i class="fa fa-globe"></i>
TileLayer</a></li>
</ul>
</div>
<div class="col-md-9">
<div class="tab-content" id="setupTabsContent">
<div class="tab-pane fade active in" id="modalSetupBeersTab">
<form id="FormSelectedBeers" class="form-group row">
<div class="col-md-6">
<div id="setupFavoritesList"></div>
</div>
<div class="col-md-6">
<div class="form-group">
<label class="control-label" data-l10n-id="modal_setup_label_add">Add
favorite beer</label>
<div class="controls">
<div class="input-group">
<input name="setupAddFavoriteInput" id="setupAddFavoriteInput"
class="form-control" type="text">
<span class="input-group-btn">
<button id="setupAddFavoriteButton" class="btn btn-primary"
type="button"><i class="fa fa-plus"></i></button>
</span>
</div>
</div>
</div>
<div class="form-group hidden">
<label class="control-label">Associated image (debug)</label>
<div class="controls">
<input type="text" name="beersearchmetadata"
id="beersearchmetadata" />
</div>
</div>
</div>
</form>
<div class='hidden'>
<!-- remove hidden here to debug -->
<span data-l10n-id="setupbeer_resultat">Selected beers: </span>
<span id="ResultLocalStorage"></span>
</div>
<div class="form-group">
<a href="#" data-dismiss="modal" class="btn btn-primary pull-right"
data-l10n-id="modal_setup_button_save">Close</a>
<a href="#" id="setupClearFavorites" class="btn btn-danger"
data-l10n-id="modal_setup_button_clear"><i class="fa fa-trash-o"></i> Clear
list</a>
</div>
</div><!-- end of modalSetupBeersTab -->
<div class="tab-pane fade" id="modalSetupTileLayerTab">
<ul>
<a href="#" onclick="change_layer(osm_cartodb)"><img
src="https://a.basemaps.cartocdn.com/light_all/17/66404/45097.png"
alt="Positron" width="80" height="80"></a>
<a href="#" onclick="change_layer(osm_stamen)"><img
src="https://stamen-tiles-a.a.ssl.fastly.net/toner/17/66404/45097.png"
alt="Stamen" width="80" height="80"></a>
</ul>
<a href="#" onclick="display_restaurant()"
data-l10n-id="modal_setup_display_restaurant">Display restaurants ?</a>
</div> <!-- end of modalSetupTileLayerTab -->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- About modal -->
<div id="modalAbout" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<button class="close" type="button" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" data-l10n-id="modal_about_title">Welcome to OpenBeerMap!</h4>
</div>
<div class="modal-body">
<div class="row">
<div class="col-md-3">
<ul class="nav nav-pills nav-stacked" id="aboutTabs">
<li class="active"><a href="#modalAboutTabAbout" data-toggle="tab"
data-l10n-id="modal_about_title_about"><i class="fa fa-question-circle"></i>
About</a></li>
<li><a href="#modalAboutTabContribute" data-toggle="tab"
data-l10n-id="modal_about_title_contribute"><i class="fa fa-globe"></i>
Contribute</a></li>
<li><a href="#modalAboutTabCredits" data-toggle="tab"
data-l10n-id="modal_about_title_credits"><i class="fa fa-group"></i>
Credits</a></li>
</ul>
</div>
<div class="col-md-9">
<div class="tab-content" id="aboutTabsContent">
<div class="tab-pane fade active in" id="modalAboutTabAbout"
data-l10n-id="modal_about_content_about">
<p>This application was built to help people find their favorite beer. If
information is missing or erroneous, feel free to contribute by clicking on
the <span class="label label-default"><i class="fa fa-edit"></i> Edit bar
information</span> button.</p>
<p>You will find more information on the genesis of this application in <a
href="https://nlehuby.5apps.com/openbeermap-ou-trouver-ma-biere-preferee.html"
target="_blank">Noémie Lehuby's blog</a> (in French).</p>
<p>You can also contribute by translating or improving this application. You
will find more information about that in the <strong>Contribute</strong>
tab.</p>
</div>
<div class="tab-pane fade" id="modalAboutTabContribute">
<div class="media">
<div class="media-left">
<i class="fa fa-beer"></i>
</div>
<div class="media-body">
<h4 class="media-heading" data-l10n-id="modal_about_category_content">
Add details</h4>
<div data-l10n-id="modal_about_content_content">The simplest way to
contribute is to add beers to the bars you know.</div>
</div>
</div>
<div class="media">
<div class="media-left">
<i class="fa fa-plus"></i>
</div>
<div class="media-body">
<h4 class="media-heading" data-l10n-id="modal_about_category_bar">Add a
new bar</h4>
<div data-l10n-id="modal_about_content_bar">If a bar is not listed on
OpenBeerMap, it must be added directly to OpenStreetMap. <a href="#"
id="modalAboutOSMToggle">How?</a></div>
<div id="modalAboutOSM">
<div class="alert alert-info"
data-l10n-id="modal_about_content_bar_more">
<p>If a bar does not appear on OpenBeerMap, you can <a
class="alert-link" href="http://osmlab.github.io/osm-note/"
target="_blank">file a note</a>. Report as much info as
you can so that an OpenStreetMap
contributor can add the bar to the map.</p>
<p>If you are an OpenStreetMap contributor, please make sure
that the node or the way has one of the following tags:</p>
<ul>
<li><code>amenity = bar</code></li>
<li><code>amenity = biergarten</code></li>
<li><code>amenity = pub</code></li>
</ul>
<p>Restaurants (<code>amenity = restaurant</code>) and the other
amenities may also be displayed if they have the
<code>brewery = *</code> tag.
</p>
</div>
</div>
</div>
</div>
<div class="media">
<div class="media-left">
<i class="fa fa-language"></i>
</div>
<div class="media-body">
<h4 class="media-heading" data-l10n-id="modal_about_category_translate">
Translate</h4>
<div data-l10n-id="modal_about_content_translate">Please visit <a
href="https://www.openstreetmap.org/user/OpenBeerMapContributor/diary/22349"
target="_blank">our diary</a> to learn how to help translate
OpenBeerMap.</div>
</div>
</div>
<div class="media">
<div class="media-left">
<i class="fa fa-code"></i>
</div>
<div class="media-body">
<h4 class="media-heading" data-l10n-id="modal_about_category_code">Code
</h4>
<div data-l10n-id="modal_about_content_code">If you are a Javascript
developer or CSS designer, your are very welcome to fork <a
href='https://github.com/OpenBeerMap/OpenBeerMap.github.io'
target='_blank'>the project</a> on Github.</div>
</div>
</div>
<div class="media">
<div class="media-left">
<i class="fa fa-globe"></i>
</div>
<div class="media-body">
<h4 class="media-heading" data-l10n-id="modal_about_category_moderate">
Moderate</h4>
<div data-l10n-id="modal_about_content_moderate">If you are an
OpenStreetMap contributor and a beer lover, you are very welcome to
help moderating the beers added by the other OpenBeerMap user.
Please <a
href='https://www.openstreetmap.org/message/new/OpenBeerMapContributor'
target='_blank'>contact the team</a>.</div>
</div>
</div>
</div>
<div id="modalAboutTabCredits" class="tab-pane fade">
<div class="media">
<div class="media-left">
<i class="fa fa-globe"></i>
</div>
<div class="media-body">
<h4 class="media-heading" data-l10n-id="modal_about_category_map">Map
</h4>
<div data-l10n-id="modal_about_content_map">Map data by the <a
href="http://www.openstreetmap.org"
target="_blank">OpenStreetMap</a> contributors, tiles courtesy
of <a href="http://stamen.com" target="_blank">Stamen</a> / <a
href="https://cartodb.com/attributions" target="_blank">CartoDB</a>
.</div>
</div>
</div>
<div class="media">
<div class="media-left">
<i class="fa fa-database"></i>
</div>
<div class="media-body">
<h4 class="media-heading" data-l10n-id="modal_about_category_data">Data
</h4>
<div data-l10n-id="modal_about_content_data">Bar and beer data by the <a
href="http://www.openstreetmap.org"
target="_blank">OpenStreetMap</a> contributors, via the <a
href="http://www.overpass-api.de" target="_blank">OverPass
API</a>.</div>
</div>
</div>
<div class="media">
<div class="media-left">
<i class="fa fa-group"></i>
</div>
<div class="media-body">
<h4 class="media-heading" data-l10n-id="modal_about_category_contributors">
Contributors</h4>
<div>
<ul>
<li>Noémie Lehuby</li>
<li>Poilou</li>
<li>Maxime Corteel</li>
<li><a href="/contributors.md" target="_blank"
data-l10n-id="modal_about_category_contributors_list">...</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="assets/3rdparty/js/jquery-1.11.0.min.js"></script>
<script src="assets/3rdparty/js/jquery-ui.min.js"></script>
<script src="assets/3rdparty/bootstrap-3.1.1/js/bootstrap.min.js"></script>
<script src="assets/3rdparty/leaflet-0.7.3/leaflet.js"></script>
<script src="assets/3rdparty/leaflet-sidebar/L.Control.Sidebar.js"></script>
<script src="assets/3rdparty/OpeningHours/suncalc.js"></script>
<script src="assets/3rdparty/OpeningHours/opening_hours.js"></script>
<script src="assets/3rdparty/js/OverPassLayer.js"></script>
<script src="assets/3rdparty/js/leaflet-search.js"></script>
<script src="assets/3rdparty/leaflet-hash/leaflet-hash.js"></script>
<script src="assets/3rdparty/leaflet-locate/L.Control.Locate.min.js"></script>
<script src="assets/js/utilities.js"></script>
<script src="assets/3rdparty/osm-js-editor/osm-auth_2.4.0/osm-auth.iife.min.js"></script>
<script src="assets/3rdparty/osm-js-editor/api.js"></script>
<script src="assets/3rdparty/osm-js-editor/editor.js"></script>
<script src="assets/js/beer-layer.js"></script>
<script src="assets/js/local-storage.js"></script>
<script src="assets/js/main.js"></script>
<script src="assets/js/search.js"></script>
</body>
</html>