webseite/templates/macros/podcast.html
2021-04-05 20:43:06 +02:00

71 lines
2.9 KiB
HTML

{% 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>
<div class="content__box -columns">
<div class="content__inner_box">
{{ post.podcast_teaser }}
{% if not from_index %}
{{ post.podcast_shownotes }}
{% endif %}
{% if from_index -%}
<br/>
<audio controls>
{% if post.podcastogg -%}
<source src="{{ post|url}}{{ post.podcastogg }}" type="audio/ogg">
{%- endif %}
{% if post.podcastmp3 -%}
<source src="{{ post|url }}{{ post.podcastmp3 }}" type="audio/mpeg">
{%- endif %}
Your browser does not support the audio element.
</audio>
<br/>
<a href="{{ post|url }}" class="button">Podcastfolge durchst&ouml;bern</a>
<br/>
{% else -%}
<audio controls>
{% if post.podcastogg -%}
<source src="{{ post.podcastogg|url }}" type="audio/ogg">
{%- endif %}
{% if post.podcastmp3 %}
<source src="{{ post.podcastmp3|url }}" type="audio/mpeg">
{%- endif %}
Your browser does not support the audio element.
</audio>
<br/>
{% if post.podcastmp3 -%}
<a class="button" href="{{ post.podcastmp3|url }}" download>
{%- if post.podcasttitle -%}
{{ post.podcasttitle }}
{%- else -%}
Download Folge
{%- endif -%}
{{ ' als MP3' }}</a>
{% endif %}
{% if post.podcastogg -%}
<a class="button special" href="{{ post.podcastogg|url }}" download>
{%- if post.podcasttitle -%}
{{ post.podcasttitle }}
{%- else -%}
Download Folge
{%- endif -%}
{{ ' als OGG' }}</a>
{% endif %}<br/>
{% endif %}
</div>
</div>
</section>
{% endmacro %}