summaryrefslogtreecommitdiff
path: root/templates/shortcodes/album_list.html
blob: 74439ca99c9fc695c99ab29f8d7692ec3b6e41b7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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=false) }}
{% for album in albums %}
  {{ macros::treelink(text=album.artist ~ " - <i>" ~ album.name ~ `</i><br>
  <img class="album-thumb" src="https://coverartarchive.org/release-group/` ~ album.release_group ~ `/front"/>`,
  url="https://musicbrainz.org/release-group/" ~ album.release_group, blank=true) }}
{% endfor %}
{{ macros::endsubtree() }}

{% endfor %}
{{ macros::endtreeview() }}