Add talkEventLocation macro

This commit is contained in:
Oliver Davies 2019-11-01 18:55:09 +00:00
parent 9d63ec82a7
commit 9b2106e586
2 changed files with 8 additions and 3 deletions

View file

@ -0,0 +1,5 @@
{% macro talkEventLocation(eventData, event) %}
{% if eventData.location %}
in {{ eventData.location }}
{% endif %}
{% endmacro %}

View file

@ -1,3 +1,5 @@
{% import 'helpers' as helpers %}
{% if page.events %} {% if page.events %}
<div> <div>
<h2 class="mb-2">Presented at</h2> <h2 class="mb-2">Presented at</h2>
@ -11,9 +13,7 @@
{% else %} {% else %}
{{ eventData.name }} {{ eventData.name }}
{% endif %} {% endif %}
{% if eventData.location %} {{ helpers.talkEventLocation(eventData, event) }}
in {{ eventData.location }}
{% endif %}
<span class="text-gray-800">- {{ event.date|date('jS F Y') }}</span> <span class="text-gray-800">- {{ event.date|date('jS F Y') }}</span>
</li> </li>
{% endfor %} {% endfor %}