

<section {% render 'section-attr' %}>
  {% render 'section-bg-image' %}
  <xo-container {% render 'section-layout' %}>
    <xo-grid style='--xs:1; --md:2; --xo-grid-col-gap: 80px;'>
      <div class='testimonial-v15__content'>
        <xo-animate xo-cascade>
          <span class='testimonial-v15__icon'>
            {{ section.settings.icon }}
          </span>
          <h2 class='testimonial-v15__title'>
            {{ section.settings.title }}
          </h2>
        </xo-animate>
        <xo-carousel
          {% if section.settings.auto_play %}
            xo-autoplay='5000'
          {% endif %}
          xo-speed='200'
          xo-gap='30'
          xo-rewind
          xo-render-bullet='<span></span>'
        >
          <xo-carousel-inner>
            <xo-carousel-list role='list' aria-label='{{ 'general.slider.name' | t }}'>
              {% for block in section.blocks %}
                <xo-carousel-slide aria-roledescription='{{ 'sections.slideshow.slide' | t }}' aria-label='{{ forloop.index }} {{ 'general.slider.of' | t }} {{ forloop.length }}'>
                  <xo-animate xo-cascade class='testimonial-v15__item'>
                    {%- if block.settings.stars > 0 -%}
                      <ul role='list' class='testimonial-v15__list-star'>
                        {% for i in (1..block.settings.stars) %}
                          <li>{% render 'icon', name: 'star', icon_size: '15', color: '#ffc107' %}</li>
                        {% endfor %}
                      </ul>
                    {%- endif -%}
                    {% if block.settings.testimonial %}
                      <div class='testimonial-v15__testimonial'>{{ block.settings.testimonial }}</div>
                    {% endif %}
                    <div class='testimonial-v15__customer'>
                      {% if block.settings.name_customer %}
                        <div class='testimonial-v15__name'>{{ block.settings.name_customer }}</div>
                        <span></span>
                      {% endif %}
                      {% if block.settings.position %}
                        <div class='testimonial-v15__position'>{{ block.settings.position }}</div>
                      {% endif %}
                    </div>
                  </xo-animate>
                </xo-carousel-slide>
              {% endfor %}
            </xo-carousel-list>
          </xo-carousel-inner>
          {% render 'carousel-pagination-style3', class: 'testimonial-v15__pagination' %}
        </xo-carousel>
      </div>
      <div
        {% if section.settings.reverse %}
          style='--order-md:-1'
        {% endif %}
      >
        <xo-instagram
          xo-limit='5'
          xo-open-mode='{{ section.settings.open_mode }}'
          xo-access-token='{{ section.settings.access_token }}'
        >
          <xo-grid
            style='--xs: 1; --md:4; --xl: {{ section.settings.columns_limit }}; --xo-grid-col-gap: {{section.settings.gap}}px ;--xo-grid-row-gap: {{section.settings.gap}}px'
            class='instagram-v1__grid'
          >
            {% if section.settings.access_token == blank %}
              {% for i in (1..section.settings.limit) %}
                <div class='instagram-v1__item'>
                  <img src='{{ 'instagram' | append: i | append: '.jpg' | file_img_url: 'master' }}' class='instagram-v1__image' alt='instagram' width='1000' height='1000'>
                  <a href='https://www.instagram.com/' class='instagram-v1__image-layer' style='--color: {{ section.settings.background_color }}' target='_blank'>
                    {{ section.settings.icon_image }}
                  </a>
                </div>
              {% endfor %}
            {% else %}
              <xo-instagram-template>
                <img class='instagram-v1__image' data-src='{ url }' alt='' width='1000' height='1000'>
                <span class='instagram-v1__image-layer' style='--color: {{ section.settings.background_color }}'>{{ section.settings.icon_image }}</span>
              </xo-instagram-template>
            {% endif %}
          </xo-grid>
        </xo-instagram>
      </div>
    </xo-grid>
  </xo-container>
