From 696346dccbde093af58cf6994fc89f19ab78e8f1 Mon Sep 17 00:00:00 2001 From: Hakim El Hattab Date: Tue, 31 Jul 2012 01:35:16 -0400 Subject: [PATCH] added slide announcing markdown support (#15) --- README.md | 4 +++- index.html | 67 +++++++++++++++++++++++++++++----------------------- js/reveal.js | 13 +++++++++- 3 files changed, 53 insertions(+), 31 deletions(-) diff --git a/README.md b/README.md index c55a30cc..be330433 100644 --- a/README.md +++ b/README.md @@ -182,7 +182,9 @@ You can change the appearance of the speaker notes by editing the file at `plugi - New API method ```Reveal.getPreviousSlide()``` - New API method ```Reveal.getCurrentSlide()``` - New API method ```Reveal.getIndices()``` -- Fixes bug where the ```.present``` class was sometimes left on the previous slide +- 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()``` #### 1.4 - Main ```#reveal container``` is now selected via a class instead of ID diff --git a/index.html b/index.html index b66f4f19..420ef4d1 100644 --- a/index.html +++ b/index.html @@ -100,19 +100,6 @@

-
-

Transition Styles

-

- You can select from different transitions, like: -

- -
-

Marvelous Unordered List

+
+ ## Markdown support + + For those of you who like that sort of thing. Instructions and a bit more info + available [here](https://github.com/hakimel/reveal.js#markdown). + +
<section data-markdown>
+  ## Markdown support
+  For those of you who like that sort of thing. Instructions and a bit more info available [here](https://github.com/hakimel/reveal.js#markdown).
+</section>
+					
+
+ +
+

Transition Styles

+

+ You can select from different transitions, like: +

+ +
+

Global State

@@ -259,7 +272,7 @@ function linkify( selector ) { diff --git a/js/reveal.js b/js/reveal.js index cbb859ab..86af9c07 100644 --- a/js/reveal.js +++ b/js/reveal.js @@ -1,5 +1,5 @@ /*! - * reveal.js 1.5 r4 + * reveal.js 1.5 r6 * http://lab.hakim.se/reveal-js * MIT licensed * @@ -1015,6 +1015,17 @@ var Reveal = (function(){ return currentSlide }, + // Helper method, retrieves query string as a key/value hash + getQueryHash: function() { + var query = {}; + + location.search.replace( /[A-Z0-9]+?=(\w*)/gi, function(a) { + query[ a.split( '=' ).shift() ] = a.split( '=' ).pop(); + } ); + + return query; + }, + // Forward event binding to the reveal DOM element addEventListener: function( type, listener, useCapture ) { ( dom.wrapper || document.querySelector( '.reveal' ) ).addEventListener( type, listener, useCapture );