fix: handle venues w/out lat/long
This commit is contained in:
parent
5fa46fa619
commit
cc4fd8b7ed
3 changed files with 13 additions and 4 deletions
|
@ -21,9 +21,18 @@ permalink: "/music/concerts/{% if pagination.pageNumber > 0 %}{{ pagination.page
|
|||
<a href="{{ concert.artistUrl }}">{{ concert.artist.name }}</a>
|
||||
{% endif %}
|
||||
{%- endcapture -%}
|
||||
{%- capture venue -%}
|
||||
{% if concert.venue.name %}
|
||||
{% if concert.venue.latitude and concert.venue.longitude %}
|
||||
<a href="https://www.openstreetmap.org/?mlat={{ concert.venue.latitude }}&mlon={{ concert.venue.longitude }}#map=18/{{ concert.venue.latitude }}/{{ concert.venue.longitude }}">{{ concert.venue.name | formatVenue }}</a>
|
||||
{% else %}
|
||||
{{ concert.venue.name | formatVenue }}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{%- endcapture -%}
|
||||
<li>
|
||||
{{ artistName }} on <strong class="highlight-text">{{ concert.date | date: "%B %e, %Y" }}</strong>
|
||||
{% if concert.venue.name %} at <a href="https://www.openstreetmap.org/?mlat={{ concert.venue.latitude }}&mlon={{ concert.venue.longitude }}#map=18/{{ concert.venue.latitude }}/{{ concert.venue.longitude }}">{{ concert.venue.name | formatVenue }}</a>{% endif %}
|
||||
{% if venue %} at {{ venue }}{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
|
Reference in a new issue