Split talks page into partials
This commit is contained in:
parent
5e83b92091
commit
e0256a0bca
9
source/_partials/talks/past.html.twig
Normal file
9
source/_partials/talks/past.html.twig
Normal 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>
|
11
source/_partials/talks/upcoming.html.twig
Normal file
11
source/_partials/talks/upcoming.html.twig
Normal 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>
|
|
@ -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 %}
|
||||
|
|
Reference in a new issue