feat: associate books and movies

This commit is contained in:
Cory Dransfeldt 2024-08-24 12:40:27 -07:00
parent c83aea01f8
commit d1e3ab23bb
No known key found for this signature in database
9 changed files with 72 additions and 9 deletions

View file

@ -73,6 +73,25 @@ schema: book
</ul>
<hr />
{%- endif -%}
{%- if book.movies -%}
{%- capture sectionTitle -%}
{% if book.movies.size > 1 %}
I've watched movies related to this book!
{% else %}
I've watched a movie related to this book!
{%- endif -%}
{%- endcapture -%}
<hr />
<p id="movies" class="movies">
{% tablericon "device-tv-old" "Movies" %}
{{ sectionTitle }}
</p>
<ul>
{% for movie in book.movies %}
<li><a href="{{ movie.url }}">{{ movie.title }}</a> ({{ movie.year }})</li>
{% endfor %}
</ul>
{%- endif -%}
{% if book.description %}
<h3>Overview</h3>
{{ book.description | markdown }}

View file

@ -105,7 +105,7 @@ schema: artist
{%- if artist.movies -%}
{%- capture sectionTitle -%}
{% if artist.movies.size > 1 %}
I've watched a movie about this artist!
I've watched movies about this artist!
{% else %}
I've watched a movie about this artist!
{%- endif -%}

View file

@ -55,7 +55,7 @@ schema: movie
{% if movie.artists.size > 1 %}
I listen to artists featured in this movie!
{% else %}
I listen to the artist featured in this movie!
I listen to the artist featured in this movie!
{%- endif -%}
{%- endcapture -%}
<p id="artists" class="music">
@ -69,6 +69,18 @@ schema: movie
</ul>
<hr />
{%- endif -%}
{%- if movie.books -%}
<p id="books" class="books">
{% tablericon "books" "Books" %}
I've read about this movie!
</p>
<ul>
{% for book in movie.books %}
<li><a href="{{ book.url }}">{{ book.title }}</a> by {{ book.author }}</li>
{% endfor %}
</ul>
<hr />
{%- endif -%}
{% if movie.description %}
<h3>Overview</h3>
{{ movie.description | markdown }}