Update default templates

This commit is contained in:
Joseph Wynn 2018-08-23 16:04:11 +12:00
parent 6533035416
commit 0153b9fb9e
No known key found for this signature in database
GPG Key ID: F34B9E530F0D3AEE
3 changed files with 14 additions and 14 deletions

View File

@ -16,10 +16,10 @@ Usage:
</div>
<script>
new Imager('.responsive-image__delayed', {
availableWidths: [{{ resized | map: 'width' | join: ', ' }}]
onImagesReplaced: function() {
$('.responsive-image__placeholder').hide();
}
});
new Imager('.responsive-image__delayed', {
availableWidths: [{{ resized | map: 'width' | join: ', ' }}],
onImagesReplaced: function() {
$('.responsive-image__placeholder').hide()
}
})
</script>

View File

@ -10,9 +10,9 @@ Usage:
{% assign largest = resized | sort: 'width' | last %}
{% capture srcset %}
{% for i in resized %}
/{{ i.path }} {{ i.width }}w,
{% endfor %}
{% for i in resized %}
/{{ i.path }} {{ i.width }}w,
{% endfor %}
{% 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">

View File

@ -9,9 +9,9 @@ Usage:
{% endcomment %}
{% capture srcset %}
{% for i in resized %}
/{{ i.path }} {{ i.width }}w,
{% endfor %}
{% for i in resized %}
/{{ i.path }} {{ i.width }}w,
{% endfor %}
{% endcapture %}
<img src="/{{ path }}" alt="{{ alt }}" srcset="{{ srcset | strip_newlines }}">
<img src="/{{ path }}" alt="{{ alt }}" srcset="{{ srcset | strip_newlines }} /{{ path }} {{ original.width }}w">