feat: associate books and artists

This commit is contained in:
Cory Dransfeldt 2024-08-23 17:04:36 -07:00
parent 40ad47aacb
commit fdf0ebf2ca
No known key found for this signature in database
12 changed files with 97 additions and 28 deletions

View file

@ -54,6 +54,25 @@ schema: book
{{ 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 flex-centered">
{% 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.description %}
<h3>Overview</h3>
{{ book.description | markdown }}

View file

@ -11,7 +11,7 @@ schema: books
<h2>Currently reading</h2>
<p>Here's what I'm reading at the moment. I've finished <strong class="highlight-text">{{ currentBookCount }} books</strong> this year.</p>
<p>{{ books.years | bookYearLinks }}</p>
{% render "partials/blocks/banners/rss.liquid", url: "https://coryd.dev/feeds/books", text: "Subscribe to my books feed or follow along on this page" %}
{% render "partials/blocks/banners/rss.liquid", url: "/feeds/books", text: "Subscribe to my books feed or follow along on this page" %}
<hr />
{% for book in bookData %}
{% capture alt %}{{ book.title }} by {{ book.authors }}{% endcapture %}

View file

@ -10,7 +10,7 @@ permalink: "/links/{% if pagination.pageNumber > 0 %}{{ pagination.pageNumber }}
{% if pagination.pageNumber == 0 %}
<h2>Links</h2>
<p>These are links I've liked or otherwise found interesting. They're all added manually, after having been read and, I suppose, properly considered.</p>
{% render "partials/blocks/banners/rss.liquid", url: "https://coryd.dev/feeds/links", text: "Subscribe to my links feed or follow along on this page" %}
{% render "partials/blocks/banners/rss.liquid", url: "/feeds/links", text: "Subscribe to my links feed or follow along on this page" %}
<hr />
{% endif %}
<div class="link-grid">

View file

@ -89,8 +89,20 @@ schema: artist
</li>
{% endfor %}
</ul>
<hr />
{%- endif -%}
{%- if artist.books -%}
<hr />
<p id="books" class="books flex-centered">
{% 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.books or artist.concerts -%}<hr />{%- endif -%}
<table>
<tr>
<th>Album</th>

View file

@ -10,7 +10,7 @@ schema: watching
<h2 class="watching">{{ title }}</h2>
{% render "partials/media/watching/hero.liquid" movie:featuredMovie %}
<p>Here's all of the TV and movies I've been watching presented in what is (hopefully) an organized fashion.</p>
{% render "partials/blocks/banners/rss.liquid", url: "https://coryd.dev/feeds/movies", text: "Subscribe to my movies feed or follow along on this page" %}
{% render "partials/blocks/banners/rss.liquid", url: "/feeds/movies", text: "Subscribe to my movies feed or follow along on this page" %}
<hr />
<h3 id="movies" class="section-header">
<a href="/watching/recent/movies">