From 244359165e0a365d62ae37e34984a5cb59e2a7fd Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Mon, 18 Nov 2024 21:14:49 +0100 Subject: [PATCH] WIP: support rendering other filetypes, lots of rough edges --- src/albums/templates/album_detail.html | 6 +- src/albums/templates/album_slideshow.html | 84 ++++++------------- src/files/managers.py | 4 +- src/files/tables.py | 20 ++++- src/files/templates/file_detail.html | 28 ++----- .../templates/includes/file_thumbnail.html | 4 +- .../templates/includes/render_audio.html | 4 + .../templates/includes/render_document.html | 3 + .../templates/includes/render_video.html | 4 + src/files/tests.py | 2 +- src/files/views.py | 8 +- src/static_src/css/bma.css | 1 - src/static_src/js/splide-custom-album.js | 26 +++--- src/utils/templatetags/bma_utils.py | 49 ++++++++++- 14 files changed, 140 insertions(+), 103 deletions(-) create mode 100644 src/files/templates/includes/render_audio.html create mode 100644 src/files/templates/includes/render_document.html create mode 100644 src/files/templates/includes/render_video.html diff --git a/src/albums/templates/album_detail.html b/src/albums/templates/album_detail.html index 69c01295..c5d846de 100644 --- a/src/albums/templates/album_detail.html +++ b/src/albums/templates/album_detail.html @@ -68,10 +68,8 @@
{{ album.title }}
-
- {% block album_detail %} - {% endblock %} -
+ {% block album_detail %} + {% endblock %}
diff --git a/src/albums/templates/album_slideshow.html b/src/albums/templates/album_slideshow.html index 60108895..7865ef04 100644 --- a/src/albums/templates/album_slideshow.html +++ b/src/albums/templates/album_slideshow.html @@ -1,13 +1,34 @@ {% extends "album_detail.html" %} +{% load humanize %} {% block album_detail %} -
-
+
+ +
+
+ + +
+
+