playlists and podcasts on episode view

This commit is contained in:
bkfox
2019-08-07 22:52:34 +02:00
parent bd185125ac
commit aabbcd97fa
10 changed files with 45 additions and 29 deletions

View File

@ -53,14 +53,14 @@ Context:
{% block header %}
<h1 class="title is-1">{% block title %}{% endblock %}</h1>
<h4 class="subtitle is-size-3 columns">
<h3 class="subtitle is-3 columns">
{% block subtitle %}
{% if parent %}
<a href="{{ parent.get_absolute_url }}" class="column">
&#10092; {{ parent.title }}</a></li>
{% endif %}
{% endblock %}
</h4>
</h3>
{% endblock %}
</header>

View File

@ -31,11 +31,32 @@
{% block main %}
{{ block.super }}
{% if podcasts %}
{% for object in podcasts %}
{% include "aircox/podcast_item.html" %}
{% endfor %}
{% endif %}
{% if podcasts or tracks %}
<section class="columns is-desktop">
{% if tracks %}
<div class="column">
<h4 class="title is-4">{% trans "Playlist" %}</h4>
<ol>
{% for track in tracks %}
<li><span>{{ track.title }}</span>
<span class="has-text-grey-dark has-text-weight-light">
&mdash; {{ track.artist }}
{% if track.info %}(<i>{{ track.info }}</i>){% endif %}
</span>
</li>
{% endfor %}
</ol>
</div>
{% endif %}
{% if podcasts %}
<div class="column">
<h4 class="title is-4">{% trans "Podcasts" %}</h4>
{% for object in podcasts %}
{% include "aircox/podcast_item.html" %}
{% endfor %}
{% endif %}
</div>
{% endif %}
</section>
{% endblock %}

View File

@ -3,17 +3,9 @@
{% with object.track as track %}
<span class="has-text-info is-size-5">&#9836;</span>
<span>{{ track.title }}</span>
{% with track.artist as artist %}
{% with track.info as info %}
<span class="has-text-grey-dark has-text-weight-light">
{% blocktrans %}
by {{ artist }}
{% endblocktrans %}
{% if info %}
({% blocktrans %}<i>{{ info }}</i>{% endblocktrans %})
{% endif %}
&mdash; {{ track.artist }}
{% if track.info %}(<i>{{ track.info }}</i>){% endif %}
</span>
{% endwith %}
{% endwith %}
{% endwith %}

View File

@ -22,12 +22,6 @@ Context:
{% block main %}
{% block headline %}
{% if page and page.headline %}
<p class="headline">{{ page.headline }}</p>
{% endif %}
{% endblock %}
{% block content %}
{{ page.content|default_if_none:''|safe }}
{% endblock %}

View File

@ -6,7 +6,7 @@
{% if episodes %}
<section>
<h4 class="subtitle is-size-4">{% trans "Last shows" %}</h4>
<h4 class="title is-4">{% trans "Last shows" %}</h4>
{% for object in episodes %}
{% include "aircox/episode_item.html" %}