Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- /sections/index-banner-grid.liquid -->
- {%- assign image_size = section.settings.image_width | append: 'x' | append: section.settings.image_height -%}
- <div class="{{ section.settings.display }}" data-section-id="{{ section.id }}" data-section-type="banner-section">
- <div class="grid-container">
- <div class="box border-none index-banner-grid-container">
- {%- if section.settings.title != blank or section.settings.sub_title != blank -%}
- <div class="box-divider grid-x">
- {%- if section.settings.title != blank -%}
- <h2 class="box-title width-100">{{ section.settings.title }}</h2>
- {%- endif -%}
- {%- if section.settings.sub_title != blank -%}
- <p class="sub-title width-100">{{ section.settings.sub_title }}</p>
- {%- endif -%}
- </div>
- {%- endif -%}
- <div class="box-content">
- {%- if section.blocks.size > 0 -%}
- <div class="index-banner-grid-list grid-x grid-margin-x align-center">
- {%- for block in section.blocks -%}
- <div class="cell small-{{ block.settings.column_small }} medium-{{ block.settings.column_medium }} large-{{ block.settings.column_large }} xlarge-{{ block.settings.column_xlarge }} xxlarge-{{ block.settings.column_xxlarge }} xxxlarge-{{ block.settings.column_xxxlarge }} text-center">
- <div class="index-banner-grid-item effect effect-scope">
- {%- unless block.settings.image == blank -%}
- <a href="{{ block.settings.link }}" class="index-banner-grid-image display-block">
- <img src="{{ 'icon-loader-clock.svg' | asset_url }}" data-src="{{ block.settings.image | img_url: image_size }}" class="width-100 lazyload" alt="{{ block.settings.image.alt }}" style="border-radius: 50%;border: 1.5px;border-color: orange;border-style: solid;padding: 1.5px;"/>
- </a>
- {% else %}
- <a href="{{ block.settings.link }}" class="index-banner-grid-image display-block" >
- {% if section.blocks.size == 1 %}
- <img src="{{ 'icon-loader-clock.svg' | asset_url }}" data-src="{{ '1470x200.png' | asset_url }}" class="width-100 lazyload" alt="{{ block.settings.image.alt }}" />
- {% elsif section.blocks.size == 2 %}
- <img src="{{ 'icon-loader-clock.svg' | asset_url }}" data-src="{{ '720x200.png' | asset_url }}" class="width-100 lazyload" alt="{{ block.settings.image.alt }}" />
- {% else %}
- <img src="{{ 'icon-loader-clock.svg' | asset_url }}" data-src="{{ '270x270.png' | asset_url }}" class="width-100 lazyload" alt="{{ block.settings.image.alt }}" />
- {% endif %}
- </a>
- {%- endunless -%}
- {%- if block.settings.action_text != blank -%}
- <a href="{{ block.settings.link }}" class="button index-banner-grid-button">{{ block.settings.action_text }}</a>
- {%- endif -%}
- </div>
- </div>
- {%- endfor -%}
- </div>
- {%- endif -%}
- </div>
- </div>
- </div>
- </div>
- {% schema %}
- {
- "name": "Banner Grid",
- "class": "index-section index-banner-grid",
- "settings": [
- {
- "type": "select",
- "id": "display",
- "label": "Display on",
- "options": [
- {
- "value": "",
- "label": "Desktop & Mobile"
- },
- {
- "value": "show-for-large",
- "label": "Desktop only"
- },
- {
- "value": "hide-for-large",
- "label": "Mobile only"
- }
- ],
- "default": ""
- },
- {
- "type": "header",
- "content": "Title"
- },
- {
- "type": "text",
- "id": "title",
- "label": "Title"
- },
- {
- "type": "html",
- "id": "sub_title",
- "label": "Sub-title"
- },
- {
- "type": "header",
- "content": "Settings"
- },
- {
- "type": "number",
- "id": "image_width",
- "label": "Image width",
- "default": 200
- },
- {
- "type": "number",
- "id": "image_height",
- "label": "Image height",
- "default": 200
- }
- ],
- "blocks": [
- {
- "type": "banner",
- "name": "Banner",
- "settings": [
- {
- "type": "image_picker",
- "id": "image",
- "label": "Image"
- },
- {
- "type": "url",
- "id": "link",
- "label": "Link"
- },
- {
- "type": "text",
- "id": "action_text",
- "label": "Action text"
- },
- {
- "type": "text",
- "id": "collection_name",
- "label": "Collection text"
- },
- {
- "type": "header",
- "content": "Responsive width"
- },
- {
- "type": "select",
- "id": "column_small",
- "label": "Width",
- "info": "For small screen (0px - 550px)",
- "options": [
- {
- "value": "12",
- "label": "1/1"
- },
- {
- "value": "6",
- "label": "1/2"
- },
- {
- "value": "4",
- "label": "1/3"
- },
- {
- "value": "3",
- "label": "1/4"
- },
- {
- "value": "2-4",
- "label": "1/5"
- },
- {
- "value": "2",
- "label": "1/6"
- },
- {
- "value": "8",
- "label": "2/3"
- },
- {
- "value": "9",
- "label": "3/4"
- },
- {
- "value": "10",
- "label": "5/6"
- }
- ],
- "default": "12"
- },
- {
- "type": "select",
- "id": "column_medium",
- "label": "Width",
- "info": "For medium screen (551px - 800px)",
- "options": [
- {
- "value": "12",
- "label": "1/1"
- },
- {
- "value": "6",
- "label": "1/2"
- },
- {
- "value": "4",
- "label": "1/3"
- },
- {
- "value": "3",
- "label": "1/4"
- },
- {
- "value": "2-4",
- "label": "1/5"
- },
- {
- "value": "2",
- "label": "1/6"
- },
- {
- "value": "8",
- "label": "2/3"
- },
- {
- "value": "9",
- "label": "3/4"
- },
- {
- "value": "10",
- "label": "5/6"
- }
- ],
- "default": "6"
- },
- {
- "type": "select",
- "id": "column_large",
- "label": "Width",
- "info": "For large screen (801px - 1260px)",
- "options": [
- {
- "value": "12",
- "label": "1/1"
- },
- {
- "value": "6",
- "label": "1/2"
- },
- {
- "value": "4",
- "label": "1/3"
- },
- {
- "value": "3",
- "label": "1/4"
- },
- {
- "value": "2-4",
- "label": "1/5"
- },
- {
- "value": "2",
- "label": "1/6"
- },
- {
- "value": "8",
- "label": "2/3"
- },
- {
- "value": "9",
- "label": "3/4"
- },
- {
- "value": "10",
- "label": "5/6"
- }
- ],
- "default": "4"
- },
- {
- "type": "select",
- "id": "column_xlarge",
- "label": "Width",
- "info": "For xlarge screen (1261px - 1440px)",
- "options": [
- {
- "value": "12",
- "label": "1/1"
- },
- {
- "value": "6",
- "label": "1/2"
- },
- {
- "value": "4",
- "label": "1/3"
- },
- {
- "value": "3",
- "label": "1/4"
- },
- {
- "value": "2-4",
- "label": "1/5"
- },
- {
- "value": "2",
- "label": "1/6"
- },
- {
- "value": "8",
- "label": "2/3"
- },
- {
- "value": "9",
- "label": "3/4"
- },
- {
- "value": "10",
- "label": "5/6"
- }
- ],
- "default": "3"
- },
- {
- "type": "select",
- "id": "column_xxlarge",
- "label": "Width",
- "info": "For xxlarge screen (1441px - 1680px)",
- "options": [
- {
- "value": "12",
- "label": "1/1"
- },
- {
- "value": "6",
- "label": "1/2"
- },
- {
- "value": "4",
- "label": "1/3"
- },
- {
- "value": "3",
- "label": "1/4"
- },
- {
- "value": "2-4",
- "label": "1/5"
- },
- {
- "value": "2",
- "label": "1/6"
- },
- {
- "value": "8",
- "label": "2/3"
- },
- {
- "value": "9",
- "label": "3/4"
- },
- {
- "value": "10",
- "label": "5/6"
- }
- ],
- "default": "2-4"
- },
- {
- "type": "select",
- "id": "column_xxxlarge",
- "label": "Width",
- "info": "For xxxlarge screen (1681px - infinity)",
- "options": [
- {
- "value": "12",
- "label": "1/1"
- },
- {
- "value": "6",
- "label": "1/2"
- },
- {
- "value": "4",
- "label": "1/3"
- },
- {
- "value": "3",
- "label": "1/4"
- },
- {
- "value": "2-4",
- "label": "1/5"
- },
- {
- "value": "2",
- "label": "1/6"
- },
- {
- "value": "8",
- "label": "2/3"
- },
- {
- "value": "9",
- "label": "3/4"
- },
- {
- "value": "10",
- "label": "5/6"
- }
- ],
- "default": "2"
- }
- ]
- }
- ],
- "presets": [
- {
- "name": "Banner Grid",
- "category": "Image"
- }
- ]
- }
- {% endschema %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement