This file contains hidden or 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
export class TouchHandler { | |
#xDown = null | |
#yDown = null | |
/** | |
* Handles touch events for selected element | |
* @param {Element|string} element | |
*/ | |
constructor(element) { |
This file contains hidden or 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
{% liquid | |
assign required_amount = section.settings.free_shipping | times: 100 | |
assign amount_needed = required_amount | minus: cart.total_price | |
assign percentage = required_amount | minus: cart.total_price | times: 100.0 | divided_by: required_amount | minus: 100 | abs | round | at_most: 100 | |
%} |
This file contains hidden or 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
$fade-in: opacity 400ms ease-in; | |
$fade-out: opacity 400ms 150ms ease-out; | |
img[data-sizes="auto"] { | |
display: block; | |
width: 100%; | |
} | |
.lazyload, | |
.lazyloading { |
This file contains hidden or 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
{%- comment -%} | |
Lazyload/Lazysizes responsive image snippet | |
Author: Eric Hayes | |
Version: 2.3 | |
------------------------------------- | |
Requires: | |
image: {Obect} image object setting variable | |
Accepts: |
This file contains hidden or 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
.image__wrapper { | |
display: block; | |
position: relative; | |
height: 100%; | |
width: 100%; | |
padding: 50%; | |
img { | |
position: absolute; | |
top: 0; | |
bottom: 0; |
This file contains hidden or 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
/// @name Font Face | |
/// @description Loads woff/local type fonts | |
/// @version 1.0.2 | |
/// @param {String} $font-family | |
/// @param {String} $fallback - fallback system font to use until main font is rendered [sans-serif] | |
/// @param {URL} $file - the URL of the font without extension, it will assume the woff type has the same file name | |
/// @param {String | Number} $weight [normal] | |
/// @param {String} $style [normal] | |
/* |
This file contains hidden or 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
{%- comment -%} | |
Lazyload/Lazysizes responsive picture snippet | |
Author: Eric Hayes | |
Version: 2.1 | |
------------------------------------- | |
Requires: | |
image: {Obect} Desktop image object setting variable | |
Accepts: | |
image_container: {Boolean} Use an image container with padding for intrinsic size |
This file contains hidden or 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
<script type="text/javascript"> | |
window.dataLayer = window.dataLayer||[]; | |
function trackGTMEcommerce() { | |
this._addTrans = addTrans; | |
this._addItem = addItems; | |
this._trackTrans = trackTrans; | |
} | |
var transaction = {}; | |
transaction.transactionProducts = []; |
This file contains hidden or 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
// ============================================================================= | |
// Responsive Font Sizes | |
// ============================================================================= | |
// | |
// Viewport sized typography with minimum and maximum values | |
// | |
// | |
// @param {Number} $responsive - Viewport-based size | |
// @param {Number} $min - Minimum font size (px) | |
// @param {Number} $max - Maximum font size (px) |
This file contains hidden or 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 cal() { | |
// Get total square feet to cover | |
var sf = document.getElementById('sf').value; | |
console.log(sf) | |
// Get tile size | |
var tileSize = document.getElementById('tileSize').value; | |
console.log(tileSize) | |
// Convert area to inches and divide by a single tile's area (ex 4x4 tile = 16), then divide by 144 to determine tiles needed. | |
var total = (sf * 144)/tileSize; | |
console.log(total) |