Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
257 lines (215 sloc) 9.32 KB
---
layout: default
include_map: true
include_back: true
stylesheets:
- "https://api.tiles.mapbox.com/mapbox-gl-js/v0.48.0/mapbox-gl.css"
---
<header class="location-summary">
{% assign category = page['category'] | downcase | replace: ' ', '-' %}
{% if
category == 'food-pantry' or
category == 'summer-lunch' or
category == 'community-garden' or
category == 'farmers-market' or
category == 'supermarket' or
category == 'restaurant' or
category == 'orchard' or
category == 'pop-up-market' %}
<img src="/assets/images/home/{{ category }}.svg" width="100" alt="" />
{% elsif category == 'cultivate-la' %}
<img src="/assets/images/home/community-garden.svg" width="100" alt="" />
{% else %}
<img src="/assets/images/home/supermarket.svg" width="100" alt="" />
{% endif %}
<h1>{{ page.name }}</h1>
<p class="address">
{{ page['address_1'] }}
{% if page['address_2'] and page['address_2'] != '' %}
<br />
{{ page['address_2'] }}
{% endif %}
<br />
{{ page['city'] }}, California {{ page['zip'] }}
</p>
{% if
category == 'food-pantry' or
category == 'summer-lunch' or
category == 'community-garden' or
category == 'farmers-market' or
category == 'supermarket' %}
<p class="type"><a href="/{{ category }}">{{ page['category'] }}</a></p>
{% else %}
<p class="type">{{ page['category'] }}</p>
{% endif %}
<script type="text/template" class="open-template">
<p class="open">Open Now</p>
</script>
<script type="text/template" class="distance-template" data-latitude="{{ data['latitude'] }}" data-longitude="{{ data['longitude'] }}">
<p class="distance"><span></span> <abbr title="miles">mi</abbr></p>
</script>
</header>
{% include location-details-options.html %}
{% comment %}
{% if page['formatted_daycode1'] %}
<section class="hours">
<h2>Hours</h2>
{% assign days = "Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday" | split: ", " %}
<dl>
{% assign i = 0 %}
{% for day in days %}
{% assign i = i | plus:1 %}
{% assign daycodei = 'daycode' | append: i %}
{% assign formatted_daycodei = 'formatted_daycode' | append: i %}
{% assign dayi_open = 'day' | append: i | append: '_open' %}
{% assign dayi_close = 'day' | append: i | append: '_close' %}
{% assign formatted_dayi_open = 'formatted_day' | append: i | append: '_open' %}
{% assign formatted_dayi_close = 'formatted_day' | append: i | append: '_close' %}
<dt data-day="{{ page[daycodei] }}">{{ day }}</dt>
{% if page[formatted_daycodei] == day %}
<dd data-day="{{ page[daycodei] }}" data-open="{{ page[dayi_open] }}" data-close="{{ page[dayi_close] }}"><span>{{ page[formatted_dayi_open] }} – {{ page[formatted_dayi_close] }}</span></dd>
{% else %}
<dd><i>Closed</i></dd>
{% endif %}
{% endfor %}
</dl>
</section>
{% endif %}
{% endcomment %}
{% comment %}
TODO: Consider updating generate-locations.js to make a simple loop like this possible (and then replace the “SHIM” below)…
{% if page['formatted_days'] %}
<section class="hours">
<h2>Hours</h2>
<dl>
{% for day in page['formatted_days'] %}
{% if page['daycode'] %}
<dt data-day="{{ page['daycode'] }}">{{ page['formatted_daycode'] }}</dt>
<dd data-day="{{ page['daycode'] }}" data-open="{{ day['open'] }}" data-close="{{ day['close'] }}"><span>{{ page['formatted_open'] }} – {{ page['formatted_close'] }}</span></dd>
{% else %}
<dd><i>Closed</i></dd>
{% endif %}
{% endfor %}
</dl>
</section>
{% endif %}
{% endcomment %}
{% if page['season_open'] and page['season_open'] != '' and page['season_close'] and page['season_close'] != '' %}
<section class="dates">
<h2>Dates</h2>
<p>{{ page['season_open'] }} – {{ page['season_close'] }}</p>
</section>
{% endif %}
{% comment %}
SHIM: Support days in any order, in the spreadsheet.
{% endcomment %}
{% if
page['formatted_daycode1'] or
page['formatted_daycode2'] or
page['formatted_daycode3'] or
page['formatted_daycode4'] or
page['formatted_daycode5'] or
page['formatted_daycode6'] or
page['formatted_daycode7'] %}
<section class="hours">
<h2>Hours</h2>
{% assign days = "Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday" | split: ", " %}
<dl>
{% for day in days %}
{% if page['formatted_daycode1'] == day %}
<dt data-day="{{ page['daycode1'] }}">{{ day }}</dt>
<dd data-day="{{ page['daycode1'] }}" data-open="{{ page['day1_open'] }}" data-close="{{ page['day1_close'] }}"><span>{{ page['formatted_day1_open'] }} – {{ page['formatted_day1_close'] }}</span></dd>
{% elsif page['formatted_daycode2'] == day %}
<dt data-day="{{ page['daycode2'] }}">{{ day }}</dt>
<dd data-day="{{ page['daycode2'] }}" data-open="{{ page['day2_open'] }}" data-close="{{ page['day2_close'] }}"><span>{{ page['formatted_day2_open'] }} – {{ page['formatted_day2_close'] }}</span></dd>
{% elsif page['formatted_daycode3'] == day %}
<dt data-day="{{ page['daycode3'] }}">{{ day }}</dt>
<dd data-day="{{ page['daycode3'] }}" data-open="{{ page['day3_open'] }}" data-close="{{ page['day3_close'] }}"><span>{{ page['formatted_day3_open'] }} – {{ page['formatted_day3_close'] }}</span></dd>
{% elsif page['formatted_daycode4'] == day %}
<dt data-day="{{ page['daycode4'] }}">{{ day }}</dt>
<dd data-day="{{ page['daycode4'] }}" data-open="{{ page['day4_open'] }}" data-close="{{ page['day4_close'] }}"><span>{{ page['formatted_day4_open'] }} – {{ page['formatted_day4_close'] }}</span></dd>
{% elsif page['formatted_daycode5'] == day %}
<dt data-day="{{ page['daycode5'] }}">{{ day }}</dt>
<dd data-day="{{ page['daycode5'] }}" data-open="{{ page['day5_open'] }}" data-close="{{ page['day5_close'] }}"><span>{{ page['formatted_day5_open'] }} – {{ page['formatted_day5_close'] }}</span></dd>
{% elsif page['formatted_daycode6'] == day %}
<dt data-day="{{ page['daycode6'] }}">{{ day }}</dt>
<dd data-day="{{ page['daycode6'] }}" data-open="{{ page['day6_open'] }}" data-close="{{ page['day6_close'] }}"><span>{{ page['formatted_day6_open'] }} – {{ page['formatted_day6_close'] }}</span></dd>
{% elsif page['formatted_daycode7'] == day %}
<dt data-day="{{ page['daycode7'] }}">{{ day }}</dt>
<dd data-day="{{ page['daycode7'] }}" data-open="{{ page['day7_open'] }}" data-close="{{ page['day7_close'] }}"><span>{{ page['formatted_day7_open'] }} – {{ page['formatted_day7_close'] }}</span></dd>
{% else %}
<dt>{{ day }}</dt>
<dd><i>Closed</i></dd>
{% endif %}
{% endfor %}
</dl>
</section>
{% endif %}
{% if page['website'] != '' or page['phone'] != '' %}
<section class="information">
<h2>Information</h2>
<dl>
{% if page['website'] and page['website'] != '' %}
<dt>Website</dt>
<dd><a href="{{ page['website'] }}">{{ page['website'] }}</a></dd>
{% endif %}
{% if page['phone'] and page['phone'] != '' %}
<dt>Phone</dt>
<dd>{{ page['phone'] }}</dd>
{% endif %}
{% if page['facebook'] and page['facebook'] != '' %}
<dt>Facebook</dt>
<dd><a href="{{ page['facebook'] }}">{{ page['facebook'] }}</a></dd>
{% endif %}
{% if page['instagram'] and page['instagram'] != '' %}
<dt>Instagram</dt>
<dd><a href="{{ page['instagram'] }}">{{ page['instagram'] }}</a></dd>
{% endif %}
{% if page['twitter'] and page['twitter'] != '' %}
<dt>Twitter</dt>
<dd><a href="{{ page['twitter'] }}">{{ page['twitter'] }}</a></dd>
{% endif %}
</dl>
</section>
{% endif %}
{{ page['notes'] | markdownify }}
{{ content }}
<section class="note">
<h2>This location’s address and hours may have changed.</h2>
{% if page['phone'] != '' %}
<p>
Before you visit, please call this location’s phone number: {{ page['phone'] }} and ask them for their address and hours.
</p>
{% else %}
<p>
Before you visit, please contact this location and ask them for their address and hours.
</p>
{% endif %}
</section>
<section class="location-details-options">
<h2>Options</h2>
<ul class="options action secondary">
<li><a href="mailto:contact@foodoasis.la?subject=Claim Business, {{ page.name }}, Food Oasis LA&body=Hello team at Food Oasis LA. I’d like to claim this business… {{ page.name }}: https://foodoasis.la{{ page.url }}">Claim Business</a></li>
<li><a href="https://form.jotform.com/62638504761156?businessName={{ page.name }}&amp;address={{ page.address_1 }}&amp;category={{ page.category }}&amp;longitude={{ page.longitude }}&amp;latitude={{ page.latitude }}">Report Issue</a></li>
</ul>
</section>
<script src="https://api.tiles.mapbox.com/mapbox-gl-js/v0.48.0/mapbox-gl.js"></script>
<!-- For location-details.js -->
<script type="text/template" id="marker-template">
<div class="marker {{ page['category'] | downcase | replace: ' ', '-' }}-marker active"></div>
</script>
<script>
var LOCATION_DETAILS = {
latitude: {{ page['latitude'] }},
longitude: {{ page['longitude'] }}
}
</script>
<!-- Jim’s Google Maps API key -->
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyBP5KxqO9v1sLhXlkrG3vDiDdOJvYLJ0H4"></script>
<script src="/assets/js/helpers.js"></script>
<script src="/assets/js/geolocate.js"></script>
<script src="/assets/js/location-details.js"></script>
<!-- MailChimp subscription popup -->
<!--
<script type="text/javascript" src="//s3.amazonaws.com/downloads.mailchimp.com/js/signup-forms/popup/embed.js" data-dojo-config="usePlainJson: true, isDebug: false"></script><script type="text/javascript">require(["mojo/signup-forms/Loader"], function(L) { L.start({"baseUrl":"mc.us15.list-manage.com","uuid":"cc58c677c486e6ca3ca80afe6","lid":"e77a0f6b67"}) })</script>
-->
You can’t perform that action at this time.