diff options
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 |
