@Julia_26
thanks for code yes try this
{% assign wrapper_class = 'wrapper' %}
{%- if section.settings.full_width -%}
{% assign wrapper_class = 'clearfix' %}
{%- endif -%}{% assign has_padding_class = '' %}
{%- if section.settings.padding -%}
{% assign has_padding_class = 'has-padding' %}
{%- endif -%}
{% for block in section.blocks %}
{% assign has_link = false %}
{% if block.settings.link != blank %}
{% assign has_link = true %}
{% endif %}
{% assign has_video = false %} {% if block.settings.link contains 'youtu' or block.settings.link contains 'vimeo.com' %}
{% assign has_video = true %}
{% endif %}
{% if block.settings.image != blank %}
{%- if section.settings.scale_image -%}
{%- render 'image-fill', img_object: block.settings.image, aspect_ratio: section.settings.aspect_ratio -%}
{%- else -%}
{%- render 'image-fill', img_object: block.settings.image -%}
{%- endif -%} {% if has_video %}
{% if has_video %}{% render 'icon-play-thumb' %}{% endif %}
{% render 'video-popup', video: block.settings.link, unique: block.id %}
{% elsif has_link %}
{% else %}
{% render 'image-zoom', image: block.settings.image, unique: block.id %}
{% endif %}
{% else %}
{%- render 'image-fill', img_object: '', aspect_ratio: section.settings.aspect_ratio -%}
{% endif %}
{% if block.settings.text-title != blank %}
### {{ block.settings.text-title }}
{% endif %}
{% endfor %}
{% if section.blocks.size == 0 %}
{{ 'home_page.onboarding.no_content' | t }}
{% endif %}
{% schema %}
{
"name": "Gallery",
"max_blocks": 6,
"settings": [
{
"type": "checkbox",
"id": "full_width",
"label": "Full width",
"default": false
},
{
"type": "checkbox",
"id": "padding",
"label": "Has padding",
"default": true
},
{
"type": "header",
"content": "Images"
},
{
"type": "checkbox",
"id": "scale_image",
"label": "Scale images",
"default": true
},
{
"type": "range",
"id": "aspect_ratio",
"min": 0.5,
"max": 1.5,
"step": 0.1,
"unit": ":1",
"label": "Image scaling ratio",
"info": "Wide to tall",
"default": 1
},
{
"type": "select",
"id": "bg",
"label": "Background color",
"default": "palette--light bg--neutral",
"options": [
{ "value": "palette--light bg--neutral", "label": "Default"},
{ "value": "palette--light bg--accent", "label": "Light"},
{ "value": "palette--dark bg--invert", "label": "Dark"},
{ "value": "palette--dark bg--invert--accent", "label": "Dark accent"}
]
}
],
"blocks": [
{
"type": "image",
"name": "Image",
"settings": [
{
"type": "image_picker",
"id": "image",
"label": "Image"
},
{
"type": "text",
"id": "text-title",
"label": "Title"
},
{
"type": "text",
"id": "link",
"label": "Link",
"info": "YouTube and Vimeo links will use a popup. Blank links will zoom image."
}
]
}
],
"presets": [
{
"name": "Gallery",
"category": "Image",
"blocks": [
{
"type": "image"
},
{
"type": "image"
},
{
"type": "image"
}
]
}
]
}
{% endschema %}