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 | |
| parent | 53bbac67cfc300f86d8c836e5f6ce7be1afd7b0e (diff) | |
Album tree view on about page
| -rw-r--r-- | content/about.md | 8 | ||||
| -rw-r--r-- | data/albums.json | 81 | ||||
| -rw-r--r-- | static/assets/music/batb.jpg | bin | 0 -> 24990 bytes | |||
| -rw-r--r-- | static/assets/music/cwts.jpg | bin | 0 -> 38132 bytes | |||
| -rw-r--r-- | static/style.css | 4 | ||||
| -rw-r--r-- | templates/blog.html | 10 | ||||
| -rw-r--r-- | templates/macros.html | 4 | ||||
| -rw-r--r-- | templates/shortcodes/album_list.html | 16 |
8 files changed, 112 insertions, 11 deletions
diff --git a/content/about.md b/content/about.md index 9a1e218..a1ca951 100644 --- a/content/about.md +++ b/content/about.md @@ -25,9 +25,11 @@ If you want to do something cool together, or just shoot the shit about whatever ### > 🎶 Music -I listen to a lot of different kinds of (rock) music. Recently I've been listening to a lot of post-hardcore, post-rock, and alternative rock. Big fan of prog too. Forgive me for reductively labeling these albums because I know a lot of them are way more complex than a narrow subgenre. +I listen to a lot of different kinds of (rock) music. Recently I've been listening to a lot of post-hardcore and post-rock. -#### > > Progressive Rock +{{ album_list() }} + +<!--#### > > Progressive Rock  @@ -67,4 +69,4 @@ Godspeed You! Black Emperor - Lift Your Skinny Fists Like Antennas to Heaven  -If These Trees Could Talk - Above the Earth, Below the Sky
\ No newline at end of file +If These Trees Could Talk - Above the Earth, Below the Sky -->
\ No newline at end of file diff --git a/data/albums.json b/data/albums.json new file mode 100644 index 0000000..9cb16f4 --- /dev/null +++ b/data/albums.json @@ -0,0 +1,81 @@ +{ + "albums": [ + { + "name": "867", + "artist": "This is the Glasshouse", + "genre": "Progressive Rock", + "cover": "867.png", + "release_group": "7787003b-444c-41d1-bfe2-1b0d3041afe7" + }, + { + "name": "wetdream", + "artist": "Willy Rodriguez", + "genre": "Alternative Rock", + "cover": "wetdream.png", + "release_group": "be0237d4-1aae-4573-8ccc-8de36cf6de9e" + }, + { + "name": "Collide with the Sky", + "artist": "Pierce the Veil", + "genre": "Post-Hardcore", + "cover": "cwts.jpg", + "release_group": "fbe216fc-3443-4425-8c99-e538b44e60ac" + }, + { + "name": "Blessed Are the Bonds", + "artist": "The Pax Cecilia", + "genre": "Post-Rock", + "cover": "batb.jpg", + "release_group": "bdf7c2e7-0433-3bee-ba8e-d89ca144ef3a" + }, + { + "name": "Lift Your Skinny Fists Like Antennas to Heaven!", + "artist": "Godspeed You! Black Emperor", + "genre": "Post-Rock", + "cover": "lysf.jpg", + "release_group": "3822abb6-ca53-3ae1-a4ec-7718cb321e9b" + }, + { + "name": "Departure Songs", + "artist": "We Lost the Sea", + "genre": "Post-Rock", + "cover": "departure_songs.jpg", + "release_group": "a23ddf04-b1e0-47e5-ae00-f09cbf7cecc5" + }, + { + "name": "Act II: The Meaning of, and All Things Regarding Ms. Leading", + "artist": "The Dear Hunter", + "genre": "Progressive Rock", + "cover": "act_ii.jpg", + "release_group": "c4dec823-cd7a-3967-9119-bee33bc7e5de" + }, + { + "name": "Good Apollo, I'm Burning Star IV, Volume One: From Fear Through the Eyes of Madness", + "artist": "Coheed and Cambria", + "genre": "Progressive Rock", + "cover": "apollo.jpg", + "release_group": "8fe00242-6d13-3f6a-a9d7-a3fec58ed631" + }, + { + "name": "jiminy", + "artist": "Bear Ghost", + "genre": "Progressive Rock", + "cover": "jiminy.jpg", + "release_group": "42f9e499-42be-4f26-b1f7-ec85a039b729" + }, + { + "name": "Twin Fantasy", + "artist": "Car Seat Headrest", + "genre": "Alternative Rock", + "cover": "twin_fantasy.jpg", + "release_group": "eeab54c6-ad8d-40c9-b595-87bae6a42397" + }, + { + "name": "Above the Earth, Below the Sky", + "artist": "If These Trees Could Talk", + "genre": "Post-Rock", + "cover": "atebts.jpg", + "release_group": "1c44567c-4015-3063-98db-e62cbd57e7a3" + } + ] +}
\ No newline at end of file diff --git a/static/assets/music/batb.jpg b/static/assets/music/batb.jpg Binary files differnew file mode 100644 index 0000000..a6a81ec --- /dev/null +++ b/static/assets/music/batb.jpg diff --git a/static/assets/music/cwts.jpg b/static/assets/music/cwts.jpg Binary files differnew file mode 100644 index 0000000..0cca425 --- /dev/null +++ b/static/assets/music/cwts.jpg diff --git a/static/style.css b/static/style.css index ed6804d..dd9ca6a 100644 --- a/static/style.css +++ b/static/style.css @@ -194,3 +194,7 @@ margin-bottom: .5em; #statuscafe-content { margin: 0 1em 0.5em 1em; } + +.album-thumb { + width: 12rem; +} diff --git a/templates/blog.html b/templates/blog.html index f659571..ff44e08 100644 --- a/templates/blog.html +++ b/templates/blog.html @@ -15,18 +15,16 @@ <h2>Latest Posts</h2> <div class="sunken-panel"> <ul class="tree-view" style="height: 8rem; overflow-y: scroll"> - {% set current_year = now() | date(format="%Y") | int %} {% for i in - range(start=0, end=current_year - 2024) %} + {% for year, posts in section.pages | group_by(attribute="year") %} <li> <details open> - <summary><b>{{current_year - i}}</b></summary> + <summary><b>{{ year }}</b></summary> <ul> - {% for post in section.pages %} {% if post.year == current_year - - i %} + {% for post in posts %} <li> <a href="{{post.permalink}}">{{post.title}}</a> - {{post.date}} </li> - {% endif %} {% endfor %} + {% endfor %} </ul> </details> </li> diff --git a/templates/macros.html b/templates/macros.html index ce73ca7..5642fc2 100644 --- a/templates/macros.html +++ b/templates/macros.html @@ -50,9 +50,9 @@ </li> {% endmacro endsubtree %} -{% macro treelink(text, url, blank=false, wip=false, wip_tooltip="") %} +{% macro treelink(text, url="", blank=false, wip=false, wip_tooltip="") %} <li> - <a href="{{ url }}" {% if blank %} target="_blank" {% endif %} {% if rel %} rel="{{ rel }}" {% endif %}>{{ text }}</a> + <a href="{{ url }}" {% if blank %} target="_blank" {% endif %} {% if rel %} rel="{{ rel }}" {% endif %}>{{ text | safe }}</a> {% if wip %} <span {% if wip_tooltip %}data-tooltip="{{ wip_tooltip }}" {% endif %}> <span class="under-construction unselectable">âš </span> 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 |
