diff options
author | Wu Cheng-Han | 2015-12-18 09:40:52 -0600 |
---|---|---|
committer | Wu Cheng-Han | 2015-12-18 09:40:52 -0600 |
commit | 031c96c72d168a23cca0c609f46e019eced8bc64 (patch) | |
tree | 6e10c7dd5c10294aa7230d11626f4f0004b78f91 /public/views/slide | |
parent | 54b33f181f70786a2df624061e7a2ffb93a3eb73 (diff) |
Updated slide mode
Diffstat (limited to 'public/views/slide')
-rw-r--r-- | public/views/slide/listing.hbs | 22 | ||||
-rw-r--r-- | public/views/slide/reveal.hbs | 78 |
2 files changed, 100 insertions, 0 deletions
diff --git a/public/views/slide/listing.hbs b/public/views/slide/listing.hbs new file mode 100644 index 00000000..371f4ac3 --- /dev/null +++ b/public/views/slide/listing.hbs @@ -0,0 +1,22 @@ +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <title>Directory Listing</title> + <link rel="stylesheet" href="/vendor/reveal.js/{{{theme}}}" id="theme"> + <style type="text/css"> + body { + margin: 1em; + } + a { + color: white; + display: block; + } + </style> + <link rel="icon" href="http://i.imgur.com/IVlU2PU.png" sizes="512x512" /> + </head> + + <body> + {{{listing}}} + </body> +</html> diff --git a/public/views/slide/reveal.hbs b/public/views/slide/reveal.hbs new file mode 100644 index 00000000..876a7ba3 --- /dev/null +++ b/public/views/slide/reveal.hbs @@ -0,0 +1,78 @@ +<!doctype html> +<html lang="en"> + <head> + <meta charset="utf-8"> + <meta name="apple-mobile-web-app-capable" content="yes"> + <meta name="apple-mobile-web-app-status-bar-style" content="black"> + <meta name="mobile-web-app-capable" content="yes"> + <title>{{title}}</title> + <link rel="icon" type="image/png" href="https://hackmd.io/favicon.png"> + <link rel="apple-touch-icon" href="https://hackmd.io/apple-touch-icon.png"> + + <link rel="stylesheet" href="/vendor/reveal.js/css/reveal.css"> + <link rel="stylesheet" href="/vendor/reveal.js/{{{theme}}}" id="theme"> + <!-- For syntax highlighting --> + <link rel="stylesheet" href="/vendor/reveal.js/lib/css/{{{highlightTheme}}}.css"> + + <!-- If the query includes 'print-pdf', use the PDF print sheet --> + <script> + document.write( '<link rel="stylesheet" href="/vendor/reveal.js/css/print/' + ( window.location.search.match( /print-pdf/gi ) ? 'pdf' : 'paper' ) + '.css" type="text/css" media="print">' ); + </script> + <script src="https://code.jquery.com/jquery-1.11.3.min.js"></script> + </head> + <body> + + <div class="reveal"> + <div class="slides">{{{slides}}}</div> + </div> + + <script src="/vendor/reveal.js/lib/js/head.min.js"></script> + <script src="/vendor/reveal.js/js/reveal.js"></script> + <script src="/vendor/string.min.js"></script> + + <script> + var body = $(".slides").html(); + $(".slides").html(S(body).unescapeHTML().s); + + function extend() { + var target = {}; + for (var i = 0; i < arguments.length; i++) { + var source = arguments[i]; + for (var key in source) { + if (source.hasOwnProperty(key)) { + target[key] = source[key]; + } + } + } + return target; + } + + // Optional libraries used to extend on reveal.js + var deps = [ + { src: '/vendor/reveal.js/lib/js/classList.js', condition: function() { return !document.body.classList; } }, + { src: '/vendor/reveal.js/plugin/markdown/marked.js', condition: function() { return !!document.querySelector('[data-markdown]'); } }, + { src: '/vendor/reveal.js/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector('[data-markdown]'); } }, + { src: '/vendor/reveal.js/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }, + { src: '/vendor/reveal.js/plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }, + { src: '/vendor/reveal.js/plugin/math/math.js', async: true } + ]; + + // default options to init reveal.js + var defaultOptions = { + controls: true, + progress: true, + history: true, + center: true, + transition: 'slide', + dependencies: deps + }; + + // options from URL query string + var queryOptions = Reveal.getQueryHash() || {}; + + var options = {{{options}}}; + options = extend(defaultOptions, options, queryOptions); + Reveal.initialize(options); + </script> + </body> +</html> |