{{ 'section-about-v9.css' | asset_url | stylesheet_tag }}

{%- liquid
  assign gap = section.settings.gap
-%}

<div class='about-v18'>
  <div
    {% render 'section-attr' %}
  >
    {% render 'section-bg-image' %}
    <xo-container
      {% render 'section-layout' %}
    >
      <xo-animate xo-cascade>
        <xo-grid
          style='--xs:1;--lg:2;--xo-grid-col-gap: {{ gap }}px;--xo-grid-row-gap: {{ gap }}px;'
        >
          <div class='about-v18__item'>
            <div class='about-v18__content'>
              <h3 class='about-v18__title'>
                {{ section.settings.title }}
              </h3>
              <xo-animate xo-cascade>
                <div class='about-v18__desc'>
                  {{ section.settings.description }}
                </div>
              </xo-animate>
            </div>
          </div>
          <div class='about-v18__item'>
            {% for block in section.blocks %}
              {%- assign length = forloop.length -%}
            {% endfor %}
            {%- if length > 0 -%}
              <xo-animate xo-cascade>
                <xo-grid
                  class='about-v18__grid-child'
                  style='--xs:1;--md: {{ length }};'
                >
                  {% for block in section.blocks %}
                    <div class='{%- render 'hover-style' -%}'>
                      <div class='about-v18__image'>
                        {% render 'image', image: block.settings.image %}
                      </div>
                    </div>
                  {% endfor %}
                </xo-grid>
              </xo-animate>
            {%- else -%}
              <xo-animate xo-cascade>
                <div class='about-v18__image'>
                  {% render 'image', image: section.settings.image %}
                </div>
              </xo-animate>
            {%- endif -%}
          </div>
        </xo-grid>
      </xo-animate>
    </xo-container>
  </div>
</div>

{% schema %}
{
  "name": "t:sections.about_v9.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": "header",
      "content": "t:sections.about_v9.settings.header.content"
    },
    {
      "type": "text",
      "id": "title",
      "default": "t:sections.about_v9.settings.title.default",
      "label": "t:sections.about_v9.settings.title.label",
      "info": "t:sections.about_v9.settings.text.info"
    },
    {
      "type": "text",
      "id": "description",
      "default": "t:sections.about_v9.settings.description.default",
      "label": "t:sections.about_v9.settings.description.label"
    },
    {
      "type": "header",
      "content": "t:sections.about_v9.settings.header.content-2"
    },
    {
      "type": "select",
      "id": "hover",
      "label": "t:sections.all.hover.label",
      "default": "scale_up",
      "options": [
        {
          "value": "scale_up",
          "label": "t:sections.all.hover.option__1.label"
        },
        {
          "value": "scale_down",
          "label": "t:sections.all.hover.option__2.label"
        },
        {
          "value": "rotate",
          "label": "t:sections.all.hover.option__3.label"
        },
        {
          "value": "slide_up",
          "label": "t:sections.all.hover.option__4.label"
        },
        {
          "value": "ripple",
          "label": "t:sections.all.hover.option__5.label"
        },
        {
          "value": "black_white",
          "label": "t:sections.all.hover.option__6.label"
        },
        {
          "value": "shake",
          "label": "t:sections.all.hover.option__7.label"
        }
      ]
    },
    {
      "type": "range",
      "id": "gap",
      "min": 0,
      "max": 100,
      "step": 1,
      "unit": "px",
      "default": 30,
      "label": "t:sections.about_v9.settings.gap.label"
    },
    {
      "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": "image_picker",
      "id": "background_image_desktop",
      "label": "t:sections.all.background_image_desktop.label"
    },
    {
      "type": "image_picker",
      "id": "background_image_mobile",
      "label": "t:sections.all.background_image_mobile.label"
    },
    {
      "type": "checkbox",
      "id": "use_parallax",
      "label": "t:sections.all.use_parallax.label",
      "default": true
    },
    {
      "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
    }
  ],
  "blocks": [
    {
      "name": "t:sections.about_v9.blocks.name",
      "type": "about-box",
      "settings": [
        {
          "type": "image_picker",
          "id": "image",
          "label": "t:sections.about_v9.blocks.image.label",
          "info": "t:sections.about_v9.blocks.image.info"
        }
      ]
    }
  ],
  "presets": [
    {
      "name": "t:sections.about_v9.presets.name"
    }
  ]
}
{% endschema %}
