-
Notifications
You must be signed in to change notification settings - Fork 8
/
episodes.njk
48 lines (34 loc) · 911 Bytes
/
episodes.njk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
---
layout: layouts/base.njk
permalink: /episodes/
title: Épisodes
eleventyNavigation:
key: Épisodes
order: 30
---
<h1>{{ title }}</h1>
{% include "annonce.njk" %}
<p><a href="/episodes-retranscrits/">Voir uniquement les épisodes retranscrits</a></p>
{% set episodes = collections.episode %}
<h2>Les plus écoutés</h2>
<ul class="episodes">
{% for episode in episodes | reverse %}
{% if episode.data.top %}
{% include "episodeslist.njk" %}
{% endif %}
{% endfor %}
</ul>
{% set currentYear = null %}
{% for episode in episodes | reverse %}
{% set episodeYear = episode.data.date | year %}
{% if currentYear != episodeYear %}
{% if currentYear != null %}
</ul>
{% endif %}
{% set currentYear = episodeYear %}
<h2>{{ currentYear }}</h2>
<ul class="episodes">
{% endif %}
{% include "episodeslist.njk" %}
{% endfor %}
</ul>