2025-05-05 23:35:33 +02:00
|
|
|
{% set gallery_data = load_data(literal = body, format="json") %}
|
2025-05-05 13:15:39 +02:00
|
|
|
|
2025-05-05 23:35:33 +02:00
|
|
|
<div id="image-gallery">
|
|
|
|
<ul class="gallery">
|
|
|
|
{% for item in gallery_data %}
|
2025-05-17 17:09:41 +02:00
|
|
|
{% set base_path = page.path | split(pat="/") | slice(end=-1) | join(sep="/") %}
|
|
|
|
{% set image_path = base_path ~ "/" ~ item.file %}
|
|
|
|
{% set image_url = get_url(path=image_path) %}
|
2025-05-05 23:35:33 +02:00
|
|
|
<li class="gallery-item">
|
2025-05-17 17:09:41 +02:00
|
|
|
<a href="{{ image_url }}" class="lightbox" target="_blank">
|
|
|
|
<img src="{{ image_url }}" {% if item.alt %}alt="{{ item.alt }}"{% endif %}>
|
2025-05-14 15:08:38 +02:00
|
|
|
</a>
|
2025-05-05 23:35:33 +02:00
|
|
|
{% if item.title %}
|
|
|
|
<p class="caption">{{ item.title }}</p>
|
|
|
|
{% endif %}
|
|
|
|
</li>
|
|
|
|
{% endfor %}
|
|
|
|
</ul>
|
2025-05-05 13:15:39 +02:00
|
|
|
</div>
|