Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.84 KB | None | 0 0
  1. {%- assign social_icons = false -%}
  2.  
  3. {% if
  4. settings.social_twitter_link != blank
  5. or settings.social_facebook_link != blank
  6. or settings.social_pinterest_link != blank
  7. or settings.social_instagram_link != blank
  8. or settings.social_tumblr_link != blank
  9. or settings.social_snapchat_link != blank
  10. or settings.social_youtube_link != blank
  11. or settings.social_vimeo_link != blank
  12. or template.name == 'article'
  13. or template.name == 'blog'
  14. %}
  15. {%- assign social_icons = true -%}
  16. {% endif %}
  17.  
  18. <footer class="site-footer" role="contentinfo">
  19. <div class="page-width">
  20. <div class="grid grid--no-gutters">
  21. <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 %}">
  22. {% if linklists[section.settings.footer_linklist].links.size > 0 %}
  23. <ul class="site-footer__linklist{% unless section.settings.footer_newsletter_enable %} site-footer__linklist--center{% endunless %}">
  24. {% for link in linklists[section.settings.footer_linklist].links %}
  25. <li class="site-footer__linklist-item">
  26. <a href="{{ link.url }}"{% if link.active %} aria-current="page"{% endif %}>{{ link.title }}</a>
  27. </li>
  28. {% endfor %}
  29. </ul>
  30. {% endif %}
  31. </div>
  32.  
  33. <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 %}">
  34. {% if linklists[section.settings.footer_linklist_two].links.size > 0 %}
  35. <ul class="site-footer__linklist{% unless section.settings.footer_newsletter_enable %} site-footer__linklist--center{% endunless %}">
  36. {% for link in linklists[section.settings.footer_linklist_two].links %}
  37. <li class="site-footer__linklist-item">
  38. <a href="{{ link.url }}"{% if link.active %} aria-current="page"{% endif %}>{{ link.title }}</a>
  39. </li>
  40. {% endfor %}
  41. </ul>
  42. {% endif %}
  43. </div>
  44.  
  45. {% if section.settings.footer_newsletter_enable %}
  46. <div class="grid__item medium-up--one-half">
  47. <div class="site-footer__newsletter">
  48. {% form 'customer' %}
  49. {{ form.errors | default_errors }}
  50. {% if form.posted_successfully? %}
  51. <p class="form--success">{{ 'general.newsletter_form.confirmation' | t }}</p>
  52. {% else %}
  53. <label for="Email" class="h4">{{ 'general.newsletter_form.newsletter_email' | t }}</label>
  54. <div class="input-group">
  55. <input type="hidden" name="contact[tags]" value="newsletter">
  56. <input type="email"
  57. name="contact[email]"
  58. id="Email"
  59. class="input-group__field newsletter__input"
  60. value="{% if customer %}{{ customer.email }}{% endif %}"
  61. placeholder="{{ 'general.newsletter_form.email_placeholder' | t }}"
  62. autocorrect="off"
  63. autocapitalize="off">
  64. <span class="input-group__btn">
  65. <button type="submit" class="btn newsletter__submit" name="commit" id="Subscribe">
  66. <span class="newsletter__submit-text--large">{{ 'general.newsletter_form.submit' | t }}</span>
  67. </button>
  68. </span>
  69. </div>
  70. {% endif %}
  71. {% endform %}
  72. </div>
  73. </div>
  74. {% endif %}
  75. </div>
  76.  
  77. <div class="grid grid--no-gutters">
  78. {% if social_icons %}
  79. <div class="grid__item{% if section.settings.footer_newsletter_enable %} medium-up--one-half{% else %} text-center{% endif %}">
  80. <ul class="list--inline site-footer__social-icons social-icons">
  81. {% if settings.social_facebook_link != blank %}
  82. <li>
  83. <a class="social-icons__link" href="{{ settings.social_facebook_link | escape }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Facebook' }}">
  84. {% include 'icon-facebook' %}
  85. <span class="icon__fallback-text">Facebook</span>
  86. </a>
  87. </li>
  88. {% endif %}
  89. {% if settings.social_twitter_link != blank %}
  90. <li>
  91. <a class="social-icons__link" href="{{ settings.social_twitter_link | escape }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Twitter' }}">
  92. {% include 'icon-twitter' %}
  93. <span class="icon__fallback-text">Twitter</span>
  94. </a>
  95. </li>
  96. {% endif %}
  97. {% if settings.social_pinterest_link != blank %}
  98. <li>
  99. <a class="social-icons__link" href="{{ settings.social_pinterest_link | escape }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Pinterest' }}">
  100. {% include 'icon-pinterest' %}
  101. <span class="icon__fallback-text">Pinterest</span>
  102. </a>
  103. </li>
  104. {% endif %}
  105. {% if settings.social_instagram_link != blank %}
  106. <li>
  107. <a class="social-icons__link" href="{{ settings.social_instagram_link | escape }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Instagram' }}">
  108. {% include 'icon-instagram' %}
  109. <span class="icon__fallback-text">Instagram</span>
  110. </a>
  111. </li>
  112. {% endif %}
  113. {% if settings.social_tumblr_link != blank %}
  114. <li>
  115. <a class="social-icons__link" href="{{ settings.social_tumblr_link | escape }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Tumblr' }}">
  116. {% include 'icon-tumblr' %}
  117. <span class="icon__fallback-text">Tumblr</span>
  118. </a>
  119. </li>
  120. {% endif %}
  121. {% if settings.social_snapchat_link != blank %}
  122. <li>
  123. <a class="social-icons__link" href="{{ settings.social_snapchat_link | escape }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Snapchat' }}">
  124. {% include 'icon-snapchat' %}
  125. <span class="icon__fallback-text">Snapchat</span>
  126. </a>
  127. </li>
  128. {% endif %}
  129. {% if settings.social_youtube_link != blank %}
  130. <li>
  131. <a class="social-icons__link" href="{{ settings.social_youtube_link | escape }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'YouTube' }}">
  132. {% include 'icon-youtube' %}
  133. <span class="icon__fallback-text">YouTube</span>
  134. </a>
  135. </li>
  136. {% endif %}
  137. {% if settings.social_vimeo_link != blank %}
  138. <li>
  139. <a class="social-icons__link" href="{{ settings.social_vimeo_link | escape }}" title="{{ 'layout.footer.social_platform' | t: name: shop.name, platform: 'Vimeo' }}">
  140. {% include 'icon-vimeo' %}
  141. <span class="icon__fallback-text">Vimeo</span>
  142. </a>
  143. </li>
  144. {% endif %}
  145. {% if template.name == 'blog' or template.name == 'article' %}
  146. <li>
  147. <a class="social-icons__link" href="{{ shop.url }}{{ blog.url }}.atom">
  148. {% include 'icon-rss' %}
  149. <span class="icon__fallback-text">RSS</span>
  150. </a>
  151. </li>
  152. {% endif %}
  153. </ul>
  154. </div>
  155. {% endif %}
  156.  
  157. <div class="grid__item{% if section.settings.footer_newsletter_enable and social_icons == true %} medium-up--one-half{% else %} text-center{% endif %}">
  158. <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 %}">
  159. {% unless social_icons and section.settings.footer_newsletter_enable and section.settings.show_payment_icons %}
  160. <small class="site-footer__copyright-content">&copy; {{ 'now' | date: "%Y" }}, {{ shop.name | link_to: '/' }}</small>
  161. <small class="site-footer__copyright-content site-footer__copyright-content--powered-by">{{ powered_by_link }}</small>
  162. {% endunless %}
  163. {% if section.settings.show_payment_icons %}
  164. <div class="site-footer__payment-icons{% unless social_icons or section.settings.footer_newsletter_enable == blank %} site-footer__payment-icons--right{% endunless %}">
  165. {% unless shop.enabled_payment_types == empty %}
  166. {%- 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: ',' -%}
  167. <ul class="payment-icons list--inline">
  168. {% for type in shop.enabled_payment_types %}
  169. {% if payment_icons_available contains type %}
  170. <li class="payment-icon">
  171. {%- assign icon_name = type | prepend: 'icon-' -%}
  172. {% include icon_name %}
  173. </li>
  174. {% endif %}
  175. {% endfor %}
  176. </ul>
  177. {% endunless %}
  178. </div>
  179. {% endif %}
  180. </div>
  181. </div>
  182. </div>
  183. {% if social_icons and section.settings.footer_newsletter_enable and section.settings.show_payment_icons %}
  184. <div class="site-footer__copyright--bottom">
  185. <small class="site-footer__copyright-content">&copy; {{ 'now' | date: "%Y" }}, {{ shop.name | link_to: '/' }}</small>
  186. <small class="site-footer__copyright-content">{{ powered_by_link }}</small>
  187. </div>
  188. {% endif %}
  189. </div>
  190. </footer>
  191.  
  192. {% schema %}
  193. {
  194. "name": "Footer",
  195. "settings": [
  196. {
  197. "type": "link_list",
  198. "id": "footer_linklist",
  199. "label": "Primary menu",
  200. "default": "footer",
  201. "info": "This menu won't show dropdown items"
  202. },
  203. {
  204. "type": "link_list",
  205. "id": "footer_linklist_two",
  206. "label": "Additional menu",
  207. "default": "main-menu",
  208. "info": "This menu won't show dropdown items"
  209. },
  210. {
  211. "type": "checkbox",
  212. "id": "footer_newsletter_enable",
  213. "label": "Show newsletter signup",
  214. "default": false
  215. },
  216. {
  217. "type": "checkbox",
  218. "id": "show_payment_icons",
  219. "label": "Show payment icons",
  220. "default": false
  221. }
  222. ]
  223. }
  224. {% endschema %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement