webseite/templates/macros/podcast.html
muli 2213bd2d35
All checks were successful
continuous-integration/drone/pr Build is passing
fix: Custom publication messages for podcasts (still not blog posts).
2022-08-24 22:43:12 +02:00

78 lines
3.3 KiB
HTML

{% macro render_podcast_episode(episode, from_index=false, section_class='-odd') %}
<section class="content {{ section_class }}">
<div class="content__box -heading">
<div class="content__inner_box">
{% if from_index %}
<h2><a class="content__blog_link {{ section_class }}" href="{{ episode|url }}">{{ episode.title }}</a></h2>
{% else %}
<h2>{{ episode.title }}</h2>
{% endif %}
<hr class="{{ section_class }}">
<p class="content__meta">
<i>aufgenommen von {{ episode.authors }}, veröffentlicht am {{ episode.pub_date }}</i>
</p>
</div>
</div>
<div class="content__half_box">
<div class="content__inner_half_box">
{{ episode.podcast_teaser }}
{% if not from_index %}
{{ episode.podcast_shownotes }}
{% endif %}
</div>
{% if from_index -%}
<div class="content__inner_half_box">
<div class="pod_ctrl_box">
<audio controls class="pod_ctrl_box__audio_controls">
{% if episode.podcastogg -%}
<source src="{{ episode|url(alt='de')}}{{ episode.podcastogg }}" type="audio/ogg">
{%- endif %}
{% if episode.podcastmp3 -%}
<source src="{{ episode|url(alt='de') }}{{ episode.podcastmp3 }}" type="audio/mpeg">
{%- endif %}
Your browser does not support the audio element.
</audio>
<div class="pod_ctrl_box__button">
<a class="pod_ctrl_box__button_link" href="{{ episode|url }}" >Podcastfolge durchst&ouml;bern</a>
</div>
</div>
{% else -%}
<div class="content__inner_half_box">
<audio controls>
{% if episode.podcastogg -%}
<source src="{{ episode.podcastogg|url(alt='de') }}" type="audio/ogg">
{%- endif %}
{% if episode.podcastmp3 %}
<source src="{{ episode.podcastmp3|url(alt='de') }}" type="audio/mpeg">
{%- endif %}
Your browser does not support the audio element.
</audio>
<br/>
{% if episode.podcastmp3 -%}
<a class="" href="{{ episode.podcastmp3|url(alt='de') }}" download>
{%- if episode.podcasttitle -%}
{{ episode.podcasttitle }}
{%- else -%}
Download Folge
{%- endif -%}
{{ ' als MP3' }}
</a>
{% endif %}
{% if episode.podcastogg -%}
<a class="" href="{{ episode.podcastogg|url(alt='de') }}" download>
{%- if episode.podcasttitle -%}
{{ episode.podcasttitle }}
{%- else -%}
Download Folge
{%- endif -%}
{{ ' als OGG' }}
</a>
{% endif %}<br/>
</div>
{% endif %}
</div>
</div>
</section>
{% endmacro %}