Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {%- assign social_icons = false -%}
- {% if
- settings.social_twitter_link != blank
- or settings.social_facebook_link != blank
- or settings.social_pinterest_link != blank
- or settings.social_instagram_link != blank
- or settings.social_tumblr_link != blank
- or settings.social_snapchat_link != blank
- or settings.social_youtube_link != blank
- or settings.social_vimeo_link != blank
- or template.name == 'article'
- or template.name == 'blog'
- %}
- {%- assign social_icons = true -%}
- {% endif %}
- <footer class="site-footer" role="contentinfo">
- <div class="page-width">
- <div class="grid grid--no-gutters">
- <div class="grid__item{% if section.settings.footer_newsletter_enable and section.settings.footer_linklist_two != blank %} medium-up--one-quarter{% elsif section.settings.footer_linklist_two == blank and section.settings.footer_newsletter_enable %} medium-up--one-half{% else %} text-center{% endif %}">
- {% if linklists[section.settings.footer_linklist].links.size > 0 %}
- <ul class="site-footer__linklist{% unless section.settings.footer_newsletter_enable %} site-footer__linklist--center{% endunless %}">
- {% for link in linklists[section.settings.footer_linklist].links %}
- <li class="site-footer__linklist-item">
- <a href="{{ link.url }}"{% if link.active %} aria-current="page"{% endif %}>{{ link.title }}</a>
- </li>
- {% endfor %}
- </ul>
- {% endif %}
- </div>
- <div class="grid__item{% if section.settings.footer_newsletter_enable and section.settings.footer_linklist != blank %} medium-up--one-quarter{% elsif section.settings.footer_linklist == blank and section.settings.footer_newsletter_enable %} medium-up--one-half{% else %} text-center{% endif %}">
- {% if linklists[section.settings.footer_linklist_two].links.size > 0 %}
- <ul class="site-footer__linklist{% unless section.settings.footer_newsletter_enable %} site-footer__linklist--center{% endunless %}">
- {% for link in linklists[section.settings.footer_linklist_two].links %}
- <li class="site-footer__linklist-item">
- <a href="{{ link.url }}"{% if link.active %} aria-current="page"{% endif %}>{{ link.title }}</a>
- </li>
- {% endfor %}
- </ul>
- {% endif %}
- </div>
- {% if section.settings.footer_newsletter_enable %}
- <div class="grid__item medium-up--one-half">
- <div class="site-footer__newsletter">
- {% form 'customer' %}
- {{ form.errors | default_errors }}
- {% if form.posted_successfully? %}
- <p class="form--success">{{ 'general.newsletter_form.confirmation' | t }}</p>
- {% else %}
- <label for="Email" class="h4">{{ 'general.newsletter_form.newsletter_email' | t }}</label>
- <div class="input-group">
- <input type="hidden" name="contact[tags]" value="newsletter">
- <input type="email"
- name="contact[email]"
- id="Email"
- class="input-group__field newsletter__input"
- value="{% if customer %}{{ customer.email }}{% endif %}"
- placeholder="{{ 'general.newsletter_form.email_placeholder' | t }}"
- autocorrect="off"
- autocapitalize="off">
- <span class="input-group__btn">
- <button type="submit" class="btn newsletter__submit" name="commit" id="Subscribe">
- <span class="newsletter__submit-text--large">{{ 'general.newsletter_form.submit' | t }}</span>
- </button>
- </span>
- </div>
- {% endif %}
- {% endform %}
- </div>
- </div>
- {% endif %}
- </div>
- <div class="grid grid--no-gutters">
- {% if social_icons %}
- <div class="grid__item{% if section.settings.footer_newsletter_enable %} medium-up--one-half{% else %} text-center{% endif %}">
- <ul class="list--inline site-footer__social-icons social-icons">
- {% if settings.social_facebook_link != blank %}
- <li>
- <a class="social-icons__link" href="{{ settings.social_facebook_link | escape }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Facebook' }}">
- {% include 'icon-facebook' %}
- <span class="icon__fallback-text">Facebook</span>
- </a>
- </li>
- {% endif %}
- {% if settings.social_twitter_link != blank %}
- <li>
- <a class="social-icons__link" href="{{ settings.social_twitter_link | escape }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Twitter' }}">
- {% include 'icon-twitter' %}
- <span class="icon__fallback-text">Twitter</span>
- </a>
- </li>
- {% endif %}
- {% if settings.social_pinterest_link != blank %}
- <li>
- <a class="social-icons__link" href="{{ settings.social_pinterest_link | escape }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Pinterest' }}">
- {% include 'icon-pinterest' %}
- <span class="icon__fallback-text">Pinterest</span>
- </a>
- </li>
- {% endif %}
- {% if settings.social_instagram_link != blank %}
- <li>
- <a class="social-icons__link" href="{{ settings.social_instagram_link | escape }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Instagram' }}">
- {% include 'icon-instagram' %}
- <span class="icon__fallback-text">Instagram</span>
- </a>
- </li>
- {% endif %}
- {% if settings.social_tumblr_link != blank %}
- <li>
- <a class="social-icons__link" href="{{ settings.social_tumblr_link | escape }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Tumblr' }}">
- {% include 'icon-tumblr' %}
- <span class="icon__fallback-text">Tumblr</span>
- </a>
- </li>
- {% endif %}
- {% if settings.social_snapchat_link != blank %}
- <li>
- <a class="social-icons__link" href="{{ settings.social_snapchat_link | escape }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Snapchat' }}">
- {% include 'icon-snapchat' %}
- <span class="icon__fallback-text">Snapchat</span>
- </a>
- </li>
- {% endif %}
- {% if settings.social_youtube_link != blank %}
- <li>
- <a class="social-icons__link" href="{{ settings.social_youtube_link | escape }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'YouTube' }}">
- {% include 'icon-youtube' %}
- <span class="icon__fallback-text">YouTube</span>
- </a>
- </li>
- {% endif %}
- {% if settings.social_vimeo_link != blank %}
- <li>
- <a class="social-icons__link" href="{{ settings.social_vimeo_link | escape }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Vimeo' }}">
- {% include 'icon-vimeo' %}
- <span class="icon__fallback-text">Vimeo</span>
- </a>
- </li>
- {% endif %}
- {% if template.name == 'blog' or template.name == 'article' %}
- <li>
- <a class="social-icons__link" href="{{ shop.url }}{{ blog.url }}.atom">
- {% include 'icon-rss' %}
- <span class="icon__fallback-text">RSS</span>
- </a>
- </li>
- {% endif %}
- </ul>
- </div>
- {% endif %}
- <div class="grid__item{% if section.settings.footer_newsletter_enable and social_icons == true %} medium-up--one-half{% else %} text-center{% endif %}">
- <div class="site-footer__copyright{% if social_icons and section.settings.footer_newsletter_enable != blank %} site-footer__copyright--right medium-up--text-right{% elsif social_icons == false and section.settings.footer_newsletter_enable %} medium-up--text-left{% endif %}">
- {% unless social_icons and section.settings.footer_newsletter_enable and section.settings.show_payment_icons %}
- <small class="site-footer__copyright-content">© {{ 'now' | date: "%Y" }}, {{ shop.name | link_to: '/' }}</small>
- <small class="site-footer__copyright-content site-footer__copyright-content--powered-by">{{ powered_by_link }}</small>
- {% endunless %}
- {% if section.settings.show_payment_icons %}
- <div class="site-footer__payment-icons{% unless social_icons or section.settings.footer_newsletter_enable == blank %} site-footer__payment-icons--right{% endunless %}">
- {% unless shop.enabled_payment_types == empty %}
- {%- assign payment_icons_available = 'amazon_payments,american_express,apple_pay,bitcoin,cirrus,dankort,diners_club,discover,dogecoin,dwolla,forbrugsforeningen,interac,jcb,litecoin,maestro,master,paypal,stripe,visa' | split: ',' -%}
- <ul class="payment-icons list--inline">
- {% for type in shop.enabled_payment_types %}
- {% if payment_icons_available contains type %}
- <li class="payment-icon">
- {%- assign icon_name = type | prepend: 'icon-' -%}
- {% include icon_name %}
- </li>
- {% endif %}
- {% endfor %}
- </ul>
- {% endunless %}
- </div>
- {% endif %}
- </div>
- </div>
- </div>
- {% if social_icons and section.settings.footer_newsletter_enable and section.settings.show_payment_icons %}
- <div class="site-footer__copyright--bottom">
- <small class="site-footer__copyright-content">© {{ 'now' | date: "%Y" }}, {{ shop.name | link_to: '/' }}</small>
- <small class="site-footer__copyright-content">{{ powered_by_link }}</small>
- </div>
- {% endif %}
- </div>
- </footer>
- {% schema %}
- {
- "name": "Footer",
- "settings": [
- {
- "type": "link_list",
- "id": "footer_linklist",
- "label": "Primary menu",
- "default": "footer",
- "info": "This menu won't show dropdown items"
- },
- {
- "type": "link_list",
- "id": "footer_linklist_two",
- "label": "Additional menu",
- "default": "main-menu",
- "info": "This menu won't show dropdown items"
- },
- {
- "type": "checkbox",
- "id": "footer_newsletter_enable",
- "label": "Show newsletter signup",
- "default": false
- },
- {
- "type": "checkbox",
- "id": "show_payment_icons",
- "label": "Show payment icons",
- "default": false
- }
- ]
- }
- {% endschema %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement