summaryrefslogtreecommitdiff
path: root/templates/shortcodes/album_list.html
blob: 521b4d18b3a5c05ff37225725452405de15f884b (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=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() }}