lib.itmens/catalog/templates/podcast_episode_data.html

46 lines
1.7 KiB
HTML
Raw Permalink Normal View History

{% load static %}
{% load i18n %}
{% load l10n %}
{% load humanize %}
{% for ep in episodes %}
<p>
2023-06-05 02:04:52 -04:00
<h6>
<a data-media="{{ ep.media_url }}"
data-cover="{{ ep.cover_url|default:item.cover.url }}"
class="episode gg-play-button-o"
href="{{ ep.url }}"
data-uuid="{{ ep.uuid }}"
2024-07-13 01:36:18 -04:00
data-title="{{ ep.display_title }}"
data-album="{{ item.display_title }}"
2024-11-22 23:44:14 -05:00
data-hosts="{{ item.host|join:' / ' }}"
2024-02-09 03:39:02 -05:00
{% if request.user.is_authenticated %} data-comment-href="{% url 'journal:comment' ep.uuid %}" {% endif %}
style="top:4px;
margin-right: 8px"></a>
&nbsp;
{% if request.user.is_authenticated %}
<a style="margin-right: 10px"
2024-05-19 16:32:59 -04:00
title="{% trans "comment this episode" %}"
href="#"
hx-get="{% url 'journal:comment' ep.uuid %}"
hx-target="body"
hx-swap="beforeend"><i class="fa-regular fa-comment-dots"></i></a>
{% endif %}
2024-05-19 16:32:59 -04:00
<a title="{% trans "original website" %}"
target="_blank"
rel="noopener"
href="{{ ep.link }}"><i class="fa-solid fa-link"></i></a>
2024-07-13 01:36:18 -04:00
{{ ep.display_title }}
<small style="color:lightgrey;">{{ ep.pub_date|date }}</small>
</h6>
2024-07-14 10:45:27 -04:00
<small class="tldr-2 muted" _="on click toggle .tldr-2">{{ ep.display_description | linebreaksbr }}</small>
</p>
{% if forloop.last %}
<button class="outline"
hx-get="{% url 'catalog:episode_data' item.uuid %}?last={{ ep.pub_date|date:'Y-m-d H:i:s.uO'|urlencode }}"
hx-trigger="click"
2024-05-19 16:32:59 -04:00
hx-swap="outerHTML">{% trans "show more" %}</button>
{% endif %}
{% empty %}
2024-05-19 16:32:59 -04:00
<div>{% trans 'nothing more.' %}</div>
{% endfor %}