fix: only show genre blurb if there's data

This commit is contained in:
Cory Dransfeldt 2024-07-01 15:15:45 -07:00
parent e30582d502
commit 9d5227e54d
No known key found for this signature in database
3 changed files with 5 additions and 3 deletions

View file

@ -24,8 +24,10 @@ schema: genre
<a class="back-link-header link-icon" href="/music" title="Go back to the music index page">{% tablericon "arrow-left" "Go back to the music index page" %} Back to music</a>
<h2 class="page-header">{{ genre.name }}</h2>
<article class="genre-focus">
{%- if genre.total_plays > 0 -%}
<p>My top <strong class="highlight-text">{{ genre.name }}</strong> artists {{ connectingWord }} {{ genre.artists | sortByPlaysDescending: "total_plays" | mediaLinks: "artist", 5 }}. I've listened to <strong class="highlight-text">{{ genre.total_plays | formatNumber }}</strong> tracks form this genre.</p>
<hr />
{% endif %}
{%- if genre.description -%}
<div data-toggle-content class="text-toggle-hidden">
{{ genre.description | markdown }}