feat: associate books and artists

This commit is contained in:
Cory Dransfeldt 2024-08-23 17:04:36 -07:00
parent 40ad47aacb
commit fdf0ebf2ca
No known key found for this signature in database
12 changed files with 97 additions and 28 deletions

View file

@ -54,6 +54,25 @@ schema: book
{{ book.review | markdown }}
<hr />
{% endif %}
{%- if book.artists -%}
{%- capture sectionTitle -%}
{% if book.artists.size > 1 %}
I listen to artists featured in this book!
{% else %}
I listen to the artist featured in this book!
{%- endif -%}
{%- endcapture -%}
<p id="artists" class="music flex-centered">
{% tablericon "headphones" "Music" %}
{{ sectionTitle }}
</p>
<ul>
{% for artist in book.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>
{% endfor %}
</ul>
<hr />
{%- endif -%}
{% if book.description %}
<h3>Overview</h3>
{{ book.description | markdown }}