{%- comment -%}
Svaram โ Find your chime
Save as: sections/svaram-chime-finder.liquid
Every image (category illustrations, mobile icons, element icons, collection images) is uploadable in the theme editor.
{%- endcomment -%}
{%- assign sid = section.id -%}
{%- capture arrow_svg -%}
{%- endcapture -%}
{% schema %}
{
"name": "Svaram chime finder",
"settings": [
{ "type": "header", "content": "Heading" },
{ "type": "text", "id": "eyebrow", "label": "Eyebrow", "default": "Musical instruments ยท Svaram" },
{ "type": "text", "id": "heading", "label": "Heading", "default": "Find your Svaram chime." },
{ "type": "textarea", "id": "subheading", "label": "Subheading", "default": "Choose by how you want to experience it: played by the breeze, played by you, or for a doorway and home." },
{ "type": "header", "content": "Elements" },
{ "type": "text", "id": "elements_heading", "label": "Elements heading", "default": "Choose an elemental wind chime" },
{ "type": "header", "content": "Collection" },
{ "type": "text", "id": "collection_heading", "label": "Collection heading", "default": "Explore the collection" },
{ "type": "collection", "id": "collection", "label": "Collection (used only if no 'Collection item' blocks are added)" },
{ "type": "range", "id": "product_count", "label": "Products to show from collection", "min": 2, "max": 12, "step": 2, "default": 4 },
{ "type": "header", "content": "Colors" },
{ "type": "color", "id": "bg_color", "label": "Background", "default": "#FBF8F2" },
{ "type": "color", "id": "text_color", "label": "Text", "default": "#1A1A1A" },
{ "type": "color", "id": "muted_color", "label": "Muted text", "default": "#5E5A52" },
{ "type": "color", "id": "accent_color", "label": "Accent (gold)", "default": "#A98A4F" }
],
"blocks": [
{
"type": "category",
"name": "Category card",
"limit": 3,
"settings": [
{ "type": "text", "id": "title", "label": "Title", "default": "Wind chimes" },
{ "type": "text", "id": "text", "label": "Subtitle", "default": "Played by the breeze" },
{ "type": "url", "id": "link", "label": "Link" },
{ "type": "image_picker", "id": "image", "label": "Desktop image (illustration)" },
{ "type": "color", "id": "bg_color", "label": "Desktop card background", "default": "#E3EAEE" },
{ "type": "image_picker", "id": "mobile_image", "label": "Mobile image (round icon)" }
]
},
{
"type": "element",
"name": "Element",
"limit": 5,
"settings": [
{ "type": "text", "id": "title", "label": "Title", "default": "Air" },
{ "type": "textarea", "id": "text", "label": "Description", "default": "Light, airy tones with a sense of movement." },
{ "type": "url", "id": "link", "label": "Link" },
{ "type": "image_picker", "id": "image", "label": "Icon image" }
]
},
{
"type": "item",
"name": "Collection item",
"settings": [
{ "type": "image_picker", "id": "image", "label": "Image" },
{ "type": "text", "id": "title", "label": "Title" },
{ "type": "text", "id": "price", "label": "Price text (optional)" },
{ "type": "url", "id": "link", "label": "Link" }
]
}
],
"presets": [
{
"name": "Svaram chime finder",
"blocks": [
{ "type": "category", "settings": { "title": "Wind chimes", "text": "Played by the breeze", "bg_color": "#E3EAEE" } },
{ "type": "category", "settings": { "title": "Musical chimes", "text": "Played by you", "bg_color": "#F5E6DA" } },
{ "type": "category", "settings": { "title": "Home chimes", "text": "Doorway & gifting", "bg_color": "#EEEEE0" } },
{ "type": "element", "settings": { "title": "Air", "text": "Light, airy tones with a sense of movement." } },
{ "type": "element", "settings": { "title": "Water", "text": "Fluid, flowing tones with a calming presence." } },
{ "type": "element", "settings": { "title": "Earth", "text": "Grounded, steady tones with warmth and depth." } },
{ "type": "element", "settings": { "title": "Fire", "text": "Bright, vibrant tones with energy and clarity." } },
{ "type": "element", "settings": { "title": "Space", "text": "Expansive, resonant tones with a sense of openness." } }
]
}
]
}
{% endschema %}
{%- if section.settings.eyebrow != blank -%}
{{ section.settings.eyebrow }}
{%- endif -%}
{{ section.settings.heading }}
{%- if section.settings.subheading != blank -%}{{ section.settings.subheading }}
{%- endif -%} {%- comment -%} ===== Category cards ===== {%- endcomment -%}
{%- for block in section.blocks -%}
{%- if block.type == 'category' -%}
{%- assign cat_link = block.settings.link | default: '#' -%}
{{ arrow_svg }}
{%- endif -%}
{%- endfor -%}
{%- comment -%} ===== Elements ===== {%- endcomment -%}
{%- assign has_elements = false -%}
{%- for block in section.blocks -%}
{%- if block.type == 'element' -%}{%- assign has_elements = true -%}{%- endif -%}
{%- endfor -%}
{%- if has_elements -%}
{%- if block.settings.image != blank -%}
{{ block.settings.image | image_url: width: 800 | image_tag: loading: 'lazy', widths: '400, 600, 800', alt: block.settings.title }}
{%- endif -%}
{%- if block.settings.mobile_image != blank -%}
{{ block.settings.mobile_image | image_url: width: 200 | image_tag: loading: 'lazy', widths: '100, 200', alt: '' }}
{%- endif -%}
{{ block.settings.title }}
{{ block.settings.text }}
{{ section.settings.elements_heading }}
{%- for block in section.blocks -%}
{%- if block.type == 'element' -%}
{%- endif -%}
{%- comment -%} ===== Collection: manual product cards first, otherwise a collection ===== {%- endcomment -%}
{%- assign has_items = false -%}
{%- for block in section.blocks -%}
{%- if block.type == 'item' -%}{%- assign has_items = true -%}{%- endif -%}
{%- endfor -%}
{%- if has_items or section.settings.collection != blank -%}
{%- if block.settings.image != blank -%}
{{ block.settings.image | image_url: width: 200 | image_tag: loading: 'lazy', widths: '100, 200', alt: block.settings.title }}
{%- endif -%}
{{ block.settings.title }}
{{ block.settings.text }}
{%- endif -%} {%- endfor -%}{{ section.settings.collection_heading }}
{%- if has_items -%}
{%- for block in section.blocks -%}
{%- if block.type == 'item' -%}
{%- endif -%}
{%- if block.settings.image != blank -%}
{{ block.settings.image | image_url: width: 600 | image_tag: loading: 'lazy', widths: '300, 450, 600', alt: block.settings.title }}
{%- endif -%}
{%- if block.settings.title != blank -%}{{ block.settings.title }}
{%- endif -%} {%- if block.settings.price != blank -%}{{ block.settings.price }}
{%- endif -%} {%- endif -%} {%- endfor -%} {%- else -%} {%- for product in section.settings.collection.products limit: section.settings.product_count -%}
{%- if product.featured_image -%}
{{ product.featured_image | image_url: width: 600 | image_tag: loading: 'lazy', widths: '300, 450, 600', alt: product.title }}
{%- endif -%}
{{ product.title }}
{{ product.price | money }}
{%- endfor -%} {%- endif -%}