webseite/templates/macros/podcast.html

78 lines
3.2 KiB
HTML
Raw Permalink Normal View History

2021-03-31 02:08:49 +02:00
{% macro render_blog_post(post, 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="{{ post|url }}">{{ post.title }}</a></h2>
{% else %}
<h2>{{ post.title }}</h2>
{% endif %}
<hr class="{{ section_class }}">
<p class="content__meta">
<i>geschrieben von {{ post.authors }} am {{ post.pub_date }}</i>
</p>
</div>
</div>
2021-04-06 18:24:25 +02:00
<div class="content__half_box">
<div class="content__inner_half_box">
{{ post.podcast_teaser }}
{% if not from_index %}
{{ post.podcast_shownotes }}
{% 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 post.podcastogg -%}
<source src="{{ post|url(alt='de')}}{{ post.podcastogg }}" type="audio/ogg">
2021-04-06 18:24:25 +02:00
{%- endif %}
{% if post.podcastmp3 -%}
<source src="{{ post|url(alt='de') }}{{ post.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="{{ post|url }}" >Podcastfolge durchst&ouml;bern</a>
</div>
</div>
{% else -%}
<div class="content__inner_half_box">
<audio controls>
2021-03-31 02:08:49 +02:00
{% if post.podcastogg -%}
<source src="{{ post.podcastogg|url(alt='de') }}" type="audio/ogg">
2021-03-31 02:08:49 +02:00
{%- endif %}
{% if post.podcastmp3 %}
<source src="{{ post.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/>
2021-03-31 02:08:49 +02:00
{% if post.podcastmp3 -%}
<a class="" href="{{ post.podcastmp3|url(alt='de') }}" download>
2021-04-06 18:24:25 +02:00
{%- if post.podcasttitle -%}
{{ post.podcasttitle }}
{%- else -%}
Download Folge
{%- endif -%}
{{ ' als MP3' }}
</a>
2021-03-31 02:08:49 +02:00
{% endif %}
{% if post.podcastogg -%}
<a class="" href="{{ post.podcastogg|url(alt='de') }}" download>
2021-04-06 18:24:25 +02:00
{%- if post.podcasttitle -%}
{{ post.podcasttitle }}
{%- 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 %}