From 2bf8d607f93cd3996023acd7de272b6a16075293 Mon Sep 17 00:00:00 2001 From: gesang Date: Tue, 11 Mar 2025 19:49:06 +0100 Subject: [PATCH] get rid of iframes --- compose.override.yml | 2 ++ custom/_item_card.custom.html | 15 ++++++++++ custom/album.custom.html | 53 +++++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+) create mode 100644 custom/_item_card.custom.html create mode 100644 custom/album.custom.html diff --git a/compose.override.yml b/compose.override.yml index 64afa618..e82fa265 100644 --- a/compose.override.yml +++ b/compose.override.yml @@ -93,6 +93,8 @@ x-shared: - ${NEODB_DATA:-../data}/takahe-cache:/www/cache - ${NEODB_DATA:-../data}/www-root:/www/root - ./custom/edition.custom.html:/neodb/catalog/templates/edition.html + - ./custom/_item_card.custom.html:/neodb/catalog/templates/_item_card.html + - ./custom/album.custom.html:/neodb/catalog/templates/album.html - ./custom/common_libs.custom.html:/neodb/common/templates/common_libs.html depends_on: - redis diff --git a/custom/_item_card.custom.html b/custom/_item_card.custom.html new file mode 100644 index 00000000..6e927684 --- /dev/null +++ b/custom/_item_card.custom.html @@ -0,0 +1,15 @@ +{% load i18n %} +{% load duration %} +
+
+ + cover + +
+
+ {% with "_item_card_metadata_"|add:item.class_name|add:".html" as template %} + {% include template %} + {% endwith %} +
+
diff --git a/custom/album.custom.html b/custom/album.custom.html new file mode 100644 index 00000000..c4a224eb --- /dev/null +++ b/custom/album.custom.html @@ -0,0 +1,53 @@ +{% extends "item_base.html" %} +{% load static %} +{% load i18n %} +{% load l10n %} +{% load humanize %} +{% load mastodon %} +{% load strip_scheme %} +{% load thumb %} +{% load duration %} + +{% block details %} +
{% include '_people.html' with people=item.additional_title role='' max=99 %}
+
{% include '_people.html' with people=item.artist role='artist' max=5 %}
+
{% include '_people.html' with people=item.company role='publisher' max=5 %}
+
+ {% if item.release_date %} + {% trans 'release date' %}: {{ item.release_date }} + {% endif %} +
+
+ {% if item.duration %} + {% trans 'duration' %}: {{ item.duration|duration_format:1000 }} + {% endif %} +
+
{% include '_people.html' with people=item.genre role='genre' max=5 %}
+
+ {% if item.barcode %} + {% trans 'barcode' %}: {{ item.barcode }} + {% endif %} +
+
+ {% if item.album_type %} + {% trans 'album type' %}: {{ item.album_type }} + {% endif %} +
+
+ {% if item.media %} + {% trans 'album media' %}: {{ item.media }} + {% endif %} +
+
+ {% if item.disc_count %} + {% trans 'number of discs' %}: {{ item.disc_count }} + {% endif %} +
+{% endblock %} + +{% block content %} + {% if item.track_list %} +
tracks
+

{{ item.track_list | linebreaksbr }}

+ {% endif %} +{% endblock %}