-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathoverview-page.twig
156 lines (129 loc) · 4.97 KB
/
overview-page.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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
{# Metaebene overview-page template v0.4 #}
{# option.group --- define the contributor group to be listed #}
{# option.role --- define the contributor role to be listed #}
{# contributor_column --- define the contributor role to be listed #}
{# language --- define the contributor role to be listed #}
{% import "metaebene-macros" as metaebene %}
{% if option.icon_size %}
{% set icon_size = icon.icon_size %}
{% else %}
{% set icon_size = '96' %}
{% endif %}
{% if option.avatar_size %}
{% set avatar_size = option.avatar_size %}
{% else %}
{% set avatar_size = '48' %}
{% endif %}
{#
{% if not option.role %}
{% set option.role = 'guest' %}
{% endif %}
#}
<div class="episode-overview">
{% set episode_count = 0 %}
{% for episode in podcast.episodes %}
{% set episode_count = episode_count + 1 %}
{% if episode_count == 1 %}
{# Featured Episode #}
<div class="featured-episode">
<h1 class="entry-title"><a title="{{ episode.title }}" href="{{ episode.url }}">{{ episode.title }}</a></h1>
<p class="episode_subtitle"><strong><em>{{ episode.subtitle }}</em></strong></p>
<p class="episode_meta">
{{ metaebene.print_date(episode.publicationDate, option.language) }}
{{ metaebene.print_duration(episode.duration, option.language) }}
</p>
{{ episode.player }}
{% if episode.contributors({group: option.group, role: option.role}) %}
<div class="episode-contributors">
<table>
<colgroup>
{% for contributor in episode.contributors({group: option.group, role: option.role}) %}
<col width="{{ avatar_size }}px" />
{% endfor %}
</colgroup>
<tr>
{% for contributor in episode.contributors({group: option.group, role: option.role}) %}
<td style="vertical-align: top; width: {{ avatar_size }}px">
{{ contributor.image.html({retina: true, width: avatar_size, title: contributor.name, alt: contributor.name }) }}
<br/>
<strong>{{ contributor.name }}</strong>
{%if contributor.comment %}
<br/>
<em>{{ contributor.comment }}</em>
{% endif %}
</td>
{% endfor %}
</tr>
</table>
</div>
{% endif %}
<p class="episode-summary">{{ episode.summary|nl2br }}</p>
<p><a title="{{ episode.title }}" href="{{ episode.url }}">Zur Sendungsseite...</a></p>
<div class="episode-footer">
</div>
</div>
{% endif %}
{% endfor %}
{% if episode_count > 1 %}
<h2>Frühere Sendungen</h2>
<div class="recent-episodes">
<table>
{% set episode_count = 0 %}
{% set recent_episodes = 5 %}
<colgroup>
<col id="episode_icon" width="{{ icon_size + 16 }}" />
<col id="episode_description" />
</colgroup>
<tbody>
{% for episode in podcast.episodes %}
{% set episode_count = episode_count + 1 %}
{% if recent_episodes >= 0 and episode_count > 1 %}
<tr id="{{ episode.slug }}" class="archive_episode_row">
<td class="episode_guest_avatar" style="width: {{ avatar_size }}px" >
{# contributor avatars #}
{% for contributor in episode.contributors({group: 'onair', role: 'guest'}) %}
<a href="{{ episode.url }}">
{{ contributor.image.html({retina: true, width: avatar_size, title: contributor.name, alt: contributor.name }) }}
</a>
{% endfor %}
<td class="episode-description">
<h2 class="recent-episode-title"><a href="{{ episode.url }}">{{ episode.title }}</a></h2>
<div class="recent-episode-subtitle">{{ episode.subtitle }}</div>
<div class="recent-episode-contributors">
{% for contributor in episode.contributors({group: group, role: role}) %}
{% if loop.first %}Mit: {% endif %}{{ contributor.name }}{% if not loop.last %}, {% endif %}
{% endfor %}
</div>
<div class="episode_meta">
{{ metaebene.print_date(episode.publicationDate, language) }} {{ metaebene.print_duration(episode.duration, language) }}
</div>
</td>
</tr>
{% endif %}
{% set recent_episodes = recent_episodes - 1 %}
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
</div>
<style>
div.featured-episode {
background-color: #eee;
padding: 12px;
margin-bottom: 24px;
}
div.podlovewebplayer_wrapper {
margin-bottom: 24px;
}
div.episode-contributors {
float: right;
margin-left: 10px;
}
div.recent-episode-contributors {
font-weight: bold;
}
div.episode-footer {
clear: right;
}
</style>