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