This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
/* Method 1: This way doesn't allow them to add a media query. Icon, Flex, and Design Packs use this method. | |
/* Desktop */ | |
{%- if section.settings.custom_css != blank -%} | |
{%- assign custom_section_declarations = section.settings.custom_css | split: '}' -%} | |
{%- for declaration in custom_section_declarations -%} | |
{%- if declaration contains '{' -%} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% if product.variants.first.inventory_quantity < 5 %} | |
<p>Stock: {{ product.variants.first.inventory_quantity }}</p> | |
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var hostingContainer = document.getElementsByClassName('hosting-tab')[0]; | |
var hostingController = angular.element(hostingContainer); | |
var scope = hostingController.scope(); | |
var redirects = [ | |
{source: '/old1', target: '/new1'}, | |
{source: '/old2', target: '/new2'}, | |
]; | |
redirects.forEach(function (rule) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Tag products with recommend_product-handle --> | |
<div class="recommended-products"> | |
{% for tag in product.tags %} | |
{% if tag contains 'recommend_' %} | |
{% assign prodHandle = tag | split: '_' | last %} | |
{% assign recProd = all_products[prodHandle] %} | |
<a href="{{ recProd.url }}" class="rec-prod"> | |
<img class="rec-prod__image" src="{{ recProd.featured_image | img_url: '500x' }}" alt="{{ recProd.title }}"> | |
<h4>{{ recProd.title }}</h4> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Get the overall dominant color of an image to use as pre-lazyload or similar. --> | |
{% assign dominant_color_image = image | img_url: '1x' %} | |
<!-- Stretch it out and you basically have an extremeley blurry version of the image. --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('[min]').change(function() { | |
var min = parseInt(jQuery(this).attr('min')); | |
var value = parseInt(jQuery(this).val()); | |
if (value < min) { jQuery(this).val(min); } | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Theme.liquid --> | |
{% if settings.enable-popup %} | |
{% include 'subscribe' %} | |
{% endif %} | |
<!-- snippets/subscribe.liquid --> | |
<div class="subscribe-popup mfp-hide"> | |
<h3>{{settings.subscribe-heading}}</h3> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="alternate" href="{{ canonical_url }}" hreflang="en-us" /> | |
<link rel="alternate" href="{{ canonical_url | replace: '.com', '.com.au' }}" hreflang="en-au" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var outboundClick = document.getElementById('js-outboundClick'); | |
outboundClick.addEventListener('click', function(event){ | |
event.preventDefault(); | |
ga('send', 'event', 'Countrypopup', 'click', { | |
hitCallback: function() { | |
console.log('event fired'); | |
// window.location.href="eteswimwear.com.au" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
When doing something like <!--video-id:abcabc--> | |
{% assign video-id = collection.description | split: 'video-id:' | last | split: '-->' | first %} | |
When you need multiple and dont know how many, | |
Example images for a slider: | |
{% assign inaction-images = collection.description | split: '<!--endinaction-->' | first | split: '<img' %} |
NewerOlder