aboutsummaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authorHakim El Hattab <hakim.elhattab@gmail.com>2012-07-31 01:13:33 -0400
committerHakim El Hattab <hakim.elhattab@gmail.com>2012-07-31 01:13:33 -0400
commit19852772fe3aaa22d3447cb57b5e1b84d69814ba (patch)
tree6c74d353559a7bacb07a7bc57dab317cb95c81bd /index.html
parentdc05ce1575ccf5026e553488133807b36acf50c8 (diff)
downloadfosdem-2018-presentation-19852772fe3aaa22d3447cb57b5e1b84d69814ba.tar
fosdem-2018-presentation-19852772fe3aaa22d3447cb57b5e1b84d69814ba.tar.gz
support for data-markdown (#15)
Diffstat (limited to 'index.html')
-rw-r--r--index.html22
1 files changed, 18 insertions, 4 deletions
diff --git a/index.html b/index.html
index 76631e9..b66f4f1 100644
--- a/index.html
+++ b/index.html
@@ -259,9 +259,23 @@ function linkify( selector ) {
<script src="lib/js/head.min.js"></script>
<script>
- // Load reveal.js as well as a classList polyfill if needed
- head.js( !document.body.classList ? 'lib/js/classList.js' : null )
- .js( 'js/reveal.js', function() {
+ // All 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' );
+ }
+
+ scripts.push( 'js/reveal.js' );
+
+ head.js.apply( null, scripts.concat([ function() {
// Parse the query string into a key/value object
var query = {};
@@ -290,7 +304,7 @@ function linkify( selector ) {
transition: query.transition || 'default' // default/cube/page/concave/linear(2d)
});
- } );
+ }]));
// Load highlight.js for syntax highlighting of code samples
head.js( 'lib/js/highlight.js', function() {