Update default templates
This commit is contained in:
parent
6533035416
commit
0153b9fb9e
|
@ -16,10 +16,10 @@ Usage:
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
new Imager('.responsive-image__delayed', {
|
new Imager('.responsive-image__delayed', {
|
||||||
availableWidths: [{{ resized | map: 'width' | join: ', ' }}]
|
availableWidths: [{{ resized | map: 'width' | join: ', ' }}],
|
||||||
onImagesReplaced: function() {
|
onImagesReplaced: function() {
|
||||||
$('.responsive-image__placeholder').hide();
|
$('.responsive-image__placeholder').hide()
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
|
@ -10,9 +10,9 @@ Usage:
|
||||||
|
|
||||||
{% assign largest = resized | sort: 'width' | last %}
|
{% assign largest = resized | sort: 'width' | last %}
|
||||||
{% capture srcset %}
|
{% capture srcset %}
|
||||||
{% for i in resized %}
|
{% for i in resized %}
|
||||||
/{{ i.path }} {{ i.width }}w,
|
/{{ i.path }} {{ i.width }}w,
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endcapture %}
|
{% endcapture %}
|
||||||
|
|
||||||
<img src="/{{ largest.path }}" alt="{{ alt }}" srcset="{{ srcset | strip_newlines }}">
|
<img src="/{{ largest.path }}" alt="{{ alt }}" srcset="{{ srcset | strip_newlines }} /{{ path }} {{ original.width }}w">
|
||||||
|
|
|
@ -9,9 +9,9 @@ Usage:
|
||||||
{% endcomment %}
|
{% endcomment %}
|
||||||
|
|
||||||
{% capture srcset %}
|
{% capture srcset %}
|
||||||
{% for i in resized %}
|
{% for i in resized %}
|
||||||
/{{ i.path }} {{ i.width }}w,
|
/{{ i.path }} {{ i.width }}w,
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endcapture %}
|
{% endcapture %}
|
||||||
|
|
||||||
<img src="/{{ path }}" alt="{{ alt }}" srcset="{{ srcset | strip_newlines }}">
|
<img src="/{{ path }}" alt="{{ alt }}" srcset="{{ srcset | strip_newlines }} /{{ path }} {{ original.width }}w">
|
||||||
|
|
Loading…
Reference in New Issue