diff options
| author | soaos <soaos@soaos.dev> | 2025-11-25 08:30:53 -0500 |
|---|---|---|
| committer | soaos <soaos@soaos.dev> | 2025-11-25 08:30:53 -0500 |
| commit | 27e2bc6928666ced9a402f589e56e8fbc9f78f81 (patch) | |
| tree | b6a024b530b43651884f4863193bb13051a977da /templates/shortcodes/album_list.html | |
| parent | 53bbac67cfc300f86d8c836e5f6ce7be1afd7b0e (diff) | |
Album tree view on about page
Diffstat (limited to 'templates/shortcodes/album_list.html')
| -rw-r--r-- | templates/shortcodes/album_list.html | 16 |
1 files changed, 16 insertions, 0 deletions
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 ~ " - <i>" ~ album.name ~ `</i><br> + <img class="album-thumb" src="/assets/music/` ~ album.cover ~ `"/>`, + url="https://musicbrainz.org/release-group/" ~ album.release_group, blank=true) }} +{% endfor %} +{{ macros::endsubtree() }} + +{% endfor %} +{{ macros::endtreeview() }}
\ No newline at end of file |