</section>

{% schema %}
{
  "name": "t:sections.testimonial_v3.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": "number",
      "id": "fullwidth_margin",
      "label": "t:sections.all.fullwidth_margin.label",
      "default": 0,
      "visible_if": "{{ section.settings.width == 'fullwidth' }}"
    },
    {
      "type": "checkbox",
      "id": "reverse",
      "label": "t:sections.testimonial_v3.settings.reverse.label"
    },
    {
      "type": "checkbox",
      "id": "auto_play",
      "label": "t:sections.testimonial_v3.settings.auto_play.label",
      "default": true
    },
    {
      "type": "html",
      "id": "icon",
      "label": "t:sections.testimonial_v3.settings.icon.label",
      "default": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\"><path d=\"M12 0C5.373 0 0 5.373 0 12s5.373 12 12 12 12-5.373 12-12S18.627 0 12 0zm0 22c-5.514 0-10-4.486-10-10S6.486 2 12 2s10 4.486 10 10-4.486 10-10 10zm-2-15h4v10h-4zm1 11h2v2h-2z\"/></svg>"
    },
    {
      "type": "text",
      "id": "title",
      "label": "t:sections.testimonial_v3.settings.title.label",
      "default": "Title"
    },
    {
      "type": "image_picker",
      "id": "image",
      "label": "t:sections.testimonial_v3.settings.image.label"
    },
    {
      "type": "range",
      "id": "columns_limit",
      "min": 1,
      "max": 12,
      "step": 1,
      "label": "t:sections.testimonial_v3.settings.columns_limit.label",
      "default": 6
    },
    {
      "type": "range",
      "id": "limit",
      "min": 1,
      "max": 20,
      "step": 1,
      "label": "t:sections.testimonial_v3.settings.limit.label",
      "default": 6
    },
    {
      "type": "range",
      "id": "gap",
      "min": 0,
      "max": 40,
      "step": 1,
      "unit": "px",
      "label": "t:sections.testimonial_v3.settings.gap.label",
      "default": 30
    },
    {
      "type": "text",
      "id": "access_token",
      "label": "t:sections.testimonial_v3.settings.access_token.label",
      "info": "t:sections.testimonial_v3.settings.access_token.info"
    },
    {
      "type": "select",
      "id": "open_mode",
      "label": "t:sections.testimonial_v3.settings.open_mode.label",
      "default": "newtab",
      "options": [
        {
          "label": "t:sections.testimonial_v3.settings.open_mode.option_1.label",
          "value": "modal"
        },
        {
          "label": "t:sections.testimonial_v3.settings.open_mode.option_2.label",
          "value": "newtab"
        }
      ]
    },
    {
      "type": "html",
      "id": "icon_image",
      "label": "t:sections.testimonial_v3.settings.icon_image.label",
      "default": "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 448 512\"><path d=\"M224.1 141c-63.6 0-114.9 51.3-114.9 114.9s51.3 114.9 114.9 114.9S339 319.5 339 255.9 287.7 141 224.1 141zm0 189.6c-41.1 0-74.7-33.5-74.7-74.7s33.5-74.7 74.7-74.7 74.7 33.5 74.7 74.7-33.6 74.7-74.7 74.7zm146.4-194.3c0 14.9-12 26.8-26.8 26.8-14.9 0-26.8-12-26.8-26.8s12-26.8 26.8-26.8 26.8 12 26.8 26.8zm76.1 27.2c-1.7-35.9-9.9-67.7-36.2-93.9-26.2-26.2-58-34.4-93.9-36.2-37-2.1-147.9-2.1-184.9 0-35.8 1.7-67.6 9.9-93.9 36.1s-34.4 58-36.2 93.9c-2.1 37-2.1 147.9 0 184.9 1.7 35.9 9.9 67.7 36.2 93.9s58 34.4 93.9 36.2c37 2.1 147.9 2.1 184.9 0 35.9-1.7 67.7-9.9 93.9-36.2 26.2-26.2 34.4-58 36.2-93.9 2.1-37 2.1-147.8 0-184.8zM398.8 388c-7.8 19.6-22.9 34.7-42.6 42.6-29.5 11.7-99.5 9-132.1 9s-102.7 2.6-132.1-9c-19.6-7.8-34.7-22.9-42.6-42.6-11.7-29.5-9-99.5-9-132.1s-2.6-102.7 9-132.1c7.8-19.6 22.9-34.7 42.6-42.6 29.5-11.7 99.5-9 132.1-9s102.7-2.6 132.1 9c19.6 7.8 34.7 22.9 42.6 42.6 11.7 29.5 9 99.5 9 132.1s2.7 102.7-9 132.1z\"/></svg>"
    },
    {
      "type": "header",
      "content": "t:sections.all.heading.content"
    },
    {
      "type": "color_scheme",
      "id": "color_scheme",
      "label": "t:sections.all.color_scheme.label"
    },
    {
      "type": "select",
      "id": "background_type",
      "label": "t:sections.all.background_type.label",
      "options": [
        {
          "value": "color",
          "label": "t:sections.all.background_type.option__1.label"
        },
        {
          "value": "gradient",
          "label": "t:sections.all.background_type.option__2.label"
        },
        {
          "value": "image",
          "label": "t:sections.all.background_type.option__3.label"
        },
        {
          "value": "video",
          "label": "t:sections.all.background_type.option__4.label"
        }
      ],
      "default": "color"
    },
    {
      "type": "color",
      "id": "background_color",
      "label": "t:sections.all.background_color.label",
      "alpha": true,
      "visible_if": "{{ section.settings.background_type == 'color' }}"
    },
    {
      "type": "color_background",
      "id": "background_gradient",
      "label": "t:sections.all.background_gradient.label",
      "visible_if": "{{ section.settings.background_type == 'gradient' }}"
    },
    {
      "type": "image_picker",
      "id": "background_image_desktop",
      "label": "t:sections.all.background_image_desktop.label",
      "visible_if": "{{ section.settings.background_type == 'image' }}"
    },
    {
      "type": "image_picker",
      "id": "background_image_mobile",
      "label": "t:sections.all.background_image_mobile.label",
      "visible_if": "{{ section.settings.background_type == 'image' }}"
    },
    {
      "type": "checkbox",
      "id": "use_parallax",
      "label": "t:sections.all.use_parallax.label",
      "default": true,
      "visible_if": "{{ section.settings.background_type == 'image' }}"
    },
    {
      "type": "select",
      "id": "background_image_animation",
      "label": "t:sections.all.animation.label",
      "options": [
        {
          "value": "none",
          "label": "t:sections.all.animation.option__0.label"
        },
        {
          "value": "fade",
          "label": "t:sections.all.animation.option__1.label"
        },
        {
          "value": "fade-up",
          "label": "t:sections.all.animation.option__2.label"
        },
        {
          "value": "fade-down",
          "label": "t:sections.all.animation.option__3.label"
        },
        {
          "value": "fade-left",
          "label": "t:sections.all.animation.option__4.label"
        },
        {
          "value": "fade-right",
          "label": "t:sections.all.animation.option__5.label"
        },
        {
          "value": "zoom-in",
          "label": "t:sections.all.animation.option__6.label"
        },
        {
          "value": "zoom-out",
          "label": "t:sections.all.animation.option__7.label"
        },
        {
          "value": "rotate-left-up",
          "label": "t:sections.all.animation.option__8.label"
        },
        {
          "value": "rotate-right-up",
          "label": "t:sections.all.animation.option__9.label"
        },
        {
          "value": "snake-up",
          "label": "t:sections.all.animation.option__10.label"
        },
        {
          "value": "snake-down",
          "label": "t:sections.all.animation.option__11.label"
        },
        {
          "value": "snake-left",
          "label": "t:sections.all.animation.option__12.label"
        },
        {
          "value": "snake-right",
          "label": "t:sections.all.animation.option__13.label"
        },
        {
          "value": "3d-up",
          "label": "t:sections.all.animation.option__14.label"
        }
      ],
      "default": "none",
      "visible_if": "{{ section.settings.background_type == 'image' }}"
    },
    {
      "type": "textarea",
      "id": "background_video_url",
      "label": "t:sections.all.background_video_url.label",
      "visible_if": "{{ section.settings.background_type == 'video' }}"
    },
    {
      "type": "select",
      "id": "background_video_animation",
      "label": "t:sections.all.animation.label",
      "options": [
        {
          "value": "none",
          "label": "t:sections.all.animation.option__0.label"
        },
        {
          "value": "fade",
          "label": "t:sections.all.animation.option__1.label"
        },
        {
          "value": "fade-up",
          "label": "t:sections.all.animation.option__2.label"
        },
        {
          "value": "fade-down",
          "label": "t:sections.all.animation.option__3.label"
        },
        {
          "value": "fade-left",
          "label": "t:sections.all.animation.option__4.label"
        },
        {
          "value": "fade-right",
          "label": "t:sections.all.animation.option__5.label"
        },
        {
          "value": "zoom-in",
          "label": "t:sections.all.animation.option__6.label"
        },
        {
          "value": "zoom-out",
          "label": "t:sections.all.animation.option__7.label"
        },
        {
          "value": "rotate-left-up",
          "label": "t:sections.all.animation.option__8.label"
        },
        {
          "value": "rotate-right-up",
          "label": "t:sections.all.animation.option__9.label"
        },
        {
          "value": "snake-up",
          "label": "t:sections.all.animation.option__10.label"
        },
        {
          "value": "snake-down",
          "label": "t:sections.all.animation.option__11.label"
        },
        {
          "value": "snake-left",
          "label": "t:sections.all.animation.option__12.label"
        },
        {
          "value": "snake-right",
          "label": "t:sections.all.animation.option__13.label"
        },
        {
          "value": "3d-up",
          "label": "t:sections.all.animation.option__14.label"
        }
      ],
      "default": "none",
      "visible_if": "{{ section.settings.background_type == 'video' }}"
    },
    {
      "type": "color",
      "id": "background_overlay",
      "label": "t:sections.all.background_overlay.label",
      "alpha": true,
      "visible_if": "{{ section.settings.background_type == 'image' or section.settings.background_type == 'video' }}"
    },
    {
      "type": "number",
      "id": "background_margin",
      "label": "t:sections.all.background_margin.label",
      "default": 0
    },
    {
      "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": [
    {
      "type": "review",
      "name": "t:sections.testimonial_v3.blocks.name",
      "settings": [
        {
          "type": "range",
          "id": "stars",
          "min": 0,
          "max": 5,
          "step": 1,
          "label": "t:sections.testimonial_v3.blocks.stars.label",
          "info": "t:sections.testimonial_v3.blocks.stars.info",
          "default": 5
        },
        {
          "type": "text",
          "id": "testimonial",
          "label": "t:sections.testimonial_v3.blocks.testimonial.label",
          "default": "” I came to Dr Thiara with lumpy asymmetrical lips which I had done from elsewhere. He was excellent in discussing my options and was able to fix my lips using 2 sessions of lip fillers. I was wowed by the results and cannot recommend him highly enough!“"
        },
        {
          "type": "text",
          "id": "name_customer",
          "label": "t:sections.testimonial_v3.blocks.name_customer.label",
          "default": "Ann Smith"
        },
        {
          "type": "text",
          "id": "position",
          "label": "t:sections.testimonial_v3.blocks.position.label",
          "default": "Photographer"
        }
      ]
    }
  ],
  "presets": [
    {
      "name": "t:sections.testimonial_v3.presets.name"
    }
  ]
}
{% endschema %}
