{{ 'section-collection-v1.css' | asset_url | stylesheet_tag }}

<div class='collection-v1'>
  <div {% render 'section-attr' %}>
    <xo-container {% render 'section-layout' %}>
      <xo-grid style='--xs:1; --md: 2;' class='collection-v1__grid'>
        <div class='collection-v1__item collection-v1__item1'>
          <div class='collection-v1__content'>
            <div class='collection-v1__image {% render 'hover-style' %}'>
              {%- render 'image', image: section.settings.item1_image -%}
            </div>
            <div class='collection-v1__title'>
              <a href='{{ section.settings.item1_url }}'>
                {{ section.settings.item1_title }}
              </a>
            </div>
          </div>
        </div>
        <div class='collection-v1__item collection-v1__item2'>
          <div class='collection-v1__content'>
            <div class='collection-v1__image {% render 'hover-style' %}'>
              {%- render 'image', image: section.settings.item2_image -%}
            </div>
            <div class='collection-v1__title'>
              <a href='{{ section.settings.item2_url }}'>
                {{ section.settings.item2_title }}
              </a>
            </div>
          </div>
        </div>
      </xo-grid>
    </xo-container>
  </div>
</div>

{% schema %}
{
  "name": "t:sections.collection_v1.name",
  "settings": [
    {
      "type": "select",
      "id": "width",
      "label": "t:sections.all.width.label",
      "default": "box",
      "options": [
        {
          "value": "box",
          "label": "t:sections.all.width.options__1.label"
        },
        {
          "value": "wide",
          "label": "t:sections.all.width.options__2.label"
        },
        {
          "value": "fullwidth",
          "label": "t:sections.all.width.options__3.label"
        }
      ]
    },
    {
      "type": "select",
      "id": "hover",
      "label": "t:sections.all.hover.label",
      "default": "hover1",
      "options": [
        {
          "value": "hover1",
          "label": "t:sections.all.hover.option__1.label"
        },
        {
          "value": "hover2",
          "label": "Style 02"
        },
        {
          "value": "hover3",
          "label": "Style 03"
        },
        {
          "value": "hover4",
          "label": "Style 04"
        },
        {
          "value": "hover5",
          "label": "Style 05"
        },
        {
          "value": "hover6",
          "label": "Style 06"
        }
      ]
    },
    {
      "type": "header",
      "content": "t:sections.collection_v1.settings.item1.label"
    },
    {
      "type": "image_picker",
      "id": "item1_image",
      "label": "t:sections.collection_v1.settings.image.label",
      "info": "Support jpg, jpeg, png, svg, gif"
    },
    {
      "type": "text",
      "id": "item1_title",
      "label": "t:sections.collection_v1.settings.title.label",
      "info": "Support jpg, jpeg, png, svg, gif"
    },
    {
      "type": "url",
      "id": "item1_url",
      "label": "t:sections.collection_v1.settings.url.label",
      "default": "/collections/all"
    },
    {
      "type": "header",
      "content": "t:sections.collection_v1.settings.item2.label"
    },
    {
      "type": "image_picker",
      "id": "item2_image",
      "label": "t:sections.collection_v1.settings.image.label",
      "info": "Support jpg, jpeg, png, svg, gif"
    },
    {
      "type": "text",
      "id": "item2_title",
      "label": "t:sections.collection_v1.settings.title.label",
      "info": "Support jpg, jpeg, png, svg, gif"
    },
    {
      "type": "url",
      "id": "item2_url",
      "label": "t:sections.collection_v1.settings.url.label",
      "default": "/collections/all"
    },
    {
      "type": "header",
      "content": "t:sections.all.heading.content"
    },
    {
      "type": "color_scheme",
      "id": "color_scheme",
      "label": "t:sections.all.color_scheme.label"
    },
    {
      "type": "color",
      "id": "background_color",
      "label": "t:sections.all.bg_color.label"
    },
    {
      "type": "color_background",
      "id": "background_gradient",
      "label": "t:sections.all.bg_gradient.label"
    },
    {
      "type": "number",
      "id": "padding_top",
      "label": "t:sections.all.padding_top.label",
      "default": 50
    },
    {
      "type": "number",
      "id": "padding_bottom",
      "label": "t:sections.all.padding_bottom.label",
      "default": 50
    }
  ],
  "presets": [
    {
      "name": "t:sections.collection_v1.presets.name"
    }
  ]
}
{% endschema %}
