lib.itmens/catalog/templates/podcast.html

71 lines
2.4 KiB
HTML
Raw Permalink Normal View History

2022-12-15 17:29:35 -05:00
{% extends "item_base.html" %}
{% load static %}
{% load i18n %}
{% load l10n %}
{% load humanize %}
{% load mastodon %}
{% load strip_scheme %}
{% load thumb %}
2023-01-31 21:21:50 -05:00
{% block head %}
2024-04-06 22:52:35 -04:00
<script src="{{ cdn_url }}/npm/shikwasa@2.2.1/dist/shikwasa.min.js"></script>
<link href="{{ cdn_url }}/npm/shikwasa@2.2.1/dist/style.min.css"
rel="stylesheet"></link>
2023-07-12 16:33:15 -04:00
<script src="{% static 'js/podcast.js' %}"></script>
2023-01-29 20:05:30 -05:00
{% endblock %}
2022-12-15 17:29:35 -05:00
{% block details %}
2024-05-19 16:32:59 -04:00
<div>{% include '_people.html' with people=item.genre role='genre' max=5 %}</div>
2024-12-01 16:18:07 -05:00
<div>{% include '_people.html' with people=item.host role='host' max=5 %}</div>
<div>
{% if item.official_site %}
2024-05-19 16:32:59 -04:00
{% trans 'website' %}: {{ item.official_site|urlizetrunc:24 }}
{% endif %}
</div>
2022-12-15 17:29:35 -05:00
{% endblock %}
{% block content %}
2024-05-19 16:32:59 -04:00
<h5>{% trans 'recent episodes' %}</h5>
2023-05-21 11:12:40 -04:00
<div hx-get="{% url 'catalog:episode_data' item.uuid %}"
hx-trigger="load"
hx-swap="outerHTML"></div>
{% endblock %}
2022-12-15 17:29:35 -05:00
<!-- class specific sidebar -->
{% block left_sidebar %}
<section>
<center>
2024-05-19 16:32:59 -04:00
<button href="#" class="podlove-subscribe-button-primary outline">{% trans 'subscribe in apps' %}</button>
</center>
</section>
<script>
window.podcastData = {
2024-07-13 01:36:18 -04:00
"title": "{{ item.display_title | escapejs }}",
"subtitle": "",
2024-07-14 10:45:27 -04:00
"description": "{{ item.display_description | escapejs }}",
"cover": "{{ item.cover.url | escapejs }}",
"feeds": [{"type": "audio", "format": "mp3", "url": "{{ item.feed_url | escapejs }}", "variant": "high"}]
}
$(()=>{
{% if focus_item %}
var position = 1 * "{{request.GET.position|escapejs}}";
window.current_item_uuid = "{{focus_item.uuid}}";
create_player({
2024-07-13 01:36:18 -04:00
title: "{{ focus_item.display_title | escapejs }}",
cover: "{{ focus_item.cover_url | default:item.cover.url | escapejs }}",
src: "{{ focus_item.media_url | escapejs }}",
2024-07-13 01:36:18 -04:00
album: "{{ item.display_title|escapejs }}",
2024-11-22 23:44:14 -05:00
artist: "{{ item.host|join:' / '|escapejs }}"
})
if (position) window.player._initSeek = position;
2024-02-09 03:39:02 -05:00
{% if request.user.is_authenticated %}
set_podcast_comment_button("{% url 'journal:comment' focus_item.uuid %}")
{% endif %}
{% endif %}
});
</script>
<script class="podlove-subscribe-button"
src="https://cdn.podlove.org/subscribe-button/javascripts/app.js"
data-json-data="podcastData"
data-buttonid="primary"
data-language="en"
data-hide="true"
data-color="#1190C0"></script>
2022-12-15 17:29:35 -05:00
{% endblock %}