Move talks into separate include files
This commit is contained in:
parent
251fbb57d7
commit
b1ec837352
4 changed files with 60 additions and 75 deletions
23
source/_includes/upcoming-talks.html.twig
Normal file
23
source/_includes/upcoming-talks.html.twig
Normal file
|
@ -0,0 +1,23 @@
|
|||
{% set year = 0 %}
|
||||
|
||||
{% for talk in data.talks if date(talk.date) >= date('today') %}
|
||||
{% if loop.first %}
|
||||
<h2>Upcoming Talks</h2>
|
||||
{% endif %}
|
||||
|
||||
{% if talk.date|date('Y') != year %}
|
||||
{% set year = talk.date|date('Y') %}
|
||||
|
||||
</ul>
|
||||
<h3>{{ year }}</h3>
|
||||
<ul>
|
||||
{% endif %}
|
||||
|
||||
<li>
|
||||
{{- include('talk-listing-item') -}}
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
||||
{% if year != 0 %}
|
||||
</ul>
|
||||
{% endif %}
|
Loading…
Add table
Add a link
Reference in a new issue