From 27e2bc6928666ced9a402f589e56e8fbc9f78f81 Mon Sep 17 00:00:00 2001 From: soaos Date: Tue, 25 Nov 2025 08:30:53 -0500 Subject: Album tree view on about page --- templates/shortcodes/album_list.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 templates/shortcodes/album_list.html (limited to 'templates/shortcodes/album_list.html') diff --git a/templates/shortcodes/album_list.html b/templates/shortcodes/album_list.html new file mode 100644 index 0000000..521b4d1 --- /dev/null +++ b/templates/shortcodes/album_list.html @@ -0,0 +1,16 @@ +{% import "macros.html" as macros %} +{% set data = load_data(path="data/albums.json") %} + +{{ macros::treeview(height="32rem") }} +{% for genre, albums in data.albums | group_by(attribute="genre") %} + +{{ macros::subtree(name=genre, open=true) }} +{% for album in albums %} + {{ macros::treelink(text=album.artist ~ " - " ~ album.name ~ `
+ `, + url="https://musicbrainz.org/release-group/" ~ album.release_group, blank=true) }} +{% endfor %} +{{ macros::endsubtree() }} + +{% endfor %} +{{ macros::endtreeview() }} \ No newline at end of file -- cgit v1.2.3