ie8 support (closes #96)
authorhakimel <hakim.elhattab@gmail.com>
Sat, 4 Aug 2012 01:49:29 +0000 (21:49 -0400)
committerhakimel <hakim.elhattab@gmail.com>
Sat, 4 Aug 2012 01:50:06 +0000 (21:50 -0400)
README.md
css/main.css
index.html
js/reveal.js
lib/js/data-markdown.js
lib/js/html5shiv.js [new file with mode: 0644]

index 5544a1a68946f883406ae71dfea616503c6f307a..47bfa2f52cf8f8c6906c858366dbd14904417dce 100644 (file)
--- a/README.md
+++ b/README.md
@@ -202,6 +202,7 @@ You can change the appearance of the speaker notes by editing the file at `plugi
 - Added support for slides written using markdown
 - Added helped method ```Reveal.getQueryHash()```
 - Added EOT font for IE support
+- IE8 support
 
 #### 1.4
 - Main ```#reveal container``` is now selected via a class instead of ID
index f2544fa27e1faf90b11c02bd715e7930b9b023a8..9239b69f191dbb85c2bfc43dc204e97a76004301 100644 (file)
@@ -44,8 +44,8 @@ body {
        letter-spacing: -0.02em;
        color: #eee;
 
-       background: #1c1e20;
-       background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPHJhZGlhbEdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY3g9IjUwJSIgY3k9IjUwJSIgcj0iNzUlIj4KICAgIDxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiM1NTVhNWYiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjMWMxZTIwIiBzdG9wLW9wYWNpdHk9IjEiLz4KICA8L3JhZGlhbEdyYWRpZW50PgogIDxyZWN0IHg9Ii01MCIgeT0iLTUwIiB3aWR0aD0iMTAxIiBoZWlnaHQ9IjEwMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
+       background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPHJhZGlhbEdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY3g9IjUwJSIgY3k9IjUwJSIgcj0iNzUlIj4KICAgIDxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiM1NTVhNWYiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjMWMxZTIwIiBzdG9wLW9wYWNpdHk9IjEiLz4KICA8L3JhZGlhbEdyYWRpZW50PgogIDxyZWN0IHg9Ii01MCIgeT0iLTUwIiB3aWR0aD0iMTAxIiBoZWlnaHQ9IjEwMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
+       background-color: #2b2b2b;
        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%);
@@ -908,14 +908,17 @@ body {
 }
 
 .no-transforms .slides section {
+       display: block!important;
+       opacity: 1!important;
+       position: relative!important;
+       height: auto;
+       min-height: auto;
+       margin-bottom: 100px;
+
        -webkit-transform: none;
           -moz-transform: none;
            -ms-transform: none;
                transform: none;
-       
-       display: block!important;
-       opacity: 1!important;
-       position: relative!important;
 }
 
 
index 8d9c8444e2d537665f110ca572b3a53f87398540..3b90c9d764b8b8e3eb5f2c14f64f642ddd931be6 100644 (file)
                <link rel="stylesheet" href="css/print.css" type="text/css" media="print">
 
                <link rel="stylesheet" href="lib/css/zenburn.css">
+
+               <!--[if lt IE 9]>
+               <script src="lib/js/html5shiv.js"></script>
+               <![endif]-->
        </head>
        
        <body>
index 6da654dd1ba9bcb5abdc86aefb55b33c3ce78e3b..c2f1a57c4ec34820d1eaa763562a5403c6546314 100644 (file)
@@ -1,5 +1,5 @@
 /*!
- * reveal.js 1.5 r8
+ * reveal.js 1.5 r9
  * http://lab.hakim.se/reveal-js
  * MIT licensed
  * 
@@ -1028,10 +1028,14 @@ var Reveal = (function(){
 
                // Forward event binding to the reveal DOM element
                addEventListener: function( type, listener, useCapture ) {
-                       ( dom.wrapper || document.querySelector( '.reveal' ) ).addEventListener( type, listener, useCapture );
+                       if( 'addEventListener' in window ) {
+                               ( dom.wrapper || document.querySelector( '.reveal' ) ).addEventListener( type, listener, useCapture );
+                       }
                },
                removeEventListener: function( type, listener, useCapture ) {
-                       ( dom.wrapper || document.querySelector( '.reveal' ) ).removeEventListener( type, listener, useCapture );
+                       if( 'addEventListener' in window ) {
+                               ( dom.wrapper || document.querySelector( '.reveal' ) ).removeEventListener( type, listener, useCapture );
+                       }
                }
        };
        
index 897247533ded7cae536abca9c81486a3e1853725..b10592ae69e171dcc7a5cae24a6c6234ae10532b 100644 (file)
@@ -2,24 +2,26 @@
 // Modified by Hakim to handle markdown indented with tabs
 (function(){
 
-  [].forEach.call( document.querySelectorAll('[data-markdown]'), function  fn(elem){
-    
-    // strip leading whitespace so it isn't evaluated as code
-    var text = elem.innerHTML;
-    
-    var leadingWs = text.match(/^\n?(\s*)/)[1].length,
-        leadingTabs = text.match(/^\n?(\t*)/)[1].length;
+    var slides = document.querySelectorAll('[data-markdown]');
 
-    if( leadingTabs > 0 ) {
-        text = text.replace( new RegExp('\\n?\\t{' + leadingTabs + '}','g'), '\n' );
-    }
-    else if( leadingWs > 1 ) {
-        text = text.replace( new RegExp('\\n? {' + leadingWs + '}','g'), '\n' );
-    }
+    for( var i = 0, len = slides.length; i < len; i++ ) {
+        var elem = slides[i];
+
+        // strip leading whitespace so it isn't evaluated as code
+        var text = elem.innerHTML;
 
-    // here, have sum HTML
-    elem.innerHTML = (new Showdown.converter()).makeHtml(text);
+        var leadingWs = text.match(/^\n?(\s*)/)[1].length,
+            leadingTabs = text.match(/^\n?(\t*)/)[1].length;
 
-  });
+        if( leadingTabs > 0 ) {
+            text = text.replace( new RegExp('\\n?\\t{' + leadingTabs + '}','g'), '\n' );
+        }
+        else if( leadingWs > 1 ) {
+            text = text.replace( new RegExp('\\n? {' + leadingWs + '}','g'), '\n' );
+        }
+
+        // here, have sum HTML
+        elem.innerHTML = (new Showdown.converter()).makeHtml(text);
+    }
 
 })();
\ No newline at end of file
diff --git a/lib/js/html5shiv.js b/lib/js/html5shiv.js
new file mode 100644 (file)
index 0000000..50649b9
--- /dev/null
@@ -0,0 +1,7 @@
+document.createElement('header');
+document.createElement('nav');
+document.createElement('section');
+document.createElement('article');
+document.createElement('aside');
+document.createElement('footer');
+document.createElement('hgroup');
\ No newline at end of file