Shows Modul: Shows Übersicht?

Ein Template, dass die Shows auflistet sieht dann etwa so aus:

{% for show in podcast.shows %} 
    <div  class="podcast_show" id="{{show.slug}}">
        <h3>
            <div class="subscribe">
            {{ podcast.subscribeButton({format: 'cover',  style: 'outline', size: 'small', show: show.slug}) }}
            </div>
            <a href="/show/{{show.slug}}/">{{ show.title}}</a>
        </h3>

        <div class="subtitle">{{show.subtitle}}</div>
        <p class="summary">{{show.summary}}</p>

        {% set episodes = [] %}
        {% for episode in podcast.episodes %}
            {% if episode.show.slug == show.slug %}
                {% set episodes = episodes|merge([episode]) %}
            {% endif %}
        {% endfor %}
        {% if episodes|length > 0 %}
            <table>
                <thead>
                    <th></th>
                    <th>Date</th>
                    <th>Title</th>
                    <th>Duration</th>
                </thead>
                <tbody>
                    {% for episode in episodes %}
                        <tr class="podcast_archive_element">
                            <td class="thumbnail">
                                {{ episode.image({fallback: true}).html({width: 64, height: 64}) }}
                            </td>
                            <td class="date">
                                <span class="release_date">
                                    {{ episode.publicationDate }}
                                </span>
                            </td>
                            <td class="title">
                                <a href="{{ episode.url }}">
                                    <strong>{{ episode.title }}</strong><br>
                                    {{ episode.subtitle }}
                                </a>
                            </td>
                            <td class="duration">
                                {% set duration = episode.duration %}
                                {{ duration.hours }}:{{ duration.minutes|padLeft("0",2) }}:{{ duration.seconds|padLeft("0",2) }}
                            </td>
                        </tr>
                    {% endfor %}
                </tbody>
            </table>
        {% else %}
            <p><em>Noch keine Folge erschienen.</em></p>
        {% endif %}
    </div>
{% endfor %}

{# Der Code für die Tabelle stammt aus include '@core/shortcode/episode-list.twig' #}
<style type="text/css">
.podcast_show {
    padding-bottom: 3em;
}
.podcast_show h3 a {
    color: #222;
    text-decoration: none;
}
.podcast_show .subscribe {
    float: right;
}
.podcast_show .subtitle {
    font-weight: bold;
}
.podcast_show .summary {
    font-size: 100%;
}
.podcast_archive_element .thumbnail {
    width: 64px;
    padding: 5px !important;
}
.podcast_archive_element td {
    vertical-align: top;
}
</style>

Dann eine Seite erstellen, in der man das entsprechne Template nutzt: [podlove-template template="Shows"].

Das Ergebnis ist dann unter http://audio.antiberg.de/show/ zu bewundern.

4 „Gefällt mir“