Add talkEventName macro
This commit is contained in:
parent
2133af2a4a
commit
105ae345a9
|
@ -1,4 +1,12 @@
|
||||||
{% macro talkEventLocation(eventData, event) %}
|
{% macro talkEventName(event) %}
|
||||||
{{ eventData.location ? 'in ' ~ eventData.location }}
|
{% if event.url %}
|
||||||
|
<a href="{{ event.url }}">{{ event.name }}</a>
|
||||||
|
{% else %}
|
||||||
|
{{ event.name }}
|
||||||
|
{% endif %}
|
||||||
|
{% endmacro %}
|
||||||
|
|
||||||
|
{% macro talkEventLocation(event) %}
|
||||||
|
{{ event.location ? 'in ' ~ event.location }}
|
||||||
{{ event.online ? ' (online)' }}
|
{{ event.online ? ' (online)' }}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
|
@ -7,13 +7,7 @@
|
||||||
<ul class="markup list-disc ml-5">
|
<ul class="markup list-disc ml-5">
|
||||||
{% for event in page.events if not event.date is empty %}
|
{% for event in page.events if not event.date is empty %}
|
||||||
<li>
|
<li>
|
||||||
{% set eventData = site.events[event.event] %}
|
{{ helpers.talkEventName(event) }}
|
||||||
{% if eventData.url %}
|
|
||||||
<a href="{{ eventData.url }}">{{ eventData.name }}</a>
|
|
||||||
{% else %}
|
|
||||||
{{ eventData.name }}
|
|
||||||
{% endif %}
|
|
||||||
{{ helpers.talkEventLocation(eventData, event) }}
|
|
||||||
<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 %}
|
||||||
|
|
Loading…
Reference in a new issue