From ebb834f4b0b42363e3a59836fc1f2aa15a691c77 Mon Sep 17 00:00:00 2001 From: hakimel Date: Thu, 3 May 2012 12:42:53 -0400 Subject: [PATCH] ie9 fixes, including new classList polyfill --- README.md | 2 +- css/main.css | 13 +++++++------ js/reveal.js | 2 +- js/reveal.min.js | 4 ++-- lib/classList.js | 5 ++--- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 8d09668..20965a9 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ A CSS 3D slideshow tool for quickly creating good looking HTML presentations. Doesn't _rely_ on any external libraries but [highlight.js](http://softwaremaniacs.org/soft/highlight/en/description/) is included by default for code highlighting. -Note that this requires a browser with support for CSS 3D transforms and ``classList``. If CSS 3D support is not detected, the presentation will degrade to less exciting 2D transitions. A [classList polyfill](https://github.com/remy/polyfills/blob/master/classList.js) from [@remy](https://github.com/remy) is also incuded to make this work in < iOS 5, < Safari 5.1 and IE. +Note that this requires a browser with support for CSS 3D transforms and ``classList``. If CSS 3D support is not detected, the presentation will degrade to less exciting 2D transitions. A [classList polyfill](http://purl.eligrey.com/github/classList.js/blob/master/classList.js) is incuded to make this work in < iOS 5, < Safari 5.1 and IE. Curious about how it looks in action? [Check out the demo page](http://lab.hakim.se/reveal-js/). diff --git a/css/main.css b/css/main.css index a9508ca..5706a35 100644 --- a/css/main.css +++ b/css/main.css @@ -42,12 +42,13 @@ html, body { html { background: #1c1e20; - background: -moz-radial-gradient(center, ellipse cover, #555a5f 0%, #1c1e20 100%); - background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,#555a5f), color-stop(100%,#1c1e20)); - background: -webkit-radial-gradient(center, ellipse cover, #555a5f 0%,#1c1e20 100%); - background: -o-radial-gradient(center, ellipse cover, #555a5f 0%,#1c1e20 100%); - background: -ms-radial-gradient(center, ellipse cover, #555a5f 0%,#1c1e20 100%); - background: radial-gradient(center, ellipse cover, #555a5f 0%,#1c1e20 100%); + background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPHJhZGlhbEdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY3g9IjUwJSIgY3k9IjUwJSIgcj0iNzUlIj4KICAgIDxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiM1NTVhNWYiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjMWMxZTIwIiBzdG9wLW9wYWNpdHk9IjEiLz4KICA8L3JhZGlhbEdyYWRpZW50PgogIDxyZWN0IHg9Ii01MCIgeT0iLTUwIiB3aWR0aD0iMTAxIiBoZWlnaHQ9IjEwMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+); + background: -moz-radial-gradient(center, ellipse cover, rgba(85,90,95,1) 0%, rgba(28,30,32,1) 100%); + background: -webkit-gradient(radial, center center, 0px, center center, 100%, color-stop(0%,rgba(85,90,95,1)), color-stop(100%,rgba(28,30,32,1))); + background: -webkit-radial-gradient(center, ellipse cover, rgba(85,90,95,1) 0%,rgba(28,30,32,1) 100%); + background: -o-radial-gradient(center, ellipse cover, rgba(85,90,95,1) 0%,rgba(28,30,32,1) 100%); + background: -ms-radial-gradient(center, ellipse cover, rgba(85,90,95,1) 0%,rgba(28,30,32,1) 100%); + background: radial-gradient(center, ellipse cover, rgba(85,90,95,1) 0%,rgba(28,30,32,1) 100%); } /********************************************* diff --git a/js/reveal.js b/js/reveal.js index 3360255..4761595 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -461,7 +461,7 @@ var Reveal = (function(){ // If this slide has a state associated with it, add it // onto the current state of the deck - var slideState = slides[index].dataset.state; + var slideState = slides[index].getAttribute( 'data-state' ); if( slideState ) { state = state.concat( slideState.split( ' ' ) ); } diff --git a/js/reveal.min.js b/js/reveal.min.js index 2bbb956..b055124 100644 --- a/js/reveal.min.js +++ b/js/reveal.min.js @@ -31,8 +31,8 @@ N.style.MozTransform="";N.style.msTransform="";N.style.OTransform="";N.style.tra }function x(M){if(H()){M.preventDefault();I();j=this.getAttribute("data-index-h");c=this.getAttribute("data-index-v");b();}}function L(N,P){var R=Array.prototype.slice.call(document.querySelectorAll(N)),S=R.length; if(S){if(E.loop){P%=S;if(P<0){P=S+P;}}P=Math.max(Math.min(P,S-1),0);for(var Q=0;Q3?"none":"block"; }R[Q].classList.remove("past");R[Q].classList.remove("present");R[Q].classList.remove("future");if(QP){R[Q].classList.add("future"); -}}if(M.querySelector("section")){R[Q].classList.add("stack");}}R[P].classList.add("present");var O=R[P].dataset.state;if(O){K=K.concat(O.split(" "));}}else{P=0; -}return P;}function b(){var Q=K.concat();K.length=0;j=L(i,j);c=L(a,c);stateLoop:for(var O=0,M=K.length;O