Mein Podlove Template

2

Du bist auf der Suche nach einem guten Template für den Podlove Podcast Publisher?

Hier kannst du meines gern verwenden oder mir Verbesserungsvorschläge schicken:

{% if not is_feed() %}
 {{ episode.player }}
{% endif %}
<br>
{# @core/shortcode/downloads-select.twig #}

{% spaceless %}
<form action="#">
 <div class="episode_downloads">
 {% if podcast.setting("tracking", "mode") in ["ptm", "ptm_analytics"] %}
 <input type="hidden" name="ptm_source" value="download" />
 <input type="hidden" name="ptm_context" value="select-button" />
 {% endif %}
 <select name="download_media_file">
 {% for file in episode.files %}
 {% set asset = file.asset %}
 {% if asset.downloadable %}
 <option value="{{ file.id }}" data-raw-url="{{ file.publicUrl("download", "select-show") }}">{{ asset.title }} [{{ file.size|formatBytes }}]</option>
 {% endif %}
 {% endfor %}
 </select>
 <button class="primary">Download</button>
 <button class="secondary">Show URL</button>
 </div>
</form>
{% endspaceless %}
{# @core/license.twig #}

{#
 Include example:
 {% include '@core/license.twig' %}

 You can pass in a license to determine which one is displayed:
 {% include '@core/license.twig' with {'license': podcast.license} %} 
#}
{% if license is not defined %}
 {% if episode is not null and episode.license.valid %}
 {% set license = episode.license %}
 {% else %}
 {% set license = podcast.license %}
 {% endif %}
{% endif %}

{% if license.valid %}
 {% if license.creativeCommons %}
 <div class="podlove_cc_license">
 <p>
 Dieser Podcast ist unter <a rel="license" href="{{ license.url }}">{{ license.name }}</a> lizenziert.
 </p>
 </div>
 {% else %}
 Dieser Podcast ist unter <a href="{{ license.url }}">{{ license.name }}</a> lizenziert.
 {% endif %}
{% else %}
 <div class="podlove_license">
 <p style="color: red;">
 This work is (not yet) licensed, as no license was chosen.
 </p>
 </div>
{% endif %}
<h3>Podcaster:</h3>
{# @contributors/contributor-table.twig #}

{% set colspan = 2 %}
{% if avatars == "yes" %}{% set colspan = colspan + 1 %}{% endif %}
{% if groups == "yes" %}{% set colspan = colspan + 1 %}{% endif %}
{% if roles == "yes" %}{% set colspan = colspan + 1 %}{% endif %}
{% if donations == "yes" %}{% set colspan = colspan + 1 %}{% endif %}
{% if flattr == "yes" %}{% set colspan = colspan + 1 %}{% endif %}

<table class="podlove-contributors-table">
 {% if title %}
 <thead>
 <tr>
 <th colspan="{{ colspan }}">}Dieser Podcast wird produziert von:</th>
 </tr>
 </thead>
 {% endif %}
 <tbody>
 {% if groupby == "group" %}
 {% for contributorGroup in episode.contributors({groupby: 'group', group: group, role: role}) %}
 <tr>
 <th colspan="{{ colspan }}" class="contributor-group">
 {% if contributorGroup.group %}
 {{ contributorGroup.group.title }}
 {% else %}
 &nbsp;
 {% endif %}
 </th>
 </tr>
 {% for contributor in contributorGroup.contributors %}
 {% if contributor.visible %}
 {% include '@contributors/_contributor-table-row.twig' %}
 {% endif %}
 {% endfor %}
 {% endfor %}
 {% else %}
 {% for contributor in episode.contributors({group: group, role: role}) %}
 {% if contributor.visible %}
 {% include '@contributors/_contributor-table-row.twig' %}
 {% endif %}
 {% endfor %}
 {% endif %}
 </tbody>
</table>

{% if flattr == "yes" %}
 {% include '@contributors/_contributor-table-flattr.twig' %}
{% endif %}

<h3>Etwas geben:</h3>
<ul class="podcast_services">
{% for service in podcast.services({category: "donation"}) %}
 <li>
 <a href="{{ service.profileUrl }}" title="{{ service.description }}">
 <img src="{{ service.logoUrl }}" width="16" height="16" /> {{ service.title }}
 </a>
 </li>
{% endfor %}
</ul>

<style>
.podcast_services li {
 list-style: none;
}
</style>
<hr>
2 Comments
  1. ben says

    Hallo, danke für das Template. ich wollte es gerade nuten und per shortcode auf einer seite aufrufen, leider erscheint nur der name des Templates. Kanns du mir sagen was ich falsch mache? Danke ben

    1. Benjamin Hartwich says

      Ich habe das Template aktualisiert.

Leave A Reply

Your email address will not be published.