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

<section {% render 'section-attr' %}>
  <xo-animate xo-cascade>
    <div class='slideshow-v100'>
      <div class='slideshow-v100__desktop'>
        <div class='slideshow-v100__haft'>
          <div
            class='slideshow-v100__bg'
            style='background-image: url("{{ section.settings.image1 | image_url }}")'
          ></div>
          <div class='slideshow-v100__mid1' style='background-image: url("{{ section.settings.image_mid | image_url }}")'></div>
          <div class='slideshow-v100__content'>
            <div class='slideshow-v100__title'>{{ section.settings.title1 | default: 'title' }}</div>
            {%- if section.settings.desc1 -%}
              <div class='slideshow-v100__desc'>{{ section.settings.desc1 }}</div>
            {%- endif -%}
            {%- render 'button', class: 'advertise', text: section.settings.button_text1, link: section.settings.button_link1, style: 'secondary' -%}
          </div>
        </div>

        <div class='slideshow-v100__haft'>
          <div
            class='slideshow-v100__bg'
            style='background-image: url("{{ section.settings.image2 | image_url }}")'
          ></div>
          <div class='slideshow-v100__mid2' style='background-image: url("{{ section.settings.image_mid | image_url }}")'></div>
          <div class='slideshow-v100__content'>
            <div class='slideshow-v100__title'>{{ section.settings.title2 | default: 'title' }}</div>
            {%- if section.settings.desc2 -%}
              <div class='slideshow-v100__desc'>{{ section.settings.desc2 }}</div>
            {%- endif -%}

            {%- render 'button', class: 'advertise', text: section.settings.button_text2, link: section.settings.button_link2, style: 'secondary' -%}
          </div>
        </div>
      </div>

      <xo-carousel
        xo-active-index='0'
        xo-render-bullet='<span class="slideshow-v100__bullet"></span>'
        xo-hover-pause
      >
        <xo-carousel-inner>
          <xo-carousel-list>
            <xo-carousel-slide>
              <div class='slideshow-v100__mobile'>
                <div class='slideshow-v100__mobile--bg'>
                  {%- render 'image', image: section.settings.image1 -%}
                </div>
                <div class='slideshow-v100__mobile--content'>
                  <div class='slideshow-v100__title'>{{ section.settings.title1 | default: 'title' }}</div>
                  {%- if section.settings.desc1 -%}
                    <div class='slideshow-v100__desc'>{{ section.settings.desc1 }}</div>
                  {%- endif -%}
                  {%- render 'button', class: 'advertise', text: section.settings.button_text1, link: section.settings.button_link1, style: 'secondary' -%}
                </div>
              </div>
            </xo-carousel-slide>
            <xo-carousel-slide>
              <div class='slideshow-v100__mobile'>
                <div class='slideshow-v100__mobile--bg'>
                  {%- render 'image', image: section.settings.image2 -%}
                </div>
                <div class='slideshow-v100__mobile--content'>
                  <div class='slideshow-v100__title'>{{ section.settings.title1 | default: 'title' }}</div>
                  {%- if section.settings.desc2 -%}
                    <div class='slideshow-v100__desc'>{{ section.settings.desc1 }}</div>
                  {%- endif -%}
                  {%- render 'button', class: 'advertise', text: section.settings.button_text2, link: section.settings.button_link2, style: 'secondary' -%}
                </div>
              </div>
            </xo-carousel-slide>
          </xo-carousel-list>
        </xo-carousel-inner>
        <xo-carousel-pagination class='slideshow-v100__pagination'></xo-carousel-pagination>
      </xo-carousel>
    </div>
  </xo-animate>
</section>

{% schema %}
{
  "name": "t:sections.slideshow_v4.name",
  "tag": "section",
  "class": "section",
  "settings": [
    {
      "type": "header",
      "content": "Setting left side"
    },
    {
      "type": "image_picker",
      "id": "image1",
      "label": "t:sections.slideshow_v4.settings.image.label",
      "info": "Support jpg, jpeg, png, svg"
    },
    {
      "type": "text",
      "id": "title1",
      "label": "t:sections.slideshow_v4.settings.title.label",
      "default": "Title"
    },
    {
      "type": "text",
      "id": "desc1",
      "label": "t:sections.slideshow_v4.settings.desc.label",
      "default": "Lorem dolor sit amet, consectetur adipiscing elit"
    },
    {
      "type": "text",
      "id": "button_text1",
      "label": "t:sections.slideshow_v4.settings.button_text.label",
      "default": "Play now"
    },
    {
      "type": "url",
      "id": "button_link1",
      "label": "t:sections.slideshow_v4.settings.button_link.label",
      "default": "/collections/all"
    },
    {
      "type": "header",
      "content": "Setting right side"
    },
    {
      "type": "image_picker",
      "id": "image2",
      "label": "t:sections.slideshow_v4.settings.image.label",
      "info": "Support jpg, jpeg, png, svg"
    },
    {
      "type": "text",
      "id": "title2",
      "label": "t:sections.slideshow_v4.settings.title.label",
      "default": "Title"
    },
    {
      "type": "text",
      "id": "desc2",
      "label": "t:sections.slideshow_v4.settings.desc.label",
      "default": "Lorem dolor sit amet, consectetur adipiscing elit"
    },
    {
      "type": "text",
      "id": "button_text2",
      "label": "t:sections.slideshow_v4.settings.button_text.label",
      "default": "Play now"
    },
    {
      "type": "url",
      "id": "button_link2",
      "label": "t:sections.slideshow_v4.settings.button_link.label",
      "default": "/collections/all"
    },
    {
      "type": "header",
      "content": "Setting additional"
    },
    {
      "type": "image_picker",
      "id": "image_mid",
      "label": "t:sections.slideshow_v4.settings.image_mid.label",
      "info": "Support jpg, jpeg, png, svg"
    },
    {
      "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.slideshow_v4.presets.name"
    }
  ]
}
{% endschema %}
