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

<section {% render 'section-attr' %}>
  {% render 'section-bg-image' %}
  <div class='about-v4'>
    <xo-container {% render 'section-layout' %}>
      <div class='about-v4__info'>
        <xo-animate xo-cascade>
          <h3 class='about-v4__title'>
            {{ section.settings.title }}
          </h3>
        </xo-animate>
        <xo-animate xo-cascade>
          <div class='about-v4__sub-title'>
            {{ section.settings.sub_title }}
          </div>
        </xo-animate>
      </div>

      <xo-carousel
        xo-breakpoints='
          {
            700: {
              perView: 1,
            },
            1000: {
              perView: 2,
            },
            1200: {
              perView: 3,
            }
          }
        '
        {% if section.settings.autoplay %}
          xo-autoplay='1500'
        {% endif %}
        xo-per-view='{{ section.settings.columns_carousel }}'
        xo-speed='400'
        xo-loop
        xo-hover-pause
        xo-gap='30'
      >
        <xo-carousel-inner>
          <xo-carousel-list>
            {%- for block in section.blocks -%}
              <xo-carousel-slide>
                <xo-animate xo-cascade>
                  <div class='about-v4__wrap'>
                    <div class='about-v4__image'>
                      {% render 'image', image: block.settings.image %}
                      <ul class='about-v4__social'>
                        {% if block.settings.svg_icon1 != blank %}
                          <li>
                            <a href='{{ block.settings.button_link1 }}' class='about-v4__icon'>
                              {{ block.settings.svg_icon1 }}
                            </a>
                          </li>
                        {% endif %}
                        {% if block.settings.svg_icon2 != blank %}
                          <li>
                            <a href='{{ block.settings.button_link2 }}' class='about-v4__icon'>
                              {{ block.settings.svg_icon2 }}
                            </a>
                          </li>
                        {% endif %}
                        {% if block.settings.svg_icon3 != blank %}
                          <li>
                            <a href='{{ block.settings.button_link3 }}' class='about-v4__icon'>
                              {{ block.settings.svg_icon3 }}
                            </a>
                          </li>
                        {% endif %}
                        {% if block.settings.svg_icon4 != blank %}
                          <li>
                            <a href='{{ block.settings.button_link4 }}' class='about-v4__icon'>
                              {{ block.settings.svg_icon4 }}
                            </a>
                          </li>
                        {% endif %}
                      </ul>
                    </div>
                    <div class='about-v4__info-teams'>
                      <h4 class='about-v4__name'>
                        <a href='#'>{{ block.settings.name }}</a>
                      </h4>
                      <div class='about-v4__positiion'>
                        {{ block.settings.position }}
                      </div>
                    </div>
                  </div>
                </xo-animate>
              </xo-carousel-slide>
            {%- endfor -%}
          </xo-carousel-list>
        </xo-carousel-inner>
      </xo-carousel>
    </xo-container>
  </div>
</section>

{% schema %}
{
  "name": "t:sections.about_v4.name",
  "tag": "section",
  "class": "section",
  "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": "range",
      "id": "columns_carousel",
      "min": 3,
      "max": 6,
      "step": 1,
      "label": "t:sections.about_v4.settings.columns-carousel.label",
      "default": 3
    },
    {
      "type": "checkbox",
      "id": "autoplay",
      "label": "t:sections.about_v4.settings.auto-play.label",
      "default": true
    },
    {
      "type": "text",
      "id": "title",
      "label": "t:sections.about_v4.settings.title.label"
    },
    {
      "type": "text",
      "id": "sub_title",
      "label": "t:sections.about_v4.settings.sub-title.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": "About box ",
      "type": "about-box",
      "settings": [
        {
          "type": "image_picker",
          "id": "image",
          "label": "t:sections.about_v4.blocks.settings.image.label"
        },
        {
          "type": "text",
          "id": "name",
          "label": "t:sections.about_v4.blocks.settings.name.label"
        },
        {
          "type": "text",
          "id": "position",
          "label": "t:sections.about_v4.blocks.settings.position.label"
        },
        {
          "type": "html",
          "id": "svg_icon1",
          "label": "t:sections.about_v4.blocks.settings.svg_icon1.label"
        },
        {
          "type": "url",
          "id": "button_link1",
          "label": "t:sections.about_v4.blocks.settings.button_link1.label"
        },
        {
          "type": "html",
          "id": "svg_icon2",
          "label": "t:sections.about_v4.blocks.settings.svg_icon2.label"
        },
        {
          "type": "url",
          "id": "button_link2",
          "label": "t:sections.about_v4.blocks.settings.button_link2.label"
        },
        {
          "type": "html",
          "id": "svg_icon3",
          "label": "t:sections.about_v4.blocks.settings.svg_icon3.label"
        },
        {
          "type": "url",
          "id": "button_link3",
          "label": "t:sections.about_v4.blocks.settings.button_link3.label"
        },
        {
          "type": "html",
          "id": "svg_icon4",
          "label": "t:sections.about_v4.blocks.settings.svg_icon4.label"
        },
        {
          "type": "url",
          "id": "button_link4",
          "label": "t:sections.about_v4.blocks.settings.button_link4.label"
        }
      ]
    }
  ],
  "presets": [
    {
      "name": "t:sections.about_v4.presets.name"
    }
  ]
}
{% endschema %}
