reveal-js-base-theme/js/reveal.min.js

8 lines
26 KiB
JavaScript
Raw Normal View History

2013-03-17 13:10:04 +01:00
/*!
2013-08-18 06:01:28 +02:00
* reveal.js 2.5.0 (2013-08-18, 00:00)
2013-03-17 13:10:04 +01:00
* http://lab.hakim.se/reveal-js
* MIT licensed
*
* Copyright (C) 2013 Hakim El Hattab, http://hakim.se
*/
2013-08-18 06:01:28 +02:00
var Reveal=function(){"use strict";function e(e){return t(),Rt||It?(window.addEventListener("load",T,!1),d(Ut,e),y(),n(),void 0):(document.body.setAttribute("class","no-transforms"),void 0)}function t(){It="WebkitPerspective"in document.body.style||"MozPerspective"in document.body.style||"msPerspective"in document.body.style||"OPerspective"in document.body.style||"perspective"in document.body.style,Rt="WebkitTransform"in document.body.style||"MozTransform"in document.body.style||"msTransform"in document.body.style||"OTransform"in document.body.style||"transform"in document.body.style,Ht=navigator.userAgent.match(/(iphone|ipod|android)/gi)}function n(){function e(){n.length&&head.js.apply(null,n),r()}for(var t=[],n=[],o=0,a=Ut.dependencies.length;a>o;o++){var i=Ut.dependencies[o];(!i.condition||i.condition())&&(i.async?n.push(i.src):t.push(i.src),"function"==typeof i.callback&&head.ready(i.src.match(/([\w\d_\-]*)\.?js$|[^\\\/]*$/i)[0],i.callback))}t.length?(head.ready(e),head.js.apply(null,t)):e()}function r(){a(),o(),c(),G(),setTimeout(function(){Kt.slides.classList.remove("no-transition"),Wt=!0,w("ready",{indexh:Nt,indexv:Pt,currentSlide:Ct})},1)}function o(){var e=f(document.querySelectorAll(Xt));e.forEach(function(e){var t=f(e.querySelectorAll("section"));t.forEach(function(e,t){t>0&&e.classList.add("future")})})}function a(){Kt.theme=document.querySelector("#theme"),Kt.wrapper=document.querySelector(".reveal"),Kt.slides=document.querySelector(".reveal .slides"),Kt.slides.classList.add("no-transition"),Kt.background=i(Kt.wrapper,"div","backgrounds",null),Kt.progress=i(Kt.wrapper,"div","progress","<span></span>"),Kt.progressbar=Kt.progress.querySelector("span"),i(Kt.wrapper,"aside","controls",'<div class="navigate-left"></div><div class="navigate-right"></div><div class="navigate-up"></div><div class="navigate-down"></div>'),i(Kt.wrapper,"div","state-background",null),i(Kt.wrapper,"div","pause-overlay",null),Ut.controls&&(Kt.controls=document.querySelector(".reveal .controls"),Kt.controlsLeft=f(document.querySelectorAll(".navigate-left")),Kt.controlsRight=f(document.querySelectorAll(".navigate-right")),Kt.controlsUp=f(document.querySelectorAll(".navigate-up")),Kt.controlsDown=f(document.querySelectorAll(".navigate-down")),Kt.controlsPrev=f(document.querySelectorAll(".navigate-prev")),Kt.controlsNext=f(document.querySelectorAll(".navigate-next")))}function i(e,t,n,r){var o=e.querySelector("."+n);return o||(o=document.createElement(t),o.classList.add(n),null!==r&&(o.innerHTML=r),e.appendChild(o)),o}function s(){function e(e,t){var n={background:e.getAttribute("data-background"),backgroundSize:e.getAttribute("data-background-size"),backgroundImage:e.getAttribute("data-background-image"),backgroundColor:e.getAttribute("data-background-color"),backgroundRepeat:e.getAttribute("data-background-repeat"),backgroundPosition:e.getAttribute("data-background-position"),backgroundTransition:e.getAttribute("data-background-transition")},r=document.createElement("div");return r.className="slide-background",n.background&&(/^(http|file|\/\/)/gi.test(n.background)||/\.(png|jpg|jpeg|gif|bmp)$/gi.test(n.background)?r.style.backgroundImage="url("+n.background+")":r.style.background=n.background),n.backgroundSize&&(r.style.backgroundSize=n.backgroundSize),n.backgroundImage&&(r.style.backgroundImage='url("'+n.backgroundImage+'")'),n.backgroundColor&&(r.style.backgroundColor=n.backgroundColor),n.backgroundRepeat&&(r.style.backgroundRepeat=n.backgroundRepeat),n.backgroundPosition&&(r.style.backgroundPosition=n.backgroundPosition),n.backgroundTransition&&r.setAttribute("data-background-transition",n.backgroundTransition),t.appendChild(r),r}h()&&document.body.classList.add("print-pdf"),Kt.background.innerHTML="",Kt.background.classList.add("no-transition"),f(document.querySelectorAll(Xt)).forEach(function(t){var n;n=h()?e(t,t):e(t,Kt.background),f(t.querySelectorAll("section")).forEach(function(t){h()?e(t,t):e(t,n)})})}function c(e){if(Kt.wrapper.classList.remove(Ut.transition),"object"==typeof e&&d(Ut,e),It===!1&&(Ut.transition="linear"),Kt.wra