{# GLOBAL VARS #} {% set settings = page.gallery %} {% set items = settings.items|split(',') %} {% set limit = settings.limit %} {% set folder_path = assetspath ~ gallery.file_path|trim(".") ~ '/' %} {% if limit is empty or limit < 1 %}{% set limit = 99999 %}{% endif %} {% set exif_items = page.popup.caption.exif_items|split(',') %} {# Video include #} {% if gallery_videos|length > 0 and 'hide-video' not in settings.classes and 'video-bottom' not in settings.classes %} {% include 'partials/module.video.html' %} {% if gallery_images|length > 0 %}
{% endif %} {% endif %} {# image_noindex rel="nofollow" #} {% set nofollow = page.settings.image_noindex ? ' rel="nofollow"' : '' %} {# set crop ratio if defined #} {% if settings.crop.enabled and settings.layout != "justified" and settings.layout != "columns" %} {% set crop_ratio = settings.crop.crop[1] / settings.crop.crop[0] * 100 %} {% set data_crop = ' data-crop="' ~ settings.crop.crop[0]|round ~ '.' ~ settings.crop.crop[1]|round ~ '"' %} {% endif %} {# split #} {% set gallery_split_view = settings.split.enabled and settings.layout != "justified" and settings.layout != "columns" %} {% if gallery_split_view %} {# invert #} {% if settings.split.invert %} {% set push = 'medium-push-' ~ (12 - settings.split.ratio) %} {% set pull = 'medium-pull-' ~ settings.split.ratio %} {% endif %} {% endif %} {# grid #} {% if settings.layout == "grid" %} {# custom grid space style #} {% if settings.grid.space > -1 %} {% set ul_style = ' style="margin: 0 ' ~ (width == 'wide' ? settings.grid.space / 2 : - settings.grid.space / 4 ) ~ 'px"' %} {% set li_style = ' style="padding: 0 ' ~ settings.grid.space / 2 ~ 'px ' ~ settings.grid.space ~ 'px"' %} {% endif %} {# use width #} {% if settings.grid.use_width %} {% set ul_open = '