forked from hackforla/food-oasis-la
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathlocation-list.html
219 lines (175 loc) · 6.54 KB
/
location-list.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
---
layout: default
classname: "location-list"
canonical_url: /locations/
include_map: true
include_map_nav: true
include_footer: false
stylesheets:
- "https://api.tiles.mapbox.com/mapbox-gl-js/v0.48.0/mapbox-gl.css"
---
<h2><a href="#list-results" id="list-results-title">List Results</a></h2>
<ul class="location-list" id="list-results">
{% if page.collection %}
{% assign data_collection = site.collections | where: "label", page.collection | first %}
{% assign data_list = data_collection.docs %}
{% assign list_limit = page.items_per_page %}
{% assign list_offset = page.list_offset %}
{% include list.html %}
{% else %}
{% assign data_list = site.data['generated-locations-for-jekyll'] %}
{% assign list_limit = page.items_per_page %}
{% assign list_offset = page.list_offset %}
{% include list.html %}
{% endif %}
</ul>
{% if page.next %}
<div class="pagination">
<p><a href="{{ page.next }}"><span>Next {{ page.items_per_page }} results</span> <img src="/assets/images/icons/forward.svg" /></a></p>
</div>
<script>
(function() {
if (PAGE_PARAMETERS.type || PAGE_PARAMETERS.address || PAGE_PARAMETERS.deserts) {
// SHIM: Pass the query string onto the next page
var paginationLink = document.querySelector('.pagination a[href]');
if (paginationLink) {
updateLink(paginationLink);
}
}
})();
</script>
{% endif %}
<!-- For location-list.js -->
<script type="text/template" id="you-are-here-template">
<div class="you-are-here"><span>You are here</span></div>
</script>
<script type="text/template" id="search-this-area-template">
<p class="action search-this-area"><a href="">Search this area</a></p>
</script>
<script type="text/template" id="list-item-template">
<a href="" class="location-summary">
<img src="" alt="" />
<h2></h2>
<p class="address"></p>
<p class="type"></p>
<p class="open">Open Now</p>
<p class="distance"><span></span> <abbr title="miles">mi</abbr></p>
</a>
</script>
<script type="text/template" id="list-item-template-detailed">
<p class="action" style="text-align: center; font-size: 0.75em; margin-top: -0.375rem; margin-bottom: 0; display: none;">
<button type="button" onclick="event.preventDefault(); if (window.oasis.hideLocationSummary) { window.oasis.hideLocationSummary(); }">
Close
</button>
</p>
<a href="" class="location-summary">
<img src="" alt="" />
<h2></h2>
<p class="address"></p>
<p class="type"></p>
<p class="open">Open Now</p>
<p class="distance"><span></span> <abbr title="miles">mi</abbr></p>
</a>
<ul class="options action">
<li><a href="#shareable-link"><span><img src="/assets/images/icons/share.svg" height="24" class="icon" alt="" /></span> <span>Share</span></a></li>
<li><a href="#directions"><span><img src="/assets/images/icons/directions.svg" height="24" class="icon" alt="" /></span> <span>Directions</span></a></li>
</ul><!-- /.options -->
<div class="shareable-link" id="shareable-link">
<h2>Share</h2>
<p class="copy-paste">
<label>
<span>Here’s a link you can copy and paste:</span>
<input type="text" onclick="this.setSelectionRange(0, this.value.length)" readonly="readonly" />
</label>
</p>
</div><!-- /.shareable-link -->
<div class="directions" id="directions">
<h2>Directions</h2>
<p class="copy-paste">
<label>
<span>Here’s an address you can copy and paste:</span>
<textarea onclick="this.setSelectionRange(0, this.value.length)" readonly="readonly"></textarea>
</label>
</p>
<p><a href="https://maps.google.com/maps?q={ directions_url }">Get Directions on Google Maps</a></p>
</div>
<section class="dates">
<h2>Dates</h2>
<p></p>
</section>
<section class="hours">
<h2>Hours</h2>
<dl></dl>
</section>
<section class="information">
<h2>Information</h2>
<dl>
<dt class="website">Website</dt>
<dd class="website"></dd>
<dt class="phone">Phone</dt>
<dd class="phone"></dd>
<dt class="facebook">Facebook</dt>
<dd class="facebook"></dd>
<dt class="instagram">Instagram</dt>
<dd class="instagram"></dd>
<dt class="twitter">Twitter</dt>
<dd class="twitter"></dd>
</dl>
</section>
<div class="content"></div>
<section class="note">
<h2>This location’s address and hours may have changed.</h2>
<p></p>
</section>
<section class="location-details-options">
<h2>Options</h2>
<ul class="options action secondary">
<li><a href="mailto:contact@foodoasis.la?subject=Claim Business, { data.name }, Food Oasis LA&body=Hello team at Food Oasis LA. I’d like to claim this business… { data.name }: https://foodoasis.la{ data.uri }">Claim Business</a></li>
<li><a href="https://form.jotform.com/62638504761156?businessName={ data.name }&address={ data.address_1 }&category={ data.category }&longitude={ data.longitude }&latitude={ data.latitude }">Report Issue</a></li>
</ul>
</section>
</script>
<script type="text/template" id="no-results-template">
<section role="status" class="message">
<h1>Oops! We couldn’t find any matching locations.</h1>
<p>You may want to <a href="/search/">try a new search</a></p>
</section>
</script>
<script src="/assets/js/helpers.js"></script>
<script src="/assets/js/location-list-toggle-view.js"></script>
<!-- Jim’s Google Maps API key -->
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBP5KxqO9v1sLhXlkrG3vDiDdOJvYLJ0H4"></script>
<script src="https://api.tiles.mapbox.com/mapbox-gl-js/v0.48.0/mapbox-gl.js"></script>
<script>
if (!mapboxgl.supported()) {
if (console && console.log) console.log('MapboxGL doesn’t appear to be supported in this web browser. Showing the list instead…');
window.oasis.showList();
window.oasis.hideToggleButtons();
} else {
document.body.classList.add('has-active-map');
}
</script>
<script>
var itemsPerPage = {{ page.items_per_page }};
var listOffset = {{ page.list_offset }};
</script>
{% if page.collection %}
<script src="/api/{{ page.collection }}.js"></script>
{% else %}
<script src="/api/locations.js"></script>
{% endif %}
<script>
(function() {
var foodSourcesList = document.querySelector('ul.location-list');
if (foodSourcesList) foodSourcesList.classList.add('sorting');
// If sorting is taking a long time, show the default list again.
setTimeout(function() {
var foodSourcesList = document.querySelector('ul.location-list');
if (foodSourcesList) foodSourcesList.classList.remove('sorting');
}, 5000);
})();
</script>
<script src="/assets/js/geolocate.js"></script>
<script src="/assets/js/location-list-sort.js"></script>
<script src="/assets/js/location-list-item.js"></script>
<script src="/assets/js/location-list-map.js"></script>