chore: remove code duplication and clean up

This commit is contained in:
Cory Dransfeldt 2024-05-28 10:25:38 -07:00
parent 5a402c4def
commit 694dae0b06
No known key found for this signature in database
34 changed files with 246 additions and 292 deletions

View file

@ -9,7 +9,10 @@ permalink: "/music/albums/this-month/{% if pagination.pageNumber > 0 %}{{ pagina
schema: music
---
<a class="back-link-header link-icon flex-centered" href="/music">{% tablericon "arrow-left" "Go back" %} Go back</a>
{% if pagination.pageNumber == 0 %}
<h2 class="page-header">{{ title }}</h2>
<p>I've listened to <strong class="highlight-text">{{ music.month.albums.size }} albums</strong> this month and most of what I've listened to has been {{ music.month.genres | sortByPlaysDescending: "plays" | genreStrings: "genre" | mediaLinks: "genre", 5 }}.</p>
<p><strong class="highlight-text">See my</strong> <a href="/music/artists/this-month/">artists</a> or <a href="/music/tracks/this-month/">tracks</a> for this period.</p>
{% render "partials/media/music/period/grid.liquid" data:pagination %}
<hr class="large-spacing" />
{% endif %}
{% render "partials/media/grid.liquid" data:pagination, shape: "square" %}