feat: bespoke func to alias artists with too many names (thanks John Dwyer)

This commit is contained in:
Cory Dransfeldt 2023-06-27 10:45:39 -07:00
parent f38ad40801
commit 8c000990b2
No known key found for this signature in database
2 changed files with 24 additions and 8 deletions

View file

@ -56,17 +56,17 @@ layout: main
</h2>
<div class="grid grid-cols-2 gap-2 md:grid-cols-4 not-prose">
{% for artist in music.artists %}
<a href="https://rateyourmusic.com/search?searchterm={{ artist.name | escape }}" title="{{artist.name | escape}}">
<a href="https://rateyourmusic.com/search?searchterm={{ artist.artist | escape }}" title="{{artist.artist | escape}}">
<div class="relative block">
<div class="absolute left-0 top-0 h-full w-full rounded-lg border border-purple-600 hover:border-purple-500 bg-cover-gradient dark:border-purple-400 dark:hover:border-purple-500"></div>
<div class="absolute left-1 bottom-2 drop-shadow-md">
<div class="px-1 text-xs font-bold text-white line-clamp-2">{{ artist.name }}</div>
<div class="px-1 text-xs font-bold text-white line-clamp-2">{{ artist.artist }}</div>
<div class="px-1 text-xs text-white">
{{ artist.plays }} plays
</div>
</div>
{%- capture artistImg %}{{ artist.name | artist }}{% endcapture -%}
{%- capture artistName %}{{ artist.name | escape }}{% endcapture -%}
{%- capture artistImg %}{{ artist.artist | artist }}{% endcapture -%}
{%- capture artistName %}{{ artist.artist | escape }}{% endcapture -%}
{% image artistImg, artistName, 'rounded-lg', '225px', 'eager' %}
</div>
</a>