feat: everything is related

This commit is contained in:
Cory Dransfeldt 2024-08-24 22:37:36 -07:00
parent d1e3ab23bb
commit 077c54d5fb
No known key found for this signature in database
20 changed files with 325 additions and 274 deletions

View file

@ -38,6 +38,12 @@ schema: book
{% if book.author %}
<p class="sub-meta">By {{ book.author }}</p>
{% endif %}
{%- if book.favorite -%}
<p class="sub-meta favorite">{% tablericon "heart" "Favorite" %} This is one of my favorite books!</p>
{%- endif -%}
{%- if book.tattoo -%}
<p class="sub-meta tattoo">{% tablericon "needle" "Tattoo" %} I have a tattoo inspired by this book!</p>
{%- endif -%}
{% if book.status == 'finished' %}
<p class="sub-meta">Finished on: {{ book.date | date: "%B %e, %Y" }}</p>
{% endif %}
@ -49,49 +55,15 @@ schema: book
</div>
</div>
{% if book.review %}
{% render "partials/blocks/banners/warning.liquid", text: "There are probably spoilers after this banner — this is a warning about them." %}
<h3>My thoughts</h3>
{{ book.review | markdown }}
<hr />
{% render "partials/blocks/banners/warning.liquid", text: "There are probably spoilers after this banner — this is a warning about them." %}
<h3>My thoughts</h3>
{{ 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">
{% 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.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 -%}
{% render "partials/blocks/associated-media.liquid", artists:book.artists %}
{% render "partials/blocks/associated-media.liquid", movies:book.movies %}
{% render "partials/blocks/associated-media.liquid", shows:book.shows %}
{% render "partials/blocks/associated-media.liquid", genres:book.genres %}
{% if book.description %}
<h3>Overview</h3>
{{ book.description | markdown }}

View file

@ -58,7 +58,10 @@ schema: artist
</p>
</div>
</div>
{% render "partials/blocks/associated-media.liquid", books:artist.books %}
{% render "partials/blocks/associated-media.liquid", movies:artist.movies %}
{%- if artist.description -%}
<h3>Overview</h3>
<div data-toggle-content class="text-toggle-hidden">{{ artist.description | markdown }}</div>
<button data-toggle-button>Show more</button>
{%- endif -%}
@ -90,37 +93,6 @@ schema: artist
{% endfor %}
</ul>
{%- endif -%}
{%- if artist.books -%}
<hr />
<p id="books" class="books">
{% tablericon "books" "Books" %}
I've read about this artist!
</p>
<ul>
{% for book in artist.books %}
<li><a href="{{ book.url }}">{{ book.title }}</a> by {{ book.author }}</li>
{% endfor %}
</ul>
{%- endif -%}
{%- if artist.movies -%}
{%- capture sectionTitle -%}
{% if artist.movies.size > 1 %}
I've watched movies 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>

View file

@ -26,15 +26,18 @@ schema: genre
<h2>{{ genre.name }}</h2>
<article class="genre-focus">
{%- if mediaLinks -%}
<p>My top <strong class="highlight-text">{{ genre.name }}</strong> artists {{ connectingWord }} {{ mediaLinks }}. I've listened to <strong class="highlight-text">{{ genre.total_plays | formatNumber }}</strong> tracks form this genre.</p>
<hr />
{% endif %}
<p>My top <strong class="highlight-text">{{ genre.name }}</strong> artists {{ connectingWord }} {{ mediaLinks }}. I've listened to <strong class="highlight-text">{{ genre.total_plays | formatNumber }}</strong> tracks form this genre.</p>
<hr />
{%- endif -%}
{% render "partials/blocks/associated-media.liquid", books:genre.books %}
{% render "partials/blocks/associated-media.liquid", movies:genre.movies %}
{%- if genre.description -%}
<div data-toggle-content class="text-toggle-hidden">
{{ genre.description | markdown }}
<p><a href="{{ genre.wiki_link }}">Continue reading at Wikipedia.</a></p>
<p><em>Wikipedia content provided under the terms of the <a href="https://creativecommons.org/licenses/by-sa/3.0/">Creative Commons BY-SA license</a></em></p>
</div>
<button data-toggle-button>Show more</button>
<h3>Overview</h3>
<div data-toggle-content class="text-toggle-hidden">
{{ genre.description | markdown }}
<p><a href="{{ genre.wiki_link }}">Continue reading at Wikipedia.</a></p>
<p><em>Wikipedia content provided under the terms of the <a href="https://creativecommons.org/licenses/by-sa/3.0/">Creative Commons BY-SA license</a></em></p>
</div>
<button data-toggle-button>Show more</button>
{%- endif -%}
</article>

View file

@ -41,46 +41,25 @@ schema: movie
{%- endif -%}
{% endif -%}
</p>
{%- if movie.favorite -%}
<p class="sub-meta favorite">{% tablericon "heart" "Favorite" %} This is one of my favorite movies!</p>
{%- endif -%}
{%- if movie.tattoo -%}
<p class="sub-meta tattoo">{% tablericon "needle" "Tattoo" %} I have a tattoo inspired by this movie!</p>
{%- endif -%}
{% if movie.lastWatched %}<p class="sub-meta">Last watched on {{ movie.lastWatched | date: "%B %e, %Y" }}.</p>{% endif %}
<p class="sub-meta"><a href="https://themoviedb.org/movie/{{ movie.id }}" title="View {{ movie.title | escape }} on TMDB">View on TMDB</a></p>
</div>
{% if movie.review %}
{% render "partials/blocks/banners/warning.liquid", text: "There are probably spoilers after this banner — this is a warning about them." %}
<h3>My thoughts</h3>
{{ movie.review | markdown }}
<hr />
{% render "partials/blocks/banners/warning.liquid", text: "There are probably spoilers after this banner — this is a warning about them." %}
<h3>My thoughts</h3>
{{ 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.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 -%}
{% render "partials/blocks/associated-media.liquid", shows:movie.shows %}
{% render "partials/blocks/associated-media.liquid", artists:movie.artists %}
{% render "partials/blocks/associated-media.liquid", books:movie.books %}
{% render "partials/blocks/associated-media.liquid", genres:movie.genres %}
{% if movie.description %}
<h3>Overview</h3>
{{ movie.description | markdown }}

View file

@ -34,6 +34,12 @@ schema: show
/>
<div class="watching-meta">
<p class="title"><strong>{{ show.title }}</strong>{%- if show.year %} ({{ show.year }}){%- endif -%}</p>
{%- if show.favorite -%}
<p class="sub-meta favorite">{% tablericon "heart" "Favorite" %} This is one of my favorite shows!</p>
{%- endif -%}
{%- if show.tattoo -%}
<p class="sub-meta tattoo">{% tablericon "needle" "Tattoo" %} I have a tattoo inspired by this show!</p>
{%- endif -%}
{%- if lastWatched -%}
{%- capture lastWatchedText -%}
{%- if show.episodes -%}
@ -47,11 +53,13 @@ schema: show
<p class="sub-meta"><a href="https://themoviedb.org/tv/{{ show.tmdb_id }}" title="View {{ show.title | escape }} on TMDB">View on TMDB</a></p>
</div>
{% if show.review %}
{% render "partials/blocks/banners/warning.liquid", text: "There are probably spoilers after this banner — this is a warning about them." %}
<h3>My thoughts</h3>
{{ show.review | markdown }}
<hr />
{% render "partials/blocks/banners/warning.liquid", text: "There are probably spoilers after this banner — this is a warning about them." %}
<h3>My thoughts</h3>
{{ show.review | markdown }}
<hr />
{% endif %}
{% render "partials/blocks/associated-media.liquid", movies:show.movies %}
{% render "partials/blocks/associated-media.liquid", books:show.books %}
{% if show.description %}
<h3>Overview</h3>
{{ show.description | markdown }}