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
// Reconfigure tasks | |
Array.prototype.map.call([ | |
// Unit tests should run in the background | |
['karma.unit.background', true], | |
// Unit tests should run on every JS change | |
['karma.unit.singleRun', false] | |
], function(args) { | |
return grunt.config.set(args[0], args[1]) | |
}); |
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
// Position config for GoPro Cards | |
"position": { | |
"x": '-50%', | |
"y": '6%', | |
}, | |
// Animation config for Cards | |
"animate": { | |
"duration": { | |
"start": .3, | |
"end": .3 |
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
<!-- <head> --> | |
<!-- Include GoPro Shoppable Video styles in the document HEAD --> | |
<link rel="stylesheet" href="//ixd.invodo.com/ivp-experiences/gopro/theme.min.css"> | |
<!-- </head> --> | |
<!-- <body> --> | |
<!-- The experience requires a DOM element --> | |
<div id="gopro-ivp-widget"></div> | |
<!-- Include Invodo.js on the page --> |
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
var Carousel = (function(){ | |
// faux jquery object | |
// mostly based on http://youmightnotneedjquery.com/ | |
var jq = function (el) { | |
var self = {0: el, el: el}; | |
self.findChild = function (selector) { | |
var results = el.querySelectorAll(selector); |
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
// Import lo-dash lang category | |
import lang from 'lodash/lang'; | |
// Import lo-dash template string function | |
import stringTemplate from 'lodash/string/template'; | |
// import assign from 'lodash/object/assign'; | |
import forEach from 'lodash/collection/foreach'; | |
// Loop through configs stored and return the matching config (value) element (key) | |
function reverseMapFind(id, map) { |
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
<!-- The experience requires a DOM element --> | |
<div id="gopro-ivp-example-widget"></div> | |
<!-- Include Shoppable Video styles on the page --> | |
<link rel="stylesheet" href="//ixd.invodo.com/ivp/2.1.0/ivp.min.css"> | |
<!-- Include Invodo.js on the page --> | |
<script src="//e.invodo.com/4.0/s/ixd.invodo.com.js"></script> | |
<!-- Include Shoppable Video library on the page --> | |
<script src="//ixd.invodo.com/ivp/2.1.0/ivp.min.js"></script> |
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
/** | |
* Utility for formating seconds into pretty time formats | |
* @OUTPUT as follows: 0:01, 1:01, 10:01, 1:10:01 | |
**/ | |
function formatTime(seconds) { | |
// video.duration returns NaN before loadedmetadata fires | |
var seconds = isNaN(seconds) ? 0 : seconds.toFixed(); | |
var h = parseInt(seconds / 3600) % 24; | |
var m = parseInt(seconds / 60) % 60; | |
var s = seconds % 60; |
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
// Override Product IDs here | |
// - these variables are hardcoded in the ivp experience, and are sent as parameters to the ___addToCart function | |
// - please redefine the product IDs here if they have changed | |
KERASTASE_BAIN_ELIXIR_ULTIME_PID = 3474630478244; | |
KERASTASE_BAIN_RICHE_PID = 3474630677241; | |
KERASTASE_ELIXIR_ULTIME_PID = 3474630346826; | |
KERASTASE_IMPERIAL_PID = 3474630476844; | |
KERASTASE_MASQUE_PID = 3474630477056; | |
KERASTASE_MORINGA_PID = 3474630476912; |
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
var on = function(items, scope) { | |
items.forEach(function(item) { | |
return item.e.map(function(e) { | |
item.context.addEventListener(e,item.fn,false) | |
}) | |
}) | |
} | |
var off = function(items) { |
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
"animate": { | |
"show": [{ | |
"duration": 1, | |
"tween": {} | |
}], | |
"hide": [{ | |
"duration": 1, | |
"tween": {} | |
}] | |
} |
NewerOlder