mirror of
https://github.com/cotes2020/jekyll-theme-chirpy.git
synced 2025-12-18 13:44:15 +00:00
fix(home): avoid LQIP dirty data passing to the next post (#1278)
This commit is contained in:
@@ -47,10 +47,6 @@ layout: default
|
|||||||
{% assign card_body_col = '12' %}
|
{% assign card_body_col = '12' %}
|
||||||
|
|
||||||
{% if post.image %}
|
{% if post.image %}
|
||||||
{% if post.image.lqip %}
|
|
||||||
{% capture lqip %}lqip="{{ post.image.lqip }}"{% endcapture %}
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% assign src = post.image.path | default: post.image %}
|
{% assign src = post.image.path | default: post.image %}
|
||||||
{% unless src contains '//' %}
|
{% unless src contains '//' %}
|
||||||
{% assign src = post.img_path | append: '/' | append: src | replace: '//', '/' %}
|
{% assign src = post.img_path | append: '/' | append: src | replace: '//', '/' %}
|
||||||
@@ -59,7 +55,7 @@ layout: default
|
|||||||
{% assign alt = post.image.alt | xml_escape | default: 'Preview Image' %}
|
{% assign alt = post.image.alt | xml_escape | default: 'Preview Image' %}
|
||||||
|
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
<img src="{{ src }}" alt="{{ alt }}" {{ lqip }}>
|
<img src="{{ src }}" alt="{{ alt }}" {% if post.image.lqip %}lqip="{{ post.image.lqip }}"{% endif %}>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% assign card_body_col = '7' %}
|
{% assign card_body_col = '7' %}
|
||||||
|
|||||||
Reference in New Issue
Block a user