fix: genre control flow
This commit is contained in:
parent
9c8e07bd8a
commit
23906da619
3 changed files with 6 additions and 5 deletions
4
package-lock.json
generated
4
package-lock.json
generated
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "21.6.2",
|
"version": "21.6.3",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "21.6.2",
|
"version": "21.6.3",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@cdransf/api-text": "^1.4.0",
|
"@cdransf/api-text": "^1.4.0",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "21.6.2",
|
"version": "21.6.3",
|
||||||
"description": "The source for my personal site. Built using 11ty (and other tools).",
|
"description": "The source for my personal site. Built using 11ty (and other tools).",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -16,6 +16,7 @@ schema: genre
|
||||||
is
|
is
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- endcapture -%}
|
{%- endcapture -%}
|
||||||
|
{%- assign mediaLinks = genre.artists | sortByPlaysDescending: "total_plays" | mediaLinks: "artist", 5 -%}
|
||||||
{%- capture js -%}
|
{%- capture js -%}
|
||||||
{% render "../../../assets/scripts/text-toggle.js" %}
|
{% render "../../../assets/scripts/text-toggle.js" %}
|
||||||
{%- endcapture -%}
|
{%- endcapture -%}
|
||||||
|
@ -24,8 +25,8 @@ 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>
|
<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>
|
<h2 class="page-header">{{ genre.name }}</h2>
|
||||||
<article class="genre-focus">
|
<article class="genre-focus">
|
||||||
{%- if genre.total_plays > 0 -%}
|
{%- if mediaLinks -%}
|
||||||
<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>
|
<p>My top <strong class="highlight-text">{{ genre.name }}</strong> artists {{ connectingWord }} {{ mediaLinks }}. I've listened to <strong class="highlight-text">{{ genre.total_plays | formatNumber }}</strong> tracks form this genre.</p>
|
||||||
<hr />
|
<hr />
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{%- if genre.description -%}
|
{%- if genre.description -%}
|
||||||
|
|
Reference in a new issue