Skip to content

Instantly share code, notes, and snippets.

@tobymarsden
tobymarsden / index.route.js
Last active October 18, 2017 18:25
Working sticky params
import Ember from 'ember';
export default Ember.Route.extend({
beforeModel: function() {
this.transitionTo('parent', 'A');
}
});
@tobymarsden
tobymarsden / index.route.js
Last active October 18, 2017 18:26
Broken sticky query params
import Ember from 'ember';
export default Ember.Route.extend({
beforeModel: function() {
this.transitionTo('parent', 'A');
}
});
@tobymarsden
tobymarsden / hypervisual-fonts.css
Created January 5, 2017 21:31
Hypervisual font size overrides
/* DESKTOP STYLES */
.hypervisual__root .hypervisual__text-small, .hypervisual__root .hypervisual__text-small *, .hypervisual__root .hypervisual__button.hypervisual__text-small {
font-size: 16px;
line-height: 1.25;
}
.hypervisual__root .hypervisual__text-medium, .hypervisual__root .hypervisual__text-medium *, .hypervisual__root .hypervisual__button.hypervisual__text-medium {
font-size: 20px;
line-height: 1.25;
}
.hypervisual__root .hypervisual__text-large, .hypervisual__root .hypervisual__text-large *, .hypervisual__root .hypervisual__button.hypervisual__text-large {
@tobymarsden
tobymarsden / gist:03eb45cb62a9b1b5dd26f4650412855c
Created January 6, 2017 09:37
Hypervisual product embed code - button only
<div
data-hypervisual-embed="product"
data-button-action="cart"
data-product-handle="my-product"
data-variant-id="27132931913"
data-shop-url="https://www.mystore.com"
data-price-format="${{amount}}"
data-image-src=""
data-show-product-title=false
data-show-variant-title=false
@tobymarsden
tobymarsden / product-embed.html
Created January 25, 2017 22:39
Product embed code for Dennis
<div
data-hypervisual-embed="product"
data-button-action="cart"
data-product-handle="my-product"
data-variant-id="27132931913"
data-shop-url="https://truprotein.myshopify.com"
data-price-format="£{{amount}}"
data-image-src=""></div>
<div id="shopify-product-reviews" data-id="12345"></div>
.hypervisual__cf:before,
.hypervisual__cf:after {
content: " "; /* 1 */
display: table; /* 2 */
}
.hypervisual__cf:after {
clear: both;
}
.hypervisual__content-block--2up-quote {
width: 100%;
}
.hypervisual__quote-image {
margin: auto;
clear: both;
float: none;
}
/* HYPERVISUAL */
.padding-5vw .hypervisual__text-wrapper { padding-top: 5vw !important; padding-bottom: 5vw !important; }
.padding-10vw .hypervisual__text-wrapper { padding-top: 10vw !important; padding-bottom: 10vw !important; }
.padding-15vw .hypervisual__text-wrapper { padding-top: 15vw !important; padding-bottom: 15vw !important; }
.padding-20vw .hypervisual__text-wrapper { padding-top: 20vw !important; padding-bottom: 20vw !important; }
.padding-25vw .hypervisual__text-wrapper { padding-top: 25vw !important; padding-bottom: 25vw !important; }
.parallax .hypervisual__utils-background-image { background-attachment: fixed; }
window.HYPERVISUAL_CALLBACKS = {
afterProductEmbed: function() {
$(this).find('.hypervisual__embed_product-price, .hypervisual__embed_product-compare-at-price').addClass('money');
if(typeof DoublyGlobalCurrency !== 'undefined') { DoublyGlobalCurrency.convertAll($("[name=doubly-currencies]").val()); }
}
}