fix: label
This commit is contained in:
parent
d16c6ab038
commit
fc62bdf104
4 changed files with 19 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": "24.1.5",
|
"version": "24.1.6",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "24.1.5",
|
"version": "24.1.6",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@cdransf/api-text": "^1.5.0",
|
"@cdransf/api-text": "^1.5.0",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "coryd.dev",
|
"name": "coryd.dev",
|
||||||
"version": "24.1.5",
|
"version": "24.1.6",
|
||||||
"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": {
|
||||||
|
|
|
@ -7,7 +7,14 @@
|
||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
{% for artist in artists %}
|
{% 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 %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
<hr />
|
<hr />
|
||||||
|
|
|
@ -14,6 +14,13 @@ schema: artist
|
||||||
{%- capture js -%}
|
{%- capture js -%}
|
||||||
{% render "../../../../assets/scripts/text-toggle.js" %}
|
{% render "../../../../assets/scripts/text-toggle.js" %}
|
||||||
{%- endcapture -%}
|
{%- endcapture -%}
|
||||||
|
{%- capture playLabel -%}
|
||||||
|
{%- if artist.totalPlays == 1 -%}
|
||||||
|
play
|
||||||
|
{%- else -%}
|
||||||
|
plays
|
||||||
|
{%- endif -%}
|
||||||
|
{%- endcapture -%}
|
||||||
<script>{{ js }}</script>
|
<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>
|
<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>
|
<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>
|
<p class="sub-meta tattoo">{% tablericon "needle" "Tattoo" %} I have a tattoo inspired by this artist!</p>
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
{%- if artist.totalPlays > 0 -%}
|
{%- 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 -%}
|
{%- endif -%}
|
||||||
<p class="sub-meta">
|
<p class="sub-meta">
|
||||||
<a href="/music/genres/{{ artist.genre | replace: '/', '-' | slugify | downcase }}" title="Learn more about {{ artist.genre | escape }}">
|
<a href="/music/genres/{{ artist.genre | replace: '/', '-' | slugify | downcase }}" title="Learn more about {{ artist.genre | escape }}">
|
||||||
|
|
Reference in a new issue