From a0f66d6809a105418b0a77609b2773530904063b Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Thu, 16 Jul 2015 00:50:12 +0100 Subject: [PATCH] Put talks back into lists. --- source/talks.html | 42 +++++++++++++++++++++++++++--------------- 1 file changed, 27 insertions(+), 15 deletions(-) diff --git a/source/talks.html b/source/talks.html index e6879d3a..570461f1 100644 --- a/source/talks.html +++ b/source/talks.html @@ -55,39 +55,51 @@ talks: {% set found = false %} {% set year = '0' %} + {% for talk in talks|reverse if talk.date >= now %} - {% set found = true %} {% if loop.first %}

Upcoming Talks

{% endif %} {% set this_year %}{{ talk.date|date('Y') }}{% endset %} {% if this_year != year %} -

{{ this_year }}

- {% set year = this_year %} - {% endif %} - {{ talk.title }}
+ {% set found = true %} - + {% set year = this_year %} +

{{ this_year }}

+ - {% endif %} + {% set found = false %} {% set year = '0' %} + {% set new_year = false %} + {% for talk in talks if talk.date < now %} {% if loop.first %}

Previous Talks

{% endif %} {% set this_year %}{{ talk.date|date('Y') }}{% endset %} - {% if this_year != year %} -

{{ this_year }}

- {% set year = this_year %} - {% endif %} - {{ talk.title }}
- + {% if this_year != year %} + {% if new_year %} + {# Close the list for the previous year. #} + + {% endif %} + + {% set year = this_year %} + {% set found = true %} + +

{{ this_year }}

+