chore: remove code duplication and clean up
This commit is contained in:
parent
5a402c4def
commit
694dae0b06
34 changed files with 246 additions and 292 deletions
|
@ -9,7 +9,10 @@ permalink: "/music/albums/three-months/{% if pagination.pageNumber > 0 %}{{ pagi
|
|||
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.threeMonth.albums.size }} albums</strong> over the last 3 months and most of what I've listened to has been {{ music.threeMonth.genres | sortByPlaysDescending: "plays" | genreStrings: "genre" | mediaLinks: "genre", 5 }}.</p>
|
||||
<p><strong class="highlight-text">See my</strong> <a href="/music/artists/three-months/">artists</a> or <a href="/music/tracks/three-months/">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" %}
|
|
@ -9,7 +9,10 @@ permalink: "/music/albums/all-time/{% if pagination.pageNumber > 0 %}{{ paginati
|
|||
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.allTime.albums.size }} albums</strong> and most of what I listen to is {{ music.allTime.genres | sortByPlaysDescending: "plays" | genreStrings: "genre" | mediaLinks: "genre", 5 }}.</p>
|
||||
<p><strong class="highlight-text">See my</strong> <a href="/music/artists/all-time/">artists</a> or <a href="/music/tracks/all-time/">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" %}
|
|
@ -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" %}
|
|
@ -9,7 +9,10 @@ permalink: "/music/albums/this-week/{% if pagination.pageNumber > 0 %}{{ paginat
|
|||
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.week.albums.size }} albums</strong> this week and most of what I've listened to has been {{ music.week.genres | sortByPlaysDescending: "plays" | genreStrings: "genre" | mediaLinks: "genre", 5 }}.</p>
|
||||
<p><strong class="highlight-text">See my</strong> <a href="/music/artists/this-week/">artists</a> or <a href="/music/tracks/this-week/">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" %}
|
|
@ -9,7 +9,10 @@ permalink: "/music/artists/three-months/{% if pagination.pageNumber > 0 %}{{ pag
|
|||
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.threeMonth.artists.size }} artists</strong> over the last 3 months and most of what I've listened to has been {{ music.threeMonth.genres | sortByPlaysDescending: "plays" | genreStrings: "genre" | mediaLinks: "genre", 5 }}.</p>
|
||||
<p><strong class="highlight-text">See my</strong> <a href="/music/albums/three-months/">albums</a> or <a href="/music/tracks/three-months/">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" %}
|
|
@ -9,7 +9,10 @@ permalink: "/music/artists/all-time/{% if pagination.pageNumber > 0 %}{{ paginat
|
|||
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.allTime.artists.size }} artists</strong> and most of what I listen to is {{ music.allTime.genres | sortByPlaysDescending: "plays" | genreStrings: "genre" | mediaLinks: "genre", 5 }}.</p>
|
||||
<p><strong class="highlight-text">See my</strong> <a href="/music/albums/all-time/">albums</a> or <a href="/music/tracks/all-time/">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" %}
|
|
@ -9,7 +9,10 @@ permalink: "/music/artists/this-month/{% if pagination.pageNumber > 0 %}{{ pagin
|
|||
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.artists.size }} artists</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/albums/this-month/">albums</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" %}
|
|
@ -9,7 +9,10 @@ permalink: "/music/artists/this-week/{% 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.week.artists.size }} artists</strong> this week and most of what I've listened to has been {{ music.week.genres | sortByPlaysDescending: "plays" | genreStrings: "genre" | mediaLinks: "genre", 5 }}.</p>
|
||||
<p><strong class="highlight-text">See my</strong> <a href="/music/albums/this-week/">albums</a> or <a href="/music/tracks/this-week/">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" %}
|
|
@ -78,19 +78,19 @@ schema: music
|
|||
</div>
|
||||
</div>
|
||||
<div id="tracks-recent">
|
||||
{% render "partials/media/music/tracks/recent", data:music.recent.tracksChronological %}
|
||||
{% render "partials/media/music/recent", data:music.recent.tracksChronological %}
|
||||
</div>
|
||||
<div class="hidden" id="tracks-window">
|
||||
{% render "partials/media/music/tracks/chart.liquid", data:music.week.tracks, mostPlayed:music.week.tracks[0].plays %}
|
||||
{% render "partials/media/music/chart.liquid", data:music.week.tracks, mostPlayed:music.week.tracks[0].plays, count: 10 %}
|
||||
</div>
|
||||
<div class="hidden" id="tracks-month">
|
||||
{% render "partials/media/music/tracks/chart.liquid", data:music.month.tracks, mostPlayed:music.month.tracks[0].plays %}
|
||||
{% render "partials/media/music/chart.liquid", data:music.month.tracks, mostPlayed:music.month.tracks[0].plays, count: 10 %}
|
||||
</div>
|
||||
<div class="hidden" id="tracks-three-months">
|
||||
{% render "partials/media/music/tracks/chart.liquid", data:music.threeMonth.tracks, mostPlayed:music.threeMonth.tracks[0].plays %}
|
||||
{% render "partials/media/music/chart.liquid", data:music.threeMonth.tracks, mostPlayed:music.threeMonth.tracks[0].plays, count: 10 %}
|
||||
</div>
|
||||
<div class="hidden" id="tracks-all-time">
|
||||
{% render "partials/media/music/tracks/chart.liquid", data:music.allTime.tracks, mostPlayed:music.allTime.tracks[0].plays %}
|
||||
{% render "partials/media/music/chart.liquid", data:music.allTime.tracks, mostPlayed:music.allTime.tracks[0].plays, count: 10 %}
|
||||
</div>
|
||||
<p><strong class="highlight-text">More:</strong> <a href="/music/tracks/this-week/">This week</a> • <a href="/music/tracks/this-month/">This month</a> • <a href="/music/tracks/three-months/">3 months</a> • <a href="/music/tracks/all-time/">All time</a></p>
|
||||
{% render "partials/media/music/releases.liquid", albumReleases:albumReleases %}
|
|
@ -9,7 +9,10 @@ permalink: "/music/tracks/three-months/{% if pagination.pageNumber > 0 %}{{ pagi
|
|||
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.threeMonth.totalTracks }} tracks</strong> over the last 3 months and most of what I've listened to has been <strong class="highlight-text">{{ music.threeMonth.genres | listToString: "genre", 5 }}</strong>.</p>
|
||||
<p><strong class="highlight-text">See my</strong> <a href="/music/artists/three-months/">artists</a> or <a href="/music/albums/three-months/">albums</a> for this period.</p>
|
||||
{% render "partials/media/music/period/chart.liquid" data:pagination, playTotal: music.threeMonth.tracks[0].plays %}
|
||||
<hr class="large-spacing" />
|
||||
{% endif %}
|
||||
{% render "partials/media/music/chart.liquid" data:pagination, playTotal: music.threeMonth.tracks[0].plays %}
|
|
@ -9,7 +9,10 @@ permalink: "/music/tracks/all-time/{% if pagination.pageNumber > 0 %}{{ paginati
|
|||
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.allTime.totalTracks }} tracks</strong> and most of what I've listened to has been <strong class="highlight-text">{{ music.allTime.genres | listToString: "genre", 5 }}</strong>.</p>
|
||||
<p><strong class="highlight-text">See my</strong> <a href="/music/artists/all-time/">artists</a> or <a href="/music/albums/all-time/">albums</a> for this period.</p>
|
||||
{% render "partials/media/music/period/chart.liquid" data:pagination, playTotal: music.allTime.tracks[0].plays %}
|
||||
<hr class="large-spacing" />
|
||||
{% endif %}
|
||||
{% render "partials/media/music/chart.liquid" data:pagination, playTotal: music.allTime.tracks[0].plays %}
|
|
@ -9,7 +9,10 @@ permalink: "/music/tracks/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.totalTracks }} tracks</strong> this month and most of what I've listened to has been <strong class="highlight-text">{{ music.month.genres | listToString: "genre", 5 }}</strong>.</p>
|
||||
<p><strong class="highlight-text">See my</strong> <a href="/music/artists/this-month/">artists</a> or <a href="/music/albums/this-month/">albums</a> for this period.</p>
|
||||
{% render "partials/media/music/period/chart.liquid" data:pagination, playTotal: music.month.tracks[0].plays %}
|
||||
<hr class="large-spacing" />
|
||||
{% endif %}
|
||||
{% render "partials/media/music/chart.liquid" data:pagination, playTotal: music.month.tracks[0].plays %}
|
|
@ -9,7 +9,10 @@ permalink: "/music/tracks/this-week/{% if pagination.pageNumber > 0 %}{{ paginat
|
|||
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.week.totalTracks }} tracks</strong> this week and most of what I've listened to has been <strong class="highlight-text">{{ music.week.genres | listToString: "genre", 5 }}</strong>.</p>
|
||||
<p><strong class="highlight-text">See my</strong> <a href="/music/artists/this-week/">artists</a> or <a href="/music/albums/this-week/">albums</a> for this period.</p>
|
||||
{% render "partials/media/music/period/chart.liquid" data:pagination, playTotal: music.week.tracks[0].plays %}
|
||||
<hr class="large-spacing" />
|
||||
{% endif %}
|
||||
{% render "partials/media/music/chart.liquid" data:pagination, playTotal: music.week.tracks[0].plays %}
|
|
@ -14,4 +14,4 @@ schema: watching
|
|||
<p>These are my favorite movies. There are many like them, but these are mine.</p>
|
||||
<hr class="large-spacing" />
|
||||
{% endif %}
|
||||
{% render "partials/media/watching/backdrop-grid-paginated.liquid", data:pagination %}
|
||||
{% render "partials/media/watching/backdrop-grid.liquid", data:pagination %}
|
|
@ -14,4 +14,4 @@ schema: watching
|
|||
<p>These are my favorite shows. There are many like them, but these are mine.</p>
|
||||
<hr class="large-spacing" />
|
||||
{% endif %}
|
||||
{% render "partials/media/watching/backdrop-grid-paginated.liquid", data:pagination %}
|
||||
{% render "partials/media/watching/backdrop-grid.liquid", data:pagination %}
|
|
@ -14,4 +14,4 @@ schema: watching
|
|||
<p>These are the movies I've watched recently. There are many like them, but these are mine. (Or well, all the movies I've watched — they're ordered latest watched, descending, hence the recent part).</p>
|
||||
<hr class="large-spacing" />
|
||||
{% endif %}
|
||||
{% render "partials/media/watching/backdrop-grid-paginated.liquid", data:pagination %}
|
||||
{% render "partials/media/watching/backdrop-grid.liquid", data:pagination %}
|
|
@ -14,4 +14,4 @@ schema: watching
|
|||
<p>These are the shows I've watched recently. There are many like them, but these are mine. (Or well, all the movies I've watched — they're ordered latest watched, descending, hence the recent part).</p>
|
||||
<hr class="large-spacing" />
|
||||
{% endif %}
|
||||
{% render "partials/media/watching/backdrop-grid-paginated.liquid", data:pagination %}
|
||||
{% render "partials/media/watching/backdrop-grid.liquid", data:pagination %}
|
Reference in a new issue