Fancybox gallery

This commit is contained in:
2024-01-12 16:31:33 +01:00
parent baacec9f2a
commit 6b63e34d64
125 changed files with 78 additions and 0 deletions

View File

@ -38,3 +38,12 @@
{% endfor %}
{% endmacro %}
{% macro gallery(page) %}
{% for asset in page.assets %}
{% if asset is matching("[.](jpg|png)$") %}
{% set image = resize_image(path=asset, width=300, height=200, op="fill") %}
<a data-fancybox="{{ page.title }}" href="{{ get_url(path=asset) }}"><img src="{{ image.url }}" alt="{{ asset }}"></a>
{% endif %}
{% endfor %}
{% endmacro %}