rhet-butler 0.5.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/default-configuration/assets/javascript/keyboard-nav.js +91 -0
- data/default-configuration/assets/javascript/rhet-present.js +855 -0
- data/default-configuration/assets/javascript/rhet-present.min.js +55 -0
- data/default-configuration/assets/stylesheets/_animate-helpers.scss +41 -0
- data/default-configuration/assets/stylesheets/animate/_attention.scss +36 -0
- data/default-configuration/assets/stylesheets/animate/_bounce.scss +71 -0
- data/default-configuration/assets/stylesheets/animate/_fade.scss +56 -0
- data/default-configuration/assets/stylesheets/animate/_flip.scss +98 -0
- data/default-configuration/assets/stylesheets/animate/_lightSpeed.scss +20 -0
- data/default-configuration/assets/stylesheets/animate/_roll.scss +20 -0
- data/default-configuration/assets/stylesheets/animate/_rotate.scss +40 -0
- data/default-configuration/assets/stylesheets/animate/_special.scss +17 -0
- data/default-configuration/assets/stylesheets/animate/_windblown.sass +17 -0
- data/default-configuration/assets/stylesheets/animate/attention/._pulse.scss.swp +0 -0
- data/default-configuration/assets/stylesheets/animate/attention/_flash.scss +34 -0
- data/default-configuration/assets/stylesheets/animate/attention/_pulse.scss +28 -0
- data/default-configuration/assets/stylesheets/animate/attention/_shake.scss +53 -0
- data/default-configuration/assets/stylesheets/animate/attention/_swing.scss +40 -0
- data/default-configuration/assets/stylesheets/animate/attention/_tada.scss +51 -0
- data/default-configuration/assets/stylesheets/animate/attention/_wiggle.scss +52 -0
- data/default-configuration/assets/stylesheets/animate/attention/_wobble.scss +41 -0
- data/default-configuration/assets/stylesheets/animate/bounce/_bounceIn.scss +151 -0
- data/default-configuration/assets/stylesheets/animate/bounce/_bounceOut.scss +139 -0
- data/default-configuration/assets/stylesheets/animate/fade/_fadeIn.sass +139 -0
- data/default-configuration/assets/stylesheets/animate/fade/_fadeOut.sass +139 -0
- data/default-configuration/assets/stylesheets/animate/flip/_flipIn.scss +78 -0
- data/default-configuration/assets/stylesheets/animate/flip/_flipOut.scss +66 -0
- data/default-configuration/assets/stylesheets/animate/lightSpeed/_lightSpeedIn.scss +37 -0
- data/default-configuration/assets/stylesheets/animate/lightSpeed/_lightSpeedOut.scss +29 -0
- data/default-configuration/assets/stylesheets/animate/roll/_rollIn.scss +29 -0
- data/default-configuration/assets/stylesheets/animate/roll/_rollOut.scss +28 -0
- data/default-configuration/assets/stylesheets/animate/rotate/_rotateIn.scss +208 -0
- data/default-configuration/assets/stylesheets/animate/rotate/_rotateOut.scss +208 -0
- data/default-configuration/assets/stylesheets/animate/special/_hinge.scss +49 -0
- data/default-configuration/assets/stylesheets/animate/windblown/_windblownIn.sass +28 -0
- data/default-configuration/assets/stylesheets/animate/windblown/_windblownOut.sass +24 -0
- data/default-configuration/assets/stylesheets/font.css +30 -0
- data/default-configuration/assets/stylesheets/highlight/arta.css +158 -0
- data/default-configuration/assets/stylesheets/highlight/ascetic.css +50 -0
- data/default-configuration/assets/stylesheets/highlight/brown_paper.css +104 -0
- data/default-configuration/assets/stylesheets/highlight/brown_papersq.png +0 -0
- data/default-configuration/assets/stylesheets/highlight/dark.css +103 -0
- data/default-configuration/assets/stylesheets/highlight/default.css +135 -0
- data/default-configuration/assets/stylesheets/highlight/far.css +111 -0
- data/default-configuration/assets/stylesheets/highlight/github.css +127 -0
- data/default-configuration/assets/stylesheets/highlight/googlecode.css +144 -0
- data/default-configuration/assets/stylesheets/highlight/idea.css +121 -0
- data/default-configuration/assets/stylesheets/highlight/ir_black.css +104 -0
- data/default-configuration/assets/stylesheets/highlight/magula.css +120 -0
- data/default-configuration/assets/stylesheets/highlight/monokai.css +114 -0
- data/default-configuration/assets/stylesheets/highlight/pojoaque.css +104 -0
- data/default-configuration/assets/stylesheets/highlight/pojoaque.jpg +0 -0
- data/default-configuration/assets/stylesheets/highlight/rainbow.css +114 -0
- data/default-configuration/assets/stylesheets/highlight/school_book.css +111 -0
- data/default-configuration/assets/stylesheets/highlight/school_book.png +0 -0
- data/default-configuration/assets/stylesheets/highlight/solarized_light.css +88 -0
- data/default-configuration/assets/stylesheets/highlight/sunburst.css +158 -0
- data/default-configuration/assets/stylesheets/highlight/tomorrow-night-blue.css +52 -0
- data/default-configuration/assets/stylesheets/highlight/tomorrow-night-bright.css +51 -0
- data/default-configuration/assets/stylesheets/highlight/tomorrow-night-eighties.css +51 -0
- data/default-configuration/assets/stylesheets/highlight/tomorrow-night.css +52 -0
- data/default-configuration/assets/stylesheets/highlight/tomorrow.css +49 -0
- data/default-configuration/assets/stylesheets/highlight/vs.css +86 -0
- data/default-configuration/assets/stylesheets/highlight/xcode.css +154 -0
- data/default-configuration/assets/stylesheets/highlight/zenburn.css +114 -0
- data/default-configuration/assets/stylesheets/presenter/rhet.css.sass +160 -0
- data/default-configuration/assets/stylesheets/rhet.css.sass +142 -0
- data/default-configuration/assets/themes.googleusercontent.com/static/fonts/arimo/v5/K-bXE71xZHgbUS_UdQjugvesZW2xOQ-xsNqO47m55DA.ttf +0 -0
- data/default-configuration/assets/themes.googleusercontent.com/static/fonts/cinzeldecorative/v1/pXhIVnhFtL_B9Vb1wq2F9wIh9oxuYcmvOvyh_107lQs.ttf +0 -0
- data/default-configuration/assets/themes.googleusercontent.com/static/fonts/cinzeldecorative/v1/pXhIVnhFtL_B9Vb1wq2F9zCUrkmwPfdnoTjOU_kXqBI.ttf +0 -0
- data/default-configuration/assets/themes.googleusercontent.com/static/fonts/droidsansmono/v4/ns-m2xQYezAtqh7ai59hJYW_AySPyikQrZReizgrnuw.ttf +0 -0
- data/default-configuration/assets/themes.googleusercontent.com/static/fonts/slackey/v3/bJZDrYrGx8atJRHR9DVdqg.ttf +0 -0
- data/default-configuration/common/config.yaml +17 -0
- data/default-configuration/common/templates/group.html.erb +5 -0
- data/default-configuration/common/templates/presentation.html.erb +11 -17
- data/default-configuration/common/templates/presenter-qr.html.erb +3 -3
- data/default-configuration/common/templates/slide.html.erb +3 -0
- data/default-configuration/common/templates/stylesheets.html.erb +1 -1
- data/default-configuration/presenter/templates/live-javascript.html.erb +4 -3
- data/default-configuration/presenter/templates/slide.html.erb +6 -0
- data/default-configuration/presenter/templates/stylesheets.html.erb +1 -1
- data/default-configuration/skels/config.yaml +15 -0
- data/default-configuration/skels/slides.yaml +6 -0
- data/default-configuration/viewer/templates/live-javascript.html.erb +1 -1
- data/lib/rhet-butler/arrangement-finder.rb +71 -0
- data/lib/rhet-butler/command-line.rb +69 -1
- data/lib/rhet-butler/configuration.rb +20 -5
- data/lib/rhet-butler/file-loading.rb +28 -0
- data/lib/rhet-butler/file-manager.rb +42 -22
- data/lib/rhet-butler/filter-resolver.rb +45 -0
- data/lib/rhet-butler/html-generator.rb +24 -4
- data/lib/rhet-butler/include-processor.rb +55 -0
- data/lib/rhet-butler/layout-rule.rb +17 -13
- data/lib/rhet-butler/resource-localizer.rb +22 -0
- data/lib/rhet-butler/sass-functions.rb +40 -0
- data/lib/rhet-butler/slide-arranger.rb +39 -0
- data/lib/rhet-butler/slide-group.rb +56 -21
- data/lib/rhet-butler/slide-includer.rb +5 -2
- data/lib/rhet-butler/slide-loader.rb +16 -332
- data/lib/rhet-butler/slide-processor.rb +27 -0
- data/lib/rhet-butler/slide-renderer.rb +42 -0
- data/lib/rhet-butler/slide-renderers/code.rb +19 -0
- data/lib/rhet-butler/slide-renderers/cues.rb +27 -0
- data/lib/rhet-butler/slide-renderers/textile.rb +14 -0
- data/lib/rhet-butler/slide-rendering.rb +22 -0
- data/lib/rhet-butler/slide-traverser.rb +45 -0
- data/lib/rhet-butler/slide.rb +40 -30
- data/lib/rhet-butler/stasis/css-transform.rb +55 -0
- data/lib/rhet-butler/stasis/document-transform.rb +32 -0
- data/lib/rhet-butler/stasis/html-transform.rb +51 -0
- data/lib/rhet-butler/stasis/http-loader.rb +19 -0
- data/lib/rhet-butler/stasis/identity-transform.rb +18 -0
- data/lib/rhet-butler/stasis/rack-loader.rb +57 -0
- data/lib/rhet-butler/stasis/resource-mapping.rb +55 -0
- data/lib/rhet-butler/stasis/transform-queue.rb +87 -0
- data/lib/rhet-butler/stasis/writer.rb +35 -0
- data/lib/rhet-butler/stasis.rb +18 -0
- data/lib/rhet-butler/static-generator.rb +21 -29
- data/lib/rhet-butler/web/assets-app.rb +24 -8
- data/lib/rhet-butler/web/main-app.rb +17 -8
- data/lib/rhet-butler/web/presentation-app.rb +22 -14
- data/lib/rhet-butler/web/qr-display-app.rb +4 -1
- data/lib/rhet-butler/yaml-schema.rb +5 -4
- data/lib/rhet-butler/yaml-type.rb +24 -1
- data/spec/html-generation.rb +7 -1
- data/spec/presentation-view.rb +33 -8
- data/spec/rhet-butler.rb +0 -13
- data/spec/slide-loader.rb +3 -3
- data/spec/slide-processing.rb +6 -3
- metadata +209 -119
- data/default-configuration/assets/javascript/impress.js +0 -800
- data/default-configuration/assets/stylesheets/presenter/presentation.css +0 -477
- data/lib/rhet-butler.rb +0 -2
@@ -0,0 +1,55 @@
|
|
1
|
+
/*
|
2
|
+
* RhetButler presentation Javascript (version 0.5
|
3
|
+
* Build date: 12-05-2013
|
4
|
+
*
|
5
|
+
* Copyright 2013 Judson Lester (@judsonlester)
|
6
|
+
*
|
7
|
+
* Inspired by impress.js by
|
8
|
+
* Bartek Szopka (@bartaz)
|
9
|
+
*
|
10
|
+
* Released under the MIT and GPL Licenses.
|
11
|
+
*/
|
12
|
+
var rhetButler={};
|
13
|
+
(function(){var b=rhetButler;b.arrayify=function(a){return[].slice.call(a)};b.$$=function(a,b){b=b||document;return this.arrayify(b.querySelectorAll(a))};b.byId=function(a){return document.getElementById(a)};b.triggerEvent=function(a,b,d){var e=document.createEvent("CustomEvent");e.initCustomEvent(b,!0,!0,d);a.dispatchEvent(e)};var a="Webkit webkit moz Moz o O ms khtml Khtml".split(" ");b.pfx=function(){var c=window.getComputedStyle(document.createElement("dummy")),b={};return function(d){if("undefined"===typeof b[d]){var e,
|
14
|
+
f;e=d.replace(/-[a-z]/g,function(a){return a.slice(-1)[0].toUpperCase()});f=[d,e];e=e.replace(/^[a-z]/,function(a){return a.toUpperCase()});var h=a.forEach(function(a){f.push(a+d);f.push(a+e);f.push(a+"-"+d);f.push(a+"-"+e);f.push("-"+a+"-"+d);f.push("-"+a+"-"+e)});f=f.concat(h);b[d]=null;for(var k in f)if(h=c.getPropertyValue(f[k]),null!==h&&void 0!==h){b[d]=f[k];break}}return b[d]}}()})();rhetButler.Step=function(b){this.element=b;this.groups=[];this.steps=[]};
|
15
|
+
(function(){var b=rhetButler.Step.prototype;b.toString=function(){return"A Step "+this.element.id};b.setup=function(a,c){this.element=a;this.children=[];this.indexes={};this.childrenById={};for(field in c)this.indexes[field]=c[field];this.element.classList.add("future");this.nextItem=this.prevItem=this.lastItem=this.firstItem=this.nextSlide=this.prevSlide=this.lastSlide=this.firstSlide=null};b.treeFinished=function(){};b.addClass=function(a){this.element.classList.add(a)};b.removeClass=function(a){a instanceof
|
16
|
+
RegExp?Array.prototype.forEach.call(this.element.classList,function(c){a.test(c)&&this.element.classList.remove(c)},this):this.element.classList.remove(a)};b.hasClass=function(a){return this.element.classList.contains(a)};b.beginDeparture=function(){this.addClass("previous");this.removeClass("current");this.parent.beginDeparture()};b.completeDeparture=function(){this.removeClass("previous");this.removeClass("present");this.removeClass("future");this.removeClass("current");this.addClass("past");this.parent.completeDeparture()};
|
17
|
+
b.beginArrival=function(){this.addClass("next");this.parent.beginArrival()};b.completeArrival=function(){this.removeClass("next");this.addClass("current");this.removeClass("future");this.removeClass("past");this.addClass("present");this.parent.completeArrival()};b.cancelArrival=function(){this.removeClass("next")};b.eachStep=function(a){a(this);this.children.forEach(function(c){c.eachStep(a)})};b.relativeLevelPosition=function(a,c){if(!c)return["none","same",a];var b=c.indexes[a]-this.indexes[a];
|
18
|
+
return-1>b?["jump","backwards","by-"+a]:-1==b?["advance","backwards","by-"+a]:1==b?["advance","forwards","by-"+a]:1<b?["jump","forwards","by-"+a]:["none","same","by-"+a]};b.relativePosition=function(a){var c=this.relativeLevelPosition("slide",a);"none"==c[0]&&(c=this.relativeLevelPosition("item",a));return c};b.addChild=function(a){this.debugAssoc("Xanc",a);var c=this.children.slice(-1)[0];c&&(this.debugAssoc("Xalc",c),a.addPrevStep(c),c.addNextStep(a));this.children.push(a);this.addDescendant(a)};
|
19
|
+
b.addDescendant=function(a){this.childrenById[a.element.id]=a;a instanceof rhetButler.Steps.Slide&&(this.lastSlide=a,null==this.firstSlide&&(this.firstItem=this.firstSlide=a,null!=this.prevSlide&&(this.prevSlide.addNextSlide(a),a.addPrevSlide(this.prevSlide))));a instanceof rhetButler.Steps.Item&&(this.lastItem=a);this.propagateDescendant(a)};b.lastChild=function(){return 0<this.children.length?this.children.slice(-1)[0]:this};b.debugAssoc=function(a,c){};b.addNextRoot=function(a){this.debugAssoc("Xnr",
|
20
|
+
a)};b.addPrevRoot=function(a){this.debugAssoc("Xpr",a)};b.addNextGroup=function(a){this.debugAssoc("Xng",a)};b.addPrevGroup=function(a){this.debugAssoc("Xpg",a)};b.addNextSlide=function(a){this.debugAssoc("Xns",a)};b.addPrevSlide=function(a){this.debugAssoc("Xps",a)};b.addNextItem=function(a){this.debugAssoc("Xni",a)};b.addPrevItem=function(a){this.debugAssoc("Xpi",a)}})();rhetButler.ChildStep=function(){};rhetButler.ChildStep.prototype=new rhetButler.Step;
|
21
|
+
(function(){var b=rhetButler.ChildStep.prototype,a=rhetButler.Step.prototype;b.setup=function(c,b,d){this.parent=c;a.setup.call(this,b,d);this.parent.addChild(this)};b.propagateDescendant=function(a){this.parent.addDescendant(a)}})();rhetButler.Steps={};rhetButler.Steps.Group=function(b,a,c){this.setup(b,a,c)};rhetButler.Steps.Group.prototype=new rhetButler.ChildStep;
|
22
|
+
(function(){var b=rhetButler.Steps.Group.prototype;b.addNextStep=function(a){a.addPrevGroup(this)};b.addPrevStep=function(a){a.addNextGroup(this)};b.addNextSlide=function(a){this.debugAssoc("gns",a);this.nextSlide=a;this.lastSlide&&this.lastSlide.addNextSlide(a)};b.addPrevSlide=function(a){this.debugAssoc("gps",a);this.lastSlide||(this.lastSlide=a);this.lastItem||(this.lastItem=a.lastChild());this.prevSlide=a;this.prevItem=a.lastChild()};b.addNextGroup=function(a){this.debugAssoc("gng",a)};b.addPrevGroup=
|
23
|
+
function(a){this.debugAssoc("gpg",a);this.lastSlide=this.prevSlide=a.lastSlide;this.lastItem=a.lastItem}})();rhetButler.Steps.Item=function(b,a,c,g){this._cue=g;this.setup(b,a,c)};rhetButler.Steps.Item.prototype=new rhetButler.ChildStep;
|
24
|
+
(function(){var b=rhetButler.Steps.Item.prototype;b.cue=function(){return this._cue};b.addChild=function(a){this.parent.addChild(a)};b.addNextStep=function(a){a.addPrevItem(this)};b.addPrevStep=function(a){a.addNextItem(this)};b.addNextItem=function(a){this.debugAssoc("ini",a);this.nextItem=a};b.addPrevItem=function(a){this.debugAssoc("ipi",a);this.prevItem=a};b.beginDeparture=function(){this.parent.addClass("prev-"+this.cue());this.parent.removeClass(/^current-cue-.*/);this.parent.beginDeparture()};
|
25
|
+
b.completeDeparture=function(){this.parent.removeClass("prev-"+this.cue());this.parent.completeDeparture()};b.beginArrival=function(){this.parent.addClass("next-"+this.cue());this.parent.beginArrival()};b.completeArrival=function(){this.parent.removeClass("next-"+this.cue());this.parent.addClass("current-"+this.cue());this.parent.completeArrival()}})();rhetButler.Steps.Root=function(b,a){this.setup(b,a)};rhetButler.Steps.Root.prototype=new rhetButler.Step;
|
26
|
+
(function(){var b=rhetButler.Steps.Root.prototype;b.propagateDescendant=function(a){};b.addNextStep=function(a){a.addPrevRoot(this)};b.addPrevStep=function(a){a.addNextRoot(this)};b.beginTransition=function(a){this.addClass("moving");this.addClass(a.startElemId());this.addClass(a.endElemId());a.direction.forEach(function(a){this.addClass(a)},this)};b.completeTransition=function(a){this.removeClass("moving");this.removeClass(a.startElemId());this.removeClass(a.endElemId());a.direction.forEach(function(a){this.removeClass(a)},
|
27
|
+
this)};b.beginArrival=function(){};b.completeArrival=function(){};b.beginDeparture=function(){};b.completeDeparture=function(){}})();rhetButler.Steps.Slide=function(b,a,c){this.setup(b,a,c);this.items=[]};rhetButler.Steps.Slide.prototype=new rhetButler.ChildStep;
|
28
|
+
(function(){var b=rhetButler.Steps.Slide.prototype,a=rhetButler.Step.prototype;b.addChild=function(a){this.items.some(function(b){return a.cue()==b.cue()})||this.items.push(a)};b.treeFinished=function(){var c=/^cue-(\d+)/;if(0!=this.items.length){this.items=this.items.sort(function(a,b){var g=parseInt(c.exec(a.cue())[1],10),h=parseInt(c.exec(b.cue())[1],10);return g==h?a.cue()<b.cue()?-1:1:g<h?-1:1});this.items[0].prevItem=this;this.nextItem=this.items[0];var b=Math.max.apply(void 0,this.items.map(function(a){return a.indexes.item}));
|
29
|
+
this.items.forEach(function(a){a.indexes.item=b;b++});this.items.forEach(function(b){b.prevSlide=this.prevSlide;a.addChild.call(this,b)},this)}};b.addNextStep=function(a){a.addPrevSlide(this)};b.addPrevStep=function(a){a.addNextSlide(this)};b.addPrevGroup=function(a){this.debugAssoc("spg",a);a.lastSlide&&this.addPrevSlide(a.lastSlide)};b.addNextSlide=function(a){this.debugAssoc("sns",a);this.nextSlide=a;this.children.forEach(function(b){b.nextSlide=a});this.lastChild().nextItem=a};b.addPrevSlide=
|
30
|
+
function(a){this.debugAssoc("sps",a);this.prevSlide=a;this.children.forEach(function(b){b.prevSlide=a});this.prevItem=a.lastChild()}})();rhetButler.TransitionStation=function(b){this.step=b;this.checkIn=!1;this.eventListener=null};
|
31
|
+
(function(){var b=["transition-duration","animation-name","animation-iteration-count","animation-play-state"],a=[];(function(){var b=["TransitionEnd","AnimationEnd"];["webkit","o","MS",""].forEach(function(c){b.forEach(function(b){a.push(c+b);a.push(c+b.toLowerCase())})})})();var c=rhetButler.TransitionStation.prototype;c.visit=function(){var a,b;if(this.checkIn)return!0;a=this.getMotionStyles();this.step.addClass("am-at");this.step.removeClass("to-come");b=this.getMotionStyles();this.checkIn=!0;
|
32
|
+
for(name in b)a[name]!=b[name]&&(this.checkIn=!1);this.elementHasMotion()||this.visited();this.checkIn&&this.step.removeClass("am-at");return this.checkIn};c.setArriveHandler=function(a){this.removeListener();this.eventListener=a;this.attachListener()};c.visited=function(){this.step.removeClass("to-come");this.step.addClass("has-gone");this.checkIn=!0};c.prepare=function(){this.step.addClass("to-come");this.attachListener()};c.complete=function(){this.step.removeClass("to-come");this.step.removeClass("has-gone");
|
33
|
+
this.step.removeClass("am-at");this.removeListener()};c.getMotionStyles=function(){var a=window.getComputedStyle(document.getElementById(this.step.element.id)),c={};b.map(function(b){c[b]=a.getPropertyValue(rhetButler.pfx(b))});return c};c.elementHasMotion=function(){var a=this.getMotionStyles(),b=[],c;a["transition-duration"]&&(b=a["transition-duration"].split(/\s*,\s*/));if(!b.every(function(a){return"0s"==a}))return!0;if(null==a["animation-name"]||"none"==a["animation-name"])return!1;b=a["animation-play-state"].split(/\s*,\s*/);
|
34
|
+
c=a["animation-iteration-count"].split(/\s*,\s*/);b.length<c.length?b=b.concat(b):c=c.concat(c);return b.some(function(a,b){return"paused"!=a&&"infinite"!=c[b]})};c.attachListener=function(){this.eventListener&&a.forEach(function(a){this.step.element.addEventListener(a,this.eventListener,!0)},this)};c.removeListener=function(){this.eventListener&&a.forEach(function(a){this.step.element.removeEventListener(a,this.eventListener,!0)},this)}})();
|
35
|
+
rhetButler.TransitionStations=function(b,a,c,g){this.presenter=b;this.uphill=[];this.uphillIndex=0;this.downhill=[];this.downhillIndex=0;this.firstStep=a;this.currentStep=c;this.lastStep=g;this.buildList();this.currentState=null;this.changeState("preparing")};
|
36
|
+
(function(){var b=rhetButler.TransitionStations.prototype,a={preparing:{},uphill:{},downhill:{},cancelled:{},arrived:{}},c={enter:function(){},start:function(){},cancel:function(){this.changeState("cancelled")},forceFinish:function(){console.log("Force Finish")},finish:function(){},currentLeg:function(){return[]},enterState:function(){},resumeStep:function(){return this.firstStep},currentStation:function(){return null},advanceStation:function(){},nextStation:function(){this.currentStation().visit();
|
37
|
+
if(this.currentStation().checkIn)return this.advanceStation();var a=this,b=this.currentStation();this.currentStation().setArriveHandler(function(c){a.arriveListener(b,c)});return!1}};for(name in a)for(func in c)a[name][func]=c[func];a.preparing.enterState=function(){this.eachStation(function(a){a.prepare()})};a.preparing.start=function(){this.changeState("uphill");this.elementArrived(this.currentStep)};a.preparing.forceFinish=function(){this.eachStation(function(a){a.visited()});this.changeState("arrived")};
|
38
|
+
a.uphill.enterState=function(){this.currentStep=this.uphill[0].step;this.presenter.rootStep.beginTransition(this);this.firstStep.beginDeparture();this.lastStep.beginArrival()};a.uphill.finish=function(){this.changeState("downhill")};a.uphill.currentLeg=function(){return this.uphill};a.uphill.currentStation=function(){return this.uphill[this.uphillIndex]};a.uphill.advanceStation=function(){this.uphillIndex++;this.uphillIndex<this.uphill.length?this.currentStep=this.currentStation().step:this.changeState("downhill");
|
39
|
+
return!0};a.downhill.currentLeg=function(){return this.downhill};a.downhill.enterState=function(){this.currentStep=this.downhill[0].step};a.downhill.currentStation=function(){return this.downhill[this.downhillIndex]};a.downhill.advanceStation=function(){this.downhillIndex++;if(this.downhillIndex<this.downhill.length)return this.currentStep=this.currentStation().step,!0;this.changeState("arrived");return!1};a.downhill.finish=function(){this.changeState("arrived")};a.downhill.resumeStep=function(){return this.lastStep};
|
40
|
+
a.cancelled.enterState=function(){this.eachStation(function(a){a.step!=this.currentStep&&a.complete()},this);this.presenter.rootStep.completeTransition(this);this.firstStep.completeDeparture();this.lastStep.cancelArrival()};a.arrived.enterState=function(){this.eachStation(function(a){a.complete()});this.currentStep=this.lastStep;this.presenter.rootStep.completeTransition(this);this.firstStep.completeDeparture();this.lastStep.completeArrival();this.presenter.completeTransition()};a.arrived.resumeStep=
|
41
|
+
function(){return this.lastStep};a.arrived.nextStation=function(){return!1};a.arrived.cancel=function(){return!1};b.changeState=function(b){"undefined"==typeof quiet_console&&console.log("Changing state: "+b+" S/C/E: "+this.firstStep.toString()+" / "+this.currentStep.toString()+" / "+this.lastStep.toString());var c=a[b];for(func in c)this[func]=c[func];for(stateName in a)this.presenter.rootStep.removeClass(stateName);this.presenter.rootStep.addClass(b);this.currentState=b;this.enterState()};b.buildList=
|
42
|
+
function(){var a=this.firstStep,b=!0,c;for(this.direction=this.firstStep.relativePosition(this.lastStep);null!=a;)b=b&&a!=this.currentStep,c=new rhetButler.TransitionStation(a),this.uphill.push(c),b&&c.visited(),a=a.parent;for(a=this.lastStep;null!=a;)this.downhill.unshift(new rhetButler.TransitionStation(a)),a=a.parent};b.startElemId=function(){return"prev_"+this.firstStep.element.id};b.endElemId=function(){return"next_"+this.lastStep.element.id};b.eachStation=function(a){this.uphill.forEach(a,this);
|
43
|
+
this.downhill.forEach(a,this)};b.arriveListener=function(a,b){console.log("rhet-butler/transition-stations.js:256","event",b);b.stopPropagation();a.visited();this.elementArrived();return!0};b.elementArrived=function(a){for(;this.nextStation(););"undefined"==typeof quiet_console&&console.log("Waiting for event")}})();rhetButler.TreeBuilder=function(b,a){this.root=b;this.stepClass=a;this.rootStep=null;this.parentStack=[];this.indexes={step:0,group:0,slide:0,item:0}};
|
44
|
+
(function(){var b=rhetButler.TreeBuilder.prototype;b.getParent=function(a){for(var b,g,d;0<this.parentStack.length;){g=this.parentStack[0];d=g.element;for(b=a;b!=d&&b!=this.root;)b=b.parentElement;if(b==d)return g;this.parentStack.shift().treeFinished()}return null};b.assembleNextElement=function(a){var b,g=this.getParent(a);if(a.classList.contains("root"))0==a.id.length&&(a.id="rhet-root"),this.rootStep=b=new rhetButler.Steps.Root(a,this.indexes),this.indexes.step++,this.parentStack.unshift(b);else if(a.classList.contains("group"))this.indexes.group++,
|
45
|
+
0==a.id.length&&(a.id="group-"+this.indexes.group),b=new rhetButler.Steps.Group(g,a,this.indexes),this.indexes.step++,this.parentStack.unshift(b);else if(a.classList.contains("slide"))this.indexes.slide++,0==a.id.length&&(a.id="slide-"+this.indexes.slide),b=new rhetButler.Steps.Slide(g,a,this.indexes),this.indexes.step++,this.parentStack.unshift(b);else if(a.classList.contains("item"))for(var d=Array.prototype.filter.call(a.classList,function(a){return/^cue-.*/.test(a)}),e=d.length,f=0;f<e;f++)this.indexes.item++,
|
46
|
+
0==a.id.length&&(a.id="item-"+this.indexes.item),b=new rhetButler.Steps.Item(g,a,this.indexes,d[f]),b.parent.items.some(function(a){return a==b})?this.indexes.step++:this.indexes.item--};b.buildTree=function(){for(rhetButler.arrayify(this.root.getElementsByClassName(this.stepClass)).forEach(this.assembleNextElement,this);0<this.parentStack.length;)this.parentStack.shift().treeFinished();return this.rootStep}})();
|
47
|
+
rhetButler.Presenter=function(b,a){this.document=b;this.body=b.body;this.window=a;this.stepsById={};this.currentTransition=this.rootStep=null;this.nextStepIndex=this.previousStepIndex=this.nextStepIndex=this.previousSlideIndex=0};
|
48
|
+
(function(){var b=rhetButler.Presenter.prototype,a=rhetButler;b.setup=function(b){this.root=a.byId(b);this.body.classList.remove("rhet-disabled");this.body.classList.add("rhet-enabled");a.arrayify(this.root.getElementsByClassName("rhet-butler"));this.rootStep=(new rhetButler.TreeBuilder(this.root,"rhet-butler")).buildTree();this.rootStep.eachStep(function(a){a.addClass("future")});b=this.rootStep.firstItem;this.currentTransition=new rhetButler.TransitionStations(this,b,b,b);this.currentTransition.forceFinish();
|
49
|
+
this.bindHandlers();a.triggerEvent(this.root,"rhet:init",{api:this})};b.markRange=function(a,b,d){this.stepsList.slice(a,b).forEach(function(a){a=this.containingElements(a);a.steps.forEach(function(a){this.thisClassNotThose(a,d,"before","after","passing")},this);a.slides.forEach(function(a){this.thisClassNotThose(a,d,"before","after","passing")},this)},this)};b.bindHandlers=function(){var a=this;this.root.addEventListener("rhet:init",function(){var b="";a.root.addEventListener("rhet:stepenter",function(a){window.location.hash=
|
50
|
+
b="#/"+a.target.id},!1);window.addEventListener("hashchange",function(d){window.location.hash!==b&&a.moveTo(a.getElementFromHash())},!1);a.teleport(a.getElementFromHash()||a.rootStep.firstItem)},!1)};b.resolveStep=function(a,b){if(a instanceof rhetButler.Step)return a;switch(a){case "next":switch(b){case "slide":return this.currentTransition.lastStep.nextSlide;case "item":return this.currentTransition.lastStep.nextItem;default:throw"Bad step reference: '"+a+","+b+"'";}case "prev":case "previous":switch(b){case "slide":return this.currentTransition.lastStep.prevSlide;
|
51
|
+
case "item":return this.currentTransition.lastStep.prevItem;default:throw"Bad step reference: '"+a+","+b+"'";}default:if(a in this.rootStep.childrenById)return this.rootStep.childrenById[a];throw"Bad slide direction: '"+a+"'";}};b.currentStep=function(){return this.currentTransition.currentStep};b.buildTransition=function(a){var b=this.currentTransition.resumeStep(),d=this.currentTransition.currentStep;"undefined"==typeof quiet_console&&console.log("New transition list: S/C/E: "+b.toString()+" / "+
|
52
|
+
d.toString()+" / "+a.toString());this.currentTransition.cancel();this.currentTransition=new rhetButler.TransitionStations(this,b,d,a)};b.teleport=function(a,b){var d=this.resolveStep(a,b);d&&(this.buildTransition(d),this.currentTransition.forceFinish())};b.moveTo=function(a,b){var d=this.resolveStep(a,b);d&&(this.buildTransition(d),this.currentTransition.start())};b.completeTransition=function(){var b=document.getElementById(this.currentTransition.currentStep.element.id);a.triggerEvent(b,"rhet:stepenter",
|
53
|
+
{api:this})};b.checkSupport=function(){navigator.userAgent.toLowerCase();if(null!==pfx("perspective")&&body.classList&&body.dataset)return this.body.classList.remove("rhet-not-supported"),this.body.classList.add("rhet-supported"),!0;this.body.className+=" rhet-not-supported ";return!1};b.getElementFromHash=function(){return window.location.hash.replace(/^#\/?/,"")};b.getStep=function(b){"number"===typeof b?b=0>b?this.stepsList[stepsList.length+b]:this.stepsList[b]:"string"===typeof b&&(b=a.byId(b));
|
54
|
+
return b&&b.id&&this.stepsData[b.id]?b:null};b.prev=function(){var a=this.steps.indexOf(this.activeStep)-1,a=0<=a?this.steps[a]:this.getStep(-1);return this.moveTo(a)};b.next=function(){var a=steps.indexOf(activeStep)+1,a=a<steps.length?steps[a]:steps[0];return this.moveTo(a)};b.thisClassNotThose=function(a,b){var d;for(d=2;d<arguments.length;d++)a.classList.remove(arguments[d]);a.classList.add(b)};b.unmarkEndpoint=function(a,b){var d=this.containingElements(this.steps[a]),e=d.slides[0];d.all.forEach(function(a){a.classList.remove(b)});
|
55
|
+
this.root.classList.remove(b+"-"+e.id)};b.markTime=function(a,b){this.containingElements(this.steps[a]).all.forEach(function(a){this.thisClassNotThose(a,b,"past","present","future")},this)};b.markEndpoint=function(a,b){var d=this.containingElements(this.steps[a]),e=d.slides[0];d.all.forEach(function(a){this.thisClassNotThose(a,b,"before","after","passing")},this);this.root.classList.add(b+"-"+e.id);return d}})();
|
@@ -0,0 +1,41 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// settings
|
3
|
+
|
4
|
+
// animation class mode: true | false | silent
|
5
|
+
$default-animation-class-mode: silent !default;
|
6
|
+
|
7
|
+
// keyframes output: true | false
|
8
|
+
$default-keyframes-output: true;
|
9
|
+
|
10
|
+
// ---------------------------------------------------------------------------
|
11
|
+
// animated class for external use
|
12
|
+
@mixin animated-class($class: $default-animation-class-mode) {
|
13
|
+
$selector: if($class == 'silent', '%animated', '.animated');
|
14
|
+
#{$selector} { @include animation(1s ease both); }
|
15
|
+
}
|
16
|
+
|
17
|
+
// ---------------------------------------------------------------------------
|
18
|
+
// animation-class
|
19
|
+
|
20
|
+
@mixin animation-class($name, $class: $default-animation-class-mode) {
|
21
|
+
$selector: if($class == 'silent', '%', '.') + $name;
|
22
|
+
@if $class {
|
23
|
+
#{$selector} {
|
24
|
+
@include animation-name($name);
|
25
|
+
@content;
|
26
|
+
}
|
27
|
+
}
|
28
|
+
}
|
29
|
+
|
30
|
+
// ---------------------------------------------------------------------------
|
31
|
+
// yepnope
|
32
|
+
|
33
|
+
// Take a $list, return true if any $args are present.
|
34
|
+
@function yepnope($list, $args) {
|
35
|
+
$list : compact($list);
|
36
|
+
$return : false;
|
37
|
+
@each $arg in $args {
|
38
|
+
$return: if(index($list,$arg), true, $return);
|
39
|
+
}
|
40
|
+
@return $return;
|
41
|
+
}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// imports
|
3
|
+
|
4
|
+
@import "attention/flash";
|
5
|
+
@import "attention/shake";
|
6
|
+
@import "attention/tada";
|
7
|
+
@import "attention/swing";
|
8
|
+
@import "attention/wobble";
|
9
|
+
@import "attention/pulse";
|
10
|
+
@import "attention/wiggle";
|
11
|
+
|
12
|
+
// ---------------------------------------------------------------------------
|
13
|
+
// attention [ flash | shake | tada |
|
14
|
+
// swing | wobble | pulse | wiggle ]
|
15
|
+
|
16
|
+
@mixin animate-attention(
|
17
|
+
$sub : all,
|
18
|
+
$class : $default-animation-class-mode,
|
19
|
+
$keyframes : $default-keyframes-output
|
20
|
+
) {
|
21
|
+
$sub : compact($sub);
|
22
|
+
$flash : yepnope($sub, all flash);
|
23
|
+
$shake : yepnope($sub, all shake);
|
24
|
+
$tada : yepnope($sub, all tada);
|
25
|
+
$swing : yepnope($sub, all swing);
|
26
|
+
$wobble : yepnope($sub, all wobble);
|
27
|
+
$pulse : yepnope($sub, all pulse);
|
28
|
+
$wiggle : yepnope($sub, all wiggle);
|
29
|
+
@if $flash { @include animate-flash ($class, $keyframes); }
|
30
|
+
@if $shake { @include animate-shake ($class, $keyframes); }
|
31
|
+
@if $tada { @include animate-tada ($class, $keyframes); }
|
32
|
+
@if $swing { @include animate-swing ($class, $keyframes); }
|
33
|
+
@if $wobble { @include animate-wobble ($class, $keyframes); }
|
34
|
+
@if $pulse { @include animate-pulse ($class, $keyframes); }
|
35
|
+
@if $wiggle { @include animate-wiggle ($class, $keyframes); }
|
36
|
+
}
|
@@ -0,0 +1,71 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// imports
|
3
|
+
|
4
|
+
@import "compass/css3/animation";
|
5
|
+
@import "compass/css3/transform";
|
6
|
+
@import "bounce/bounceIn";
|
7
|
+
@import "bounce/bounceOut";
|
8
|
+
|
9
|
+
// ---------------------------------------------------------------------------
|
10
|
+
// bounce [ in | inUp | inDown | inLeft | inRight |
|
11
|
+
// out | outUp | outDown | outLeft | outRight |
|
12
|
+
// up | down | left | right | only | all ]
|
13
|
+
|
14
|
+
@mixin animate-bounce(
|
15
|
+
$sub : all,
|
16
|
+
$class : $default-animation-class-mode,
|
17
|
+
$keyframes : $default-keyframes-output
|
18
|
+
) {
|
19
|
+
$sub : compact($sub);
|
20
|
+
$only : yepnope($sub, all only);
|
21
|
+
$in : yepnope($sub, all in);
|
22
|
+
$inUp : yepnope($sub, all in inUp up);
|
23
|
+
$inDown : yepnope($sub, all in inDown down);
|
24
|
+
$inLeft : yepnope($sub, all in inLeft left);
|
25
|
+
$inRight : yepnope($sub, all in inRight right);
|
26
|
+
$out : yepnope($sub, all out);
|
27
|
+
$outUp : yepnope($sub, all out outUp up);
|
28
|
+
$outDown : yepnope($sub, all out outDown down);
|
29
|
+
$outLeft : yepnope($sub, all out outLeft left);
|
30
|
+
$outRight : yepnope($sub, all out outRight right);
|
31
|
+
@if $in { @include animate-bounceIn ($class, $keyframes); }
|
32
|
+
@if $inUp { @include animate-bounceInUp ($class, $keyframes); }
|
33
|
+
@if $inDown { @include animate-bounceInDown ($class, $keyframes); }
|
34
|
+
@if $inLeft { @include animate-bounceInLeft ($class, $keyframes); }
|
35
|
+
@if $inRight { @include animate-bounceInRight ($class, $keyframes); }
|
36
|
+
@if $out { @include animate-bounceOut ($class, $keyframes); }
|
37
|
+
@if $outUp { @include animate-bounceOutUp ($class, $keyframes); }
|
38
|
+
@if $outDown { @include animate-bounceOutDown ($class, $keyframes); }
|
39
|
+
@if $outLeft { @include animate-bounceOutLeft ($class, $keyframes); }
|
40
|
+
@if $outRight { @include animate-bounceOutRight ($class, $keyframes); }
|
41
|
+
|
42
|
+
$name: bounce;
|
43
|
+
@if $only {
|
44
|
+
@if $keyframes {
|
45
|
+
@include keyframes($name) {
|
46
|
+
0% {
|
47
|
+
@include translateY(0);
|
48
|
+
}
|
49
|
+
20% {
|
50
|
+
@include translateY(0);
|
51
|
+
}
|
52
|
+
40% {
|
53
|
+
@include translateY(-30px);
|
54
|
+
}
|
55
|
+
50% {
|
56
|
+
@include translateY(0);
|
57
|
+
}
|
58
|
+
60% {
|
59
|
+
@include translateY(-15px);
|
60
|
+
}
|
61
|
+
80% {
|
62
|
+
@include translateY(0);
|
63
|
+
}
|
64
|
+
100% {
|
65
|
+
@include translateY(0);
|
66
|
+
}
|
67
|
+
}
|
68
|
+
}
|
69
|
+
@include animation-class($name, $class) {}
|
70
|
+
}
|
71
|
+
}
|
@@ -0,0 +1,56 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// imports
|
3
|
+
|
4
|
+
@import "fade/fadeIn";
|
5
|
+
@import "fade/fadeOut";
|
6
|
+
|
7
|
+
// ---------------------------------------------------------------------------
|
8
|
+
// fade [ in | inUp | inDown | inLeft | inRight |
|
9
|
+
// inUpBig | inDownBig | inLeftBig | inRightBig |
|
10
|
+
// out | outUp | outDown | outLeft | outRight |
|
11
|
+
// outUpBig | outDownBig | outLeftBig | outRightBig |
|
12
|
+
// up | down | left | right | big | all ]
|
13
|
+
|
14
|
+
@mixin animate-fade(
|
15
|
+
$sub : all,
|
16
|
+
$class : $default-animation-class-mode,
|
17
|
+
$keyframes : $default-keyframes-output
|
18
|
+
) {
|
19
|
+
$sub : compact($sub);
|
20
|
+
$in : yepnope($sub, all in);
|
21
|
+
$inUp : yepnope($sub, all in inUp up);
|
22
|
+
$inDown : yepnope($sub, all in inDown down);
|
23
|
+
$inLeft : yepnope($sub, all in inLeft left);
|
24
|
+
$inRight : yepnope($sub, all in inRight right);
|
25
|
+
$inUpBig : yepnope($sub, all in inUp up big);
|
26
|
+
$inDownBig : yepnope($sub, all in inDown down big);
|
27
|
+
$inLeftBig : yepnope($sub, all in inLeft left big);
|
28
|
+
$inRightBig : yepnope($sub, all in inRight right big);
|
29
|
+
$out : yepnope($sub, all out);
|
30
|
+
$outUp : yepnope($sub, all out outUp up);
|
31
|
+
$outDown : yepnope($sub, all out outDown down);
|
32
|
+
$outLeft : yepnope($sub, all out outLeft left);
|
33
|
+
$outRight : yepnope($sub, all out outRight right);
|
34
|
+
$outUpBig : yepnope($sub, all out outUp up big);
|
35
|
+
$outDownBig : yepnope($sub, all out outDown down big);
|
36
|
+
$outLeftBig : yepnope($sub, all out outLeft left big);
|
37
|
+
$outRightBig : yepnope($sub, all out outRight right big);
|
38
|
+
@if $in { @include animate-fadeIn ($class, $keyframes); }
|
39
|
+
@if $inUp { @include animate-fadeInUp ($class, $keyframes); }
|
40
|
+
@if $inDown { @include animate-fadeInDown ($class, $keyframes); }
|
41
|
+
@if $inLeft { @include animate-fadeInLeft ($class, $keyframes); }
|
42
|
+
@if $inRight { @include animate-fadeInRight ($class, $keyframes); }
|
43
|
+
@if $inUpBig { @include animate-fadeInUpBig ($class, $keyframes); }
|
44
|
+
@if $inDownBig { @include animate-fadeInDownBig ($class, $keyframes); }
|
45
|
+
@if $inLeftBig { @include animate-fadeInLeftBig ($class, $keyframes); }
|
46
|
+
@if $inRightBig { @include animate-fadeInRightBig ($class, $keyframes); }
|
47
|
+
@if $out { @include animate-fadeOut ($class, $keyframes); }
|
48
|
+
@if $outUp { @include animate-fadeOutUp ($class, $keyframes); }
|
49
|
+
@if $outDown { @include animate-fadeOutDown ($class, $keyframes); }
|
50
|
+
@if $outLeft { @include animate-fadeOutLeft ($class, $keyframes); }
|
51
|
+
@if $outRight { @include animate-fadeOutRight ($class, $keyframes); }
|
52
|
+
@if $outUpBig { @include animate-fadeOutUpBig ($class, $keyframes); }
|
53
|
+
@if $outDownBig { @include animate-fadeOutDownBig ($class, $keyframes); }
|
54
|
+
@if $outLeftBig { @include animate-fadeOutLeftBig ($class, $keyframes); }
|
55
|
+
@if $outRightBig { @include animate-fadeOutRightBig ($class, $keyframes); }
|
56
|
+
}
|
@@ -0,0 +1,98 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// special class handling
|
3
|
+
|
4
|
+
@mixin flip-class($name, $class: $default-animation-class-mode) {
|
5
|
+
@include animation-class($name, $class) {
|
6
|
+
@include backface-visibility(visible);
|
7
|
+
}
|
8
|
+
}
|
9
|
+
|
10
|
+
// ---------------------------------------------------------------------------
|
11
|
+
// imports
|
12
|
+
@import "compass/css3/animation";
|
13
|
+
|
14
|
+
@import "flip/flipIn";
|
15
|
+
@import "flip/flipOut";
|
16
|
+
|
17
|
+
// ---------------------------------------------------------------------------
|
18
|
+
// flip [ only | in | out | x | y | all |
|
19
|
+
// flipIn | flipInX | flipInY |
|
20
|
+
// flipOut | flipOutX | flipOutY |
|
21
|
+
// flipX | flipY ]
|
22
|
+
|
23
|
+
@mixin animate-flip(
|
24
|
+
$sub : all,
|
25
|
+
$class : $default-animation-class-mode,
|
26
|
+
$keyframes : $default-keyframes-output
|
27
|
+
) {
|
28
|
+
$sub : compact($sub);
|
29
|
+
$only : yepnope($sub, all only);
|
30
|
+
$flipInX : yepnope($sub, all flipIn flipInX flipX in x);
|
31
|
+
$flipInY : yepnope($sub, all flipIn flipInY flipY in y);
|
32
|
+
$flipOutX : yepnope($sub, all flipOut flipOutX flipX out x);
|
33
|
+
$flipOutY : yepnope($sub, all flipOut flipOutY flipY out y);
|
34
|
+
|
35
|
+
@if $flipInX { @include animate-flipInX ($class, $keyframes); }
|
36
|
+
@if $flipInY { @include animate-flipInY ($class, $keyframes); }
|
37
|
+
@if $flipOutX { @include animate-flipOutX ($class, $keyframes); }
|
38
|
+
@if $flipOutY { @include animate-flipOutY ($class, $keyframes); }
|
39
|
+
|
40
|
+
$name: flip;
|
41
|
+
@if $only {
|
42
|
+
@if $keyframes {
|
43
|
+
@include keyframes($name) {
|
44
|
+
0% {
|
45
|
+
@include transform(perspective(400px) rotateY(0));
|
46
|
+
@include animation-timing-function(ease-out);
|
47
|
+
}
|
48
|
+
40% {
|
49
|
+
@include transform(perspective(400px) translateZ(150px) rotateY(170deg));
|
50
|
+
@include animation-timing-function(ease-out);
|
51
|
+
}
|
52
|
+
50% {
|
53
|
+
@include transform(perspective(400px) translateZ(150px) rotateY(190deg) scale(1));
|
54
|
+
@include animation-timing-function(ease-in);
|
55
|
+
}
|
56
|
+
80% {
|
57
|
+
@include transform(perspective(400px) rotateY(360deg) scale(0.95));
|
58
|
+
@include animation-timing-function(ease-in);
|
59
|
+
}
|
60
|
+
100% {
|
61
|
+
@include transform(perspective(400px) scale(1));
|
62
|
+
@include animation-timing-function(ease-in);
|
63
|
+
}
|
64
|
+
}
|
65
|
+
}
|
66
|
+
@include flip-class($name, $class);
|
67
|
+
}
|
68
|
+
}
|
69
|
+
|
70
|
+
// ---------------------------------------------------------------------------
|
71
|
+
// flipX [ in | out | all ]
|
72
|
+
|
73
|
+
@mixin animate-flipX(
|
74
|
+
$sub : all,
|
75
|
+
$class : $default-animation-class-mode,
|
76
|
+
$keyframes : $default-keyframes-output
|
77
|
+
) {
|
78
|
+
$sub : compact($sub);
|
79
|
+
$in : yepnope($sub, all in);
|
80
|
+
$out : yepnope($sub, all out);
|
81
|
+
@if $in { @include animate-flipInX (all, $class, $keyframes); }
|
82
|
+
@if $out { @include animate-flipOutX (all, $class, $keyframes); }
|
83
|
+
}
|
84
|
+
|
85
|
+
// ---------------------------------------------------------------------------
|
86
|
+
// flipY [ in | out | all ]
|
87
|
+
|
88
|
+
@mixin animate-flipY(
|
89
|
+
$sub : all,
|
90
|
+
$class : $default-animation-class-mode,
|
91
|
+
$keyframes : $default-keyframes-output
|
92
|
+
) {
|
93
|
+
$sub : compact($sub);
|
94
|
+
$in : yepnope($sub, all in);
|
95
|
+
$out : yepnope($sub, all out);
|
96
|
+
@if $in { @include animate-flipInY (all, $class, $keyframes); }
|
97
|
+
@if $out { @include animate-flipOutY (all, $class, $keyframes); }
|
98
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// imports
|
3
|
+
|
4
|
+
@import "lightSpeed/lightSpeedIn";
|
5
|
+
@import "lightSpeed/lightSpeedOut";
|
6
|
+
|
7
|
+
// ---------------------------------------------------------------------------
|
8
|
+
// lightSpeed [ in | out | all ]
|
9
|
+
|
10
|
+
@mixin animate-lightSpeed(
|
11
|
+
$sub : all,
|
12
|
+
$class : $default-animation-class-mode,
|
13
|
+
$keyframes : $default-keyframes-output
|
14
|
+
) {
|
15
|
+
$sub : compact($sub);
|
16
|
+
$in : yepnope($sub, all in);
|
17
|
+
$out : yepnope($sub, all out);
|
18
|
+
@if $in { @include animate-lightSpeedIn ($class, $keyframes); }
|
19
|
+
@if $out { @include animate-lightSpeedOut ($class, $keyframes); }
|
20
|
+
}
|
@@ -0,0 +1,20 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// imports
|
3
|
+
|
4
|
+
@import "roll/rollIn";
|
5
|
+
@import "roll/rollOut";
|
6
|
+
|
7
|
+
// ---------------------------------------------------------------------------
|
8
|
+
// roll [ in | out | all ]
|
9
|
+
|
10
|
+
@mixin animate-roll(
|
11
|
+
$sub : all,
|
12
|
+
$class : $default-animation-class-mode,
|
13
|
+
$keyframes : $default-keyframes-output
|
14
|
+
) {
|
15
|
+
$sub : compact($sub);
|
16
|
+
$in : yepnope($sub, all in);
|
17
|
+
$out : yepnope($sub, all out);
|
18
|
+
@if $in { @include animate-rollIn ($class, $keyframes); }
|
19
|
+
@if $out { @include animate-rollOut ($class, $keyframes); }
|
20
|
+
}
|
@@ -0,0 +1,40 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// imports
|
3
|
+
|
4
|
+
@import "rotate/rotateIn";
|
5
|
+
@import "rotate/rotateOut";
|
6
|
+
|
7
|
+
// ---------------------------------------------------------------------------
|
8
|
+
// rotate [ in | in-only | inUp | inDown | inLeft | inRight |
|
9
|
+
// inDownLeft | inDownRight | inUpLeft | inUpRight |
|
10
|
+
// out | out-only | outUp | outDown | outLeft | outRight |
|
11
|
+
// outDownLeft | outDownRight | outUpLeft | outUpRight |
|
12
|
+
// left | right | up | down | all ]
|
13
|
+
|
14
|
+
@mixin animate-rotate(
|
15
|
+
$sub : all,
|
16
|
+
$class : $default-animation-class-mode,
|
17
|
+
$keyframes : $default-keyframes-output
|
18
|
+
) {
|
19
|
+
$sub : compact($sub);
|
20
|
+
$in-only : yepnope($sub, all in in-only);
|
21
|
+
$inDownLeft : yepnope($sub, all in inDown inLeft left down);
|
22
|
+
$inDownRight : yepnope($sub, all in inDown inRight right down);
|
23
|
+
$inUpLeft : yepnope($sub, all in inUp inLeft left up);
|
24
|
+
$inUpRight : yepnope($sub, all in inUp inRight right up);
|
25
|
+
$out-only : yepnope($sub, all out out-only);
|
26
|
+
$outDownLeft : yepnope($sub, all out outDown outLeft left down);
|
27
|
+
$outDownRight : yepnope($sub, all out outDown outRight right down);
|
28
|
+
$outUpLeft : yepnope($sub, all out outUp outLeft left up);
|
29
|
+
$outUpRight : yepnope($sub, all out outUp outRight right up);
|
30
|
+
@if $in-only { @include animate-rotateIn (only, $class, $keyframes); }
|
31
|
+
@if $inDownLeft { @include animate-rotateInDownLeft ($class, $keyframes); }
|
32
|
+
@if $inDownRight { @include animate-rotateInDownRight ($class, $keyframes); }
|
33
|
+
@if $inUpLeft { @include animate-rotateInUpLeft ($class, $keyframes); }
|
34
|
+
@if $inUpRight { @include animate-rotateInUpRight ($class, $keyframes); }
|
35
|
+
@if $out-only { @include animate-rotateOut (only, $class, $keyframes); }
|
36
|
+
@if $outDownLeft { @include animate-rotateOutDownLeft ($class, $keyframes); }
|
37
|
+
@if $outDownRight { @include animate-rotateOutDownRight ($class, $keyframes); }
|
38
|
+
@if $outUpLeft { @include animate-rotateOutUpLeft ($class, $keyframes); }
|
39
|
+
@if $outUpRight { @include animate-rotateOutUpRight ($class, $keyframes); }
|
40
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// imports
|
3
|
+
|
4
|
+
@import "special/hinge";
|
5
|
+
|
6
|
+
// ---------------------------------------------------------------------------
|
7
|
+
// special [ hinge | all ]
|
8
|
+
|
9
|
+
@mixin animate-special(
|
10
|
+
$sub : all,
|
11
|
+
$class : $default-animation-class-mode,
|
12
|
+
$keyframes : $default-keyframes-output
|
13
|
+
) {
|
14
|
+
$sub : compact($sub);
|
15
|
+
$hinge : yepnope($sub, all hinge);
|
16
|
+
@if $hinge { @include animate-hinge($class, $keyframes); }
|
17
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// imports
|
3
|
+
|
4
|
+
@import windblown/windblownIn
|
5
|
+
@import windblown/windblownOut
|
6
|
+
|
7
|
+
// ---------------------------------------------------------------------------
|
8
|
+
// windblown [ in | out | all ]
|
9
|
+
|
10
|
+
=animate-windblown($sub: all, $class: $default-animation-class-mode, $keyframes: $default-keyframes-output)
|
11
|
+
$sub: compact($sub)
|
12
|
+
$in: yepnope($sub, all in)
|
13
|
+
$out: yepnope($sub, all out)
|
14
|
+
@if $in
|
15
|
+
+animate-windblownIn($class, $keyframes)
|
16
|
+
@if $out
|
17
|
+
+animate-windblownOut($class, $keyframes)
|
@@ -0,0 +1,34 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// imports
|
3
|
+
@import "compass/css3/animation";
|
4
|
+
@import "compass/css3/opacity";
|
5
|
+
|
6
|
+
// ---------------------------------------------------------------------------
|
7
|
+
// flash
|
8
|
+
|
9
|
+
@mixin animate-flash(
|
10
|
+
$class : $default-animation-class-mode,
|
11
|
+
$keyframes : $default-keyframes-output
|
12
|
+
) {
|
13
|
+
$name: flash;
|
14
|
+
@if $keyframes {
|
15
|
+
@include keyframes($name) {
|
16
|
+
0% {
|
17
|
+
opacity: 1;
|
18
|
+
}
|
19
|
+
25% {
|
20
|
+
opacity: 0;
|
21
|
+
}
|
22
|
+
50% {
|
23
|
+
opacity: 1;
|
24
|
+
}
|
25
|
+
75% {
|
26
|
+
opacity: 0;
|
27
|
+
}
|
28
|
+
100% {
|
29
|
+
opacity: 1;
|
30
|
+
}
|
31
|
+
}
|
32
|
+
}
|
33
|
+
@include animation-class($name, $class) {}
|
34
|
+
}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// imports
|
3
|
+
|
4
|
+
@import "compass/css3/animation";
|
5
|
+
|
6
|
+
// ---------------------------------------------------------------------------
|
7
|
+
// pulse
|
8
|
+
|
9
|
+
@mixin animate-pulse(
|
10
|
+
$class : $default-animation-class-mode,
|
11
|
+
$keyframes : $default-keyframes-output
|
12
|
+
) {
|
13
|
+
$name: pulse;
|
14
|
+
@if $keyframes {
|
15
|
+
@include keyframes($name) {
|
16
|
+
0% {
|
17
|
+
@include scale(1);
|
18
|
+
}
|
19
|
+
50% {
|
20
|
+
@include scale(1.1);
|
21
|
+
}
|
22
|
+
100% {
|
23
|
+
@include scale(1);
|
24
|
+
}
|
25
|
+
}
|
26
|
+
}
|
27
|
+
@include animation-class($name, $class) {}
|
28
|
+
}
|
@@ -0,0 +1,53 @@
|
|
1
|
+
// ---------------------------------------------------------------------------
|
2
|
+
// imports
|
3
|
+
|
4
|
+
@import "compass/css3/animation";
|
5
|
+
@import "compass/css3/transform";
|
6
|
+
|
7
|
+
// ---------------------------------------------------------------------------
|
8
|
+
// shake
|
9
|
+
|
10
|
+
@mixin animate-shake(
|
11
|
+
$class : $default-animation-class-mode,
|
12
|
+
$keyframes : $default-keyframes-output
|
13
|
+
) {
|
14
|
+
$name: shake;
|
15
|
+
@if $keyframes {
|
16
|
+
@include keyframes($name) {
|
17
|
+
0% {
|
18
|
+
@include translateX(0);
|
19
|
+
}
|
20
|
+
10% {
|
21
|
+
@include translateX(-10px);
|
22
|
+
}
|
23
|
+
20% {
|
24
|
+
@include translateX(10px);
|
25
|
+
}
|
26
|
+
30% {
|
27
|
+
@include translateX(-10px);
|
28
|
+
}
|
29
|
+
40% {
|
30
|
+
@include translateX(10px);
|
31
|
+
}
|
32
|
+
50% {
|
33
|
+
@include translateX(-10px);
|
34
|
+
}
|
35
|
+
60% {
|
36
|
+
@include translateX(10px);
|
37
|
+
}
|
38
|
+
70% {
|
39
|
+
@include translateX(-10px);
|
40
|
+
}
|
41
|
+
80% {
|
42
|
+
@include translateX(10px);
|
43
|
+
}
|
44
|
+
90% {
|
45
|
+
@include translateX(-10px);
|
46
|
+
}
|
47
|
+
100% {
|
48
|
+
@include translateX(0);
|
49
|
+
}
|
50
|
+
}
|
51
|
+
}
|
52
|
+
@include animation-class($name, $class) {}
|
53
|
+
}
|