Split upcoming and previous talks
This commit is contained in:
parent
cef2334662
commit
7897c4a633
|
@ -36,11 +36,28 @@ use:
|
||||||
|
|
||||||
{% set now = 'now'|date('U') %}
|
{% set now = 'now'|date('U') %}
|
||||||
|
|
||||||
<dl>
|
{% set found = false %}
|
||||||
{% for talk in page.talks|reverse if talk.date <= now %}
|
{% for talk in page.talks|reverse if talk.date >= now %}
|
||||||
{% if loop.first %}<h2>Previous Talks</h2>{% endif %}
|
{% if loop.first %}
|
||||||
|
<h2>Upcoming Talks</h2>
|
||||||
|
<dl>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<dt>{{ talk.date|date('F Y') }} - {{ talk.location }}</dt>
|
{% include 'talk-listing-item' %}
|
||||||
<dd>{{ talk.description|raw }}</dd>
|
{% endfor %}
|
||||||
{% endfor %}
|
{% if found %}
|
||||||
</dl>
|
</dl>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% set found = false %}
|
||||||
|
{% for talk in page.talks|reverse if talk.date < now %}
|
||||||
|
{% if loop.first %}
|
||||||
|
<h2>Previous Talks</h2>
|
||||||
|
<dl>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% include 'talk-listing-item' %}
|
||||||
|
{% endfor %}
|
||||||
|
{% if found %}
|
||||||
|
</dl>
|
||||||
|
{% endif %}
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
<dt>{{ talk.date|date('F Y') }} - {{ talk.location }}</dt>
|
||||||
|
<dd>{{ talk.description|raw }}</dd>
|
Loading…
Reference in a new issue