Advertisement
Guest User

Untitled

a guest
Jan 17th, 2019
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 18.84 KB | None | 0 0
  1. {%- assign social_icons = false -%}
  2. {%- assign inline_list = false -%}
  3.  
  4. {%- if
  5. settings.social_twitter_link != blank
  6. or settings.social_facebook_link != blank
  7. or settings.social_pinterest_link != blank
  8. or settings.social_instagram_link != blank
  9. or settings.social_tumblr_link != blank
  10. or settings.social_snapchat_link != blank
  11. or settings.social_youtube_link != blank
  12. or settings.social_vimeo_link != blank
  13. or template.name == 'article'
  14. or template.name == 'blog'
  15. -%}
  16. {%- assign social_icons = true -%}
  17. {%- endif -%}
  18.  
  19. {%- case section.blocks.size -%}
  20. {%- when 1 -%}
  21. {%- assign footer_item = 'site-footer__item--full-width' -%}
  22. {%- assign inline_list = true -%}
  23. {%- when 2 -%}
  24. {%- assign footer_item = 'site-footer__item--one-half' -%}
  25. {%- assign inline_list = true -%}
  26. {%- when 3 -%}
  27. {%- assign footer_item = 'site-footer__item--one-third' -%}
  28. {%- for block in section.blocks -%}
  29. {%- if block.type == 'newsletter' -%}
  30. {%- assign footer_item = 'site-footer__item--one-quarter' -%}
  31. {%- break -%}
  32. {%- endif -%}
  33. {%- endfor -%}
  34. {%- when 4 -%}
  35. {%- assign footer_item = 'site-footer__item--one-quarter' -%}
  36. {%- when 5 -%}
  37. {%- assign footer_item = 'site-footer__item--one-fifth' -%}
  38. {%- endcase -%}
  39.  
  40. {% comment %} Create an appropriate hover color based on text color and brightness {% endcomment %}
  41. {%- assign footer_text_color = section.settings.color_footer_text -%}
  42. {%- assign footer_text_color_brightness = section.settings.color_footer_text | color_brightness -%}
  43. {%- if footer_text_color_brightness <= 26 -%}
  44. {%- assign footer_text_color_hover = footer_text_color | color_lighten: 25 -%}
  45. {%- elsif footer_text_color_brightness <= 65 -%}
  46. {%- assign footer_text_color_hover = footer_text_color | color_lighten: 15 -%}
  47. {%- else -%}
  48. {%- assign footer_text_color_hover = footer_text_color | color_darken: 10 -%}
  49. {%- endif -%}
  50.  
  51. <style>
  52. .site-footer__hr {
  53. border-bottom: 1px solid {{ section.settings.color_footer_bg | color_darken: 10 }};
  54. }
  55.  
  56. .site-footer,
  57. .site-footer a,
  58. .site-footer__rte p {
  59. color: {{ section.settings.color_footer_text }};
  60. background-color: {{ section.settings.color_footer_bg }};
  61. }
  62.  
  63. .site-footer a:hover {
  64. color: {{ footer_text_color_hover }};
  65. }
  66. </style>
  67.  
  68. <footer class="site-footer" role="contentinfo">
  69. <div class="page-width">
  70. <div class="site-footer__content">
  71. {%- for block in section.blocks -%}
  72.  
  73. <div class="site-footer__item
  74. {% if section.blocks.size == 1 %} site-footer__item--center{% endif %}
  75. {{ footer_item }}
  76. {% if block.type == 'newsletter' and section.blocks.size == 3 %}site-footer-newsletter__one-half{% endif %}"
  77. {{ block.shopify_attributes }}>
  78. <div class="site-footer__item-inner site-footer__item-inner--{{ block.type }}">
  79.  
  80. {%- if block.settings.title -%}
  81. <h4>{{ block.settings.title | escape }}</h4>
  82. {%- endif -%}
  83.  
  84. {%- case block.type -%}
  85. {%- when 'newsletter' -%}
  86. <div class="site-footer__newsletter
  87. {% if section.blocks.size == 1 %} site-footer__single-block--centered{% endif %}">
  88. {%- assign formId = 'ContactFooter' -%}
  89. <form class="soundest-subscribe-form">
  90. <!-- {% form 'customer' %} -->
  91. <div class="input-group {% if form.errors %} input-group--error{% endif %}">
  92. {% include 'form-status', form_id: formId, success_message: 'general.newsletter_form.confirmation' %}
  93.  
  94. <input type="hidden" name="contact[tags]" value="newsletter">
  95. <input type="email"
  96. name="contact[email]"
  97. id="{{ formId }}-email"
  98. class= soundest-subscribe-input" {% if form.errors %} input--error{% endif %}"
  99. value="{% if customer %}{{ customer.email }}{% endif %}"
  100. placeholder="{{ 'general.newsletter_form.email_placeholder' | t }}"
  101. aria-label="{{ 'general.newsletter_form.email_placeholder' | t }}"
  102. aria-required="true"
  103. required
  104. autocorrect="off"
  105. autocapitalize="off"
  106. {% if form.errors %} aria-invalid="true" aria-describedby="{{ formId }}-email-error"{% endif %}>
  107. <span class="input-group__btn">
  108. <button type="submit" class="btn newsletter__submit" name="commit" id="Subscribe">
  109. <span class="newsletter__submit-text--large">{{ 'general.newsletter_form.submit' | t }}</span>
  110. </button>
  111. </span>
  112. <span id="{{ formId }}-email-error" class="input-error-message">{% include 'icon-error' %} {{ form.errors.translated_fields['email'] | capitalize }} {{ form.errors.messages['email'] }}.</span>
  113. </div>
  114. <!-- {% endform %} -->
  115. </form>
  116. </div>
  117.  
  118. {%- when 'text' -%}
  119. {%- if block.settings.text != blank -%}
  120. <div class="site-footer__rte
  121. {% if section.blocks.size == 1 %} site-footer__single-block--centered{% endif %}">
  122. {{ block.settings.text }}
  123. </div>
  124. {%- endif -%}
  125.  
  126. {%- when 'link_list' -%}
  127. {%- assign footer_linklist = block.settings.menu -%}
  128. <ul class="site-footer__linklist
  129. {% if inline_list %}list--inline{% endif %}">
  130. {%- for link in linklists[footer_linklist].links -%}
  131. <li class="site-footer__linklist-item">
  132. <a href="{{ link.url }}">{{ link.title }}</a>
  133. </li>
  134. {%- endfor -%}
  135. </ul>
  136.  
  137. {%- endcase -%}
  138.  
  139. </div>
  140. </div>
  141. {%- endfor -%}
  142. </div>
  143. </div>
  144.  
  145. <hr class="site-footer__hr">
  146.  
  147. <div class="page-width">
  148. <div class="grid grid--no-gutters small--text-center">
  149. <div class="grid__item one-half small--one-whole">
  150. {%- if social_icons -%}
  151. <ul class="list--inline site-footer__social-icons social-icons site-footer__icon-list">
  152. {%- if settings.social_facebook_link != blank -%}
  153. <li>
  154. <a class="social-icons__link" href="{{ settings.social_facebook_link | escape }}" aria-describedby="a11y-external-message">
  155. {%- include 'icon-facebook' -%}
  156. <span class="icon__fallback-text">Facebook</span>
  157. </a>
  158. </li>
  159. {%- endif -%}
  160. {%- if settings.social_twitter_link != blank -%}
  161. <li>
  162. <a class="social-icons__link" href="{{ settings.social_twitter_link | escape }}" aria-describedby="a11y-external-message">
  163. {%- include 'icon-twitter' -%}
  164. <span class="icon__fallback-text">Twitter</span>
  165. </a>
  166. </li>
  167. {%- endif -%}
  168. {%- if settings.social_pinterest_link != blank -%}
  169. <li>
  170. <a class="social-icons__link" href="{{ settings.social_pinterest_link | escape }}" aria-describedby="a11y-external-message">
  171. {%- include 'icon-pinterest' -%}
  172. <span class="icon__fallback-text">Pinterest</span>
  173. </a>
  174. </li>
  175. {%- endif -%}
  176. {%- if settings.social_instagram_link != blank -%}
  177. <li>
  178. <a class="social-icons__link" href="{{ settings.social_instagram_link | escape }}" aria-describedby="a11y-external-message">
  179. {%- include 'icon-instagram' -%}
  180. <span class="icon__fallback-text">Instagram</span>
  181. </a>
  182. </li>
  183. {%- endif -%}
  184. {%- if settings.social_tumblr_link != blank -%}
  185. <li>
  186. <a class="social-icons__link" href="{{ settings.social_tumblr_link | escape }}" aria-describedby="a11y-external-message">
  187. {%- include 'icon-tumblr' -%}
  188. <span class="icon__fallback-text">Tumblr</span>
  189. </a>
  190. </li>
  191. {%- endif -%}
  192. {%- if settings.social_snapchat_link != blank -%}
  193. <li>
  194. <a class="social-icons__link" href="{{ settings.social_snapchat_link | escape }}" aria-describedby="a11y-external-message">
  195. {%- include 'icon-snapchat' -%}
  196. <span class="icon__fallback-text">Snapchat</span>
  197. </a>
  198. </li>
  199. {%- endif -%}
  200. {%- if settings.social_youtube_link != blank -%}
  201. <li>
  202. <a class="social-icons__link" href="{{ settings.social_youtube_link | escape }}" aria-describedby="a11y-external-message">
  203. {%- include 'icon-youtube' -%}
  204. <span class="icon__fallback-text">YouTube</span>
  205. </a>
  206. </li>
  207. {%- endif -%}
  208. {%- if settings.social_vimeo_link != blank -%}
  209. <li>
  210. <a class="social-icons__link" href="{{ settings.social_vimeo_link | escape }}" aria-describedby="a11y-external-message">
  211. {%- include 'icon-vimeo' -%}
  212. <span class="icon__fallback-text">Vimeo</span>
  213. </a>
  214. </li>
  215. {%- endif -%}
  216. {%- if template.name == 'blog' or template.name == 'article' -%}
  217. <li>
  218. <a class="social-icons__link" href="{{ shop.url }}{{ blog.url }}.atom">
  219. {%- include 'icon-rss' -%}
  220. <span class="icon__fallback-text">RSS</span>
  221. </a>
  222. </li>
  223. {%- endif -%}
  224. </ul>
  225. {%- else -%}
  226. <div class="small--hide">
  227. <small class="site-footer__copyright-content">&copy; {{ 'now' | date: "%Y" }}, {{ shop.name | link_to: '/' }}</small>
  228. <small class="site-footer__copyright-content site-footer__copyright-content-powered-by">{{ powered_by_link }}</small>
  229. </div>
  230. {%- endif -%}
  231. </div>
  232.  
  233. <div class="grid__item one-half small--one-whole">
  234. {% if section.settings.show_payment_icons %}
  235. <div class="grid__item site-footer__payment-icons">
  236. {% unless shop.enabled_payment_types == empty %}
  237. <span class="visually-hidden">{{ 'general.payment.method' | t }}</span>
  238. <ul class="payment-icons list--inline site-footer__icon-list">
  239. {% for type in shop.enabled_payment_types %}
  240. <li class="payment-icon">
  241. {{ type | payment_type_svg_tag: class: 'icon icon--full-color' }}
  242. </li>
  243. {% endfor %}
  244. </ul>
  245. {% endunless %}
  246. </div>
  247. {% endif %}
  248. </div>
  249. <div class="grid__item{% unless social_icons %} medium-up--hide{% endunless %}">
  250. <small class="site-footer__copyright-content">&copy; {{ 'now' | date: "%Y" }}, {{ shop.name | link_to: '/' }}</small>
  251. <small class="site-footer__copyright-content site-footer__copyright-content--powered-by">{{ powered_by_link }}</small>
  252. </div>
  253. </div>
  254. </div>
  255. </footer>
  256.  
  257.  
  258.  
  259. {% schema %}
  260. {
  261. "name": {
  262. "de": "Fußzeile",
  263. "en": "Footer",
  264. "es": "Pie de página",
  265. "fr": "Pied de page",
  266. "it": "Footer",
  267. "ja": "フッター",
  268. "pt-BR": "Rodapé"
  269. },
  270. "max_blocks": 4,
  271. "settings": [
  272. {
  273. "type": "header",
  274. "content": {
  275. "de": "Zahlungsarten",
  276. "en": "Payment methods",
  277. "es": "Métodos de pago",
  278. "fr": "Moyens de paiement",
  279. "it": "Metodi di pagamento",
  280. "ja": "お支払い方法",
  281. "pt-BR": "Formas de pagamento"
  282. }
  283. },
  284. {
  285. "type": "checkbox",
  286. "id": "show_payment_icons",
  287. "label": {
  288. "de": "Zahlungs-Buttons anzeigen",
  289. "en": "Show payment icons",
  290. "es": "Mostrar iconos de pago",
  291. "fr": "Afficher les icônes de paiement",
  292. "it": "Mostra le icone di pagamento",
  293. "ja": "支払いアイコンを表示する",
  294. "pt-BR": "Exibir ícones de pagamento"
  295. },
  296. "default": false
  297. },
  298. {
  299. "type": "header",
  300. "content": {
  301. "de": "Farbe",
  302. "en": "Color",
  303. "es": "Color",
  304. "fr": "Couleur",
  305. "it": "Colore",
  306. "ja": "色",
  307. "pt-BR": "Cor"
  308. }
  309. },
  310. {
  311. "type": "color",
  312. "id": "color_footer_bg",
  313. "label": {
  314. "de": "Schriftfarbe",
  315. "en": "Background",
  316. "es": "Fondo",
  317. "fr": "Couleur de fond",
  318. "it": "Sfondo",
  319. "ja": "背景",
  320. "pt-BR": "Plano de fundo"
  321. },
  322. "default": "#F5F5F5"
  323. },
  324. {
  325. "type": "color",
  326. "id": "color_footer_text",
  327. "label": {
  328. "de": "Text",
  329. "en": "Text",
  330. "es": "Texto",
  331. "fr": "Texte",
  332. "it": "Testo",
  333. "ja": "テキスト",
  334. "pt-BR": "Texto"
  335. },
  336. "default": "#3d4246"
  337. }
  338. ],
  339. "blocks": [
  340. {
  341. "type": "link_list",
  342. "name": {
  343. "de": "Menü",
  344. "en": "Menu",
  345. "es": "Menú",
  346. "fr": "Menu",
  347. "it": "Menu",
  348. "ja": "メニュー",
  349. "pt-BR": "Menu"
  350. },
  351. "settings": [
  352. {
  353. "type": "text",
  354. "id": "title",
  355. "label": {
  356. "de": "Überschrift",
  357. "en": "Heading",
  358. "es": "Título",
  359. "fr": "Titre",
  360. "it": "Heading",
  361. "ja": "見出し",
  362. "pt-BR": "Título"
  363. },
  364. "default": {
  365. "de": "Quick-Links",
  366. "en": "Quick links",
  367. "es": "Enlaces rápidos",
  368. "fr": "Liens rapides",
  369. "it": "Link rapidi",
  370. "ja": "クイックリンク",
  371. "pt-BR": "Links rápidos"
  372. }
  373. },
  374. {
  375. "type": "link_list",
  376. "id": "menu",
  377. "label": {
  378. "de": "Menü",
  379. "en": "Menu",
  380. "es": "Menú",
  381. "fr": "Menu",
  382. "it": "Menu",
  383. "ja": "メニュー",
  384. "pt-BR": "Menu"
  385. },
  386. "default": "footer"
  387. }
  388. ]
  389. },
  390. {
  391. "type": "text",
  392. "name": {
  393. "de": "Text",
  394. "en": "Text",
  395. "es": "Texto",
  396. "fr": "Texte",
  397. "it": "Testo",
  398. "ja": "テキスト",
  399. "pt-BR": "Texto"
  400. },
  401. "settings": [
  402. {
  403. "type": "text",
  404. "id": "title",
  405. "label": {
  406. "de": "Überschrift",
  407. "en": "Heading",
  408. "es": "Título",
  409. "fr": "Titre",
  410. "it": "Heading",
  411. "ja": "見出し",
  412. "pt-BR": "Título"
  413. },
  414. "default": {
  415. "de": "Reden Sie über Ihr Unternehmen",
  416. "en": "Talk about your business",
  417. "es": "Habla sobre tu negocio",
  418. "fr": "Parlez de votre entreprise",
  419. "it": "Parla della tua attività commerciale",
  420. "ja": "あなたのビジネスについて語る",
  421. "pt-BR": "Fale sobre o seu negócio"
  422. }
  423. },
  424. {
  425. "type": "richtext",
  426. "id": "text",
  427. "label": {
  428. "de": "Text",
  429. "en": "Text",
  430. "es": "Texto",
  431. "fr": "Texte",
  432. "it": "Testo",
  433. "ja": "テキスト",
  434. "pt-BR": "Texto"
  435. },
  436. "default": {
  437. "de": "<p>Teilen Sie Ihre Shop-Details, Werbeaktionen oder Markeninhalte mit Ihren Kunden.</p>",
  438. "en": "<p>Share store details, promotions, or brand content with your customers.</p>",
  439. "es": "<p>Comparte detalles de la tienda, promociones o contenido de la marca con tus clientes.</p>",
  440. "fr": "<p>Partagez les détails de la boutique, les promotions ou le contenu de la marque avec vos clients.</p>",
  441. "it": "<p>Condividi dettagli del negozio, promozioni o contenuti del brand con i clienti.</p>",
  442. "ja": "<p>ストア詳細、プロモーション、ブランドのコンテンツをお客様と共有する。</p>",
  443. "pt-BR": "<p>Compartilhe detalhes da loja, promoções ou conteúdo da marca com seus clientes.</p>"
  444. }
  445. }
  446. ]
  447. },
  448. {
  449. "type": "newsletter",
  450. "limit": 1,
  451. "name": {
  452. "de": "Newsletter-Anmeldung",
  453. "en": "Newsletter signup",
  454. "es": "Suscripción al boletín",
  455. "fr": "Inscription",
  456. "it": "Iscriviti alla Newsletter",
  457. "ja": "メールマガジンの登録",
  458. "pt-BR": "Assinatura da newsletter"
  459. },
  460. "settings": [
  461. {
  462. "type": "text",
  463. "id": "title",
  464. "label": {
  465. "de": "Überschrift",
  466. "en": "Heading",
  467. "es": "Título",
  468. "fr": "Titre",
  469. "it": "Heading",
  470. "ja": "見出し",
  471. "pt-BR": "Título"
  472. },
  473. "info": {
  474. "de": "Abonnenten werden zu Ihrer \"akzeptiert Marketingmaterial\"-Liste hinzugefügt [Kundenliste.](/admin/customers?query=&accepts_marketing=1)",
  475. "en": "Subscribers will be added to your “accepts marketing” [customer list.](/admin/customers?query=&accepts_marketing=1)",
  476. "es": "Se añadirá los suscriptores a tu lista \"acepta marketing\"[lista de clients.](/admin/customers?query=&accepts_marketing=1)",
  477. "fr": "Les abonnés seront ajoutés à votre [liste de clients](/admin/customers?query=&accepts_marketing=1) « Accepte le marketing ».",
  478. "it": "Gli iscritti verranno aggiunti al tuo [elenco clienti](/admin/customers?query=&accepts_marketing=1) “Accetta marketing”.",
  479. "ja": "購読者は「マーケティングを受け入れる」[顧客リスト](/admin/customers?query=&accepts_marketing=1)に追加されます。",
  480. "pt-BR": "Os assinantes serão adicionados à sua lista de pessoas que “aceitam marketing” [lista de clientes.](/admin/customers?query=&accepts_marketing=1)"
  481. },
  482. "default": {
  483. "de": "Newsletter",
  484. "en": "Newsletter",
  485. "es": "Boletín",
  486. "fr": "Newsletter",
  487. "it": "Newsletter",
  488. "ja": "メールマガジン",
  489. "pt-BR": "Newsletter"
  490. }
  491. }
  492. ]
  493. }
  494. ]
  495. }
  496. {% endschema %}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement