feat: improved image optimization
This commit is contained in:
parent
9e118c83db
commit
0534bc5607
10 changed files with 70 additions and 104 deletions
|
@ -8,13 +8,13 @@ layout: default
|
|||
{% endcapture %}
|
||||
<style>{{ css }}</style>
|
||||
{{ content }}
|
||||
{% render "partials/now/media-grid.liquid", data:artists, icon: "microphone-2", title: "Artists", shape: "square", count: 8, loading: 'eager' %}
|
||||
{% render "partials/now/media-grid.liquid", data:albums, icon: "vinyl", title: "Albums", shape: "square", count: 8 %}
|
||||
{% render "partials/now/media-grid.liquid", data:artists, icon: "microphone-2", title: "Artists", shape: "square", count: 8, loading: 'eager', imageMaxWidth: 320 %}
|
||||
{% render "partials/now/media-grid.liquid", data:albums, icon: "vinyl", title: "Albums", shape: "square", count: 8, imageMaxWidth: 320 %}
|
||||
{% render "partials/now/albumReleases.liquid", albumReleases:albumReleases %}
|
||||
{% render "partials/now/media-grid.liquid", data:books, icon: "books", title: "Books", shape: "vertical", count: 6 %}
|
||||
{% render "partials/now/media-grid.liquid", data:books, icon: "books", title: "Books", shape: "vertical", count: 6, imageMaxWidth: 320 %}
|
||||
{% render "partials/now/links.liquid", links:links %}
|
||||
{% render "partials/now/media-grid.liquid", data:movies, icon: "movie", title: "Movies", shape: "vertical", count: 6 %}
|
||||
{% render "partials/now/media-grid.liquid", data:tv, icon: "device-tv", title: "TV", shape: "vertical", count: 6 %}
|
||||
{% render "partials/now/media-grid.liquid", data:movies, icon: "movie", title: "Movies", shape: "vertical", count: 6, imageMaxWidth: 320 %}
|
||||
{% render "partials/now/media-grid.liquid", data:tv, icon: "device-tv", title: "TV", shape: "vertical", count: 6, imageMaxWidth: 320 %}
|
||||
<p class="now__explainer text-center">
|
||||
This is a <a href="https://nownownow.com/about">now page</a>, and if you have your own site, <a href="https://nownownow.com/about">you should make one too</a>.
|
||||
</p>
|
||||
|
|
|
@ -37,7 +37,11 @@
|
|||
'lazy'
|
||||
{%- endif -%}
|
||||
{%- endcapture -%}
|
||||
{% image item.image, alt, 'item__image', loadingStrategy %}
|
||||
{% if imageMaxWidth %}
|
||||
{% image item.image, alt, '', loadingStrategy, imageMaxWidth %}
|
||||
{% else %}
|
||||
{% image item.image, alt, '', loadingStrategy %}
|
||||
{% endif %}
|
||||
</div>
|
||||
</a>
|
||||
{% endfor %}
|
||||
|
|
Reference in a new issue