chore: refactor book data

This commit is contained in:
Cory Dransfeldt 2023-06-28 20:18:39 -07:00
parent 44937c864c
commit b58ea63bc1
No known key found for this signature in database
4 changed files with 31 additions and 33 deletions

View file

@ -119,13 +119,13 @@ layout: main
</h2>
<div class="grid grid-cols-3 gap-2 md:grid-cols-6 not-prose">
{% for book in books %}
<a href="{{book.link}}" title="{{book.title | escape}}">
<div class="relative block" style="max-width:226px">
<a href="{{book.url}}" title="{{book.title | escape}}">
<div class="relative block" style="max-height:226px">
<div class="absolute left-0 top-0 h-full w-full rounded-lg border border-purple-600 hover:border-purple-500 bg-cover-gradient dark:border-purple-400 dark:hover:border-purple-500"></div>
<div class="absolute left-1 bottom-2 drop-shadow-md">
<div class="px-1 text-xs font-bold text-white line-clamp-3">{{ book.title }}</div>
</div>
{%- capture bookImg %}{{book.image | cdn: site.oku-host, site.cdn-books}}{% endcapture -%}
{%- capture bookImg %}{{book.cover}}{% endcapture -%}
{%- capture bookName %}{{book.title | escape}}{% endcapture -%}
{% image bookImg, bookName, 'rounded-lg w-full', '180px' %}
</div>