get rid of iframes
Some checks are pending
code check / lint (3.12) (push) Waiting to run
code check / type-checker (3.12) (push) Waiting to run
Mirror to Codeberg / to_codeberg (push) Waiting to run
unit test / django (3.12) (push) Waiting to run

This commit is contained in:
gesang 2025-03-11 19:49:06 +01:00
parent d4752cac1d
commit 2bf8d607f9
Signed by: gesang
GPG key ID: 6CE35141D31CEAFB
3 changed files with 70 additions and 0 deletions

View file

@ -93,6 +93,8 @@ x-shared:
- ${NEODB_DATA:-../data}/takahe-cache:/www/cache - ${NEODB_DATA:-../data}/takahe-cache:/www/cache
- ${NEODB_DATA:-../data}/www-root:/www/root - ${NEODB_DATA:-../data}/www-root:/www/root
- ./custom/edition.custom.html:/neodb/catalog/templates/edition.html - ./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 - ./custom/common_libs.custom.html:/neodb/common/templates/common_libs.html
depends_on: depends_on:
- redis - redis

View file

@ -0,0 +1,15 @@
{% load i18n %}
{% load duration %}
<div class="item">
<div class="cover">
<a href="{{ item.url }}">
<img src="{{ item.cover_image_url|default:default_cover_url|relative_uri }}"
alt="cover" />
</a>
</div>
<div>
{% with "_item_card_metadata_"|add:item.class_name|add:".html" as template %}
{% include template %}
{% endwith %}
</div>
</div>

53
custom/album.custom.html Normal file
View file

@ -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 %}
<!-- class specific details -->
{% block details %}
<div>{% include '_people.html' with people=item.additional_title role='' max=99 %}</div>
<div>{% include '_people.html' with people=item.artist role='artist' max=5 %}</div>
<div>{% include '_people.html' with people=item.company role='publisher' max=5 %}</div>
<div>
{% if item.release_date %}
{% trans 'release date' %}: {{ item.release_date }}
{% endif %}
</div>
<div>
{% if item.duration %}
{% trans 'duration' %}: {{ item.duration|duration_format:1000 }}
{% endif %}
</div>
<div>{% include '_people.html' with people=item.genre role='genre' max=5 %}</div>
<div>
{% if item.barcode %}
{% trans 'barcode' %}: {{ item.barcode }}
{% endif %}
</div>
<div>
{% if item.album_type %}
{% trans 'album type' %}: {{ item.album_type }}
{% endif %}
</div>
<div>
{% if item.media %}
{% trans 'album media' %}: {{ item.media }}
{% endif %}
</div>
<div>
{% if item.disc_count %}
{% trans 'number of discs' %}: {{ item.disc_count }}
{% endif %}
</div>
{% endblock %}
<!-- class specific sidebar -->
{% block content %}
{% if item.track_list %}
<h5>tracks</h5>
<p class="tldr" _="on click toggle .tldr on me">{{ item.track_list | linebreaksbr }}</p>
{% endif %}
{% endblock %}