2020-03-03 20:01:59 +01:00
{% if section.background %}
< div class = "bg-section" style = "background: {{ section.background }};" >
{% endif %}
< section class = "polaroid-group baguette" { % if section . css % } style = "{{ section.css }}" { % endif % } >
2020-03-06 14:43:19 +01:00
< div class = "polaroid-line" { % if section . margin_bottom % } style = "margin-bottom: {{ section.margin_bottom }};" { % endif % } >
2020-03-04 00:53:06 +01:00
{% for image in section.images %}
2020-03-03 20:01:59 +01:00
{% set caption = image.text %}
2020-03-04 00:53:06 +01:00
{% set custpos = false %}
2020-03-03 20:01:59 +01:00
{% if image.angle %}
{% set angle = image.angle %}
{% else %}
2020-03-04 00:53:06 +01:00
{% if (loop.index%2 == 1) %}
{% set angle = 15 %}
{% else %}
{% set angle = -15 %}
{% endif %}
2020-03-03 20:01:59 +01:00
{% endif %}
2020-03-06 14:43:19 +01:00
2020-03-03 20:01:59 +01:00
{% if image.x %}
{% set x = image.x %}
2020-03-04 00:53:06 +01:00
{% set custpos = true %}
2020-03-03 20:01:59 +01:00
{% else %}
{% set x = "0px" %}
2020-03-04 00:53:06 +01:00
{% endif %}
2020-03-06 14:43:19 +01:00
2020-03-03 20:01:59 +01:00
{% if image.y %}
{% set y = image.y %}
2020-03-04 00:53:06 +01:00
{% set custpos = true %}
2020-03-03 20:01:59 +01:00
{% else %}
{% set y = "0px" %}
{% endif %}
2020-03-06 14:43:19 +01:00
2020-03-03 20:01:59 +01:00
{% if image.z %}
{% set z = image.z %}
{% else %}
2020-03-04 00:53:06 +01:00
{% set z = loop.index %}
2020-03-03 20:01:59 +01:00
{% endif %}
2020-03-06 14:43:19 +01:00
2020-03-06 17:09:40 +01:00
{% set w = image.w %}
{% set h = image.h %}
2020-03-06 14:43:19 +01:00
2020-03-03 20:01:59 +01:00
{% set image = Image(image) %}
{{ image.copy() }}
{% set ratio = image.ratio %}
< a href = "{{ image }}" { % if caption % } data-caption = "{{ caption }}" { % endif % }
data-at-450="{{ image.generate_thumbnail("x450") }}"
data-at-800="{{ image.generate_thumbnail("x800") }}"
data-at-1366="{{ image.generate_thumbnail("x1366") }}"
data-at-1920="{{ image.generate_thumbnail("x1920") }}"
class="polaroid"
2020-03-06 17:09:40 +01:00
style="{% if w %}width:{{ w }};{% endif %}{% if h %}height: {{ h }};{% endif %}{% if custpos %}position:absolute;{% endif %}left: {{ x }}; top: {{ y }}; z-index: {{ z }}; -webkit-transform: rotate({{ angle }}deg); -moz-transform: rotate({{ angle }}deg); transform: rotate({{ angle }}deg);">
2020-03-03 20:01:59 +01:00
{% if caption %}
< img class = "lazy" src = "" data-original = "{{ image.generate_thumbnail(" x450 " ) } } " alt = "{{ caption }}" >
< h5 class = "polaroid__title" > {{ caption }}< / h5 >
{% else %}
< img class = "lazy" src = "" data-original = "{{ image.generate_thumbnail(" x450 " ) } } " alt = "unnamed image" >
{% endif %}
< / a >
{% endfor %}
2020-03-04 00:53:06 +01:00
< / div >
< / section >
2020-03-03 20:01:59 +01:00
{% if section.background %}
< / div >
{% endif %}
<!-- vim: ts=8 et sw=4 sts=4
-->