Templates
*********

There are some ready to use templates included. For example to display the list
of posts or the detail page of a post. Often there are blocks that can be overwritten
to customize the appearance of those templates.


Example Podcast
===============

Feeds
-----

For a podcast like python-podcast.de_ you may want to add the podlove-subscribe-button_
instead of having the default feed icon. This is quite easy to accomplish. Just create
a template named templates/cast/post_list.html and set the content to:

.. code-block:: html

    {% extends "cast/post_list.html" %}
    {% block feeds %}
    <p>
    <script>window.podcastData={"title":"Python Podcast","subtitle":"Ein deutschsprachiger Podcast rund um die Programmiersprache Python","description":"","cover":"https://d2mmy4gxasde9x.cloudfront.net/cast_images/itunes_artwork/pp_itunes_artwork_3k.png","feeds":[{"type":"audio","format":"aac","url":"https://python-podcast.de/show/feed/podcast/m4a/rss.xml","directory-url-itunes":"https://podcasts.apple.com/de/podcast/python-podcast/id1445331513"},{"type":"audio","format":"mp3","url":"https://python-podcast.de/show/feed/podcast/mp3/rss.xml","directory-url-itunes":"https://podcasts.apple.com/de/podcast/python-podcast/id1445331513"},{"type":"audio","format":"ogg","url":"https://python-podcast.de/show/feed/podcast/oga/rss.xml","directory-url-itunes":"https://podcasts.apple.com/de/podcast/python-podcast/id1445331513"},{"type":"audio","format":"opus","url":"https://python-podcast.de/show/feed/podcast/opus/rss.xml","directory-url-itunes":"https://podcasts.apple.com/de/podcast/python-podcast/id1445331513"}]}</script><script class="podlove-subscribe-button" src="https://cdn.podlove.org/subscribe-button/javascripts/app.js" data-language="de" data-size="big" data-json-data="podcastData" data-color="#469cd1" data-format="cover" data-style="filled"></script><noscript><a href="https://python-podcast.de/show/feed/podcast/m4a/rss.xml">Subscribe to feed</a></noscript>
    </p>
    {% endblock feeds %}

The javascript snipped was generated by the subscribe-button-generator_ which was also really
easy.


Post Detail Link
----------------

Or maybe you want to overwrite the default post detail link if you used  "{% if include_detail %}"
to exclude the shownotes of your podcast from the episode list view.

.. code-block:: html

    {% extends "cast/post_list.html" %}
    {% load i18n %}

    {% block detail_link %}
    <a href="{% url "cast:post_detail" blog_slug=blog.slug slug=post.slug %}">
      Shownotes | {% trans "Comments" %} | Permalink
    </a>
    {% endblock detail_link %}


.. _`python-podcast.de`: https://python-podcast.de
.. _`podlove-subscribe-button`: https://podlove.org/podlove-subscribe-button/
.. _`subscribe-button-generator`: https://subscribe-button.podlove.org/#generator
