onders.org_zola_theme/templates/shortcodes/gallery.html

38 lines
1.1 KiB
HTML
Raw Normal View History

<div class="gallery">
2023-02-06 12:20:18 +01:00
{% for path in images %}
{% if section %}
{% set full_path = section.path ~ path %}
{% endif %}
{% if page %}
{% set full_path = page.path ~ path %}
{% endif %}
{% set thumb = resize_image(path=full_path, width=120, height=120) %}
<a href="#{{ loop.index }}"><img class="thumbnail" src="{{ thumb.url }}"></a>
2023-02-06 12:20:18 +01:00
<div class="lightbox" id="{{ loop.index }}">
{% if loop.first and loop.last %}
<a href="#" class="close full">
<div class="image">
<img src="{{ path }}">
</div>
2023-02-06 12:20:18 +01:00
</a>
{% else %}
<a href="#"><span class="close"></span></a>
{% if loop.first %}
<a href="#{{ images | length }}"><span class="prev end"></span></a>
{% else %}
<a href="#{{ loop.index - 1 }}"><span class="prev"></span></a>
{% endif %}
{% if loop.last %}
<a href="#1"><span class="next start"></span></a>
{% else %}
<a href="#{{ loop.index + 1 }}"><span class="next"></span></a>
{% endif %}
<div class="image">
<img src="{{ path }}">
2023-02-06 12:20:18 +01:00
</div>
{% endif %}
2023-02-06 12:20:18 +01:00
</div>
{% endfor %}
</div>