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 %}
|
{% block content %}
|
||||||
<div class="spaced-y-10">
|
<div class="spaced-y-10">
|
||||||
<div class="spaced-y-4">
|
{% include 'talks/upcoming' with {
|
||||||
<h2 class="font-bold">Upcoming Talks</h2>
|
talks: getTalks(page.talks|merge(data.talks))|upcoming,
|
||||||
|
} %}
|
||||||
|
|
||||||
<div class="spaced-y-10">
|
{% include 'talks/past' with {
|
||||||
{% for talk in getTalks(page.talks|merge(data.talks))|upcoming %}
|
talks: getTalks(page.talks|merge(data.talks))|past,
|
||||||
{% 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>
|
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
Loading…
Reference in a new issue