fix: label

This commit is contained in:
Cory Dransfeldt 2024-08-28 15:01:05 -07:00
parent d16c6ab038
commit fc62bdf104
No known key found for this signature in database
4 changed files with 19 additions and 5 deletions
package-lock.jsonpackage.json
src
includes/partials/blocks
pages/dynamic/music/artists

4
package-lock.json generated
View file

@ -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",

View file

@ -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": {

View file

@ -7,7 +7,14 @@
</p>
<ul>
{% for artist in artists %}
<li><a href="{{ artist.url }}">{{ artist.name }}</a>{%- if artist.total_plays > 0 -%}: <strong class="highlight-text">{{ artist.total_plays }} plays</strong>{%- endif -%}</li>
{%- capture playLabel -%}
{%- if artist.total_plays == 1 -%}
play
{%- else -%}
plays
{%- endif -%}
{%- endcapture -%}
<li><a href="{{ artist.url }}">{{ artist.name }}</a>{%- if artist.total_plays > 0 -%}: <strong class="highlight-text">{{ artist.total_plays }} {{ playLabel }}</strong>{%- endif -%}</li>
{% endfor %}
</ul>
<hr />

View file

@ -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 -%}
<script>{{ js }}</script>
<noscript><style>[data-toggle-content].text-toggle-hidden {height: unset !important;overflow: unset !important;margin-bottom: unset !important;}[data-toggle-content].text-toggle-hidden::after {display: none !important;}</style></noscript>
<a href="/music" title="Go back to the music index page">{% tablericon "arrow-left" "Go back to the music index page" %} Back to music</a>
@ -46,7 +53,7 @@ schema: artist
<p class="sub-meta tattoo">{% tablericon "needle" "Tattoo" %} I have a tattoo inspired by this artist!</p>
{%- endif -%}
{%- if artist.totalPlays > 0 -%}
<p class="sub-meta"><strong class="highlight-text">{{ artist.totalPlays }} plays</strong></p>
<p class="sub-meta"><strong class="highlight-text">{{ artist.totalPlays }} {{ playLabel }}</strong></p>
{%- endif -%}
<p class="sub-meta">
<a href="/music/genres/{{ artist.genre | replace: '/', '-' | slugify | downcase }}" title="Learn more about {{ artist.genre | escape }}">