chore: configurable loading
This commit is contained in:
parent
4108ce86ef
commit
a05666f1c7
4 changed files with 12 additions and 4 deletions
|
@ -3,7 +3,7 @@ layout: main
|
|||
---
|
||||
{% render "partials/header.liquid", site: site, page: page, nav: nav %}
|
||||
{{ content }}
|
||||
{% render "partials/now/media-grid.liquid", data:music.artists, icon: "microphone-2", title: "Artists", shape: "square", count: 8 %}
|
||||
{% render "partials/now/media-grid.liquid", data:music.artists, icon: "microphone-2", title: "Artists", shape: "square", count: 8, loading: 'eager' %}
|
||||
{% render "partials/now/media-grid.liquid", data:music.albums, icon: "vinyl", title: "Albums", shape: "square", count: 8 %}
|
||||
{% render "partials/now/albumReleases.liquid", albumReleases:albumReleases %}
|
||||
{% render "partials/now/media-grid.liquid", data:books, icon: "books", title: "Books", shape: "vertical", count: 6 %}
|
||||
|
|
|
@ -20,7 +20,14 @@
|
|||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% image item.image, alt, 'rounded-lg w-full h-full [&>*]:h-full' %}
|
||||
{%- capture loadingStrategy %}
|
||||
{% if loading %}
|
||||
{{ loading }}
|
||||
{% else %}
|
||||
'lazy'
|
||||
{% endif %}
|
||||
{% endcapture -%}
|
||||
{% image item.image, alt, 'rounded-lg w-full h-full [&>*]:h-full', loadingStrategy %}
|
||||
</div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
|
|
|
@ -26,7 +26,7 @@ meta:
|
|||
|
||||
Software and services that I use for work and my own enjoyment.
|
||||
|
||||
{% image 'https://coryd.dev/assets/img/pages/uses.jpg', 'My desk', 'border border-purple-600 dark:border-purple-400 rounded-lg overflow-hidden [&>*]:w-full' %}
|
||||
{% image 'https://coryd.dev/assets/img/pages/uses.jpg', 'My desk', 'border border-purple-600 dark:border-purple-400 rounded-lg overflow-hidden [&>*]:w-full', 'eager' %}
|
||||
|
||||
<h3 className="text-xl font-extrabold leading-9 tracking-tight text-gray-900 dark:text-gray-100 sm:text-2xl sm:leading-10 md:text-4xl md:leading-14">Computer setup</h3>
|
||||
|
||||
|
|
Reference in a new issue