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 %}
+
+ - {{ talk.title }}
{% endfor %}
- {% if found %}
-
- {% 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 }}
+
+ {% else %}
+ {% set new_year = true %}
+ {% endif %}
+
+ - {{ talk.title }}
{% endfor %}
{% endblock %}