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="import" href="../../bower_components/polymer/polymer.html"> | |
<polymer-element name="" attributes="" extends="" noscript="" constructor=""> | |
<template> | |
<style> | |
:host { |
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
<template> | |
<style> | |
:host { | |
display: block; | |
} | |
#container { | |
min-width:100px; | |
min-height:100px; | |
margin: 50px auto; | |
text-align: center; |
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="import" href="../../bower_components/polymer/polymer.html"> | |
<polymer-element name="hello-world" constructor="HelloWorld"> | |
<template> | |
<style> | |
:host { | |
display: block; | |
} | |
#container { | |
min-width:100px; | |
min-height:100px; |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Hello World</title> | |
<script src="../../bower_components/webcomponentsjs/webcomponents.js"></script> | |
<link rel="import" href="hello-world.html"> | |
</head> | |
<body> | |
<hello-world></hello-world> |
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
'use strict'; | |
app | |
.directive('journeyStep', function ($window, $state, $rootScope, $document, _){ | |
return { | |
restrict: 'AE', | |
scope: { | |
challenge: '=', | |
index: '@', | |
total: '@', |
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
<nav class="c-header navigation-dark" ng-include="'modules/navigation/header-authenticated.html'" role="navigation"></nav> | |
<coach-mark config="coachMarks.journey" on-skip="coachMarks.setNonce('journey')" on-finish="coachMarks.setNonce('journey')"></coach-mark> | |
<div id="journey-wrapper"> | |
<div class="journey" ng-class="{'ready' : !coachMarks.journey.start}"> | |
<article ng-repeat="ch in challenges" | |
class="challenge pointer" | |
journey-step | |
challenge="ch" |
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
angular.element('.challenge').each(function (){ | |
var self = angular.element(this); | |
// determine direction of slide and apply styles | |
if(self.data('position') > scope.index) { | |
self.addClass('right'); | |
self.css({ | |
'display': 'block', | |
'width': avgWidth + 'px', | |
'float': 'left' | |
}); |
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
_.map(document.querySelectorAll('.challenge'), function(element) { | |
var position; | |
position = element.getAttribute('data-position'); | |
// determine direction of slide and apply styles | |
if(position > scope.index){ // slide right | |
element.classList.add('right'); | |
element.setAttribute('style', 'display:block; width:' + avgWidth + 'px; float:left;'); | |
} | |
if(position < scope.index) { // slide left | |
element.classList.add('left'); |
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
angular.element('.right').wrapAll('<div style="float: right; height:100%;"></div>'); | |
angular.element('.left').wrapAll('<div style="float: left; height: 100%; "></div>'); |
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 rightSlideContainer, leftSlideContainer, rightSlideContent, leftSLideContent, journeyContainer, selectedChallenge; | |
// create right and left slider wrappers | |
rightSlideContainer = document.createElement('div'); | |
rightSlideContainer.setAttribute('style', 'float: right; height:100%;'); | |
leftSlideContainer = document.createElement('div'); | |
leftSlideContainer.setAttribute('style', 'float: left; height: 100%;'); | |
// get content to wrap | |
rightSlideContent = document.querySelectorAll('.right'); |
OlderNewer