feat: associate books and movies
This commit is contained in:
parent
c83aea01f8
commit
d1e3ab23bb
9 changed files with 72 additions and 9 deletions
|
@ -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 }}
|
||||
|
|
|
@ -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 -%}
|
||||
|
|
|
@ -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 }}
|
||||
|
|
Reference in a new issue