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
<!-- /snippets/schema-markup.liquid --> | |
<script type="application/ld+json"> | |
{%- if template == 'index' -%} | |
{ | |
"@context": "http://schema.org", | |
"@type": "WebSite", | |
"name": "{{ shop.name }}", | |
"alternateName": "{{ shop.description }}", | |
"url": "{{ shop.url }}" |
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
{% assign current_variant = product.selected_or_first_available_variant %} | |
<script type="application/ld+json"> | |
{ | |
"@context": "http://schema.org/", | |
"@type": "Product", | |
"name": {{ product.title | json }}, | |
"url": {{ shop.url | append: product.url | json }}, | |
{%- if product.featured_media -%} | |
{%- assign media_size = product.featured_media.preview_image.width | append: 'x' -%} |
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
<!-- Disable keyboard keys --> | |
<script> | |
document.onkeydown = function(e) { | |
return false; | |
} | |
</script> | |
<!-- Disable images drag --> | |
<script> | |
window.ondragstart = function() { |
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
function confetti(){ | |
'use strict'; | |
var onlyOnKonami = false; | |
$(function() { | |
// Globals | |
var $window = $(window) | |
, random = Math.random |
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
function checkBrowserVersion() { | |
var objappVersion = navigator.appVersion; | |
var objAgent = navigator.userAgent; | |
var objbrowserName = navigator.appName; | |
var objfullVersion = ''+parseFloat(navigator.appVersion); | |
var objBrMajorVersion = parseInt(navigator.appVersion,10); | |
var objOffsetName,objOffsetVersion,ix; | |
// In Chrome | |
if ((objOffsetVersion=objAgent.indexOf("Chrome"))!=-1) { |
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
<HTML> | |
<HEAD> | |
<!-- anti-flicker snippet (recommended) --> | |
<style>.async-hide { opacity: 0 !important} </style> | |
<script>(function(a,s,y,n,c,h,i,d,e){s.className+=' '+y;h.start=1*new Date; | |
h.end=i=function(){s.className=s.className.replace(RegExp(' ?'+y),'')}; | |
(a[n]=a[n]||[]).hide=h;setTimeout(function(){i();h.end=null},c);h.timeout=c; | |
})(window,document.documentElement,'async-hide','dataLayer',4000, | |
{'CONTAINER_ID':true});</script> |
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
// check device | |
let isMobile = false; | |
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { | |
isMobile = true; | |
document.body.classList.add('is-mobile'); | |
} |
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
// Source: https://css-tricks.com/snippets/sass/px-to-em-functions/ | |
@function rem($pixels, $context: 16) { | |
@return (math.div($pixels, $context)) * 1rem; | |
} |
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
/* Vh Calc */ | |
// First we get the viewport height and we multiple it by 1% to get a value for a vh unit | |
let vh = window.innerHeight * 0.01; | |
// Then we set the value in the --vh custom property to the root of the document | |
document.documentElement.style.setProperty('--vh', `${vh}px`); | |
window.setTimeout(() => { | |
let vh = window.innerHeight * 0.01; | |
document.documentElement.style.setProperty('--vh', `${vh}px`); | |
}, 1000); |
OlderNewer