-
Notifications
You must be signed in to change notification settings - Fork 1
/
JSFP-Startseite.twig
60 lines (57 loc) · 6.62 KB
/
JSFP-Startseite.twig
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
49
50
51
52
53
54
55
56
57
58
59
60
{# indicates that an episoded is planned for release in the future and gives some information about ist #}
{% for episode in podcast.episodes({post_status: 'future'}) %}
{% if loop.last %}
<p style="margin-top:20px">Die Episode <b>"{{ episode.post.post_title }}"</b> erscheint am {{ episode.publicationDate.format('j. F Y') }} um {{ episode.publicationDate.format('G:i') }} Uhr{% if episode.chapters|length > 0 and episode.chapters|length < 15 %} und hat {{ episode.chapters|length }} Kapitelmarken, unter anderem {% for chapter in episode.chapters|slice(3,6) %} "{{ chapter.title }}"{% if not loop.last %}, {% endif %}{% endfor %}{% else %}, thematisch geht es unter anderem um {% for tag in episode.tags|slice(2,6) %}{{ tag.name }}{% if not loop.last %}, {% endif %}{% endfor %} und {% for tag in episode.tags %}{% if loop.first %}{{ tag.name }}{% endif %}{% endfor %}{% endif %}. {% if episode.duration.totalMilliseconds > 0 %} Du kannst Dich auf {{ episode.duration }} feinste Unterhaltung freuen. {% endif %}</p>
{% endif %}
{% endfor %}
{# gives information about episodes in draft state, showing only one of them #}
{% if podcast.episodes({post_status: "draft"})|length > 0 %}
{% for episode in podcast.episodes({post_status: 'draft', order: 'ASC', orderby: 'title'}) %}
{% if loop.first %}"{{ episode.post.post_title }}".
{% if episode.tags|length < 6 %}Eines der Stichworte für diese Episode ist
{% for tag in episode.tags %}
{% if loop.last %}"{{ tag.name }}"{% endif %}{% endfor %}.
{% else %}Stichworte für diese Episode sind unter anderem
{% for tag in episode.tags|slice(2,6) %}{{ tag.name }}{% if not loop.last %}, {% endif %}{% endfor %} und {% for tag in episode.tags %}{% if loop.first %}{{ tag.name }}{% endif %}{% endfor %}.
{% endif %} Aufnehmen werde ich voraussichtlich am {{ episode.recordingdate.format('j. F') }}. {{ random(['Vermutlich wird das auch das Veröffentlichungsdatum sein.', 'Wann die Episode veröffentlicht wird, steht noch nicht fest.', 'Wenn nichts dazwischen kommt, geht die Episode dann auch online.', 'Behalte an diesem Tag Deine Podcast-App im Auge!']) }}</p>
{% endif %}
{% endfor %}
{% endif %}
{# shows only the 11 newest episodes on this page, the most recent with many informations, five after that with less information and another five with little info #}
{% for episode in podcast.episodes({limit:'11'}) %}
{% if loop.first %}
<h1><span style="font-size:0.4em">Neueste Episode:</span> <br /><a href="{{ episode.url }}">{{ episode.post.post_title }}</a></h1>
{{ episode.player({post_id: episode.post.ID}) }}
<p><small><span class="podlove-duration" style="margin-right:75px"><img src="https://www.meine-url-ist-laenger-als-deine.de/wp-content/uploads/2019/12/dauer.png" alt="Die Dauer der Episode" title="Die Dauer der Episode" width="20px"> {{ episode.duration }}</span><span class="podlove-duration" style="margin-right:75px"><img src="https://www.meine-url-ist-laenger-als-deine.de/wp-content/uploads/2019/12/kalender.png" alt="Diese Episode erschien am" title="Diese Episode erschien am" width="20px"> {{ episode.publicationdate.format('j. F Y, G:i') }} Uhr</span></small>{% if episode.total_downloads > 1000 %}<span class="podlove-duration" style="margin-right:75px"><img src="https://www.meine-url-ist-laenger-als-deine.de/wp-content/uploads/2019/12/downloads.png" alt="Downloads" title="Downloads" width="20px"> {{ episode.total_downloads | number_format(0, ',', '.') }} Downloads</span>{% endif %} {{ podcast.subscribeButton({format: 'rectangle', color: '#000000', style: 'outline', size: 'small'}) }}</p>
{% if episode.contributors({role: 'guest'})|length > 0 %}{{ include("Episodengast") }}{% endif %} {# the extratemplate 'Episodengast' shows info about my guest(s) in this episode along with their photo, name an social media #}
<p><small> </small><br />{{ episode.summary }}</p>
<p style="clear:both"><a href="{{ episode.url }}">Zu den Shownotes</a></p>
<p> </p>
<p> </p>
<h1>Ältere Episoden:</h1>
{% elseif loop.index > 5 %}
<p><span style="font-size:1.5em"><a href="{{ episode.url }}"><b>{{ episode.post.post_title }}</b></a></span> vom {{ episode.publicationDate.format('j. F Y, G:i') }} Uhr{% if episode.contributors({role: 'guest'})|length > 0 %} zusammen mit {% for contributor in episode.contributors({role: 'guest'}) %}{{ contributor.name }}{% if not loop.last %}, {% endif %}{% endfor %}{% endif %}</p>
{% else %}
{# calculate duration for display #}
{% set Stunden = episode.duration.hours %}
{% set Minuten = episode.duration.minutes %}
{% set Sekunden = episode.duration.seconds %}
<p style="margin-top:20px"><span style="font-weight:bold;font-size:1.5em"><a href="{{ episode.url }}">{{ episode.post.post_title }}</a></span><br /><span style="font-weight:italic">{{ episode.subtitle }}</span> {% if episode.contributors({role: 'guest'})|length > 0 %}Diesmal mit dabei: {% for contributor in episode.contributors({role: 'guest'}) %} {{ contributor.name }} ({% if contributor.comment %}{{ contributor.comment }}{% else %}{{ contributor.jobtitle }}{% endif %}){% if not loop.last %}, {% else %}.{% endif %}{% endfor %}{% endif %}<br /><small><span class="podlove-duration" style="margin-right:30px"><img src="http://www.meine-url-ist-laenger-als-deine.de/wp-content/uploads/2019/12/dauer.png" alt="Die Dauer der Episode" title="Die Dauer der Episode" width="20px">
{% if Stunden > 0 %}{{ Stunden }}{% endif %}
{% if Stunden == 1 %} Stunde
{% elseif Stunden > 1 %} Stunden
{% endif %}
{{ Minuten }}
{% if Minuten == 0 %} 0 Minuten
{% elseif Minuten == 1 %} Minute
{% elseif Minuten > 1 %} Minuten
{% endif %}
und {{ Sekunden }}
{% if Sekunden == 0 %} Sekunden
{% elseif Sekunden == 1 %} Sekunden
{% elseif Sekunden > 1 %} Sekunden
{% endif %}
</span><span class="podlove-duration" style="margin-right:30px"><img src="http://www.meine-url-ist-laenger-als-deine.de/wp-content/uploads/2019/12/kalender.png" alt="Diese Episode erschien am" title="Diese Episode erschien am" width="20px"> {{ episode.publicationdate.format('d.m.Y, G:i') }} Uhr</span> </small></li>
{% endif %}
{% endfor %}
<p style="margin-top:25px"><a href="http://www.meine-url-ist-laenger-als-deine.de/?page_id=29195" style="font-color:#d90609;font-weight:bold;background-color:#f8f85c">Weitere Episoden gibt es im Archiv</a></p>