onders.org_zola_theme/templates/shortcodes/gallery.html
finga 4aff0378ac Deprecate bulma in favor of normalize and milligram
Deprecate the bulma css framework in favor of normalize and
milligram. Adapt the templates to work with the new css libraries.
2024-04-20 00:02:14 +02:00

37 lines
1.1 KiB
HTML

<div class="gallery">
{% 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>
<div class="lightbox" id="{{ loop.index }}">
{% if loop.first and loop.last %}
<a href="#" class="close full">
<div class="image">
<img src="{{ path }}">
</div>
</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 }}">
</div>
{% endif %}
</div>
{% endfor %}
</div>