Fancybox gallery
This commit is contained in:
@ -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 %}
|
||||
|
Reference in New Issue
Block a user