mirror of
https://github.com/kremalicious/blog.git
synced 2024-11-15 01:25:28 +01:00
28 lines
1.1 KiB
HTML
28 lines
1.1 KiB
HTML
{% case include.size %}
|
|
|
|
{% when 'phototeaser' %}
|
|
{% assign pictureSize = 'w_940,h_700,c_fill,q_auto:good,f_auto' %}
|
|
{% assign pictureSizeRetina = 'w_1880,h_1400,c_fill,q_auto:good,f_auto' %}
|
|
{% when 'photothumb' %}
|
|
{% assign pictureSize = 'w_190,h_190,c_thumb,q_auto:good,f_auto' %}
|
|
{% assign pictureSizeRetina = 'w_380,h_380,c_thumb,q_auto:good,f_auto' %}
|
|
{% when 'featured' %}
|
|
{% assign pictureSize = 'w_275,h_100,c_fill,q_auto:good,f_auto' %}
|
|
{% assign pictureSizeRetina = 'w_550,h_200,c_fill,q_auto:good,f_auto' %}
|
|
{% else %}
|
|
{% assign pictureSize = 'w_940,f_auto,fl_keep_iptc' %}
|
|
{% assign pictureSizeRetina = 'w_1880,f_auto,fl_keep_iptc' %}
|
|
{% endcase %}
|
|
|
|
{% if include.file %}
|
|
{% assign pictureSrc = include.file %}
|
|
{% else %}
|
|
{% if page.image %}
|
|
{% assign pictureSrc = page.image %}
|
|
{% else %}
|
|
{% assign pictureSrc = post.image %}
|
|
{% endif %}
|
|
{% endif %}
|
|
|
|
<img src="{{ site.media_url }}/{{ pictureSize }}/media/{{ pictureSrc }}" srcset="{{ site.media_url }}/{{ pictureSize }}/media/{{ pictureSrc }} 1x, {{ site.media_url }}/{{ pictureSizeRetina }}/media/{{ pictureSrc }} 2x" alt="{{ post.title }}">
|