diff options
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | css/main.css | 35 | ||||
-rw-r--r-- | index.html | 69 | ||||
-rw-r--r-- | js/reveal.js | 32 | ||||
-rwxr-xr-x | lib/font/league_gothic-webfont.eot | bin | 0 -> 18485 bytes | |||
-rw-r--r-- | lib/js/data-markdown.js | 34 | ||||
-rw-r--r-- | lib/js/html5shiv.js | 7 |
7 files changed, 107 insertions, 74 deletions
@@ -201,6 +201,10 @@ You can change the appearance of the speaker notes by editing the file at `plugi - Fixed bug where the ```.present``` class was sometimes left on the previous slide - Added support for slides written using markdown - Added helped method ```Reveal.getQueryHash()``` +- Added EOT font for IE support +- IE8 support +- Fixed bug where hovering 3D links in Chrome caused them to disappear +- Disable 3D links in IE and more accurate CSS feature detection #### 1.4 - Main ```#reveal container``` is now selected via a class instead of ID diff --git a/css/main.css b/css/main.css index f288869..444a659 100644 --- a/css/main.css +++ b/css/main.css @@ -12,9 +12,11 @@ @font-face { font-family: 'League Gothic'; - src: url('../lib/font/league_gothic-webfont.ttf') format('truetype'); - font-weight: normal; - font-style: normal; + src: url('../lib/font/league_gothic-webfont.eot'); + src: url('../lib/font/league_gothic-webfont.eot?#iefix') format('embedded-opentype'), + url('../lib/font/league_gothic-webfont.ttf') format('truetype'); + font-weight: normal; + font-style: normal; } @@ -42,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%); @@ -416,6 +418,10 @@ body { -moz-transform-style: preserve-3d; -ms-transform-style: preserve-3d; transform-style: preserve-3d; + + -webkit-backface-visibility: hidden; + -moz-backface-visibility: hidden; + backface-visibility: hidden; } .reveal .roll:hover span { background: rgba(0,0,0,0.5); @@ -442,10 +448,10 @@ body { -ms-transform-origin: 50% 0%; transform-origin: 50% 0%; - -webkit-transform: translate3d( 0px, 105%, 0px ) rotateX( -90deg ); - -moz-transform: translate3d( 0px, 105%, 0px ) rotateX( -90deg ); - -ms-transform: translate3d( 0px, 105%, 0px ) rotateX( -90deg ); - transform: translate3d( 0px, 105%, 0px ) rotateX( -90deg ); + -webkit-transform: translate3d( 0px, 110%, 0px ) rotateX( -90deg ); + -moz-transform: translate3d( 0px, 110%, 0px ) rotateX( -90deg ); + -ms-transform: translate3d( 0px, 110%, 0px ) rotateX( -90deg ); + transform: translate3d( 0px, 110%, 0px ) rotateX( -90deg ); } @@ -905,14 +911,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; } @@ -19,6 +19,10 @@ <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> @@ -274,31 +278,7 @@ function linkify( selector ) { <script src="lib/js/head.min.js"></script> <script> - // Scripts that should be loaded before initializing - var scripts = []; - - // If the browser doesn't support classList, load a polyfill - if( !document.body.classList ) { - scripts.push( 'lib/js/classList.js' ); - } - - // Load markdown parser if there are slides defined using markdown - if( document.querySelector( '[data-markdown]' ) ) { - scripts.push( 'lib/js/showdown.js' ); - scripts.push( 'lib/js/data-markdown.js' ); - } - - // If we're runnning the notes server we need to include some additional JS - // TODO Is there a better way to determine if we're running the notes server? - if( window.location.host === 'localhost:1947' ) { - scripts.push( 'socket.io/socket.io.js' ); - scripts.push( 'plugin/speakernotes/client.js' ); - } - - scripts.push( 'js/reveal.js' ); - - // Load the scripts and, when completed, initialize reveal.js - head.js.apply( null, scripts.concat([function() { + head.ready( function() { // Fires when a slide with data-state=customevent is activated Reveal.addEventListener( 'customevent', function() { @@ -321,13 +301,40 @@ function linkify( selector ) { transition: Reveal.getQueryHash().transition || 'default' // default/cube/page/concave/linear(2d) }); - }])); - - // Load highlight.js for syntax highlighting of code samples - head.js( 'lib/js/highlight.js', function() { - hljs.initHighlightingOnLoad(); + // Load highlight.js for syntax highlighting of code samples + head.js( 'lib/js/highlight.js', function() { + hljs.initHighlightingOnLoad(); + } ); + } ); + + // Scripts that should be loaded before initializing + var scripts = []; + + // If the browser doesn't support classList, load a polyfill + if( !document.body.classList ) { + head.js( 'lib/js/classList.js' ); + } + + // Load markdown parser if there are slides defined using markdown + if( document.querySelector( '[data-markdown]' ) ) { + scripts.push( 'lib/js/showdown.js' ); + scripts.push( 'lib/js/data-markdown.js' ); + } + + scripts.push( 'js/reveal.js' ); + + // If we're runnning the notes server we need to include some additional JS + // TODO Is there a better way to determine if we're running the notes server? + if( window.location.host === 'localhost:1947' ) { + scripts.push( 'socket.io/socket.io.js' ); + scripts.push( 'plugin/speakernotes/client.js' ); + } + + // Load the scripts and, when completed, initialize reveal.js + head.js.apply( null, scripts ); + </script> </body> -</html>
\ No newline at end of file +</html> diff --git a/js/reveal.js b/js/reveal.js index 541ea0d..23629c3 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1,5 +1,5 @@ /*! - * reveal.js 1.5 r7 + * reveal.js 1.5 r11 * http://lab.hakim.se/reveal-js * MIT licensed * @@ -63,17 +63,17 @@ var Reveal = (function(){ dom = {}, // Detect support for CSS 3D transforms - supports3DTransforms = document.body.style['WebkitPerspective'] !== undefined || - document.body.style['MozPerspective'] !== undefined || - document.body.style['msPerspective'] !== undefined || - document.body.style['OPerspective'] !== undefined || - document.body.style['perspective'] !== undefined, + supports3DTransforms = '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, - supports2DTransforms = document.body.style['WebkitTransform'] !== undefined || - document.body.style['MozTransform'] !== undefined || - document.body.style['msTransform'] !== undefined || - document.body.style['OTransform'] !== undefined || - document.body.style['transform'] !== undefined, + supports2DTransforms = '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, // Detect support for elem.classList supportsClassList = !!document.body.classList; @@ -444,7 +444,7 @@ var Reveal = (function(){ * Wrap all links in 3D goodness. */ function linkify() { - if( supports3DTransforms ) { + if( supports3DTransforms && !( 'msPerspective' in document.body.style ) ) { var nodes = document.querySelectorAll( '.reveal .slides section a:not(.image)' ); for( var i = 0, len = nodes.length; i < len; i++ ) { @@ -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 ); + } } }; diff --git a/lib/font/league_gothic-webfont.eot b/lib/font/league_gothic-webfont.eot Binary files differnew file mode 100755 index 0000000..598dcbc --- /dev/null +++ b/lib/font/league_gothic-webfont.eot diff --git a/lib/js/data-markdown.js b/lib/js/data-markdown.js index 8972475..b10592a 100644 --- a/lib/js/data-markdown.js +++ b/lib/js/data-markdown.js @@ -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 index 0000000..50649b9 --- /dev/null +++ b/lib/js/html5shiv.js @@ -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 |