Advertisement
Guest User

Untitled

a guest
Jul 15th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 12.48 KB | None | 0 0
  1. {% comment %}
  2. ** Footer - default view **
  3. - Static section
  4. - Uses blocks
  5. {% endcomment %}
  6.  
  7. <footer class="footer">
  8. <div class="container footer-menu-wrap">
  9. {% for block in section.blocks %}
  10. <div class="{% if forloop.length >= 5 %}one-fifth column{% elsif forloop.length == 4 %}one-fourth column{% elsif forloop.length == 3 %}one-third column{% elsif forloop.length == 2 %}one-half column{% endif %} medium-down--one-whole" {{ block.shopify_attributes }}>
  11. {% if block.type == 'logo' %}
  12. <div class="text-align--{{block.settings.text_align}}">
  13. {% if block.settings.image %}
  14. <img alt="{{ block.settings.image.alt | escape }}"
  15. class="footer-logo lazyload {{ settings.image_loading_style }}"
  16. data-sizes="25vw"
  17. style="max-width:2000px {{- block.settings.image.width -}}px"
  18. data-src="{{ block.settings.image | img_url: '2048x' }}"
  19. data-srcset=" {{ block.settings.image | img_url: '200x' }} 200w,
  20. {{ block.settings.image | img_url: '300x' }} 300w,
  21. {{ block.settings.image | img_url: '400x' }} 400w,
  22. {{ block.settings.image | img_url: '500x' }} 500w,
  23. {{ block.settings.image | img_url: '600x' }} 600w,
  24. {{ block.settings.image | img_url: '1000x' }} 1000w"
  25. />
  26. {% else %}
  27. <div class="logo">{{ shop.name }}</div>
  28. {% endif %}
  29. </div>
  30.  
  31. {% elsif block.type == 'newsletter' %}
  32.  
  33. <div class="newsletter_section">
  34.  
  35. {% if block.settings.title != blank %}
  36. <h6>{{ block.settings.title }}</h6>
  37. {% endif %}
  38. {% if block.settings.newsletter_text != blank %}
  39. {{ block.settings.newsletter_text }}
  40. {% endif %}
  41.  
  42. <div class="newsletter">
  43. <span class="message"></span>
  44. {% if settings.mailchimp_link != blank %}
  45. <form action="{{ settings.mailchimp_link }}" method="post" name="mc-embedded-subscribe-form" id="contact_form" target="_blank">
  46. {% if block.settings.show_firstname %}
  47. <input type="text" value="" class="firstName" name="FNAME" placeholder="{{ 'general.newsletter_form.subscriber_first_name' | t }}">
  48. {% endif %}
  49. {% if block.settings.show_lastname %}
  50. <input type="text" value="" name="LNAME" placeholder="{{ 'general.newsletter_form.subscriber_last_name' | t }}">
  51. {% endif %}
  52. <input type="email" value="" name="EMAIL" class="contact_email" placeholder="{{ 'general.newsletter_form.placeholder' | t }}">
  53. <input type="submit" value="{{ 'general.newsletter_form.submit' | t }}" class="action_button sign_up" name="subscribe" />
  54. </form>
  55. {% else %}
  56. <form class="omnisend-subscribe-form">
  57. <!-- {% form 'customer' %} -->
  58. {% if form.posted_successfully? %}
  59. <p><em>{{ 'general.newsletter_form.success_text' | t }}</em></p>
  60. {% elsif form.errors %}
  61. {% for field in form.errors %}
  62. <p><em>{{ field }} - {{ form.errors.messages[field] }}</em></p>
  63. {% endfor %}
  64. {% endif %}
  65.  
  66. <input type="hidden" name="contact[tags]" value="prospect,newsletter"/>
  67. {% if block.settings.show_firstname %}
  68. <input type="text" class="firstName" name="contact[first_name]" placeholder="{{ 'general.newsletter_form.subscriber_first_name' | t }}" />
  69. {% endif %}
  70. {% if block.settings.show_lastname %}
  71. <input type="text" name="contact[last_name]" placeholder="{{ 'general.newsletter_form.subscriber_last_name' | t }}" />
  72. {% endif %}
  73.  
  74. <input type="hidden" name="challenge" value="false" />
  75. <input type="email" class="omnisend-subscribe-input-email" name="contact[email]" required placeholder="{{ 'general.newsletter_form.placeholder' | t }}" />
  76. <input type='submit' class="action_button sign_up" value="{{ 'general.newsletter_form.submit' | t }}" />
  77. <!-- {% endform %} -->
  78. </form>
  79. {% endif %}
  80. </div>
  81. {% if block.settings.show_social %}
  82. {% include 'social-icons' %}
  83. {% endif %}
  84. </div>
  85.  
  86. {% elsif block.type == 'link_list' %}
  87. <div class="footer_menu">
  88. {% if block.settings.menu != blank %}
  89. <h6>{{ linklists[block.settings.menu].title }}<span class="right icon-down-arrow"></span></h6>
  90. <div class="toggle_content">
  91. <ul>
  92. {% for link in linklists[block.settings.menu].links %}
  93. <li><p><a href="{{ link.url }}">{{ link.title }}</a></p></li>
  94. {% endfor %}
  95. </ul>
  96. </div>
  97. {% else %}
  98. <h6>Menu title<span class="right icon-down-arrow"></span></h6>
  99. <div class="toggle_content">
  100. <ul>
  101. <li><p>{{ 'homepage.onboarding.no_content' | t }}</p></li>
  102. </ul>
  103. </div>
  104. {% endif %}
  105. </div>
  106.  
  107. {% elsif block.type == 'text' %}
  108. <div class="footer_content footer-text {% if block.settings.title == blank %}no-footer-title{% endif %}">
  109. {% if block.settings.title != blank %}
  110. <h6>{{ block.settings.title }}<span class="right icon-down-arrow"></span></h6>
  111. {% endif %}
  112. {% if block.settings.content %}
  113. <div class="toggle_content">
  114. {{ block.settings.content }}
  115. </div>
  116. {% endif %}
  117. </div>
  118. {% elsif block.type == 'page' %}
  119. <div class="footer_content footer-text">
  120. {% if block.settings.page != blank %}
  121. <h6>{{ pages[block.settings.page].title }}<span class="right icon-down-arrow"></span></h6>
  122. <div class="toggle_content">
  123. {{ pages[block.settings.page].content }}
  124. </div>
  125. {% else %}
  126. <h6>Page title<span class="right icon-down-arrow"></span></h6>
  127. <div class="toggle_content">
  128. <p>{{ 'homepage.onboarding.no_content' | t }}</p>
  129. </div>
  130. {% endif %}
  131. </div>
  132.  
  133. {% elsif block.type == 'html' %}
  134. {% comment %}@TODO - Add HTML section for maps, widgets, embedding, etc{% endcomment %}
  135.  
  136. {% elsif block.type == 'empty' %}
  137. <div class="empty-column"></div>
  138.  
  139. {% endif %}
  140.  
  141. {% assign social_media_column = section.settings.social_media_column | plus: 0 %}
  142.  
  143. {% if block.settings.social_icons_footer %}
  144. {% assign social_icons = true %}
  145. <div class="footer-social-icons">
  146. {% include 'social-icons' %}
  147. </div>
  148. {% endif %}
  149.  
  150. </div>
  151. {% if forloop.last and social_icons %}
  152. <div class="footer-social-icons--mobile sixteen columns">
  153. {% include 'social-icons' %}
  154. </div>
  155. {% endif %}
  156. {% endfor %}
  157.  
  158. <div class="sixteen columns row footer_credits">
  159. <p class="credits">
  160. &copy; {{ "now" | date: "%Y" }} {{ shop.name | link_to: '/' }}.
  161. {{ section.settings.copyright_text }}
  162. {% if section.settings.display_designed_by %}
  163. {{ 'layout.general.designer_credits_html' | t }}
  164. {% endif %}
  165.  
  166. </p>
  167.  
  168. {% if section.settings.display_payment_methods %}
  169. <div class="payment_methods">
  170. {% for type in shop.enabled_payment_types %}
  171. {{ type | payment_type_svg_tag: class:'payment-icon' }}
  172. {% endfor %}
  173. </div>
  174. {% endif %}
  175. </div><!--end footer_credits-->
  176. </div>
  177. </div>
  178. </footer>
  179.  
  180. {% schema %}
  181.  
  182. {
  183. "name": "Footer",
  184. "class": "footer-section",
  185. "max_blocks": 5,
  186. "settings": [
  187. {
  188. "type": "header",
  189. "content": "Sub footer"
  190. },
  191. {
  192. "type": "text",
  193. "id": "copyright_text",
  194. "label": "Copyright text"
  195. },
  196. {
  197. "type": "checkbox",
  198. "id": "display_designed_by",
  199. "label": "Show theme designer credits",
  200. "default": true
  201. },
  202. {
  203. "type": "checkbox",
  204. "id": "display_payment_methods",
  205. "label": "Show payment method icons",
  206. "default": true
  207. }
  208. ],
  209. "blocks": [
  210. {
  211. "type": "logo",
  212. "name": "Logo",
  213. "settings": [
  214. {
  215. "type": "image_picker",
  216. "id": "image",
  217. "label": "Logo"
  218. },
  219. {
  220. "type": "select",
  221. "id": "text_align",
  222. "label": "Logo alignment",
  223. "options": [
  224. {
  225. "value": "left",
  226. "label": "Left"
  227. },
  228. {
  229. "value": "center",
  230. "label": "Center"
  231. },
  232. {
  233. "value": "right",
  234. "label": "Right"
  235. }
  236. ],
  237. "default": "left"
  238. },
  239. {
  240. "type": "checkbox",
  241. "id": "social_icons_footer",
  242. "label": "Show social media footer icons",
  243. "default": false
  244. }
  245. ]
  246. },
  247. {
  248. "type": "newsletter",
  249. "name": "Newsletter",
  250. "settings": [
  251. {
  252. "type": "text",
  253. "id": "title",
  254. "label": "Heading",
  255. "default": "Subscribe today!"
  256. },
  257. {
  258. "type": "richtext",
  259. "id": "newsletter_text",
  260. "label": "Text"
  261. },
  262. {
  263. "type": "checkbox",
  264. "id": "show_firstname",
  265. "label": "Show first name"
  266. },
  267. {
  268. "type": "checkbox",
  269. "id": "show_lastname",
  270. "label": "Show last name"
  271. },
  272. {
  273. "type": "checkbox",
  274. "id": "show_social",
  275. "label": "Show social media icons"
  276. }
  277. ]
  278. },
  279. {
  280. "type": "link_list",
  281. "name": "Menu",
  282. "settings": [
  283. {
  284. "type": "link_list",
  285. "id": "menu",
  286. "label": "Menu",
  287. "info": "This menu won't show drop-down items"
  288. },
  289. {
  290. "type": "checkbox",
  291. "id": "social_icons_footer",
  292. "label": "Show social media footer icons",
  293. "default": false
  294. }
  295. ]
  296. },
  297. {
  298. "type": "page",
  299. "name": "Page",
  300. "limit": 1,
  301. "settings": [
  302. {
  303. "type": "page",
  304. "id": "page",
  305. "label": "Content page"
  306. },
  307. {
  308. "type": "checkbox",
  309. "id": "social_icons_footer",
  310. "label": "Show social media footer icons",
  311. "default": false
  312. }
  313. ]
  314. },
  315. {
  316. "type": "text",
  317. "name": "Text",
  318. "settings": [
  319. {
  320. "type": "text",
  321. "id": "title",
  322. "label": "Heading",
  323. "default": "Title"
  324. },
  325. {
  326. "type": "richtext",
  327. "id": "content",
  328. "label": "Text",
  329. "default": "<p>Use this text to share information about your brand with your customers. Describe a product, share announcements, or welcome customers to your store.</p>"
  330. },
  331. {
  332. "type": "checkbox",
  333. "id": "social_icons_footer",
  334. "label": "Show social media footer icons",
  335. "default": false
  336. }
  337. ]
  338. },
  339. {
  340. "type": "empty",
  341. "name": "Empty column",
  342. "settings": [
  343. {
  344. "type": "checkbox",
  345. "id": "social_icons_footer",
  346. "label": "Show social media footer icons",
  347. "default": false
  348. }
  349. ]
  350. }
  351. ],
  352. "default": {
  353. "blocks": [
  354. {
  355. "type": "logo"
  356. },
  357. {
  358. "type": "link_list"
  359. },
  360. {
  361. "type": "link_list"
  362. },
  363. {
  364. "type": "text"
  365. }
  366. ]
  367. }
  368. }
  369.  
  370. {% endschema %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement