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

<footer {% render 'section-attr' %}>
  <div class='footer-v12'>
    {%- if section.blocks.size > 0 or section.settings.newsletter_enable or section.settings.show_social and has_social_icons == true or section.settings.enable_follow_on_shop -%}
      {%- unless only_empty_brand -%}
        <div class='footer-v12__content-top'>
          <xo-container {% render 'section-layout' %}>
            <xo-grid>
              {% for block in section.blocks %}
                {% if block.type == 'logo' %}
                  <div class='footer-v12__grid' style='--xs: 12; --sm: 12; --md:12; --lg: 3'>
                    <xo-animate xo-cascade>
                      <div class='footer-v12__block'>
                        {%- case block.type -%}
                            {% assign col = 0 %}
                          {%- when 'logo' -%}
                            <div class='footer-v12__block-logo'>
                              <div class='footer-v12__block-logo-phone'>
                                {% if block.settings.image != blank %}
                                  {%- assign image_size_2x = block.settings.image_width | times: 2 | at_most: 5760 -%}
                                  <div
                                    class='footer-v12__block-logo-image'
                                    style='max-width: min(100%, {{ block.settings.image_width }}px);'
                                  >
                                    {% render 'image', image: block.settings.image %}
                                  </div>
                                {% endif %}
                              </div>
                              <div class='footer-v12__block-text'>
                                {{ block.settings.text }}
                              </div>
                              {%- if block.settings.newsletter_enable -%}
                                <div class='footer-v12__block-input'>
                                  <xo-animate xo-cascade>
                                    {%- form 'customer', id: 'ContactFooter', class: 'footer-v12__block-form' -%}
                                      <input type='hidden' name='contact[tags]' value='newsletter'>
                                      <div class='footer-v12__form'>
                                        <div class='footer-v12__field-input'>
                                          {% assign value = form.email %}
                                          {% assign label = 'newsletter.label' | t %}
                                          {% capture attr %}
                                                  aria-required='true'
                                                  autocorrect='off'
                                                  {% if form.errors %}
                                                    autofocus
                                                    aria-invalid='true'
                                                    aria-describedby='ContactFooter-error'
                                                  {% elsif form.posted_successfully? %}
                                                    aria-describedby='ContactFooter-success'
                                                  {% endif %}
                                                  required
                                                {% endcapture %}
                                          {% render 'field-input', type: 'email', name: 'contact[email]',| placeholder: 'Your email address...', value: value, label: label, attr: attr %}
                                          <button
                                            type='submit'
                                            class='footer-v12__field-button'
                                            name='commit'
                                            id='Subscribe'
                                            aria-label='{{ 'newsletter.button_label' | t }}'
                                          >
                                            <div class='footer-v12__button-email'>
                                              {% render 'icon', class: 'footer-v12__icon-before', name: 'email', icon_size: '16', color: '#FFF' %}
                                              {% render 'icon', class: 'footer-v12__icon-after', name: 'email', icon_size: '16', color: '#FFF' %}
                                            </div>
                                          </button>
                                        </div>

                                        {%- if form.errors -%}
                                          <small id='ContactFooter-error' class='newsletter-form__message newsletter-form__message--error'>
                                            {%- render 'icon', name: 'error' -%}
                                            {{- form.errors.translated_fields.email | capitalize }}
                                            {{ form.errors.messages.email -}}
                                          </small>
                                        {%- endif -%}
                                        {%- if form.posted_successfully? -%}
                                          <div
                                            class='newsletter-form__message newsletter-form__message--success'
                                            id='ContactFooter-success'
                                            tabindex='-1'
                                            autofocus
                                          >
                                            {% render 'icon', name: 'success' -%}
                                            {{- 'newsletter.success' | t }}
                                          </div>
                                        {%- endif -%}
                                      </div>
                                    {%- endform -%}
                                  </xo-animate>
                                </div>
                              {%- endif -%}
                              {%- if block.settings.show_social -%}
                                <xo-animate xo-cascade>
                                  <ul class='footer-v12__social'>
                                    {%- if block.settings.icon_link1 != blank and block.settings.item_icon1 != blank -%}
                                      <li>
                                        <a href='{{block.settings.icon_link1}}' class='footer-v12__social-link' target='_blank'>{{ block.settings.item_icon1 }}</a>
                                      </li>
                                    {%- endif -%}
                                    {%- if block.settings.icon_link2 != blank and block.settings.item_icon2 != blank -%}
                                      <li>
                                        <a href='{{block.settings.icon_link2}}' class='footer-v12__social-link' target='_blank'>{{ block.settings.item_icon2 }}</a>
                                      </li>
                                    {%- endif -%}
                                    {%- if block.settings.icon_link3 != blank and block.settings.item_icon3 != blank -%}
                                      <li>
                                        <a href='{{block.settings.icon_link3}}' class='footer-v12__social-link' target='_blank'>{{ block.settings.item_icon3 }}</a>
                                      </li>
                                    {%- endif -%}
                                    {%- if block.settings.icon_link4 != blank and block.settings.item_icon4 != blank -%}
                                      <li>
                                        <a href='{{block.settings.icon_link4}}' class='footer-v12__social-link' target='_blank'>{{ block.settings.item_icon4 }}</a>
                                      </li>
                                    {%- endif -%}
                                  </ul>
                                </xo-animate>
                              {%- endif -%}
                            </div>
                        {%- endcase -%}
                      </div>
                    </xo-animate>
                  </div>
                {% elsif block.type == 'text' %}
                  <div class='footer-v12__grid' style='--xs: 12; --sm: 12; --md:4 ;--lg: 3'>
                    <xo-animate xo-cascade>
                      <div class='footer-v12__block'>
                        {%- if block.settings.heading != blank -%}
                          <h2 class='footer-v12__block-heading'>{{- block.settings.heading -}}</h2>
                        {%- endif -%}
                        {%- case block.type -%}
                            {% assign col = 0 %}
                          {%- when 'text' -%}
                            <div class='footer-v12__block-detail-content rte'>
                              {{ block.settings.subtext }}
                            </div>
                        {%- endcase -%}
                      </div>
                    </xo-animate>
                  </div>
                {% else %}
                  <div class='footer-v12__grid' style='--xs: 12; --sm: 12; --md:4;--lg: 3'>
                    <xo-animate xo-cascade>
                      <div class='footer-v12__block'>
                        {%- if block.settings.heading != blank -%}
                          <h2 class='footer-v12__block-heading'>{{- block.settings.heading -}}</h2>
                        {%- endif -%}
                        {%- case block.type -%}
                            {% assign col = 0 %}
                          {%- when 'link_list' -%}
                            {%- if block.settings.menu != blank -%}
                              <ul class='footer-v12__block-list'>
                                {%- for link in block.settings.menu.links -%}
                                  <li class='footer-v12__block-list-item'>
                                    <a
                                      href='{{ link.url }}'
                                    >
                                      {{ link.title }}
                                    </a>
                                  </li>
                                {%- endfor -%}
                              </ul>
                            {%- endif -%}
                        {%- endcase -%}
                      </div>
                    </xo-animate>
                  </div>
                {% endif %}
              {% endfor %}
            </xo-grid>
          </xo-container>
        </div>
      {%- endunless -%}
    {%- endif -%}
    <xo-container {% render 'section-layout' %}>
      <div class='footer-v12__content-bottom'>
        <xo-grid class='footer-v12__bottom'>
          <div class='footer-v12__copyright' style='--xs: 12; --md: 6; --lg: 6;'>
            {% if section.settings.copyright != blank %}
              {{- section.settings.copyright -}}
            {% else %}
              <small class='footer-v12__copyright-content'>&copy; Copyright {{ 'now' | date: '%Y' }} | {{ shop.name | link_to: routes.root_url -}}</small>
              <small class='footer-v12__copyright-content'> By <a class='footer-v12__copyright-shopilaunch' href='https://shopilaunch.com/'> ShopiLaunch.</a> </small>
              <small class='footer-v12__copyright-content footer-v12__copyright-content--black'>{{ powered_by_link }}.</small>
            {% endif %}
          </div>
          <div class='footer-v12__copyright-payment' style='--xs: 12; --md: 6; --lg: 6;'>
            {%- if section.settings.image_payment != blank -%}
              {% render 'image', image: section.settings.image_payment %}
            {%- endif -%}
          </div>
        </xo-grid>
      </div>
    </xo-container>
  </div>
</footer>

{% schema %}
{
  "name": "t:sections.footer_v4.name",
  "class": "section-footer",
  "blocks": [
    {
      "type": "link_list",
      "name": "t:sections.footer_v4.blocks.link_list.name",
      "settings": [
        {
          "type": "text",
          "id": "heading",
          "default": "Quick links",
          "label": "t:sections.footer_v4.blocks.link_list.settings.heading.label"
        },
        {
          "type": "link_list",
          "id": "menu",
          "default": "footer",
          "label": "t:sections.footer_v4.blocks.link_list.settings.menu.label"
        }
      ]
    },
    {
      "type": "text",
      "name": "t:sections.footer_v4.blocks.text.name",
      "settings": [
        {
          "type": "text",
          "id": "heading",
          "default": "Heading",
          "label": "t:sections.footer_v4.blocks.text.settings.heading.label"
        },
        {
          "type": "text",
          "id": "subtext",
          "default": "<p>Share contact information, store details, and brand content with your customers.</p>",
          "label": "t:sections.footer_v4.blocks.text.settings.subtext.label"
        }
      ]
    },
    {
      "type": "logo",
      "name": "t:sections.footer_v4.blocks.logo.name",
      "settings": [
        {
          "type": "image_picker",
          "id": "image",
          "label": "t:sections.footer_v4.blocks.logo.settings.image.label",
          "info": "Support jpg, jpeg, png, svg"
        },
        {
          "type": "range",
          "id": "image_width",
          "min": 50,
          "max": 550,
          "step": 5,
          "unit": "px",
          "label": "t:sections.footer_v4.blocks.logo.settings.image_width.label",
          "default": 80
        },
        {
          "type": "text",
          "id": "text",
          "default": "Praesent nec nisl a purus blandit viverra. Pellentesque habitant morbi tristique senectuse.",
          "label": "t:sections.footer_v4.blocks.logo.settings.text.label"
        },
        {
          "type": "checkbox",
          "id": "newsletter_enable",
          "default": true,
          "label": "t:sections.footer_v4.blocks.logo.settings.newsletter_enable.label"
        },
        {
          "type": "checkbox",
          "id": "show_social",
          "default": true,
          "label": "t:sections.footer_v4.blocks.logo.settings.show_social.label"
        },
        {
          "type": "html",
          "id": "item_icon1",
          "label": "t:sections.footer_v4.blocks.logo.settings.item_icon1.label",
          "default": "<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewbox=\"0 0 150 150\" style=\"enable-background:new 0 0 150 150;\" height=\"1em\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:space=\"preserve\">\n  <g>\n   <path d=\"M131.95,12.84c-5.03,5.87-10.06,11.74-15.1,17.6c-9.93,11.54-19.88,23.07-29.81,34.6c-0.11,0.12-0.2,0.25-0.37,0.47\n     c16.38,23.8,32.77,47.61,49.27,71.57c-0.51,0.03-0.84,0.07-1.18,0.07c-11.35,0-22.7-0.01-34.06,0.02c-0.78,0-1.22-0.24-1.67-0.89\n     c-10.58-15.41-21.18-30.79-31.78-46.18c-0.25-0.36-0.51-0.71-0.82-1.14c-2.93,3.39-5.79,6.7-8.64,10.01\n     c-10.7,12.42-21.41,24.84-32.09,37.28c-0.59,0.68-1.18,0.94-2.07,0.92c-3.07-0.05-6.15-0.02-9.54-0.02\n     c15.95-18.51,31.74-36.82,47.57-55.19c-2.56-3.72-5.09-7.41-7.63-11.1C40.93,51.86,27.85,32.87,14.78,13.88\n     c-0.22-0.33-0.38-0.7-0.57-1.04c12.08,0,24.16,0,36.25,0c0.08,0.14,0.15,0.28,0.24,0.42c10.22,14.85,20.44,29.71,30.67,44.56\n     c0.13,0.19,0.29,0.36,0.5,0.6c0.35-0.38,0.66-0.68,0.94-1.01c11.76-13.64,23.51-27.27,35.26-40.92c1.02-1.18,1.96-2.43,2.94-3.64\n     C124.65,12.84,128.3,12.84,131.95,12.84z M121.13,129.4c-0.24-0.4-0.34-0.58-0.45-0.74C95.71,93.01,70.74,57.36,45.74,21.73\n     c-0.3-0.43-1.04-0.77-1.58-0.77c-4.78-0.06-9.57-0.04-14.35-0.03c-0.26,0-0.53,0.03-0.99,0.06c0.4,0.59,0.68,1.02,0.97,1.44\n     c8.98,12.82,17.97,25.65,26.95,38.47c15.78,22.53,31.57,45.06,47.33,67.61c0.48,0.68,0.97,0.93,1.78,0.92\n     c4.66-0.04,9.32-0.02,13.99-0.02C120.2,129.4,120.55,129.4,121.13,129.4\"></path>\n  </g>\n</svg>"
        },
        {
          "type": "url",
          "id": "icon_link1",
          "label": "t:sections.footer_v4.blocks.logo.settings.icon_link1.label",
          "default": "/collections/all"
        },
        {
          "type": "html",
          "id": "item_icon2",
          "label": "t:sections.footer_v4.blocks.logo.settings.item_icon2.label",
          "default": "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"1em\" viewbox=\"0 0 512 512\"><path d=\"M256 8C119.252 8 8 119.252 8 256s111.252 248 248 248 248-111.252 248-248S392.748 8 256 8zm163.97 114.366c29.503 36.046 47.369 81.957 47.835 131.955-6.984-1.477-77.018-15.682-147.502-6.818-5.752-14.041-11.181-26.393-18.617-41.614 78.321-31.977 113.818-77.482 118.284-83.523zM396.421 97.87c-3.81 5.427-35.697 48.286-111.021 76.519-34.712-63.776-73.185-116.168-79.04-124.008 67.176-16.193 137.966 1.27 190.061 47.489zm-230.48-33.25c5.585 7.659 43.438 60.116 78.537 122.509-99.087 26.313-186.36 25.934-195.834 25.809C62.38 147.205 106.678 92.573 165.941 64.62zM44.17 256.323c0-2.166.043-4.322.108-6.473 9.268.19 111.92 1.513 217.706-30.146 6.064 11.868 11.857 23.915 17.174 35.949-76.599 21.575-146.194 83.527-180.531 142.306C64.794 360.405 44.17 310.73 44.17 256.323zm81.807 167.113c22.127-45.233 82.178-103.622 167.579-132.756 29.74 77.283 42.039 142.053 45.189 160.638-68.112 29.013-150.015 21.053-212.768-27.882zm248.38 8.489c-2.171-12.886-13.446-74.897-41.152-151.033 66.38-10.626 124.7 6.768 131.947 9.055-9.442 58.941-43.273 109.844-90.795 141.978z\"></path></svg>"
        },
        {
          "type": "url",
          "id": "icon_link2",
          "label": "t:sections.footer_v4.blocks.logo.settings.icon_link2.label",
          "default": "/collections/all"
        },
        {
          "type": "html",
          "id": "item_icon3",
          "label": "t:sections.footer_v4.blocks.logo.settings.item_icon3.label",
          "default": "<svg xmlns=\"http://www.w3.org/2000/svg\" height=\"1em\" viewbox=\"0 0 576 512\"><path d=\"M232 237.2c31.8-15.2 48.4-38.2 48.4-74 0-70.6-52.6-87.8-113.3-87.8H0v354.4h171.8c64.4 0 124.9-30.9 124.9-102.9 0-44.5-21.1-77.4-64.7-89.7zM77.9 135.9H151c28.1 0 53.4 7.9 53.4 40.5 0 30.1-19.7 42.2-47.5 42.2h-79v-82.7zm83.3 233.7H77.9V272h84.9c34.3 0 56 14.3 56 50.6 0 35.8-25.9 47-57.6 47zm358.5-240.7H376V94h143.7v34.9zM576 305.2c0-75.9-44.4-139.2-124.9-139.2-78.2 0-131.3 58.8-131.3 135.8 0 79.9 50.3 134.7 131.3 134.7 61.3 0 101-27.6 120.1-86.3H509c-6.7 21.9-34.3 33.5-55.7 33.5-41.3 0-63-24.2-63-65.3h185.1c.3-4.2.6-8.7.6-13.2zM390.4 274c2.3-33.7 24.7-54.8 58.5-54.8 35.4 0 53.2 20.8 56.2 54.8H390.4z\"></path></svg>"
        },
        {
          "type": "url",
          "id": "icon_link3",
          "label": "t:sections.footer_v4.blocks.logo.settings.icon_link3.label",
          "default": "/collections/all"
        },
        {
          "type": "html",
          "id": "item_icon4",
          "label": "t:sections.footer_v4.blocks.logo.settings.item_icon4.label",
          "default": "<svg version=\"1.1\" id=\"Layer_1\" xmlns=\"http://www.w3.org/2000/svg\" x=\"0px\" y=\"0px\" viewbox=\"0 0 150 150\" style=\"enable-background:new 0 0 150 150;\" height=\"1em\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" xml:space=\"preserve\">\n  <g>\n   <path d=\"M131.95,12.84c-5.03,5.87-10.06,11.74-15.1,17.6c-9.93,11.54-19.88,23.07-29.81,34.6c-0.11,0.12-0.2,0.25-0.37,0.47\n     c16.38,23.8,32.77,47.61,49.27,71.57c-0.51,0.03-0.84,0.07-1.18,0.07c-11.35,0-22.7-0.01-34.06,0.02c-0.78,0-1.22-0.24-1.67-0.89\n     c-10.58-15.41-21.18-30.79-31.78-46.18c-0.25-0.36-0.51-0.71-0.82-1.14c-2.93,3.39-5.79,6.7-8.64,10.01\n     c-10.7,12.42-21.41,24.84-32.09,37.28c-0.59,0.68-1.18,0.94-2.07,0.92c-3.07-0.05-6.15-0.02-9.54-0.02\n     c15.95-18.51,31.74-36.82,47.57-55.19c-2.56-3.72-5.09-7.41-7.63-11.1C40.93,51.86,27.85,32.87,14.78,13.88\n     c-0.22-0.33-0.38-0.7-0.57-1.04c12.08,0,24.16,0,36.25,0c0.08,0.14,0.15,0.28,0.24,0.42c10.22,14.85,20.44,29.71,30.67,44.56\n     c0.13,0.19,0.29,0.36,0.5,0.6c0.35-0.38,0.66-0.68,0.94-1.01c11.76-13.64,23.51-27.27,35.26-40.92c1.02-1.18,1.96-2.43,2.94-3.64\n     C124.65,12.84,128.3,12.84,131.95,12.84z M121.13,129.4c-0.24-0.4-0.34-0.58-0.45-0.74C95.71,93.01,70.74,57.36,45.74,21.73\n     c-0.3-0.43-1.04-0.77-1.58-0.77c-4.78-0.06-9.57-0.04-14.35-0.03c-0.26,0-0.53,0.03-0.99,0.06c0.4,0.59,0.68,1.02,0.97,1.44\n     c8.98,12.82,17.97,25.65,26.95,38.47c15.78,22.53,31.57,45.06,47.33,67.61c0.48,0.68,0.97,0.93,1.78,0.92\n     c4.66-0.04,9.32-0.02,13.99-0.02C120.2,129.4,120.55,129.4,121.13,129.4\"></path>\n  </g>\n</svg>"
        },
        {
          "type": "url",
          "id": "icon_link4",
          "label": "t:sections.footer_v4.blocks.logo.settings.icon_link4.label",
          "default": "/collections/all"
        }
      ]
    }
  ],
  "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": "liquid",
      "id": "copyright",
      "label": "t:sections.footer_v4.settings.copyright.label",
      "default": " © Copyright {{ 'now' | date: '%Y' }} | <a href='http://toyland-store-newdemo.myshopify.com' rel='nofollow' target='_blank' class='footer-v12__theme-name'>Toyland</a> By <a href='https://shopilaunch.com/' rel='nofollow' target='_blank' class='footer-v12__shop-name'> ShopiLaunch.</a><a href='https://shopify.pxf.io/9gPaY0' rel='nofollow' target='_blank' class='footer-v12__powered-shopify'> Powered by Shopify.</a>"
    },
    {
      "type": "image_picker",
      "id": "image_payment",
      "label": "t:sections.footer_v4.settings.image_payment.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
    }
  ],
  "default": {
    "blocks": [
      {
        "type": "text"
      },
      {
        "type": "link_list"
      },
      {
        "type": "link_list"
      },
      {
        "type": "link_list"
      }
    ]
  }
}
{% endschema %}
