feat: associate movies and artists
This commit is contained in:
parent
b2eb6112ec
commit
7e1a55754b
8 changed files with 99 additions and 37 deletions
|
@ -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>
|
||||
|
|
|
@ -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 }}
|
||||
|
|
Reference in a new issue