feat: associate movies and artists

This commit is contained in:
Cory Dransfeldt 2024-08-23 21:40:13 -07:00
parent b2eb6112ec
commit 7e1a55754b
No known key found for this signature in database
8 changed files with 99 additions and 37 deletions

View file

@ -93,7 +93,7 @@ schema: artist
{%- if artist.books -%}
<hr />
<p id="books" class="books">
{% tablericon "books" "books" %}
{% tablericon "books" "Books" %}
I've read about this artist!
</p>
<ul>
@ -102,7 +102,26 @@ schema: artist
{% endfor %}
</ul>
{%- endif -%}
{%- if artist.books or artist.concerts -%}<hr />{%- endif -%}
{%- if artist.movies -%}
{%- capture sectionTitle -%}
{% if artist.movies.size > 1 %}
I've watched a movie about this artist!
{% else %}
I've watched a movie about this artist!
{%- endif -%}
{%- endcapture -%}
<hr />
<p id="movies" class="movies">
{% tablericon "device-tv-old" "Movies" %}
{{ sectionTitle}}
</p>
<ul>
{% for movie in artist.movies %}
<li><a href="{{ movie.url }}">{{ movie.title }}</a> ({{ movie.year }})</li>
{% endfor %}
</ul>
{%- endif -%}
{%- if artist.books or artist.concerts or artist.movies -%}<hr />{%- endif -%}
<table>
<tr>
<th>Album</th>

View file

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