forked from timpritlove/podlove-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
/
podcast-archive.twig
105 lines (82 loc) · 2.89 KB
/
podcast-archive.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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
{# Template: podcast-archive template #}
{# Version: 1.3 #}
{# group - define the contributor group to be listed #}
{# role - define the contributor role to be listed #}
{# contributor_column - define the contributor role to be listed #}
{% import "metaebene-macros" as metaebene %}
{% set icon_size = '96' %}
{% if not avatar_size %}
{% set avatar_size = '48' %}
{% endif %}
<table>
<colgroup>
<col id="episode_icon" width="{{ icon_size + 16 }}" />
<col id="episode_description" />
{% if contributor_column %}
<col id="episode_contributors" />
{% endif %}
</colgroup>
<tbody>
{% for episode in podcast.episodes %}
<tr id="{{ episode.slug }}" class="archive_episode_row">
<td class="episode_icon">
<img src="{{ episode.imageUrlWithFallback }}" width="{{ icon_size }}" height="{{ icon_size }}">
</td>
<td class="episode_description">
<div class="episode_title"><a href="{{ episode.url }}">{{ episode.title }}</a></div>
<div class="episode_meta">
{{ metaebene.print_date(episode.publicationDate, language) }}<br/>
{{ metaebene.print_duration(episode.duration, language) }}
</div>
<div class="episode_subtitle">{{ episode.subtitle }}</div>
{% if contributor_column %}
</td>
<td>
{% endif %}
{# contributor avatars #}
<div class="episode_contributor_avatars">
{% for contributor in episode.contributors({group: group, role: role}) %}
<img src="{{ contributor.avatar.url }}" title="{{ contributor.name }}" height="{{ avatar_size }}" width="{{ avatar_size }}"/ />
{% endfor %}
</div>
{# contributor names #}
<div class="episode_contributor_names">
{% for contributor in episode.contributors({group: group, role: role}) %}
{{ contributor.name }}{% if not loop.last %}, {% endif %}
{% endfor %}
</div>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<style type="text/css">
.archive_episode_row .episode_icon {
text-align: left;
}
.archive_episode_row .episode_title {
color: #0199CA;
font-size: larger !important;
font-weight: bold !important;
}
.archive_episode_row .episode_meta {
font-weight: bold !important;
}
.archive_episode_row .episode_contributor_names {
font-weight: bold !important;
}
.archive_episode_row div.episode_contributor_avatars {
margin-top: 16px;
}
.archive_episode_row div.episode_meta {
vertical-align: baseline;
}
.archive_episode_row img.tiny_icon {
vertical-align: -10%;
}
.archive_episode_row td {
vertical-align: top;
padding-top: 32px;
padding-bottom: 32px;
}
</style>