chore: modularize now page
This commit is contained in:
parent
c5c04214cc
commit
cc6d813fed
10 changed files with 196 additions and 188 deletions
18
src/_includes/partials/now/books.liquid
Normal file
18
src/_includes/partials/now/books.liquid
Normal file
|
@ -0,0 +1,18 @@
|
|||
{% if books.size > 0 %}
|
||||
<h2 class="m-0 text-xl flex flex-row items-center font-black leading-tight tracking-normal dark:text-gray-200 md:text-2xl mt-8 mb-4">
|
||||
{% heroicon "outline" "book-open" "Books" "height=28" %}
|
||||
<div class="ml-1">Books</div>
|
||||
</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">
|
||||
<div class="absolute left-0 top-0 h-full w-full rounded-lg border border-purple-600 hover:border-purple-500 dark:border-purple-400 dark:hover:border-purple-500"></div>
|
||||
{%- capture bookImg %}{{book.cover}}{% endcapture -%}
|
||||
{%- capture bookName %}{{book.title | escape}}{% endcapture -%}
|
||||
{% image bookImg, bookName, 'rounded-lg w-full h-full', '180px' %}
|
||||
</div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
Reference in a new issue