ie8 support (closes #96)

edit
hakimel 2012-08-03 21:49:29 -04:00
parent 6bc92af17c
commit 9a657e2676
6 changed files with 47 additions and 26 deletions

View File

@ -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 support for slides written using markdown
- Added helped method ```Reveal.getQueryHash()``` - Added helped method ```Reveal.getQueryHash()```
- Added EOT font for IE support - Added EOT font for IE support
- IE8 support
#### 1.4 #### 1.4
- Main ```#reveal container``` is now selected via a class instead of ID - Main ```#reveal container``` is now selected via a class instead of ID

View File

@ -44,8 +44,8 @@ body {
letter-spacing: -0.02em; letter-spacing: -0.02em;
color: #eee; color: #eee;
background: #1c1e20; background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPHJhZGlhbEdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgY3g9IjUwJSIgY3k9IjUwJSIgcj0iNzUlIj4KICAgIDxzdG9wIG9mZnNldD0iMCUiIHN0b3AtY29sb3I9IiM1NTVhNWYiIHN0b3Atb3BhY2l0eT0iMSIvPgogICAgPHN0b3Agb2Zmc2V0PSIxMDAlIiBzdG9wLWNvbG9yPSIjMWMxZTIwIiBzdG9wLW9wYWNpdHk9IjEiLz4KICA8L3JhZGlhbEdyYWRpZW50PgogIDxyZWN0IHg9Ii01MCIgeT0iLTUwIiB3aWR0aD0iMTAxIiBoZWlnaHQ9IjEwMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
background: 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: -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-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: -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 { .no-transforms .slides section {
display: block!important;
opacity: 1!important;
position: relative!important;
height: auto;
min-height: auto;
margin-bottom: 100px;
-webkit-transform: none; -webkit-transform: none;
-moz-transform: none; -moz-transform: none;
-ms-transform: none; -ms-transform: none;
transform: none; transform: none;
display: block!important;
opacity: 1!important;
position: relative!important;
} }

View File

@ -19,6 +19,10 @@
<link rel="stylesheet" href="css/print.css" type="text/css" media="print"> <link rel="stylesheet" href="css/print.css" type="text/css" media="print">
<link rel="stylesheet" href="lib/css/zenburn.css"> <link rel="stylesheet" href="lib/css/zenburn.css">
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head> </head>
<body> <body>

View File

@ -1,5 +1,5 @@
/*! /*!
* reveal.js 1.5 r8 * reveal.js 1.5 r9
* http://lab.hakim.se/reveal-js * http://lab.hakim.se/reveal-js
* MIT licensed * MIT licensed
* *
@ -1028,10 +1028,14 @@ var Reveal = (function(){
// Forward event binding to the reveal DOM element // Forward event binding to the reveal DOM element
addEventListener: function( type, listener, useCapture ) { 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 ) { 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 );
}
} }
}; };

View File

@ -2,24 +2,26 @@
// Modified by Hakim to handle markdown indented with tabs // Modified by Hakim to handle markdown indented with tabs
(function(){ (function(){
[].forEach.call( document.querySelectorAll('[data-markdown]'), function fn(elem){ var slides = document.querySelectorAll('[data-markdown]');
// 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;
if( leadingTabs > 0 ) { for( var i = 0, len = slides.length; i < len; i++ ) {
text = text.replace( new RegExp('\\n?\\t{' + leadingTabs + '}','g'), '\n' ); var elem = slides[i];
// 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;
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);
} }
else if( leadingWs > 1 ) {
text = text.replace( new RegExp('\\n? {' + leadingWs + '}','g'), '\n' );
}
// here, have sum HTML
elem.innerHTML = (new Showdown.converter()).makeHtml(text);
});
})(); })();

7
lib/js/html5shiv.js vendored 100644
View File

@ -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');