This repository has been archived on 2025-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
coryd.dev-eleventy/src/pages/main/books/book.html
Cory Dransfeldt 88a4ec4acd
# This is a combination of 3 commits.
# This is the 1st commit message:

fix: redirects + update root cdn url

# This is the commit message #2:

chore: workflow

# This is the commit message #3:

chore: naming
2024-06-09 11:16:24 -07:00

56 lines
No EOL
2 KiB
HTML

---
layout: default
pagination:
data: books
size: 1
alias: book
permalink: "/books/{{ book.isbn }}/index.html"
isbn: {{ book.isbn }}
schema: book
---
{%- capture alt -%}
{{ book.title }}{% if book.authors %}By {{ book.authors }}{% endif %}
{%- endcapture -%}
<a class="back-link-header link-icon flex-centered" href="/books" title="Go back to the books index page">{% tablericon "arrow-left" "Go back" %} Go back</a>
<article class="book-focus">
<div class="book-display">
<img
srcset="
https://cdn.coryd.dev{{ book.image }}?w=203&aspect_ratio=2:3 203w,
https://cdn.coryd.dev{{ book.image }}?w=406&aspect_ratio=2:3 406w,
https://cdn.coryd.dev{{ book.image }}?w=812&aspect_ratio=2:3 812w,
https://cdn.coryd.dev{{ book.image }}?w=1624&aspect_ratio=2:3 1624w
"
sizes="(max-width: 450px) 203px,
(max-width: 850px) 406px,
(max-width: 1000px) 812px,
1624px"
src="https://cdn.coryd.dev{{ book.image }}?w=1624&aspect_ratio=2:3"
alt="{{ alt }}"
loading="eager"
decoding="async"
width="203"
height="309"
/>
<div class="book-meta">
<p class="title"><strong>{{ book.title }}</strong></p>
{% if book.rating %}<p>{{ book.rating }}</p>{% endif %}
{% if book.author %}
<p class="sub-meta">By {{ book.author }}</p>
{% endif %}
{% if book.status == 'finished' %}
<p class="sub-meta">Finished on: {{ book.date | date: "%B %e, %Y" }}</p>
{% endif %}
{% unless book.status == 'finished' %}
{%- assign percentage = book.progress | append: '%' -%}
{% render "partials/media/progress-bar.liquid", percentage:percentage %}
{% endunless %}
<p class="sub-meta"><a href="https://openlibrary.org/isbn/{{ book.isbn }}" title="View {{ book.title | escape }} on Open Library">View on Open Library</a></p>
</div>
</div>
{% if book.review %}
{{ book.review | markdown }}
<hr class="large-spacing" />
{% endif %}
{% if book.description %}<em>{{ book.description }}</em>{% endif %}
</article>