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