webseite/templates/macros/podcast.html

78 lines
3.3 KiB
HTML
Raw Normal View History

{% macro render_podcast_episode(episode, from_index=false, section_class='-odd') %}
2021-03-31 02:08:49 +02:00
<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>
2021-03-31 02:08:49 +02:00
{% else %}
<h2>{{ episode.title }}</h2>
2021-03-31 02:08:49 +02:00
{% endif %}
<hr class="{{ section_class }}">
<p class="content__meta">
<i>geschrieben von {{ episode.authors }} am {{ episode.pub_date }}</i>
2021-03-31 02:08:49 +02:00
</p>
</div>
</div>
2021-04-06 18:24:25 +02:00
<div class="content__half_box">
<div class="content__inner_half_box">
{{ episode.podcast_teaser }}
2021-04-06 18:24:25 +02:00
{% if not from_index %}
{{ episode.podcast_shownotes }}
2021-04-06 18:24:25 +02:00
{% endif %}
</div>
2021-03-31 02:08:49 +02:00
2021-04-06 18:24:25 +02:00
{% 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">
2021-04-06 18:24:25 +02:00
{%- endif %}
{% if episode.podcastmp3 -%}
<source src="{{ episode|url(alt='de') }}{{ episode.podcastmp3 }}" type="audio/mpeg">
2021-04-06 18:24:25 +02:00
{%- endif %}
Your browser does not support the audio element.
2021-03-31 02:08:49 +02:00
</audio>
2021-04-06 18:24:25 +02:00
<div class="pod_ctrl_box__button">
<a class="pod_ctrl_box__button_link" href="{{ episode|url }}" >Podcastfolge durchst&ouml;bern</a>
2021-04-06 18:24:25 +02:00
</div>
</div>
{% else -%}
<div class="content__inner_half_box">
<audio controls>
{% if episode.podcastogg -%}
<source src="{{ episode.podcastogg|url(alt='de') }}" type="audio/ogg">
2021-03-31 02:08:49 +02:00
{%- endif %}
{% if episode.podcastmp3 %}
<source src="{{ episode.podcastmp3|url(alt='de') }}" type="audio/mpeg">
2021-03-31 02:08:49 +02:00
{%- endif %}
Your browser does not support the audio element.
2021-04-06 18:24:25 +02:00
</audio>
<br/>
{% if episode.podcastmp3 -%}
<a class="" href="{{ episode.podcastmp3|url(alt='de') }}" download>
{%- if episode.podcasttitle -%}
{{ episode.podcasttitle }}
2021-04-06 18:24:25 +02:00
{%- else -%}
Download Folge
{%- endif -%}
{{ ' als MP3' }}
</a>
2021-03-31 02:08:49 +02:00
{% endif %}
{% if episode.podcastogg -%}
<a class="" href="{{ episode.podcastogg|url(alt='de') }}" download>
{%- if episode.podcasttitle -%}
{{ episode.podcasttitle }}
2021-04-06 18:24:25 +02:00
{%- else -%}
Download Folge
{%- endif -%}
{{ ' als OGG' }}
</a>
2021-03-31 02:08:49 +02:00
{% endif %}<br/>
2021-04-06 18:24:25 +02:00
</div>
{% endif %}
</div>
2021-03-31 02:08:49 +02:00
</div>
2021-04-05 20:43:06 +02:00
</section>
2021-03-31 02:08:49 +02:00
{% endmacro %}