Last active
April 15, 2019 10:13
-
-
Save ronipl/ce9ebbc0d04acdf140d7df40c807ac91 to your computer and use it in GitHub Desktop.
Shopify section - Gallery Carousel section *classes works on testament theme. just remove classes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="row gallery-carousel"> | |
{% for block in section.blocks %} | |
<div class="gallery-section-item gallery-section-item-{{ block.id }}" {{ block.shopify_attributes }}> | |
<div class="gallery-section-item-inner"> | |
{% if block.settings.link != blank %}<a href="{{ block.settings.link }}">{% endif %} | |
{% if block.settings.image != blank %} | |
<img src="{{ block.settings.image | img_url: 'master' }}" alt="{{ block.settings.image.alt }}"> | |
<noscript> | |
<img src="{{ block.settings.image | img_url: '1024x' }}" alt="{{ block.settings.image.alt }}"> | |
</noscript> | |
{% else %} | |
<div class="onboard"> | |
{{ 'image' | placeholder_svg_tag: 'placeholder-svg' }} | |
</div> | |
{% endif %} | |
<div class="caption"> | |
{% if block.settings.title_text != blank %} | |
<h3>{{ block.settings.title_text | escape }}</h3> | |
{% endif %} | |
{% if block.settings.hidden_text != blank %} | |
<p>{{ block.settings.hidden_text | escape }}</p> | |
{% endif %} | |
</div> | |
{% if block.settings.link != blank %}</a>{% endif %} | |
</div> | |
</div> | |
{% if section.blocks.size == 0 %} | |
{% endif %} | |
{% endfor %} | |
</div> | |
{% schema %} | |
{ | |
"name": "Gallery Carousel", | |
"max_blocks": 10, | |
"settings": [ | |
{ | |
"type": "range", | |
"id": "heading_size", | |
"min": 12, | |
"max": 36, | |
"step": 1, | |
"unit": "px", | |
"label": "Heading size", | |
"default": 22 | |
}, | |
{ | |
"type": "range", | |
"id": "hidden_size", | |
"min": 12, | |
"max": 36, | |
"step": 1, | |
"unit": "px", | |
"label": "Subheading size", | |
"default": 14 | |
} | |
], | |
"blocks": [ | |
{ | |
"type": "image", | |
"name": "Image", | |
"settings": [ | |
{ | |
"type": "image_picker", | |
"id": "image", | |
"label": "Image" | |
}, | |
{ | |
"type": "url", | |
"id": "link", | |
"label": "Link", | |
"info": "Optional" | |
}, | |
{ | |
"type": "text", | |
"id": "title_text", | |
"label": "Heading", | |
"default": "Our collections" | |
}, | |
{ | |
"type": "text", | |
"id": "hidden_text", | |
"label": "Shown on hover", | |
"default": "Shop now", | |
"info": "Shown on hover" | |
}, | |
{ | |
"type": "color", | |
"id": "heading_color", | |
"label": "Heading color", | |
"default": "#ffffff" | |
}, | |
{ | |
"type": "color", | |
"id": "hidden_color", | |
"label": "Subheading color", | |
"default": "#ffffff" | |
} | |
] | |
} | |
], | |
"presets": [ | |
{ | |
"name": "Gallery Carousel", | |
"category": "Image", | |
"blocks": [ | |
{ | |
"type": "image" | |
}, | |
{ | |
"type": "image" | |
}, | |
{ | |
"type": "image" | |
} | |
] | |
} | |
] | |
} | |
{% endschema %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment