diff --git a/snippets/article-card.liquid b/snippets/article-card.liquid index 1fb4a86..35c3673 100644 --- a/snippets/article-card.liquid +++ b/snippets/article-card.liquid @@ -25,29 +25,22 @@ -%}
{% comment %}
{% endcomment %} -
-
+ " style="--ratio-percent: {{ 1 | divided_by: ratio | times: 100 }}%;"> +
{%- if show_image == true and article.image -%}
+ style="padding-bottom: {{ 1 | divided_by: article.image.aspect_ratio | times: 100 }}%;" + {% endif %}> {% comment %}theme-check-disable ImgLazyLoading{% endcomment %} {{ article.image.src.alt | escape }} + height="{{ article.image.height }}"> {% comment %}theme-check-enable ImgLazyLoading{% endcomment %}
@@ -152,4 +144,4 @@
-{%- endif -%} +{%- endif -%} \ No newline at end of file diff --git a/snippets/card-product.liquid b/snippets/card-product.liquid index 7516330..382219d 100644 --- a/snippets/card-product.liquid +++ b/snippets/card-product.liquid @@ -36,8 +36,7 @@ endif -%}