mirror of
https://github.com/kremalicious/blog.git
synced 2024-11-15 09:35:21 +01:00
28 lines
1.1 KiB
HTML
28 lines
1.1 KiB
HTML
{% case include.size %}
|
|
|
|
{% when 'phototeaser' %}
|
|
{% assign pictureSize = 'w_940%2Ch_700%2Cc_fill%2Cq_90' %}
|
|
{% assign pictureSizeRetina = 'w_1880%2Ch_1400%2Cc_fill%2Cq_90' %}
|
|
{% when 'photothumb' %}
|
|
{% assign pictureSize = 'w_190%2Ch_190%2Cc_thumb%2Cq_90' %}
|
|
{% assign pictureSizeRetina = 'w_380%2Ch_380%2Cc_thumb%2Cq_90' %}
|
|
{% when 'featured' %}
|
|
{% assign pictureSize = 'w_275%2Ch_100%2Cc_fill' %}
|
|
{% assign pictureSizeRetina = 'w_550%2Ch_200%2Cc_fill%2Cq_90' %}
|
|
{% else %}
|
|
{% assign pictureSize = 'w_940%2Cq_90' %}
|
|
{% assign pictureSizeRetina = 'w_1880%2Cq_90' %}
|
|
{% 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 }}">
|