fix: Changed naming in podcast makros because a podcast is not a blog.
This commit is contained in:
parent
37a90b4b16
commit
991050ea2c
@ -1,23 +1,23 @@
|
|||||||
{% macro render_blog_post(post, from_index=false, section_class='-odd') %}
|
{% macro render_podcast_episode(episode, from_index=false, section_class='-odd') %}
|
||||||
<section class="content {{ section_class }}">
|
<section class="content {{ section_class }}">
|
||||||
<div class="content__box -heading">
|
<div class="content__box -heading">
|
||||||
<div class="content__inner_box">
|
<div class="content__inner_box">
|
||||||
{% if from_index %}
|
{% if from_index %}
|
||||||
<h2><a class="content__blog_link {{ section_class }}" href="{{ post|url }}">{{ post.title }}</a></h2>
|
<h2><a class="content__blog_link {{ section_class }}" href="{{ episode|url }}">{{ episode.title }}</a></h2>
|
||||||
{% else %}
|
{% else %}
|
||||||
<h2>{{ post.title }}</h2>
|
<h2>{{ episode.title }}</h2>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<hr class="{{ section_class }}">
|
<hr class="{{ section_class }}">
|
||||||
<p class="content__meta">
|
<p class="content__meta">
|
||||||
<i>geschrieben von {{ post.authors }} am {{ post.pub_date }}</i>
|
<i>geschrieben von {{ episode.authors }} am {{ episode.pub_date }}</i>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content__half_box">
|
<div class="content__half_box">
|
||||||
<div class="content__inner_half_box">
|
<div class="content__inner_half_box">
|
||||||
{{ post.podcast_teaser }}
|
{{ episode.podcast_teaser }}
|
||||||
{% if not from_index %}
|
{% if not from_index %}
|
||||||
{{ post.podcast_shownotes }}
|
{{ episode.podcast_shownotes }}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -25,44 +25,44 @@
|
|||||||
<div class="content__inner_half_box">
|
<div class="content__inner_half_box">
|
||||||
<div class="pod_ctrl_box">
|
<div class="pod_ctrl_box">
|
||||||
<audio controls class="pod_ctrl_box__audio_controls">
|
<audio controls class="pod_ctrl_box__audio_controls">
|
||||||
{% if post.podcastogg -%}
|
{% if episode.podcastogg -%}
|
||||||
<source src="{{ post|url(alt='de')}}{{ post.podcastogg }}" type="audio/ogg">
|
<source src="{{ episode|url(alt='de')}}{{ episode.podcastogg }}" type="audio/ogg">
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{% if post.podcastmp3 -%}
|
{% if episode.podcastmp3 -%}
|
||||||
<source src="{{ post|url(alt='de') }}{{ post.podcastmp3 }}" type="audio/mpeg">
|
<source src="{{ episode|url(alt='de') }}{{ episode.podcastmp3 }}" type="audio/mpeg">
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
Your browser does not support the audio element.
|
Your browser does not support the audio element.
|
||||||
</audio>
|
</audio>
|
||||||
<div class="pod_ctrl_box__button">
|
<div class="pod_ctrl_box__button">
|
||||||
<a class="pod_ctrl_box__button_link" href="{{ post|url }}" >Podcastfolge durchstöbern</a>
|
<a class="pod_ctrl_box__button_link" href="{{ episode|url }}" >Podcastfolge durchstöbern</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% else -%}
|
{% else -%}
|
||||||
<div class="content__inner_half_box">
|
<div class="content__inner_half_box">
|
||||||
<audio controls>
|
<audio controls>
|
||||||
{% if post.podcastogg -%}
|
{% if episode.podcastogg -%}
|
||||||
<source src="{{ post.podcastogg|url(alt='de') }}" type="audio/ogg">
|
<source src="{{ episode.podcastogg|url(alt='de') }}" type="audio/ogg">
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{% if post.podcastmp3 %}
|
{% if episode.podcastmp3 %}
|
||||||
<source src="{{ post.podcastmp3|url(alt='de') }}" type="audio/mpeg">
|
<source src="{{ episode.podcastmp3|url(alt='de') }}" type="audio/mpeg">
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
Your browser does not support the audio element.
|
Your browser does not support the audio element.
|
||||||
</audio>
|
</audio>
|
||||||
<br/>
|
<br/>
|
||||||
{% if post.podcastmp3 -%}
|
{% if episode.podcastmp3 -%}
|
||||||
<a class="" href="{{ post.podcastmp3|url(alt='de') }}" download>
|
<a class="" href="{{ episode.podcastmp3|url(alt='de') }}" download>
|
||||||
{%- if post.podcasttitle -%}
|
{%- if episode.podcasttitle -%}
|
||||||
{{ post.podcasttitle }}
|
{{ episode.podcasttitle }}
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
Download Folge
|
Download Folge
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{{ ' als MP3' }}
|
{{ ' als MP3' }}
|
||||||
</a>
|
</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if post.podcastogg -%}
|
{% if episode.podcastogg -%}
|
||||||
<a class="" href="{{ post.podcastogg|url(alt='de') }}" download>
|
<a class="" href="{{ episode.podcastogg|url(alt='de') }}" download>
|
||||||
{%- if post.podcasttitle -%}
|
{%- if episode.podcasttitle -%}
|
||||||
{{ post.podcasttitle }}
|
{{ episode.podcasttitle }}
|
||||||
{%- else -%}
|
{%- else -%}
|
||||||
Download Folge
|
Download Folge
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{% extends "header_slim.html" %}
|
{% extends "header_slim.html" %}
|
||||||
{% from "macros/podcast.html" import render_blog_post %}
|
{% from "macros/podcast.html" import render_podcast_episode %}
|
||||||
{%- block title -%}{{ this.title }}{%- endblock -%}
|
{%- block title -%}{{ this.title }}{%- endblock -%}
|
||||||
{%- block meta_description -%}
|
{%- block meta_description -%}
|
||||||
{%- if this.meta_description is defined and this.meta_description != "" -%}
|
{%- if this.meta_description is defined and this.meta_description != "" -%}
|
||||||
@ -14,5 +14,5 @@
|
|||||||
<h1>{{ this.title }}</h1>
|
<h1>{{ this.title }}</h1>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{{ render_blog_post(this) }}
|
{{ render_podcast_episode(this) }}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{% extends "header_slim.html" %}
|
{% extends "header_slim.html" %}
|
||||||
{% from "macros/podcast.html" import render_blog_post %}
|
{% from "macros/podcast.html" import render_podcast_episode %}
|
||||||
{% from "macros/pagination.html" import render_pagination %}
|
{% from "macros/pagination.html" import render_pagination %}
|
||||||
|
|
||||||
{%- block title -%}{{ this.title }}{%- endblock -%}
|
{%- block title -%}{{ this.title }}{%- endblock -%}
|
||||||
@ -45,8 +45,8 @@
|
|||||||
{#- Die Podcast Folgen werden aus dem blog template importiert :P -#}
|
{#- Die Podcast Folgen werden aus dem blog template importiert :P -#}
|
||||||
|
|
||||||
|
|
||||||
{% for blog_post in this.pagination.items %}
|
{% for episode in this.pagination.items %}
|
||||||
{{ render_blog_post(blog_post, from_index=true) }}
|
{{ render_podcast_episode(episode, from_index=true) }}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
<section>
|
<section>
|
||||||
{{ render_pagination(this.pagination, true) }}
|
{{ render_pagination(this.pagination, true) }}
|
||||||
|
Loading…
Reference in New Issue
Block a user