Created
February 28, 2022 02:36
-
-
Save svaustin66/56480fb0a59525c7a1ae98656ffc3a72 to your computer and use it in GitHub Desktop.
Product Accordion Section
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
| {% style %} | |
| #shopify-section-{{ section.id }} { | |
| padding-top: {{ section.settings.padding_top }}px; | |
| padding-bottom: {{ section.settings.padding_bottom }}px; | |
| padding-left: {{ section.settings.padding_left }}px; | |
| padding-right: {{ section.settings.padding_right }}px; | |
| {% if section.settings.width == 'wide' -%} | |
| width: 100%; | |
| {%- elsif section.settings.width == 'half' -%} | |
| width: 50%; | |
| {%- endif %} | |
| } | |
| {% render 'css-loop', | |
| css: section.settings.custom_css, | |
| id: section.id | |
| %} | |
| {% endstyle %} | |
| <section class="section {{ section.settings.css_class }} | |
| is-width-{{ section.settings.width }}" | |
| data-section-id="{{ section.id }}" | |
| {% if section.settings.animation != "none" %} | |
| data-scroll-class="{{ section.settings.animation }}" | |
| {% endif %}> | |
| {% render 'product-accordion' %} | |
| </section> | |
| {% schema %} | |
| { | |
| "name": "Product accordion", | |
| "class": "product-accordion", | |
| "templates": [ | |
| "product" | |
| ], | |
| "settings": [ | |
| { | |
| "type": "header", | |
| "content": "Layout" | |
| }, | |
| { | |
| "type": "select", | |
| "id": "width", | |
| "label": "Width", | |
| "default": "standard", | |
| "options": [ | |
| { | |
| "value": "half", | |
| "label": "Half" | |
| }, | |
| { | |
| "value": "standard", | |
| "label": "Standard" | |
| }, | |
| { | |
| "value": "wide", | |
| "label": "Wide" | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "range", | |
| "id": "padding_top", | |
| "label": "Top spacing", | |
| "min": 0, | |
| "max": 80, | |
| "default": 20, | |
| "unit": "px" | |
| }, | |
| { | |
| "type": "range", | |
| "id": "padding_bottom", | |
| "label": "Bottom spacing", | |
| "min": 0, | |
| "max": 80, | |
| "default": 20, | |
| "unit": "px" | |
| }, | |
| { | |
| "type": "range", | |
| "id": "padding_left", | |
| "label": "Left spacing", | |
| "min": 0, | |
| "max": 80, | |
| "default": 0, | |
| "unit": "px" | |
| }, | |
| { | |
| "type": "range", | |
| "id": "padding_right", | |
| "label": "Right spacing", | |
| "default": 0, | |
| "min": 0, | |
| "max": 80, | |
| "unit": "px" | |
| }, | |
| { | |
| "type": "select", | |
| "id": "animation", | |
| "label": "Animation", | |
| "default": "none", | |
| "options": [ | |
| { | |
| "value": "none", | |
| "label": "None" | |
| }, | |
| { | |
| "value": "fadeIn", | |
| "label": "Fade in" | |
| }, | |
| { | |
| "value": "fadeInDown", | |
| "label": "Fade in down" | |
| }, | |
| { | |
| "value": "fadeInLeft", | |
| "label": "Fade in left" | |
| }, | |
| { | |
| "value": "fadeInRight", | |
| "label": "Fade in right" | |
| }, | |
| { | |
| "value": "slideInLeft", | |
| "label": "Slide in left" | |
| }, | |
| { | |
| "value": "slideInRight", | |
| "label": "Slide in right" | |
| }, | |
| { | |
| "value": "zoomIn", | |
| "label": "Zoom in" | |
| } | |
| ] | |
| }, | |
| { | |
| "type": "header", | |
| "content": "Advanced" | |
| }, | |
| { | |
| "type": "paragraph", | |
| "content": "[Learn more](https://help.outofthesandbox.com/hc/en-us/articles/360022329373)" | |
| }, | |
| { | |
| "type": "text", | |
| "id": "css_class", | |
| "label": "CSS Class" | |
| }, | |
| { | |
| "type": "textarea", | |
| "id": "custom_css", | |
| "label": "Custom CSS" | |
| } | |
| ], | |
| "presets": [ | |
| { | |
| "name": "Product accordion", | |
| "category": "JadePuma", | |
| "settings": { | |
| } | |
| } | |
| ], | |
| "templates": [ | |
| "product" | |
| ] | |
| } | |
| {% endschema %} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment