59 lines
2 KiB
HTML
59 lines
2 KiB
HTML
---
|
|
title: Books
|
|
description: Here's what I'm reading at the moment.
|
|
permalink: "/reading/index.html"
|
|
schema: books
|
|
updated: "now"
|
|
---
|
|
{%- assign currentYear = 'now' | date: "%Y" -%}
|
|
{%- assign bookData = books.all | filterBooksByStatus: 'started' | reverse -%}
|
|
{%- assign currentBookCount = books.currentYear | size -%}
|
|
<h2 class="page-title">Reading</h2>
|
|
<p>Here's what I'm reading at the moment. I've finished <mark>{{ currentBookCount }} books</mark> this year. I've read <mark>{{ books.daysRead }}</mark> days in a row and counting.</p>
|
|
{% render "blocks/top-tags.liquid"
|
|
label:"Top genres"
|
|
tags:topTags.books_genres
|
|
%}
|
|
<p class="book-years">{{ books.years | bookYearLinks }}</p>
|
|
{% render "blocks/banners/rss.liquid",
|
|
url: "/feeds/books.xml",
|
|
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="
|
|
{{ globals.cdn_url }}{{ book.image }}?class=verticalsm&type=webp 200w,
|
|
{{ globals.cdn_url }}{{ book.image }}?class=verticalmd&type=webp 400w
|
|
"
|
|
sizes="(max-width: 450px) 200px,
|
|
400px"
|
|
src="{{ globals.cdn_url }}{{ book.image }}?class=verticalsm&type=webp"
|
|
alt="{{ alt | replaceQuotes }}"
|
|
loading="lazy"
|
|
decoding="async"
|
|
width="200"
|
|
height="307"
|
|
/>
|
|
</a>
|
|
<div class="media-meta">
|
|
<a href="{{ book.url }}">
|
|
<h2>{{ book.title }}</h2>
|
|
</a>
|
|
{% if book.author %}
|
|
<span class="sub-meta">By {{ book.author }}</span>
|
|
{% endif %}
|
|
{% if book.progress %}
|
|
{% render "media/progress-bar.liquid",
|
|
percentage:book.progress
|
|
%}
|
|
{% endif %}
|
|
{% if book.description %}
|
|
<div class="description">{{ book.description | normalize_whitespace | markdown | htmlTruncate }}</div>
|
|
{% endif %}
|
|
</div>
|
|
</article>
|
|
{% endfor %}
|