Adjust headline
[blog.git] / _includes / image.html
1 {% capture width %}{% if include.width %}{{ include.width }}{% else %}320{% endif %}{% endcapture %}
2 {% capture prevwidth %}{% if include.prevwidth %}{{ include.prevwidth }}{% else %}400{% endif %}{% endcapture %}
3 {% capture class %}{% if include.class %}{{ include.class }}{% else %}left{% endif %}{% endcapture %}
4 {% capture alttxt %}{% if include.alt %}{{ include.alt }}{% else %}FIXME: No Alt Text{% endif %}{% endcapture %}
5 {% capture caption %}{% if include.caption %}{{ include.caption }}{% else %}Click picture for original size{% endif %}{% endcapture %}
6 <figure class='{{ class }}'>
7 <a href="/assets/images/fullsize/{{ include.file }}" title="Original/Fullsize image">
8 {% srcset {{ include.file }} ppi:1,2 alt='{{ alttxt }}' class='{{ class }}' width='{{ prevwidth }}' %}
9 {% srcset_source media:'(min-width: 400px)' size:'512px' width:512 %}
10 {% srcset_source media:'(min-width: 900px)' size:'1024px' width:1024 %}
11 {% srcset_source width:{{width}} %}
12 {% endsrcset %}
13 {% if caption != 'none' %}
14 <figcaption>
15 {{ caption }}
16 </figcaption>
17 {% endif %}
18 </a>
19 </figure>