From fc62bdf104377ffc28d9f5ce5da5c8a1ed8b5370 Mon Sep 17 00:00:00 2001 From: Cory Dransfeldt Date: Wed, 28 Aug 2024 15:01:05 -0700 Subject: [PATCH] fix: label --- package-lock.json | 4 ++-- package.json | 2 +- src/includes/partials/blocks/associated-media.liquid | 9 ++++++++- src/pages/dynamic/music/artists/artist.html | 9 ++++++++- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9966babf..38598feb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "coryd.dev", - "version": "24.1.5", + "version": "24.1.6", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "coryd.dev", - "version": "24.1.5", + "version": "24.1.6", "license": "MIT", "dependencies": { "@cdransf/api-text": "^1.5.0", diff --git a/package.json b/package.json index 63e2c32a..9313ff20 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "coryd.dev", - "version": "24.1.5", + "version": "24.1.6", "description": "The source for my personal site. Built using 11ty (and other tools).", "type": "module", "scripts": { diff --git a/src/includes/partials/blocks/associated-media.liquid b/src/includes/partials/blocks/associated-media.liquid index 7ae86991..b7caac12 100644 --- a/src/includes/partials/blocks/associated-media.liquid +++ b/src/includes/partials/blocks/associated-media.liquid @@ -7,7 +7,14 @@


diff --git a/src/pages/dynamic/music/artists/artist.html b/src/pages/dynamic/music/artists/artist.html index dac8ed52..2fa3080d 100644 --- a/src/pages/dynamic/music/artists/artist.html +++ b/src/pages/dynamic/music/artists/artist.html @@ -14,6 +14,13 @@ schema: artist {%- capture js -%} {% render "../../../../assets/scripts/text-toggle.js" %} {%- endcapture -%} +{%- capture playLabel -%} + {%- if artist.totalPlays == 1 -%} + play + {%- else -%} + plays + {%- endif -%} +{%- endcapture -%} {% tablericon "arrow-left" "Go back to the music index page" %} Back to music @@ -46,7 +53,7 @@ schema: artist

{% tablericon "needle" "Tattoo" %} I have a tattoo inspired by this artist!

{%- endif -%} {%- if artist.totalPlays > 0 -%} -

{{ artist.totalPlays }} plays

+

{{ artist.totalPlays }} {{ playLabel }}

{%- endif -%}