diff --git a/source/_partials/talks/past.html.twig b/source/_partials/talks/past.html.twig new file mode 100644 index 00000000..f2756bf1 --- /dev/null +++ b/source/_partials/talks/past.html.twig @@ -0,0 +1,9 @@ +
+

Previous Talks

+ +
+ {% for talk in talks|reverse %} + {% include 'talks/talk' %} + {% endfor %} +
+
\ No newline at end of file diff --git a/source/_partials/talks/upcoming.html.twig b/source/_partials/talks/upcoming.html.twig new file mode 100644 index 00000000..65c7415e --- /dev/null +++ b/source/_partials/talks/upcoming.html.twig @@ -0,0 +1,11 @@ +
+

Upcoming Talks

+ +
+ {% for talk in talks %} + {% include 'talks/talk' %} + {% else %} +

Nothing scheduled at the moment.

+ {% endfor %} +
+
\ No newline at end of file diff --git a/source/talks.html.twig b/source/talks.html.twig index 0ca26c06..feffa372 100644 --- a/source/talks.html.twig +++ b/source/talks.html.twig @@ -26,26 +26,12 @@ talks: --- {% block content %}
-
-

Upcoming Talks

+ {% include 'talks/upcoming' with { + talks: getTalks(page.talks|merge(data.talks))|upcoming, + } %} -
- {% for talk in getTalks(page.talks|merge(data.talks))|upcoming %} - {% include 'talks/talk' %} - {% else %} -

Nothing scheduled at the moment.

- {% endfor %} -
-
- -
-

Previous Talks

- -
- {% for talk in getTalks(page.talks|merge(data.talks))|past|reverse %} - {% include 'talks/talk' %} - {% endfor %} -
-
+ {% include 'talks/past' with { + talks: getTalks(page.talks|merge(data.talks))|past, + } %}
{% endblock %}