Split talks page into partials

This commit is contained in:
Oliver Davies 2019-05-20 02:38:31 +01:00
parent 5e83b92091
commit e0256a0bca
3 changed files with 26 additions and 20 deletions

View file

@ -0,0 +1,9 @@
<div class="spaced-y-4">
<h2 class="font-bold">Previous Talks</h2>
<div class="spaced-y-10">
{% for talk in talks|reverse %}
{% include 'talks/talk' %}
{% endfor %}
</div>
</div>

View file

@ -0,0 +1,11 @@
<div class="spaced-y-4">
<h2 class="font-bold">Upcoming Talks</h2>
<div class="spaced-y-10">
{% for talk in talks %}
{% include 'talks/talk' %}
{% else %}
<p>Nothing scheduled at the moment.</p>
{% endfor %}
</div>
</div>

View file

@ -26,26 +26,12 @@ talks:
---
{% block content %}
<div class="spaced-y-10">
<div class="spaced-y-4">
<h2 class="font-bold">Upcoming Talks</h2>
{% include 'talks/upcoming' with {
talks: getTalks(page.talks|merge(data.talks))|upcoming,
} %}
<div class="spaced-y-10">
{% for talk in getTalks(page.talks|merge(data.talks))|upcoming %}
{% include 'talks/talk' %}
{% else %}
<p>Nothing scheduled at the moment.</p>
{% endfor %}
</div>
</div>
<div class="spaced-y-4">
<h2 class="font-bold">Previous Talks</h2>
<div class="spaced-y-10">
{% for talk in getTalks(page.talks|merge(data.talks))|past|reverse %}
{% include 'talks/talk' %}
{% endfor %}
</div>
</div>
{% include 'talks/past' with {
talks: getTalks(page.talks|merge(data.talks))|past,
} %}
</div>
{% endblock %}