chore: clearer organizational distinction between data-generated (dynamic) pages and strictly markdown ones

This commit is contained in:
Cory Dransfeldt 2024-07-16 15:37:30 -07:00
parent a8beefaa4a
commit 4dca0dfb3e
No known key found for this signature in database
36 changed files with 541 additions and 198 deletions

View file

@ -0,0 +1,53 @@
---
title: Currently reading / Books
description: Here's what I'm reading at the moment.
layout: default
permalink: "/books/index.html"
updated: "now"
schema: books
---
{%- assign bookData = books.all | bookStatus: 'started' | reverse -%}
{%- assign currentBookCount = books.all | currentBookCount -%}
<h2 class="page-header">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://feedpress.me/coryd-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 %}
<article class="book-entry">
<a href="{{ book.url }}">
<img
srcset="
https://cdn.coryd.dev{{ book.image }}?class=verticalsm 200w,
https://cdn.coryd.dev{{ book.image }}?class=verticalmd 400w,
https://cdn.coryd.dev{{ book.image }}?class=verticalbase 800w,
https://cdn.coryd.dev{{ book.image }}?class=verticallg 1200w
"
sizes="(max-width: 450px) 200px,
(max-width: 850px) 400px,
(max-width: 1000px) 800px,
1200px"
src="https://cdn.coryd.dev{{ book.image }}?class=verticallg 1200w"
alt="{{ alt }}"
loading="eager"
decoding="async"
width="200"
height="307"
/>
</a>
<div class="book-meta">
<a href="{{ book.url }}">
<p class="title"><strong>{{ book.title }}</strong></p>
</a>
{% if book.author %}
<p class="sub-meta">By {{ book.author }}</p>
{% endif %}
{% if book.progress %}
{%- assign percentage = book.progress | append: '%' -%}
{% render "partials/media/progress-bar.liquid", percentage:percentage %}
{% endif %}
{% if book.description %}<div class="description">{{ book.description | markdown | truncate: 300 }}</div>{% endif %}
</div>
</article>
{% endfor %}