Limit previous talks on talks page, add talks archive
This commit is contained in:
parent
64bf53cc69
commit
d33e78a2fa
|
@ -9,7 +9,6 @@
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody>
|
<tbody>
|
||||||
{% set events = reverse_order ? events|sortbyfield('date')|reverse : events|sortbyfield('date') %}
|
|
||||||
{% for event in events %}
|
{% for event in events %}
|
||||||
<tr>
|
<tr>
|
||||||
<td class="date">
|
<td class="date">
|
||||||
|
|
|
@ -29,15 +29,16 @@ use: [talks, posts]
|
||||||
<h2>Upcoming Talks</h2>
|
<h2>Upcoming Talks</h2>
|
||||||
|
|
||||||
{% include "talks-table" with {
|
{% include "talks-table" with {
|
||||||
events: upcoming_events,
|
events: upcoming_events|sortbyfield('date'),
|
||||||
show_talk: true
|
show_talk: true
|
||||||
} %}
|
} %}
|
||||||
|
|
||||||
<h2>Previous Talks</h2>
|
<h2>Last 5 Talks</h2>
|
||||||
|
|
||||||
{% include "talks-table" with {
|
{% include "talks-table" with {
|
||||||
events: past_events,
|
events: past_events|sortbyfield('date')|reverse[:5],
|
||||||
reverse_order: true,
|
|
||||||
show_feedback: true,
|
show_feedback: true,
|
||||||
show_talk: true
|
show_talk: true
|
||||||
} %}
|
} %}
|
||||||
|
|
||||||
|
<p>You can view more talks in the <a href="/talks/archive">talks archive</a>.</p>
|
||||||
|
|
18
source/talks/archive.twig
Normal file
18
source/talks/archive.twig
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
---
|
||||||
|
title: Talk Archive
|
||||||
|
layout: page
|
||||||
|
use: [talks]
|
||||||
|
---
|
||||||
|
{% set events = [] %}
|
||||||
|
{% for talk in data.talks %}
|
||||||
|
{% for event in talk.events if event.date < 'today'|date('Y-m-d') %}
|
||||||
|
{% set event = event|merge({ talk: talk })|merge(site.events[event.id]) %}
|
||||||
|
{% set events = events|merge([event]) %}
|
||||||
|
{% endfor %}
|
||||||
|
{% endfor %}
|
||||||
|
|
||||||
|
{% include "talks-table" with {
|
||||||
|
events: events|sortbyfield('date')|reverse,
|
||||||
|
show_feedback: true,
|
||||||
|
show_talk: true
|
||||||
|
} %}
|
Loading…
Reference in a new issue