-
Notifications
You must be signed in to change notification settings - Fork 1
/
map.html
116 lines (108 loc) · 4.82 KB
/
map.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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="css/bootstrap-theme.min.css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<link id="favicon" rel="shortcut icon" type="image/png" href="favicon.png" />
<script type="text/javascript" src="js/libs/jquery-3.6.1.min.js" crossorigin="anonymous"></script>
<script type="text/javascript" src="js/libs/popper.min-2.11.6.js" crossorigin="anonymous"></script>
<script type="text/javascript" src="js/libs/bootstrap.min-4.0.0.js" crossorigin="anonymous"></script>
<script type="text/javascript" src="js/libs/handlebars.min-v4.7.7.js"></script>
<script type="text/javascript" src="js/libs/jquery-dateFormat.min.js"></script>
<script type="text/javascript" src="js/libs/js-yaml.min-4.1.0.js"></script>
<script type="text/javascript" src="js/libs/object_hash.min-3.0.0.js"></script>
<script type="text/javascript" src="js/common.js"></script>
<script type="text/javascript" src="js/map.js"></script>
<script type="text/javascript" src="js/beer.js"></script>
<script type="text/javascript" src="js/map-style.js"></script>
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCkJA89Qjb-HVrRm7jEOpiKxGmOG4SFiz4&callback=GoogleMap.init&libraries=places,visualization" async defer></script>
<title>Best Beer Berths</title>
</head>
<body>
<div id="main-container" class="container">
<div id="row-container" class="row no-gutters">
<div id="map" class="col-xs-12 col-sm-8 col-md-9"></div>
<div id="places-container" class="col-xs-12 col-sm-4 col-md-3">
<h1>Best Beer Berths</h1>
<strong>Databases:</strong>
<ul>
<li><a href="?BEER_DATABASE_FILE=database.yml">All places</a></li>
<li><a href="?BEER_DATABASE_FILE=db_belgium.yml">Belgium</a></li>
<li><a href="?BEER_DATABASE_FILE=db_england.yml">England</a></li>
<li><a href="?BEER_DATABASE_FILE=db_italy.yml">Italy</a></li>
<li><a href="?BEER_DATABASE_FILE=db_france.yml">France</a></li>
<li><a href="?BEER_DATABASE_FILE=db_switzerland.yml">Switzerland</a></li>
<li><a href="?BEER_DATABASE_FILE=db_usa.yml">USA</a></li>
<li><a href="?BEER_DATABASE_FILE=db_others.yml">Others</a></li>
</ul>
<strong>Actions:</strong>
<ul>
<li><a href="javascript:PlacesDB.Cache.reset()">Reset cache</a></li>
<li><a href="javascript:PlacesDB.Cache.export()">Export cache</a></li>
<li><a href="javascript:PlacesDB.Cache.import()">Import cache</a></li>
<li><a href="javascript:PlacesDB.toggleHeatmap()">Toggle Heatmap</a></li>
</ul>
<div id="debug"></div>
</div>
</div>
</div>
<div id="legend" class="map-ctrl-box">
<h3>Legend</h3>
<div id="legend-tried">
<strong>Tried</strong>
</div>
<div id="legend-totry">
<strong>Haven't Tried</strong>
</div>
</div>
<!-- Google InfoWindow template for Handlebar -->
<script id="place-template" type="text/x-handlebars-template">
<div class="placeInfo">
<h6>{{ name }} - {{ avgScore }}/10</h6>
<p>
<span class="stars">{ "value": {{ avgScore }}, "minValue": {{ minAvgScore }}, "maxValue": {{ maxAvgScore }} }</span>
</p>
<p>
{{# if url }}<a href="{{ url }}" target="_blank">Open on Google</a> -{{/ if }}
<a href="{{ directionsUrl }}" target="_blank">Directions</a>
{{# if website }}- <a href="{{ website }}" target="_blank">Website</a>{{/ if }}
</p>
<strong>Open now: </strong><span style="color: {{ openNowColour }}">{{ openNow }}</span><br/>
<div style="height: 120px">
{{# if imgUrl }}<img id="placeImage" src="{{ imgUrl }}" />{{/ if }}
{{# if score }}
<p>
<strong>Score</strong>
</p>
<ul>
{{# each score }}
<li><strong>{{ @key }}: </strong>{{ this }}</li>
{{/ each }}
</ul>
{{/ if }}
{{# if expectation }}
<p>
<strong>Expectation</strong>
</p>
<ul>
{{# each expectation }}
<li><strong>{{ @key }}: </strong>{{ this }}</li>
{{/ each }}
</ul>
{{/ if }}
</div>
{{# if openingHours }}
<strong>Opening hours:</strong>
<ul>
{{# each openingHours }}
<li>{{ this }}</span></li>
{{/ each }}
</ul>
{{/ if }}
</div>
</script>
</body>
</html>