chore: book meta + og images

This commit is contained in:
Cory Dransfeldt 2024-05-21 12:40:29 -07:00
parent 3ccc07ee63
commit 41d3d4b8c3
No known key found for this signature in database
2 changed files with 7 additions and 1 deletions

View file

@ -0,0 +1,26 @@
---
layout: default
pagination:
data: books
size: 1
alias: book
permalink: /books/{{ book.isbn }}/
isbn: {{ book.isbn }}
schema: book
---
<a class="back-link-header link-icon flex-centered" href="/books">{% tablericon "arrow-left" "Go back" %} Go back</a>
<article class="book-focus">
<div class="book-display">
<img src="https://coryd.dev/.netlify/images/?url={{ book.image }}&fm=webp&q=85&w=137&h=209&fit=cover" alt="{{ alt }}" loading="eager" decoding="async" width="137" height="209" />
<div class="book-meta">
<p class="title"><strong>{{ book.title }}</strong></p>
{% if book.rating %}<p>{{ book.rating }}</p>{% endif %}
{% if book.authors or book.categories %}
<p class="sub-meta">{% if book.authors %}By {{ book.authors }}{% endif %}{% if book.categories %}{% if book.authors %} • {% endif %}{{ book.categories }}{% endif %}</p>
{% endif %}
{% if book.status == 'finished' %}<p class="sub-meta">Finished on: {{ book.date | date: "%B %e, %Y" }}</p>{% endif %}
<p class="sub-meta"><a href="https://openlibrary.org/isbn/{{ book.isbn }}">View on Open Library</a></p>
</div>
</div>
{% if book.description %}<p><em>{{ book.description }}</em></p>{% endif %}
</article>