dyndoc-ruby 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/dyn-init.rb +9 -0
- data/share/demo/first.dyn +38 -0
- data/share/demo/second.dyn +87 -0
- data/share/demo/simple.dyn +10 -0
- data/share/demo/simple_lib.dyn +2 -0
- data/share/demo/simple_lib2.dyn +2 -0
- data/share/demo/testBeamer.dyn +77 -0
- data/share/demo/testBeamer_lib.dyn +7 -0
- data/share/demo/test_atom.dyn +79 -0
- data/share/etc/alias +3 -0
- data/share/etc/dyndoc_library_path +1 -0
- data/share/etc/helpers +1 -0
- data/share/etc/pandoc/README.INSTALL +1 -0
- data/share/etc/pandoc/config.rb +4 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/CONTRIBUTING.md +19 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/Gruntfile.js +174 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/LICENSE +19 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/README.md +950 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/print/paper.css +202 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/print/pdf.css +157 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/reveal.css +1141 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/reveal.min.css +1141 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/reveal.scss +1316 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/README.md +25 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/beige.css +265 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/black.css +261 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/blood.css +291 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/default.css +268 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/league.css +267 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/moon.css +265 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/night.css +259 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/serif.css +261 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/simple.css +261 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/sky.css +268 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/solarized.css +265 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/source/beige.scss +39 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/source/black.scss +49 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/source/blood.scss +91 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/source/league.scss +34 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/source/moon.scss +57 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/source/night.scss +35 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/source/serif.scss +35 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/source/simple.scss +38 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/source/sky.scss +46 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/source/solarized.scss +63 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/source/white.scss +49 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/template/mixins.scss +29 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/template/settings.scss +43 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/template/theme.scss +339 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/css/theme/white.css +261 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/index.html +408 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/js/reveal.js +4276 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/js/reveal.min.js +4276 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/css/zenburn.css +117 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/league-gothic/LICENSE +2 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/league-gothic/league-gothic.css +10 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/league-gothic/league-gothic.eot +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/league-gothic/league-gothic.ttf +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/league-gothic/league-gothic.woff +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/LICENSE +45 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/source-sans-pro-italic.eot +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/source-sans-pro-italic.ttf +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/source-sans-pro-italic.woff +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/source-sans-pro-regular.eot +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/source-sans-pro-regular.ttf +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/source-sans-pro-regular.woff +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/source-sans-pro-semibold.eot +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/source-sans-pro-semibold.ttf +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/source-sans-pro-semibold.woff +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/font/source-sans-pro/source-sans-pro.css +39 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/js/classList.js +2 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/js/head.min.js +8 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/lib/js/html5shiv.js +7 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/package.json +48 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/highlight/highlight.js +30 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/leap/leap.js +159 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/markdown/example.html +129 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/markdown/example.md +31 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/markdown/markdown.js +393 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/markdown/marked.js +37 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/math/math.js +64 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/multiplex/client.js +13 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/multiplex/index.js +56 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/multiplex/master.js +51 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/notes-server/client.js +60 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/notes-server/index.js +66 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/notes-server/notes.html +396 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/notes/notes.html +406 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/notes/notes.js +122 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/print-pdf/print-pdf.js +48 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/remotes/remotes.js +39 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/search/search.js +196 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/plugin/zoom-js/zoom.js +278 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/examples/assets/image1.png +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/examples/assets/image2.png +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/examples/barebones.html +41 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/examples/embedded-media.html +49 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/examples/math.html +185 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/examples/slide-backgrounds.html +144 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/qunit-1.12.0.css +244 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/qunit-1.12.0.js +2212 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/test-markdown-element-attributes.html +134 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/test-markdown-element-attributes.js +46 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/test-markdown-slide-attributes.html +128 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/test-markdown-slide-attributes.js +47 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/test-markdown.html +52 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/test-markdown.js +15 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/test-pdf.html +83 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/test-pdf.js +15 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/test.html +82 -0
- data/share/etc/pandoc/extra/reveal.js-3.0.0/test/test.js +572 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/CONTRIBUTING.md +23 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/Gruntfile.js +170 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/LICENSE +19 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/README.md +1050 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/print/paper.css +202 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/print/pdf.css +157 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/reveal.css +1175 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/reveal.scss +1319 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/README.md +23 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/beige.css +271 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/black.css +267 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/blood.css +285 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/league.css +273 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/moon.css +271 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/night.css +265 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/serif.css +267 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/simple.css +267 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/sky.css +274 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/solarized.css +271 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/source/beige.scss +39 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/source/black.scss +49 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/source/blood.scss +79 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/source/league.scss +34 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/source/moon.scss +57 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/source/night.scss +35 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/source/serif.scss +35 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/source/simple.scss +38 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/source/sky.scss +46 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/source/solarized.scss +63 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/source/white.scss +49 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/template/mixins.scss +29 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/template/settings.scss +43 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/template/theme.scss +349 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/css/theme/white.css +267 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/index.html +411 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/js/reveal.js +4508 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/css/zenburn.css +117 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/league-gothic/LICENSE +2 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/league-gothic/league-gothic.css +10 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/league-gothic/league-gothic.eot +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/league-gothic/league-gothic.ttf +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/league-gothic/league-gothic.woff +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/LICENSE +45 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/source-sans-pro-italic.eot +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/source-sans-pro-italic.ttf +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/source-sans-pro-italic.woff +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/source-sans-pro-regular.eot +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/source-sans-pro-regular.ttf +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/source-sans-pro-regular.woff +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/source-sans-pro-semibold.eot +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/source-sans-pro-semibold.ttf +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/source-sans-pro-semibold.woff +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/font/source-sans-pro/source-sans-pro.css +39 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/js/classList.js +2 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/js/head.min.js +8 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/lib/js/html5shiv.js +7 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/package.json +49 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/highlight/highlight.js +30 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/leap/leap.js +159 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/markdown/example.html +129 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/markdown/example.md +31 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/markdown/markdown.js +393 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/markdown/marked.js +6 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/math/math.js +64 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/multiplex/client.js +13 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/multiplex/index.js +56 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/multiplex/master.js +51 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/notes-server/client.js +60 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/notes-server/index.js +66 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/notes-server/notes.html +396 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/notes/notes.html +406 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/notes/notes.js +122 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/print-pdf/print-pdf.js +48 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/remotes/remotes.js +39 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/search/search.js +196 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/plugin/zoom-js/zoom.js +278 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/examples/assets/image1.png +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/examples/assets/image2.png +0 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/examples/barebones.html +41 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/examples/embedded-media.html +49 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/examples/math.html +185 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/examples/slide-backgrounds.html +144 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/examples/slide-transitions.html +101 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/qunit-1.12.0.css +244 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/qunit-1.12.0.js +2212 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/test-markdown-element-attributes.html +134 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/test-markdown-element-attributes.js +46 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/test-markdown-slide-attributes.html +128 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/test-markdown-slide-attributes.js +47 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/test-markdown.html +52 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/test-markdown.js +15 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/test-pdf.html +83 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/test-pdf.js +15 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/test.html +85 -0
- data/share/etc/pandoc/extra/reveal.js-3.1.0/test/test.js +589 -0
- data/share/etc/pandoc/extra/s5-ui/default/blank.gif +0 -0
- data/share/etc/pandoc/extra/s5-ui/default/bodybg.gif +0 -0
- data/share/etc/pandoc/extra/s5-ui/default/framing.css +23 -0
- data/share/etc/pandoc/extra/s5-ui/default/iepngfix.htc +42 -0
- data/share/etc/pandoc/extra/s5-ui/default/opera.css +7 -0
- data/share/etc/pandoc/extra/s5-ui/default/outline.css +15 -0
- data/share/etc/pandoc/extra/s5-ui/default/pretty.css +86 -0
- data/share/etc/pandoc/extra/s5-ui/default/print.css +1 -0
- data/share/etc/pandoc/extra/s5-ui/default/s5-core.css +9 -0
- data/share/etc/pandoc/extra/s5-ui/default/slides.css +3 -0
- data/share/etc/pandoc/extra/s5-ui/default/slides.js +553 -0
- data/share/etc/uv/render/README +1 -0
- data/share/etc/uv/render/latex/-h.yaml +1 -0
- data/share/etc/uv/render/latex/active4d.render +136 -0
- data/share/etc/uv/render/latex/all_hallows_eve.render +100 -0
- data/share/etc/uv/render/latex/amy.render +175 -0
- data/share/etc/uv/render/latex/blackboard.render +115 -0
- data/share/etc/uv/render/latex/brilliance_black.render +556 -0
- data/share/etc/uv/render/latex/brilliance_dull.render +565 -0
- data/share/etc/uv/render/latex/cobalt.render +166 -0
- data/share/etc/uv/render/latex/dawn.render +130 -0
- data/share/etc/uv/render/latex/eiffel.render +136 -0
- data/share/etc/uv/render/latex/espresso_libre.render +127 -0
- data/share/etc/uv/render/latex/idle.render +97 -0
- data/share/etc/uv/render/latex/iplastic.render +103 -0
- data/share/etc/uv/render/latex/lazy.render +100 -0
- data/share/etc/uv/render/latex/mac_classic.render +139 -0
- data/share/etc/uv/render/latex/magicwb_amiga.render +121 -0
- data/share/etc/uv/render/latex/pastels_on_dark.render +208 -0
- data/share/etc/uv/render/latex/slush_poppies.render +127 -0
- data/share/etc/uv/render/latex/solarized.render +495 -0
- data/share/etc/uv/render/latex/spacecadet.render +85 -0
- data/share/etc/uv/render/latex/sunburst.render +190 -0
- data/share/etc/uv/render/latex/twilight.render +157 -0
- data/share/etc/uv/render/latex/zenburnesque.render +130 -0
- data/share/etc/uv/render/old/txt2tags.render +131 -0
- data/share/etc/uv/render/theme2latexrender +123 -0
- data/share/etc/uv/render/theme2xhtmlrender +157 -0
- data/share/etc/uv/render/tmTheme/solarized.tmTheme +1875 -0
- data/share/etc/uv/render/xhtml/active4d.render +140 -0
- data/share/etc/uv/render/xhtml/all_hallows_eve.render +104 -0
- data/share/etc/uv/render/xhtml/amy.render +179 -0
- data/share/etc/uv/render/xhtml/blackboard.render +119 -0
- data/share/etc/uv/render/xhtml/brilliance_black.render +560 -0
- data/share/etc/uv/render/xhtml/brilliance_dull.render +569 -0
- data/share/etc/uv/render/xhtml/cobalt.render +170 -0
- data/share/etc/uv/render/xhtml/dawn.render +134 -0
- data/share/etc/uv/render/xhtml/eiffel.render +140 -0
- data/share/etc/uv/render/xhtml/espresso_libre.render +131 -0
- data/share/etc/uv/render/xhtml/files/css/active4d.css +114 -0
- data/share/etc/uv/render/xhtml/files/css/all_hallows_eve.css +72 -0
- data/share/etc/uv/render/xhtml/files/css/amy.css +147 -0
- data/share/etc/uv/render/xhtml/files/css/blackboard.css +88 -0
- data/share/etc/uv/render/xhtml/files/css/brilliance_black.css +605 -0
- data/share/etc/uv/render/xhtml/files/css/brilliance_dull.css +599 -0
- data/share/etc/uv/render/xhtml/files/css/cobalt.css +149 -0
- data/share/etc/uv/render/xhtml/files/css/dawn.css +121 -0
- data/share/etc/uv/render/xhtml/files/css/eiffel.css +121 -0
- data/share/etc/uv/render/xhtml/files/css/espresso_libre.css +109 -0
- data/share/etc/uv/render/xhtml/files/css/idle.css +62 -0
- data/share/etc/uv/render/xhtml/files/css/iplastic.css +80 -0
- data/share/etc/uv/render/xhtml/files/css/lazy.css +73 -0
- data/share/etc/uv/render/xhtml/files/css/mac_classic.css +123 -0
- data/share/etc/uv/render/xhtml/files/css/magicwb_amiga.css +104 -0
- data/share/etc/uv/render/xhtml/files/css/pastels_on_dark.css +188 -0
- data/share/etc/uv/render/xhtml/files/css/slush_poppies.css +85 -0
- data/share/etc/uv/render/xhtml/files/css/solarized.css +478 -0
- data/share/etc/uv/render/xhtml/files/css/spacecadet.css +51 -0
- data/share/etc/uv/render/xhtml/files/css/sunburst.css +180 -0
- data/share/etc/uv/render/xhtml/files/css/twilight.css +137 -0
- data/share/etc/uv/render/xhtml/files/css/zenburnesque.css +91 -0
- data/share/etc/uv/render/xhtml/idle.render +101 -0
- data/share/etc/uv/render/xhtml/iplastic.render +107 -0
- data/share/etc/uv/render/xhtml/lazy.render +104 -0
- data/share/etc/uv/render/xhtml/mac_classic.render +143 -0
- data/share/etc/uv/render/xhtml/magicwb_amiga.render +125 -0
- data/share/etc/uv/render/xhtml/pastels_on_dark.render +212 -0
- data/share/etc/uv/render/xhtml/slush_poppies.render +131 -0
- data/share/etc/uv/render/xhtml/solarized.render +503 -0
- data/share/etc/uv/render/xhtml/spacecadet.render +89 -0
- data/share/etc/uv/render/xhtml/sunburst.render +194 -0
- data/share/etc/uv/render/xhtml/twilight.render +161 -0
- data/share/etc/uv/render/xhtml/zenburnesque.render +134 -0
- data/share/etc/uv/syntax/broken/markdown.syntax +519 -0
- data/share/etc/uv/syntax/broken/php.syntax +1253 -0
- data/share/etc/uv/syntax/buggy/nemerle.syntax +74 -0
- data/share/etc/uv/syntax/dyndoc.syntax +237 -0
- data/share/etc/uv/syntax/old/YAML.yaml +160 -0
- data/share/etc/uv/syntax/old/txt2tags.yaml +139 -0
- data/share/etc/uv/syntax/r.syntax +81 -0
- data/share/etc/uv/syntax/ruby.syntax +1035 -0
- data/share/etc/uv/syntax/source.actionscript.syntax +97 -0
- data/share/etc/uv/syntax/source.active4d.library.syntax +21 -0
- data/share/etc/uv/syntax/source.active4d.syntax +276 -0
- data/share/etc/uv/syntax/source.ada.syntax +33 -0
- data/share/etc/uv/syntax/source.antlr.syntax +151 -0
- data/share/etc/uv/syntax/source.apache-config.mod_perl.syntax +50 -0
- data/share/etc/uv/syntax/source.apache-config.syntax +191 -0
- data/share/etc/uv/syntax/source.applescript.syntax +384 -0
- data/share/etc/uv/syntax/source.asp.syntax +70 -0
- data/share/etc/uv/syntax/source.asp.vb.net.syntax +129 -0
- data/share/etc/uv/syntax/source.c++.qt.syntax +26 -0
- data/share/etc/uv/syntax/source.c++.syntax +186 -0
- data/share/etc/uv/syntax/source.c-sharp.syntax +59 -0
- data/share/etc/uv/syntax/source.c.ragel.syntax +201 -0
- data/share/etc/uv/syntax/source.c.syntax +414 -0
- data/share/etc/uv/syntax/source.camlp4.ocaml.syntax +36 -0
- data/share/etc/uv/syntax/source.cm.syntax +32 -0
- data/share/etc/uv/syntax/source.coffee.syntax +216 -0
- data/share/etc/uv/syntax/source.context-free.syntax +176 -0
- data/share/etc/uv/syntax/source.css.beta.syntax +1925 -0
- data/share/etc/uv/syntax/source.css.syntax +195 -0
- data/share/etc/uv/syntax/source.d.syntax +142 -0
- data/share/etc/uv/syntax/source.diff.syntax +81 -0
- data/share/etc/uv/syntax/source.dot.syntax +47 -0
- data/share/etc/uv/syntax/source.dylan.syntax +62 -0
- data/share/etc/uv/syntax/source.eiffel.syntax +78 -0
- data/share/etc/uv/syntax/source.erlang.syntax +922 -0
- data/share/etc/uv/syntax/source.fortran.syntax +141 -0
- data/share/etc/uv/syntax/source.fscript.syntax +80 -0
- data/share/etc/uv/syntax/source.fxscript.syntax +142 -0
- data/share/etc/uv/syntax/source.gri.syntax +83 -0
- data/share/etc/uv/syntax/source.groovy.groovy.syntax +191 -0
- data/share/etc/uv/syntax/source.haskell.syntax +88 -0
- data/share/etc/uv/syntax/source.icalendar.syntax +32 -0
- data/share/etc/uv/syntax/source.inform.syntax +48 -0
- data/share/etc/uv/syntax/source.ini.syntax +55 -0
- data/share/etc/uv/syntax/source.io.syntax +81 -0
- data/share/etc/uv/syntax/source.java-props.syntax +20 -0
- data/share/etc/uv/syntax/source.java.syntax +211 -0
- data/share/etc/uv/syntax/source.js.greasemonkey.syntax +34 -0
- data/share/etc/uv/syntax/source.js.jquery.syntax +114 -0
- data/share/etc/uv/syntax/source.js.mootools.syntax +572 -0
- data/share/etc/uv/syntax/source.js.prototype.bracketed.syntax +140 -0
- data/share/etc/uv/syntax/source.js.prototype.syntax +72 -0
- data/share/etc/uv/syntax/source.js.syntax +256 -0
- data/share/etc/uv/syntax/source.js.yui.syntax +176 -0
- data/share/etc/uv/syntax/source.json.syntax +136 -0
- data/share/etc/uv/syntax/source.lex.syntax +219 -0
- data/share/etc/uv/syntax/source.lighttpd-config.syntax +54 -0
- data/share/etc/uv/syntax/source.lilypond.syntax +492 -0
- data/share/etc/uv/syntax/source.lisp.syntax +61 -0
- data/share/etc/uv/syntax/source.logo.syntax +29 -0
- data/share/etc/uv/syntax/source.logtalk.syntax +152 -0
- data/share/etc/uv/syntax/source.lua.syntax +86 -0
- data/share/etc/uv/syntax/source.makefile.syntax +36 -0
- data/share/etc/uv/syntax/source.matlab.syntax +142 -0
- data/share/etc/uv/syntax/source.mel.syntax +92 -0
- data/share/etc/uv/syntax/source.mips.syntax +66 -0
- data/share/etc/uv/syntax/source.ml.syntax +121 -0
- data/share/etc/uv/syntax/source.modula-3.syntax +47 -0
- data/share/etc/uv/syntax/source.nant-build.syntax +53 -0
- data/share/etc/uv/syntax/source.objc++.syntax +18 -0
- data/share/etc/uv/syntax/source.objc.syntax +233 -0
- data/share/etc/uv/syntax/source.ocaml.syntax +764 -0
- data/share/etc/uv/syntax/source.ocamllex.syntax +167 -0
- data/share/etc/uv/syntax/source.ocamlyacc.syntax +184 -0
- data/share/etc/uv/syntax/source.open-gl.syntax +14 -0
- data/share/etc/uv/syntax/source.pascal.syntax +77 -0
- data/share/etc/uv/syntax/source.pascal.vectorscript.syntax +57 -0
- data/share/etc/uv/syntax/source.perl.syntax +1113 -0
- data/share/etc/uv/syntax/source.php.cake.syntax +55 -0
- data/share/etc/uv/syntax/source.plist.tm-grammar.syntax +708 -0
- data/share/etc/uv/syntax/source.postscript.syntax +114 -0
- data/share/etc/uv/syntax/source.processing.syntax +106 -0
- data/share/etc/uv/syntax/source.prolog.syntax +40 -0
- data/share/etc/uv/syntax/source.python.django.syntax +21 -0
- data/share/etc/uv/syntax/source.python.syntax +868 -0
- data/share/etc/uv/syntax/source.qmake.syntax +114 -0
- data/share/etc/uv/syntax/source.quake-config.syntax +32 -0
- data/share/etc/uv/syntax/source.r-console.syntax +16 -0
- data/share/etc/uv/syntax/source.r.syntax +81 -0
- data/share/etc/uv/syntax/source.regexp.oniguruma.syntax +107 -0
- data/share/etc/uv/syntax/source.regexp.python.syntax +109 -0
- data/share/etc/uv/syntax/source.regexp.syntax +50 -0
- data/share/etc/uv/syntax/source.remind.syntax +253 -0
- data/share/etc/uv/syntax/source.rez.syntax +80 -0
- data/share/etc/uv/syntax/source.ruby.experimental.syntax +145 -0
- data/share/etc/uv/syntax/source.ruby.rails.syntax +88 -0
- data/share/etc/uv/syntax/source.ruby.syntax +1035 -0
- data/share/etc/uv/syntax/source.s5.syntax +69 -0
- data/share/etc/uv/syntax/source.sass.syntax +45 -0
- data/share/etc/uv/syntax/source.scheme.syntax +347 -0
- data/share/etc/uv/syntax/source.scilab.syntax +41 -0
- data/share/etc/uv/syntax/source.scss.syntax +527 -0
- data/share/etc/uv/syntax/source.shell.syntax +384 -0
- data/share/etc/uv/syntax/source.slate.syntax +149 -0
- data/share/etc/uv/syntax/source.smarty.syntax +63 -0
- data/share/etc/uv/syntax/source.sql.ruby.syntax +18 -0
- data/share/etc/uv/syntax/source.sql.syntax +237 -0
- data/share/etc/uv/syntax/source.ssh-config.syntax +33 -0
- data/share/etc/uv/syntax/source.strings.syntax +39 -0
- data/share/etc/uv/syntax/source.swig.syntax +57 -0
- data/share/etc/uv/syntax/source.tcl.macports.syntax +163 -0
- data/share/etc/uv/syntax/source.tcl.syntax +152 -0
- data/share/etc/uv/syntax/source.yaml.syntax +160 -0
- data/share/etc/uv/syntax/text.active4d-ini.syntax +50 -0
- data/share/etc/uv/syntax/text.bbcode.syntax +287 -0
- data/share/etc/uv/syntax/text.bibtex.syntax +151 -0
- data/share/etc/uv/syntax/text.blog.html.syntax +41 -0
- data/share/etc/uv/syntax/text.blog.markdown.syntax +42 -0
- data/share/etc/uv/syntax/text.blog.syntax +27 -0
- data/share/etc/uv/syntax/text.blog.textile.syntax +27 -0
- data/share/etc/uv/syntax/text.dyndoc.syntax +237 -0
- data/share/etc/uv/syntax/text.gtdalt.syntax +143 -0
- data/share/etc/uv/syntax/text.haml.syntax +88 -0
- data/share/etc/uv/syntax/text.html.asp.net.syntax +424 -0
- data/share/etc/uv/syntax/text.html.asp.syntax +27 -0
- data/share/etc/uv/syntax/text.html.basic.syntax +362 -0
- data/share/etc/uv/syntax/text.html.cfm.syntax +119 -0
- data/share/etc/uv/syntax/text.html.django.syntax +36 -0
- data/share/etc/uv/syntax/text.html.dokuwiki.syntax +204 -0
- data/share/etc/uv/syntax/text.html.doxygen.syntax +43 -0
- data/share/etc/uv/syntax/text.html.markdown.multimarkdown.syntax +39 -0
- data/share/etc/uv/syntax/text.html.mason.syntax +119 -0
- data/share/etc/uv/syntax/text.html.mediawiki.syntax +567 -0
- data/share/etc/uv/syntax/text.html.mt.syntax +162 -0
- data/share/etc/uv/syntax/text.html.ruby.syntax +40 -0
- data/share/etc/uv/syntax/text.html.strict.active4d.syntax +311 -0
- data/share/etc/uv/syntax/text.html.tcl.syntax +26 -0
- data/share/etc/uv/syntax/text.html.textile.syntax +215 -0
- data/share/etc/uv/syntax/text.html.tt.syntax +121 -0
- data/share/etc/uv/syntax/text.html.twiki.syntax +241 -0
- data/share/etc/uv/syntax/text.html.xhtml.1-strict.syntax +4027 -0
- data/share/etc/uv/syntax/text.log.latex.syntax +50 -0
- data/share/etc/uv/syntax/text.mail.markdown.syntax +118 -0
- data/share/etc/uv/syntax/text.man.syntax +17 -0
- data/share/etc/uv/syntax/text.moinmoin.syntax +189 -0
- data/share/etc/uv/syntax/text.plain.gtd.syntax +22 -0
- data/share/etc/uv/syntax/text.plain.release-notes.syntax +46 -0
- data/share/etc/uv/syntax/text.plain.syntax +32 -0
- data/share/etc/uv/syntax/text.plist.syntax +635 -0
- data/share/etc/uv/syntax/text.pmwiki.syntax +113 -0
- data/share/etc/uv/syntax/text.restructuredtext.syntax +250 -0
- data/share/etc/uv/syntax/text.setext.syntax +147 -0
- data/share/etc/uv/syntax/text.subversion-commit.syntax +36 -0
- data/share/etc/uv/syntax/text.tabular.csv.syntax +68 -0
- data/share/etc/uv/syntax/text.tabular.tsv.syntax +50 -0
- data/share/etc/uv/syntax/text.tex.latex.beamer.syntax +41 -0
- data/share/etc/uv/syntax/text.tex.latex.haskell.syntax +24 -0
- data/share/etc/uv/syntax/text.tex.latex.memoir.syntax +64 -0
- data/share/etc/uv/syntax/text.tex.latex.rd.syntax +91 -0
- data/share/etc/uv/syntax/text.tex.latex.sweave.syntax +84 -0
- data/share/etc/uv/syntax/text.tex.latex.syntax +566 -0
- data/share/etc/uv/syntax/text.tex.math.syntax +49 -0
- data/share/etc/uv/syntax/text.tex.syntax +86 -0
- data/share/etc/uv/syntax/text.txt2tags.syntax +79 -0
- data/share/etc/uv/syntax/text.xml.apple-dist.syntax +77 -0
- data/share/etc/uv/syntax/text.xml.strict.syntax +92 -0
- data/share/etc/uv/syntax/text.xml.syntax +180 -0
- data/share/etc/uv/syntax/text.xml.xsl.syntax +60 -0
- data/share/etc/uv/uv.rb +161 -0
- metadata +465 -1
@@ -0,0 +1,6 @@
|
|
1
|
+
/**
|
2
|
+
* marked - a markdown parser
|
3
|
+
* Copyright (c) 2011-2014, Christopher Jeffrey. (MIT Licensed)
|
4
|
+
* https://github.com/chjj/marked
|
5
|
+
*/
|
6
|
+
(function(){function e(e){this.tokens=[],this.tokens.links={},this.options=e||a.defaults,this.rules=p.normal,this.options.gfm&&(this.rules=this.options.tables?p.tables:p.gfm)}function t(e,t){if(this.options=t||a.defaults,this.links=e,this.rules=u.normal,this.renderer=this.options.renderer||new n,this.renderer.options=this.options,!this.links)throw new Error("Tokens array requires a `links` property.");this.options.gfm?this.rules=this.options.breaks?u.breaks:u.gfm:this.options.pedantic&&(this.rules=u.pedantic)}function n(e){this.options=e||{}}function r(e){this.tokens=[],this.token=null,this.options=e||a.defaults,this.options.renderer=this.options.renderer||new n,this.renderer=this.options.renderer,this.renderer.options=this.options}function s(e,t){return e.replace(t?/&/g:/&(?!#?\w+;)/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function i(e){return e.replace(/&([#\w]+);/g,function(e,t){return t=t.toLowerCase(),"colon"===t?":":"#"===t.charAt(0)?String.fromCharCode("x"===t.charAt(1)?parseInt(t.substring(2),16):+t.substring(1)):""})}function l(e,t){return e=e.source,t=t||"",function n(r,s){return r?(s=s.source||s,s=s.replace(/(^|[^\[])\^/g,"$1"),e=e.replace(r,s),n):new RegExp(e,t)}}function o(){}function h(e){for(var t,n,r=1;r<arguments.length;r++){t=arguments[r];for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])}return e}function a(t,n,i){if(i||"function"==typeof n){i||(i=n,n=null),n=h({},a.defaults,n||{});var l,o,p=n.highlight,u=0;try{l=e.lex(t,n)}catch(c){return i(c)}o=l.length;var g=function(e){if(e)return n.highlight=p,i(e);var t;try{t=r.parse(l,n)}catch(s){e=s}return n.highlight=p,e?i(e):i(null,t)};if(!p||p.length<3)return g();if(delete n.highlight,!o)return g();for(;u<l.length;u++)!function(e){return"code"!==e.type?--o||g():p(e.text,e.lang,function(t,n){return t?g(t):null==n||n===e.text?--o||g():(e.text=n,e.escaped=!0,void(--o||g()))})}(l[u])}else try{return n&&(n=h({},a.defaults,n)),r.parse(e.lex(t,n),n)}catch(c){if(c.message+="\nPlease report this to https://github.com/chjj/marked.",(n||a.defaults).silent)return"<p>An error occured:</p><pre>"+s(c.message+"",!0)+"</pre>";throw c}}var p={newline:/^\n+/,code:/^( {4}[^\n]+\n*)+/,fences:o,hr:/^( *[-*_]){3,} *(?:\n+|$)/,heading:/^ *(#{1,6}) *([^\n]+?) *#* *(?:\n+|$)/,nptable:o,lheading:/^([^\n]+)\n *(=|-){2,} *(?:\n+|$)/,blockquote:/^( *>[^\n]+(\n(?!def)[^\n]+)*\n*)+/,list:/^( *)(bull) [\s\S]+?(?:hr|def|\n{2,}(?! )(?!\1bull )\n*|\s*$)/,html:/^ *(?:comment *(?:\n|\s*$)|closed *(?:\n{2,}|\s*$)|closing *(?:\n{2,}|\s*$))/,def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +["(]([^\n]+)[")])? *(?:\n+|$)/,table:o,paragraph:/^((?:[^\n]+\n?(?!hr|heading|lheading|blockquote|tag|def))+)\n*/,text:/^[^\n]+/};p.bullet=/(?:[*+-]|\d+\.)/,p.item=/^( *)(bull) [^\n]*(?:\n(?!\1bull )[^\n]*)*/,p.item=l(p.item,"gm")(/bull/g,p.bullet)(),p.list=l(p.list)(/bull/g,p.bullet)("hr","\\n+(?=\\1?(?:[-*_] *){3,}(?:\\n+|$))")("def","\\n+(?="+p.def.source+")")(),p.blockquote=l(p.blockquote)("def",p.def)(),p._tag="(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:/|[^\\w\\s@]*@)\\b",p.html=l(p.html)("comment",/<!--[\s\S]*?-->/)("closed",/<(tag)[\s\S]+?<\/\1>/)("closing",/<tag(?:"[^"]*"|'[^']*'|[^'">])*?>/)(/tag/g,p._tag)(),p.paragraph=l(p.paragraph)("hr",p.hr)("heading",p.heading)("lheading",p.lheading)("blockquote",p.blockquote)("tag","<"+p._tag)("def",p.def)(),p.normal=h({},p),p.gfm=h({},p.normal,{fences:/^ *(`{3,}|~{3,}) *(\S+)? *\n([\s\S]+?)\s*\1 *(?:\n+|$)/,paragraph:/^/}),p.gfm.paragraph=l(p.paragraph)("(?!","(?!"+p.gfm.fences.source.replace("\\1","\\2")+"|"+p.list.source.replace("\\1","\\3")+"|")(),p.tables=h({},p.gfm,{nptable:/^ *(\S.*\|.*)\n *([-:]+ *\|[-| :]*)\n((?:.*\|.*(?:\n|$))*)\n*/,table:/^ *\|(.+)\n *\|( *[-:]+[-| :]*)\n((?: *\|.*(?:\n|$))*)\n*/}),e.rules=p,e.lex=function(t,n){var r=new e(n);return r.lex(t)},e.prototype.lex=function(e){return e=e.replace(/\r\n|\r/g,"\n").replace(/\t/g," ").replace(/\u00a0/g," ").replace(/\u2424/g,"\n"),this.token(e,!0)},e.prototype.token=function(e,t,n){for(var r,s,i,l,o,h,a,u,c,e=e.replace(/^ +$/gm,"");e;)if((i=this.rules.newline.exec(e))&&(e=e.substring(i[0].length),i[0].length>1&&this.tokens.push({type:"space"})),i=this.rules.code.exec(e))e=e.substring(i[0].length),i=i[0].replace(/^ {4}/gm,""),this.tokens.push({type:"code",text:this.options.pedantic?i:i.replace(/\n+$/,"")});else if(i=this.rules.fences.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"code",lang:i[2],text:i[3]});else if(i=this.rules.heading.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"heading",depth:i[1].length,text:i[2]});else if(t&&(i=this.rules.nptable.exec(e))){for(e=e.substring(i[0].length),h={type:"table",header:i[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3].replace(/\n$/,"").split("\n")},u=0;u<h.align.length;u++)h.align[u]=/^ *-+: *$/.test(h.align[u])?"right":/^ *:-+: *$/.test(h.align[u])?"center":/^ *:-+ *$/.test(h.align[u])?"left":null;for(u=0;u<h.cells.length;u++)h.cells[u]=h.cells[u].split(/ *\| */);this.tokens.push(h)}else if(i=this.rules.lheading.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"heading",depth:"="===i[2]?1:2,text:i[1]});else if(i=this.rules.hr.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"hr"});else if(i=this.rules.blockquote.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"blockquote_start"}),i=i[0].replace(/^ *> ?/gm,""),this.token(i,t,!0),this.tokens.push({type:"blockquote_end"});else if(i=this.rules.list.exec(e)){for(e=e.substring(i[0].length),l=i[2],this.tokens.push({type:"list_start",ordered:l.length>1}),i=i[0].match(this.rules.item),r=!1,c=i.length,u=0;c>u;u++)h=i[u],a=h.length,h=h.replace(/^ *([*+-]|\d+\.) +/,""),~h.indexOf("\n ")&&(a-=h.length,h=this.options.pedantic?h.replace(/^ {1,4}/gm,""):h.replace(new RegExp("^ {1,"+a+"}","gm"),"")),this.options.smartLists&&u!==c-1&&(o=p.bullet.exec(i[u+1])[0],l===o||l.length>1&&o.length>1||(e=i.slice(u+1).join("\n")+e,u=c-1)),s=r||/\n\n(?!\s*$)/.test(h),u!==c-1&&(r="\n"===h.charAt(h.length-1),s||(s=r)),this.tokens.push({type:s?"loose_item_start":"list_item_start"}),this.token(h,!1,n),this.tokens.push({type:"list_item_end"});this.tokens.push({type:"list_end"})}else if(i=this.rules.html.exec(e))e=e.substring(i[0].length),this.tokens.push({type:this.options.sanitize?"paragraph":"html",pre:"pre"===i[1]||"script"===i[1]||"style"===i[1],text:i[0]});else if(!n&&t&&(i=this.rules.def.exec(e)))e=e.substring(i[0].length),this.tokens.links[i[1].toLowerCase()]={href:i[2],title:i[3]};else if(t&&(i=this.rules.table.exec(e))){for(e=e.substring(i[0].length),h={type:"table",header:i[1].replace(/^ *| *\| *$/g,"").split(/ *\| */),align:i[2].replace(/^ *|\| *$/g,"").split(/ *\| */),cells:i[3].replace(/(?: *\| *)?\n$/,"").split("\n")},u=0;u<h.align.length;u++)h.align[u]=/^ *-+: *$/.test(h.align[u])?"right":/^ *:-+: *$/.test(h.align[u])?"center":/^ *:-+ *$/.test(h.align[u])?"left":null;for(u=0;u<h.cells.length;u++)h.cells[u]=h.cells[u].replace(/^ *\| *| *\| *$/g,"").split(/ *\| */);this.tokens.push(h)}else if(t&&(i=this.rules.paragraph.exec(e)))e=e.substring(i[0].length),this.tokens.push({type:"paragraph",text:"\n"===i[1].charAt(i[1].length-1)?i[1].slice(0,-1):i[1]});else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),this.tokens.push({type:"text",text:i[0]});else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0));return this.tokens};var u={escape:/^\\([\\`*{}\[\]()#+\-.!_>])/,autolink:/^<([^ >]+(@|:\/)[^ >]+)>/,url:o,tag:/^<!--[\s\S]*?-->|^<\/?\w+(?:"[^"]*"|'[^']*'|[^'">])*?>/,link:/^!?\[(inside)\]\(href\)/,reflink:/^!?\[(inside)\]\s*\[([^\]]*)\]/,nolink:/^!?\[((?:\[[^\]]*\]|[^\[\]])*)\]/,strong:/^__([\s\S]+?)__(?!_)|^\*\*([\s\S]+?)\*\*(?!\*)/,em:/^\b_((?:__|[\s\S])+?)_\b|^\*((?:\*\*|[\s\S])+?)\*(?!\*)/,code:/^(`+)\s*([\s\S]*?[^`])\s*\1(?!`)/,br:/^ {2,}\n(?!\s*$)/,del:o,text:/^[\s\S]+?(?=[\\<!\[_*`]| {2,}\n|$)/};u._inside=/(?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*/,u._href=/\s*<?([\s\S]*?)>?(?:\s+['"]([\s\S]*?)['"])?\s*/,u.link=l(u.link)("inside",u._inside)("href",u._href)(),u.reflink=l(u.reflink)("inside",u._inside)(),u.normal=h({},u),u.pedantic=h({},u.normal,{strong:/^__(?=\S)([\s\S]*?\S)__(?!_)|^\*\*(?=\S)([\s\S]*?\S)\*\*(?!\*)/,em:/^_(?=\S)([\s\S]*?\S)_(?!_)|^\*(?=\S)([\s\S]*?\S)\*(?!\*)/}),u.gfm=h({},u.normal,{escape:l(u.escape)("])","~|])")(),url:/^(https?:\/\/[^\s<]+[^<.,:;"')\]\s])/,del:/^~~(?=\S)([\s\S]*?\S)~~/,text:l(u.text)("]|","~]|")("|","|https?://|")()}),u.breaks=h({},u.gfm,{br:l(u.br)("{2,}","*")(),text:l(u.gfm.text)("{2,}","*")()}),t.rules=u,t.output=function(e,n,r){var s=new t(n,r);return s.output(e)},t.prototype.output=function(e){for(var t,n,r,i,l="";e;)if(i=this.rules.escape.exec(e))e=e.substring(i[0].length),l+=i[1];else if(i=this.rules.autolink.exec(e))e=e.substring(i[0].length),"@"===i[2]?(n=this.mangle(":"===i[1].charAt(6)?i[1].substring(7):i[1]),r=this.mangle("mailto:")+n):(n=s(i[1]),r=n),l+=this.renderer.link(r,null,n);else if(this.inLink||!(i=this.rules.url.exec(e))){if(i=this.rules.tag.exec(e))!this.inLink&&/^<a /i.test(i[0])?this.inLink=!0:this.inLink&&/^<\/a>/i.test(i[0])&&(this.inLink=!1),e=e.substring(i[0].length),l+=this.options.sanitize?s(i[0]):i[0];else if(i=this.rules.link.exec(e))e=e.substring(i[0].length),this.inLink=!0,l+=this.outputLink(i,{href:i[2],title:i[3]}),this.inLink=!1;else if((i=this.rules.reflink.exec(e))||(i=this.rules.nolink.exec(e))){if(e=e.substring(i[0].length),t=(i[2]||i[1]).replace(/\s+/g," "),t=this.links[t.toLowerCase()],!t||!t.href){l+=i[0].charAt(0),e=i[0].substring(1)+e;continue}this.inLink=!0,l+=this.outputLink(i,t),this.inLink=!1}else if(i=this.rules.strong.exec(e))e=e.substring(i[0].length),l+=this.renderer.strong(this.output(i[2]||i[1]));else if(i=this.rules.em.exec(e))e=e.substring(i[0].length),l+=this.renderer.em(this.output(i[2]||i[1]));else if(i=this.rules.code.exec(e))e=e.substring(i[0].length),l+=this.renderer.codespan(s(i[2],!0));else if(i=this.rules.br.exec(e))e=e.substring(i[0].length),l+=this.renderer.br();else if(i=this.rules.del.exec(e))e=e.substring(i[0].length),l+=this.renderer.del(this.output(i[1]));else if(i=this.rules.text.exec(e))e=e.substring(i[0].length),l+=s(this.smartypants(i[0]));else if(e)throw new Error("Infinite loop on byte: "+e.charCodeAt(0))}else e=e.substring(i[0].length),n=s(i[1]),r=n,l+=this.renderer.link(r,null,n);return l},t.prototype.outputLink=function(e,t){var n=s(t.href),r=t.title?s(t.title):null;return"!"!==e[0].charAt(0)?this.renderer.link(n,r,this.output(e[1])):this.renderer.image(n,r,s(e[1]))},t.prototype.smartypants=function(e){return this.options.smartypants?e.replace(/--/g,"—").replace(/(^|[-\u2014/(\[{"\s])'/g,"$1‘").replace(/'/g,"’").replace(/(^|[-\u2014/(\[{\u2018\s])"/g,"$1“").replace(/"/g,"”").replace(/\.{3}/g,"…"):e},t.prototype.mangle=function(e){for(var t,n="",r=e.length,s=0;r>s;s++)t=e.charCodeAt(s),Math.random()>.5&&(t="x"+t.toString(16)),n+="&#"+t+";";return n},n.prototype.code=function(e,t,n){if(this.options.highlight){var r=this.options.highlight(e,t);null!=r&&r!==e&&(n=!0,e=r)}return t?'<pre><code class="'+this.options.langPrefix+s(t,!0)+'">'+(n?e:s(e,!0))+"\n</code></pre>\n":"<pre><code>"+(n?e:s(e,!0))+"\n</code></pre>"},n.prototype.blockquote=function(e){return"<blockquote>\n"+e+"</blockquote>\n"},n.prototype.html=function(e){return e},n.prototype.heading=function(e,t,n){return"<h"+t+' id="'+this.options.headerPrefix+n.toLowerCase().replace(/[^\w]+/g,"-")+'">'+e+"</h"+t+">\n"},n.prototype.hr=function(){return this.options.xhtml?"<hr/>\n":"<hr>\n"},n.prototype.list=function(e,t){var n=t?"ol":"ul";return"<"+n+">\n"+e+"</"+n+">\n"},n.prototype.listitem=function(e){return"<li>"+e+"</li>\n"},n.prototype.paragraph=function(e){return"<p>"+e+"</p>\n"},n.prototype.table=function(e,t){return"<table>\n<thead>\n"+e+"</thead>\n<tbody>\n"+t+"</tbody>\n</table>\n"},n.prototype.tablerow=function(e){return"<tr>\n"+e+"</tr>\n"},n.prototype.tablecell=function(e,t){var n=t.header?"th":"td",r=t.align?"<"+n+' style="text-align:'+t.align+'">':"<"+n+">";return r+e+"</"+n+">\n"},n.prototype.strong=function(e){return"<strong>"+e+"</strong>"},n.prototype.em=function(e){return"<em>"+e+"</em>"},n.prototype.codespan=function(e){return"<code>"+e+"</code>"},n.prototype.br=function(){return this.options.xhtml?"<br/>":"<br>"},n.prototype.del=function(e){return"<del>"+e+"</del>"},n.prototype.link=function(e,t,n){if(this.options.sanitize){try{var r=decodeURIComponent(i(e)).replace(/[^\w:]/g,"").toLowerCase()}catch(s){return""}if(0===r.indexOf("javascript:")||0===r.indexOf("vbscript:"))return""}var l='<a href="'+e+'"';return t&&(l+=' title="'+t+'"'),l+=">"+n+"</a>"},n.prototype.image=function(e,t,n){var r='<img src="'+e+'" alt="'+n+'"';return t&&(r+=' title="'+t+'"'),r+=this.options.xhtml?"/>":">"},r.parse=function(e,t,n){var s=new r(t,n);return s.parse(e)},r.prototype.parse=function(e){this.inline=new t(e.links,this.options,this.renderer),this.tokens=e.reverse();for(var n="";this.next();)n+=this.tok();return n},r.prototype.next=function(){return this.token=this.tokens.pop()},r.prototype.peek=function(){return this.tokens[this.tokens.length-1]||0},r.prototype.parseText=function(){for(var e=this.token.text;"text"===this.peek().type;)e+="\n"+this.next().text;return this.inline.output(e)},r.prototype.tok=function(){switch(this.token.type){case"space":return"";case"hr":return this.renderer.hr();case"heading":return this.renderer.heading(this.inline.output(this.token.text),this.token.depth,this.token.text);case"code":return this.renderer.code(this.token.text,this.token.lang,this.token.escaped);case"table":var e,t,n,r,s,i="",l="";for(n="",e=0;e<this.token.header.length;e++)r={header:!0,align:this.token.align[e]},n+=this.renderer.tablecell(this.inline.output(this.token.header[e]),{header:!0,align:this.token.align[e]});for(i+=this.renderer.tablerow(n),e=0;e<this.token.cells.length;e++){for(t=this.token.cells[e],n="",s=0;s<t.length;s++)n+=this.renderer.tablecell(this.inline.output(t[s]),{header:!1,align:this.token.align[s]});l+=this.renderer.tablerow(n)}return this.renderer.table(i,l);case"blockquote_start":for(var l="";"blockquote_end"!==this.next().type;)l+=this.tok();return this.renderer.blockquote(l);case"list_start":for(var l="",o=this.token.ordered;"list_end"!==this.next().type;)l+=this.tok();return this.renderer.list(l,o);case"list_item_start":for(var l="";"list_item_end"!==this.next().type;)l+="text"===this.token.type?this.parseText():this.tok();return this.renderer.listitem(l);case"loose_item_start":for(var l="";"list_item_end"!==this.next().type;)l+=this.tok();return this.renderer.listitem(l);case"html":var h=this.token.pre||this.options.pedantic?this.token.text:this.inline.output(this.token.text);return this.renderer.html(h);case"paragraph":return this.renderer.paragraph(this.inline.output(this.token.text));case"text":return this.renderer.paragraph(this.parseText())}},o.exec=o,a.options=a.setOptions=function(e){return h(a.defaults,e),a},a.defaults={gfm:!0,tables:!0,breaks:!1,pedantic:!1,sanitize:!1,smartLists:!1,silent:!1,highlight:null,langPrefix:"lang-",smartypants:!1,headerPrefix:"",renderer:new n,xhtml:!1},a.Parser=r,a.parser=r.parse,a.Renderer=n,a.Lexer=e,a.lexer=e.lex,a.InlineLexer=t,a.inlineLexer=t.output,a.parse=a,"undefined"!=typeof module&&"object"==typeof exports?module.exports=a:"function"==typeof define&&define.amd?define(function(){return a}):this.marked=a}).call(function(){return this||("undefined"!=typeof window?window:global)}());
|
@@ -0,0 +1,64 @@
|
|
1
|
+
/**
|
2
|
+
* A plugin which enables rendering of math equations inside
|
3
|
+
* of reveal.js slides. Essentially a thin wrapper for MathJax.
|
4
|
+
*
|
5
|
+
* @author Hakim El Hattab
|
6
|
+
*/
|
7
|
+
var RevealMath = window.RevealMath || (function(){
|
8
|
+
|
9
|
+
var options = Reveal.getConfig().math || {};
|
10
|
+
options.mathjax = options.mathjax || 'https://cdn.mathjax.org/mathjax/latest/MathJax.js';
|
11
|
+
options.config = options.config || 'TeX-AMS_HTML-full';
|
12
|
+
|
13
|
+
loadScript( options.mathjax + '?config=' + options.config, function() {
|
14
|
+
|
15
|
+
MathJax.Hub.Config({
|
16
|
+
messageStyle: 'none',
|
17
|
+
tex2jax: { inlineMath: [['$','$'],['\\(','\\)']] },
|
18
|
+
skipStartupTypeset: true
|
19
|
+
});
|
20
|
+
|
21
|
+
// Typeset followed by an immediate reveal.js layout since
|
22
|
+
// the typesetting process could affect slide height
|
23
|
+
MathJax.Hub.Queue( [ 'Typeset', MathJax.Hub ] );
|
24
|
+
MathJax.Hub.Queue( Reveal.layout );
|
25
|
+
|
26
|
+
// Reprocess equations in slides when they turn visible
|
27
|
+
Reveal.addEventListener( 'slidechanged', function( event ) {
|
28
|
+
|
29
|
+
MathJax.Hub.Queue( [ 'Typeset', MathJax.Hub, event.currentSlide ] );
|
30
|
+
|
31
|
+
} );
|
32
|
+
|
33
|
+
} );
|
34
|
+
|
35
|
+
function loadScript( url, callback ) {
|
36
|
+
|
37
|
+
var head = document.querySelector( 'head' );
|
38
|
+
var script = document.createElement( 'script' );
|
39
|
+
script.type = 'text/javascript';
|
40
|
+
script.src = url;
|
41
|
+
|
42
|
+
// Wrapper for callback to make sure it only fires once
|
43
|
+
var finish = function() {
|
44
|
+
if( typeof callback === 'function' ) {
|
45
|
+
callback.call();
|
46
|
+
callback = null;
|
47
|
+
}
|
48
|
+
}
|
49
|
+
|
50
|
+
script.onload = finish;
|
51
|
+
|
52
|
+
// IE
|
53
|
+
script.onreadystatechange = function() {
|
54
|
+
if ( this.readyState === 'loaded' ) {
|
55
|
+
finish();
|
56
|
+
}
|
57
|
+
}
|
58
|
+
|
59
|
+
// Normal browsers
|
60
|
+
head.appendChild( script );
|
61
|
+
|
62
|
+
}
|
63
|
+
|
64
|
+
})();
|
@@ -0,0 +1,13 @@
|
|
1
|
+
(function() {
|
2
|
+
var multiplex = Reveal.getConfig().multiplex;
|
3
|
+
var socketId = multiplex.id;
|
4
|
+
var socket = io.connect(multiplex.url);
|
5
|
+
|
6
|
+
socket.on(multiplex.id, function(data) {
|
7
|
+
// ignore data from sockets that aren't ours
|
8
|
+
if (data.socketId !== socketId) { return; }
|
9
|
+
if( window.location.host === 'localhost:1947' ) return;
|
10
|
+
|
11
|
+
Reveal.slide(data.indexh, data.indexv, data.indexf, 'remote');
|
12
|
+
});
|
13
|
+
}());
|
@@ -0,0 +1,56 @@
|
|
1
|
+
var express = require('express');
|
2
|
+
var fs = require('fs');
|
3
|
+
var io = require('socket.io');
|
4
|
+
var crypto = require('crypto');
|
5
|
+
|
6
|
+
var app = express.createServer();
|
7
|
+
var staticDir = express.static;
|
8
|
+
|
9
|
+
io = io.listen(app);
|
10
|
+
|
11
|
+
var opts = {
|
12
|
+
port: 1948,
|
13
|
+
baseDir : __dirname + '/../../'
|
14
|
+
};
|
15
|
+
|
16
|
+
io.sockets.on('connection', function(socket) {
|
17
|
+
socket.on('slidechanged', function(slideData) {
|
18
|
+
if (typeof slideData.secret == 'undefined' || slideData.secret == null || slideData.secret === '') return;
|
19
|
+
if (createHash(slideData.secret) === slideData.socketId) {
|
20
|
+
slideData.secret = null;
|
21
|
+
socket.broadcast.emit(slideData.socketId, slideData);
|
22
|
+
};
|
23
|
+
});
|
24
|
+
});
|
25
|
+
|
26
|
+
app.configure(function() {
|
27
|
+
[ 'css', 'js', 'plugin', 'lib' ].forEach(function(dir) {
|
28
|
+
app.use('/' + dir, staticDir(opts.baseDir + dir));
|
29
|
+
});
|
30
|
+
});
|
31
|
+
|
32
|
+
app.get("/", function(req, res) {
|
33
|
+
res.writeHead(200, {'Content-Type': 'text/html'});
|
34
|
+
fs.createReadStream(opts.baseDir + '/index.html').pipe(res);
|
35
|
+
});
|
36
|
+
|
37
|
+
app.get("/token", function(req,res) {
|
38
|
+
var ts = new Date().getTime();
|
39
|
+
var rand = Math.floor(Math.random()*9999999);
|
40
|
+
var secret = ts.toString() + rand.toString();
|
41
|
+
res.send({secret: secret, socketId: createHash(secret)});
|
42
|
+
});
|
43
|
+
|
44
|
+
var createHash = function(secret) {
|
45
|
+
var cipher = crypto.createCipher('blowfish', secret);
|
46
|
+
return(cipher.final('hex'));
|
47
|
+
};
|
48
|
+
|
49
|
+
// Actually listen
|
50
|
+
app.listen(opts.port || null);
|
51
|
+
|
52
|
+
var brown = '\033[33m',
|
53
|
+
green = '\033[32m',
|
54
|
+
reset = '\033[0m';
|
55
|
+
|
56
|
+
console.log( brown + "reveal.js:" + reset + " Multiplex running on port " + green + opts.port + reset );
|
@@ -0,0 +1,51 @@
|
|
1
|
+
(function() {
|
2
|
+
// Don't emit events from inside of notes windows
|
3
|
+
if ( window.location.search.match( /receiver/gi ) ) { return; }
|
4
|
+
|
5
|
+
var multiplex = Reveal.getConfig().multiplex;
|
6
|
+
|
7
|
+
var socket = io.connect(multiplex.url);
|
8
|
+
|
9
|
+
var notify = function( slideElement, indexh, indexv, origin ) {
|
10
|
+
if( typeof origin === 'undefined' && origin !== 'remote' ) {
|
11
|
+
var nextindexh;
|
12
|
+
var nextindexv;
|
13
|
+
|
14
|
+
var fragmentindex = Reveal.getIndices().f;
|
15
|
+
if (typeof fragmentindex == 'undefined') {
|
16
|
+
fragmentindex = 0;
|
17
|
+
}
|
18
|
+
|
19
|
+
if (slideElement.nextElementSibling && slideElement.parentNode.nodeName == 'SECTION') {
|
20
|
+
nextindexh = indexh;
|
21
|
+
nextindexv = indexv + 1;
|
22
|
+
} else {
|
23
|
+
nextindexh = indexh + 1;
|
24
|
+
nextindexv = 0;
|
25
|
+
}
|
26
|
+
|
27
|
+
var slideData = {
|
28
|
+
indexh : indexh,
|
29
|
+
indexv : indexv,
|
30
|
+
indexf : fragmentindex,
|
31
|
+
nextindexh : nextindexh,
|
32
|
+
nextindexv : nextindexv,
|
33
|
+
secret: multiplex.secret,
|
34
|
+
socketId : multiplex.id
|
35
|
+
};
|
36
|
+
|
37
|
+
socket.emit('slidechanged', slideData);
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
Reveal.addEventListener( 'slidechanged', function( event ) {
|
42
|
+
notify( event.currentSlide, event.indexh, event.indexv, event.origin );
|
43
|
+
} );
|
44
|
+
|
45
|
+
var fragmentNotify = function( event ) {
|
46
|
+
notify( Reveal.getCurrentSlide(), Reveal.getIndices().h, Reveal.getIndices().v, event.origin );
|
47
|
+
};
|
48
|
+
|
49
|
+
Reveal.addEventListener( 'fragmentshown', fragmentNotify );
|
50
|
+
Reveal.addEventListener( 'fragmenthidden', fragmentNotify );
|
51
|
+
}());
|
@@ -0,0 +1,60 @@
|
|
1
|
+
(function() {
|
2
|
+
|
3
|
+
// don't emit events from inside the previews themselves
|
4
|
+
if( window.location.search.match( /receiver/gi ) ) { return; }
|
5
|
+
|
6
|
+
var socket = io.connect( window.location.origin ),
|
7
|
+
socketId = Math.random().toString().slice( 2 );
|
8
|
+
|
9
|
+
console.log( 'View slide notes at ' + window.location.origin + '/notes/' + socketId );
|
10
|
+
|
11
|
+
window.open( window.location.origin + '/notes/' + socketId, 'notes-' + socketId );
|
12
|
+
|
13
|
+
/**
|
14
|
+
* Posts the current slide data to the notes window
|
15
|
+
*/
|
16
|
+
function post() {
|
17
|
+
|
18
|
+
var slideElement = Reveal.getCurrentSlide(),
|
19
|
+
notesElement = slideElement.querySelector( 'aside.notes' );
|
20
|
+
|
21
|
+
var messageData = {
|
22
|
+
notes: '',
|
23
|
+
markdown: false,
|
24
|
+
socketId: socketId,
|
25
|
+
state: Reveal.getState()
|
26
|
+
};
|
27
|
+
|
28
|
+
// Look for notes defined in a slide attribute
|
29
|
+
if( slideElement.hasAttribute( 'data-notes' ) ) {
|
30
|
+
messageData.notes = slideElement.getAttribute( 'data-notes' );
|
31
|
+
}
|
32
|
+
|
33
|
+
// Look for notes defined in an aside element
|
34
|
+
if( notesElement ) {
|
35
|
+
messageData.notes = notesElement.innerHTML;
|
36
|
+
messageData.markdown = typeof notesElement.getAttribute( 'data-markdown' ) === 'string';
|
37
|
+
}
|
38
|
+
|
39
|
+
socket.emit( 'statechanged', messageData );
|
40
|
+
|
41
|
+
}
|
42
|
+
|
43
|
+
// When a new notes window connects, post our current state
|
44
|
+
socket.on( 'connect', function( data ) {
|
45
|
+
post();
|
46
|
+
} );
|
47
|
+
|
48
|
+
// Monitor events that trigger a change in state
|
49
|
+
Reveal.addEventListener( 'slidechanged', post );
|
50
|
+
Reveal.addEventListener( 'fragmentshown', post );
|
51
|
+
Reveal.addEventListener( 'fragmenthidden', post );
|
52
|
+
Reveal.addEventListener( 'overviewhidden', post );
|
53
|
+
Reveal.addEventListener( 'overviewshown', post );
|
54
|
+
Reveal.addEventListener( 'paused', post );
|
55
|
+
Reveal.addEventListener( 'resumed', post );
|
56
|
+
|
57
|
+
// Post the initial state
|
58
|
+
post();
|
59
|
+
|
60
|
+
}());
|
@@ -0,0 +1,66 @@
|
|
1
|
+
var express = require('express');
|
2
|
+
var fs = require('fs');
|
3
|
+
var io = require('socket.io');
|
4
|
+
var _ = require('underscore');
|
5
|
+
var Mustache = require('mustache');
|
6
|
+
|
7
|
+
var app = express.createServer();
|
8
|
+
var staticDir = express.static;
|
9
|
+
|
10
|
+
io = io.listen(app);
|
11
|
+
|
12
|
+
var opts = {
|
13
|
+
port : 1947,
|
14
|
+
baseDir : __dirname + '/../../'
|
15
|
+
};
|
16
|
+
|
17
|
+
io.sockets.on( 'connection', function( socket ) {
|
18
|
+
|
19
|
+
socket.on( 'connect', function( data ) {
|
20
|
+
socket.broadcast.emit( 'connect', data );
|
21
|
+
});
|
22
|
+
|
23
|
+
socket.on( 'statechanged', function( data ) {
|
24
|
+
socket.broadcast.emit( 'statechanged', data );
|
25
|
+
});
|
26
|
+
|
27
|
+
});
|
28
|
+
|
29
|
+
app.configure( function() {
|
30
|
+
|
31
|
+
[ 'css', 'js', 'images', 'plugin', 'lib' ].forEach( function( dir ) {
|
32
|
+
app.use( '/' + dir, staticDir( opts.baseDir + dir ) );
|
33
|
+
});
|
34
|
+
|
35
|
+
});
|
36
|
+
|
37
|
+
app.get('/', function( req, res ) {
|
38
|
+
|
39
|
+
res.writeHead( 200, { 'Content-Type': 'text/html' } );
|
40
|
+
fs.createReadStream( opts.baseDir + '/index.html' ).pipe( res );
|
41
|
+
|
42
|
+
});
|
43
|
+
|
44
|
+
app.get( '/notes/:socketId', function( req, res ) {
|
45
|
+
|
46
|
+
fs.readFile( opts.baseDir + 'plugin/notes-server/notes.html', function( err, data ) {
|
47
|
+
res.send( Mustache.to_html( data.toString(), {
|
48
|
+
socketId : req.params.socketId
|
49
|
+
}));
|
50
|
+
});
|
51
|
+
|
52
|
+
});
|
53
|
+
|
54
|
+
// Actually listen
|
55
|
+
app.listen( opts.port || null );
|
56
|
+
|
57
|
+
var brown = '\033[33m',
|
58
|
+
green = '\033[32m',
|
59
|
+
reset = '\033[0m';
|
60
|
+
|
61
|
+
var slidesLocation = 'http://localhost' + ( opts.port ? ( ':' + opts.port ) : '' );
|
62
|
+
|
63
|
+
console.log( brown + 'reveal.js - Speaker Notes' + reset );
|
64
|
+
console.log( '1. Open the slides at ' + green + slidesLocation + reset );
|
65
|
+
console.log( '2. Click on the link your JS console to go to the notes page' );
|
66
|
+
console.log( '3. Advance through your slides and your notes will advance automatically' );
|
@@ -0,0 +1,396 @@
|
|
1
|
+
<!doctype html>
|
2
|
+
<html lang="en">
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8">
|
5
|
+
|
6
|
+
<title>reveal.js - Slide Notes</title>
|
7
|
+
|
8
|
+
<style>
|
9
|
+
body {
|
10
|
+
font-family: Helvetica;
|
11
|
+
}
|
12
|
+
|
13
|
+
#current-slide,
|
14
|
+
#upcoming-slide,
|
15
|
+
#speaker-controls {
|
16
|
+
padding: 6px;
|
17
|
+
box-sizing: border-box;
|
18
|
+
-moz-box-sizing: border-box;
|
19
|
+
}
|
20
|
+
|
21
|
+
#current-slide iframe,
|
22
|
+
#upcoming-slide iframe {
|
23
|
+
width: 100%;
|
24
|
+
height: 100%;
|
25
|
+
border: 1px solid #ddd;
|
26
|
+
}
|
27
|
+
|
28
|
+
#current-slide .label,
|
29
|
+
#upcoming-slide .label {
|
30
|
+
position: absolute;
|
31
|
+
top: 10px;
|
32
|
+
left: 10px;
|
33
|
+
font-weight: bold;
|
34
|
+
font-size: 14px;
|
35
|
+
z-index: 2;
|
36
|
+
color: rgba( 255, 255, 255, 0.9 );
|
37
|
+
}
|
38
|
+
|
39
|
+
#current-slide {
|
40
|
+
position: absolute;
|
41
|
+
width: 65%;
|
42
|
+
height: 100%;
|
43
|
+
top: 0;
|
44
|
+
left: 0;
|
45
|
+
padding-right: 0;
|
46
|
+
}
|
47
|
+
|
48
|
+
#upcoming-slide {
|
49
|
+
position: absolute;
|
50
|
+
width: 35%;
|
51
|
+
height: 40%;
|
52
|
+
right: 0;
|
53
|
+
top: 0;
|
54
|
+
}
|
55
|
+
|
56
|
+
#speaker-controls {
|
57
|
+
position: absolute;
|
58
|
+
top: 40%;
|
59
|
+
right: 0;
|
60
|
+
width: 35%;
|
61
|
+
height: 60%;
|
62
|
+
|
63
|
+
font-size: 18px;
|
64
|
+
}
|
65
|
+
|
66
|
+
.speaker-controls-time.hidden,
|
67
|
+
.speaker-controls-notes.hidden {
|
68
|
+
display: none;
|
69
|
+
}
|
70
|
+
|
71
|
+
.speaker-controls-time .label,
|
72
|
+
.speaker-controls-notes .label {
|
73
|
+
text-transform: uppercase;
|
74
|
+
font-weight: normal;
|
75
|
+
font-size: 0.66em;
|
76
|
+
color: #666;
|
77
|
+
margin: 0;
|
78
|
+
}
|
79
|
+
|
80
|
+
.speaker-controls-time {
|
81
|
+
border-bottom: 1px solid rgba( 200, 200, 200, 0.5 );
|
82
|
+
margin-bottom: 10px;
|
83
|
+
padding: 10px 16px;
|
84
|
+
padding-bottom: 20px;
|
85
|
+
cursor: pointer;
|
86
|
+
}
|
87
|
+
|
88
|
+
.speaker-controls-time .reset-button {
|
89
|
+
opacity: 0;
|
90
|
+
float: right;
|
91
|
+
color: #666;
|
92
|
+
text-decoration: none;
|
93
|
+
}
|
94
|
+
.speaker-controls-time:hover .reset-button {
|
95
|
+
opacity: 1;
|
96
|
+
}
|
97
|
+
|
98
|
+
.speaker-controls-time .timer,
|
99
|
+
.speaker-controls-time .clock {
|
100
|
+
width: 50%;
|
101
|
+
font-size: 1.9em;
|
102
|
+
}
|
103
|
+
|
104
|
+
.speaker-controls-time .timer {
|
105
|
+
float: left;
|
106
|
+
}
|
107
|
+
|
108
|
+
.speaker-controls-time .clock {
|
109
|
+
float: right;
|
110
|
+
text-align: right;
|
111
|
+
}
|
112
|
+
|
113
|
+
.speaker-controls-time span.mute {
|
114
|
+
color: #bbb;
|
115
|
+
}
|
116
|
+
|
117
|
+
.speaker-controls-notes {
|
118
|
+
padding: 10px 16px;
|
119
|
+
}
|
120
|
+
|
121
|
+
.speaker-controls-notes .value {
|
122
|
+
margin-top: 5px;
|
123
|
+
line-height: 1.4;
|
124
|
+
font-size: 1.2em;
|
125
|
+
}
|
126
|
+
|
127
|
+
.clear {
|
128
|
+
clear: both;
|
129
|
+
}
|
130
|
+
|
131
|
+
@media screen and (max-width: 1080px) {
|
132
|
+
#speaker-controls {
|
133
|
+
font-size: 16px;
|
134
|
+
}
|
135
|
+
}
|
136
|
+
|
137
|
+
@media screen and (max-width: 900px) {
|
138
|
+
#speaker-controls {
|
139
|
+
font-size: 14px;
|
140
|
+
}
|
141
|
+
}
|
142
|
+
|
143
|
+
@media screen and (max-width: 800px) {
|
144
|
+
#speaker-controls {
|
145
|
+
font-size: 12px;
|
146
|
+
}
|
147
|
+
}
|
148
|
+
|
149
|
+
</style>
|
150
|
+
</head>
|
151
|
+
|
152
|
+
<body>
|
153
|
+
|
154
|
+
<div id="current-slide"></div>
|
155
|
+
<div id="upcoming-slide"><span class="label">UPCOMING:</span></div>
|
156
|
+
<div id="speaker-controls">
|
157
|
+
<div class="speaker-controls-time">
|
158
|
+
<h4 class="label">Time <span class="reset-button">Click to Reset</span></h4>
|
159
|
+
<div class="clock">
|
160
|
+
<span class="clock-value">0:00 AM</span>
|
161
|
+
</div>
|
162
|
+
<div class="timer">
|
163
|
+
<span class="hours-value">00</span><span class="minutes-value">:00</span><span class="seconds-value">:00</span>
|
164
|
+
</div>
|
165
|
+
<div class="clear"></div>
|
166
|
+
</div>
|
167
|
+
|
168
|
+
<div class="speaker-controls-notes hidden">
|
169
|
+
<h4 class="label">Notes</h4>
|
170
|
+
<div class="value"></div>
|
171
|
+
</div>
|
172
|
+
</div>
|
173
|
+
|
174
|
+
<script src="/socket.io/socket.io.js"></script>
|
175
|
+
<script src="/plugin/markdown/marked.js"></script>
|
176
|
+
|
177
|
+
<script>
|
178
|
+
(function() {
|
179
|
+
|
180
|
+
var notes,
|
181
|
+
notesValue,
|
182
|
+
currentState,
|
183
|
+
currentSlide,
|
184
|
+
upcomingSlide,
|
185
|
+
connected = false;
|
186
|
+
|
187
|
+
var socket = io.connect( window.location.origin ),
|
188
|
+
socketId = '{{socketId}}';
|
189
|
+
|
190
|
+
socket.on( 'statechanged', function( data ) {
|
191
|
+
|
192
|
+
// ignore data from sockets that aren't ours
|
193
|
+
if( data.socketId !== socketId ) { return; }
|
194
|
+
|
195
|
+
if( connected === false ) {
|
196
|
+
connected = true;
|
197
|
+
|
198
|
+
setupIframes( data );
|
199
|
+
setupKeyboard();
|
200
|
+
setupNotes();
|
201
|
+
setupTimer();
|
202
|
+
|
203
|
+
}
|
204
|
+
|
205
|
+
handleStateMessage( data );
|
206
|
+
|
207
|
+
} );
|
208
|
+
|
209
|
+
window.addEventListener( 'message', function( event ) {
|
210
|
+
|
211
|
+
var data = JSON.parse( event.data );
|
212
|
+
|
213
|
+
if( data && data.namespace === 'reveal' ) {
|
214
|
+
if( /ready/.test( data.eventName ) ) {
|
215
|
+
socket.emit( 'connect', { socketId: socketId } );
|
216
|
+
}
|
217
|
+
}
|
218
|
+
|
219
|
+
} );
|
220
|
+
|
221
|
+
/**
|
222
|
+
* Called when the main window sends an updated state.
|
223
|
+
*/
|
224
|
+
function handleStateMessage( data ) {
|
225
|
+
|
226
|
+
// Store the most recently set state to avoid circular loops
|
227
|
+
// applying the same state
|
228
|
+
currentState = JSON.stringify( data.state );
|
229
|
+
|
230
|
+
// No need for updating the notes in case of fragment changes
|
231
|
+
if ( data.notes ) {
|
232
|
+
notes.classList.remove( 'hidden' );
|
233
|
+
if( data.markdown ) {
|
234
|
+
notesValue.innerHTML = marked( data.notes );
|
235
|
+
}
|
236
|
+
else {
|
237
|
+
notesValue.innerHTML = data.notes;
|
238
|
+
}
|
239
|
+
}
|
240
|
+
else {
|
241
|
+
notes.classList.add( 'hidden' );
|
242
|
+
}
|
243
|
+
|
244
|
+
// Update the note slides
|
245
|
+
currentSlide.contentWindow.postMessage( JSON.stringify({ method: 'setState', args: [ data.state ] }), '*' );
|
246
|
+
upcomingSlide.contentWindow.postMessage( JSON.stringify({ method: 'setState', args: [ data.state ] }), '*' );
|
247
|
+
upcomingSlide.contentWindow.postMessage( JSON.stringify({ method: 'next' }), '*' );
|
248
|
+
|
249
|
+
}
|
250
|
+
|
251
|
+
// Limit to max one state update per X ms
|
252
|
+
handleStateMessage = debounce( handleStateMessage, 200 );
|
253
|
+
|
254
|
+
/**
|
255
|
+
* Forward keyboard events to the current slide window.
|
256
|
+
* This enables keyboard events to work even if focus
|
257
|
+
* isn't set on the current slide iframe.
|
258
|
+
*/
|
259
|
+
function setupKeyboard() {
|
260
|
+
|
261
|
+
document.addEventListener( 'keydown', function( event ) {
|
262
|
+
currentSlide.contentWindow.postMessage( JSON.stringify({ method: 'triggerKey', args: [ event.keyCode ] }), '*' );
|
263
|
+
} );
|
264
|
+
|
265
|
+
}
|
266
|
+
|
267
|
+
/**
|
268
|
+
* Creates the preview iframes.
|
269
|
+
*/
|
270
|
+
function setupIframes( data ) {
|
271
|
+
|
272
|
+
var params = [
|
273
|
+
'receiver',
|
274
|
+
'progress=false',
|
275
|
+
'history=false',
|
276
|
+
'transition=none',
|
277
|
+
'backgroundTransition=none'
|
278
|
+
].join( '&' );
|
279
|
+
|
280
|
+
var hash = '#/' + data.state.indexh + '/' + data.state.indexv;
|
281
|
+
var currentURL = '/?' + params + '&postMessageEvents=true' + hash;
|
282
|
+
var upcomingURL = '/?' + params + '&controls=false' + hash;
|
283
|
+
|
284
|
+
currentSlide = document.createElement( 'iframe' );
|
285
|
+
currentSlide.setAttribute( 'width', 1280 );
|
286
|
+
currentSlide.setAttribute( 'height', 1024 );
|
287
|
+
currentSlide.setAttribute( 'src', currentURL );
|
288
|
+
document.querySelector( '#current-slide' ).appendChild( currentSlide );
|
289
|
+
|
290
|
+
upcomingSlide = document.createElement( 'iframe' );
|
291
|
+
upcomingSlide.setAttribute( 'width', 640 );
|
292
|
+
upcomingSlide.setAttribute( 'height', 512 );
|
293
|
+
upcomingSlide.setAttribute( 'src', upcomingURL );
|
294
|
+
document.querySelector( '#upcoming-slide' ).appendChild( upcomingSlide );
|
295
|
+
|
296
|
+
}
|
297
|
+
|
298
|
+
/**
|
299
|
+
* Setup the notes UI.
|
300
|
+
*/
|
301
|
+
function setupNotes() {
|
302
|
+
|
303
|
+
notes = document.querySelector( '.speaker-controls-notes' );
|
304
|
+
notesValue = document.querySelector( '.speaker-controls-notes .value' );
|
305
|
+
|
306
|
+
}
|
307
|
+
|
308
|
+
/**
|
309
|
+
* Create the timer and clock and start updating them
|
310
|
+
* at an interval.
|
311
|
+
*/
|
312
|
+
function setupTimer() {
|
313
|
+
|
314
|
+
var start = new Date(),
|
315
|
+
timeEl = document.querySelector( '.speaker-controls-time' ),
|
316
|
+
clockEl = timeEl.querySelector( '.clock-value' ),
|
317
|
+
hoursEl = timeEl.querySelector( '.hours-value' ),
|
318
|
+
minutesEl = timeEl.querySelector( '.minutes-value' ),
|
319
|
+
secondsEl = timeEl.querySelector( '.seconds-value' );
|
320
|
+
|
321
|
+
function _updateTimer() {
|
322
|
+
|
323
|
+
var diff, hours, minutes, seconds,
|
324
|
+
now = new Date();
|
325
|
+
|
326
|
+
diff = now.getTime() - start.getTime();
|
327
|
+
hours = Math.floor( diff / ( 1000 * 60 * 60 ) );
|
328
|
+
minutes = Math.floor( ( diff / ( 1000 * 60 ) ) % 60 );
|
329
|
+
seconds = Math.floor( ( diff / 1000 ) % 60 );
|
330
|
+
|
331
|
+
clockEl.innerHTML = now.toLocaleTimeString( 'en-US', { hour12: true, hour: '2-digit', minute:'2-digit' } );
|
332
|
+
hoursEl.innerHTML = zeroPadInteger( hours );
|
333
|
+
hoursEl.className = hours > 0 ? '' : 'mute';
|
334
|
+
minutesEl.innerHTML = ':' + zeroPadInteger( minutes );
|
335
|
+
minutesEl.className = minutes > 0 ? '' : 'mute';
|
336
|
+
secondsEl.innerHTML = ':' + zeroPadInteger( seconds );
|
337
|
+
|
338
|
+
}
|
339
|
+
|
340
|
+
// Update once directly
|
341
|
+
_updateTimer();
|
342
|
+
|
343
|
+
// Then update every second
|
344
|
+
setInterval( _updateTimer, 1000 );
|
345
|
+
|
346
|
+
timeEl.addEventListener( 'click', function() {
|
347
|
+
start = new Date();
|
348
|
+
_updateTimer();
|
349
|
+
return false;
|
350
|
+
} );
|
351
|
+
|
352
|
+
}
|
353
|
+
|
354
|
+
function zeroPadInteger( num ) {
|
355
|
+
|
356
|
+
var str = '00' + parseInt( num );
|
357
|
+
return str.substring( str.length - 2 );
|
358
|
+
|
359
|
+
}
|
360
|
+
|
361
|
+
/**
|
362
|
+
* Limits the frequency at which a function can be called.
|
363
|
+
*/
|
364
|
+
function debounce( fn, ms ) {
|
365
|
+
|
366
|
+
var lastTime = 0,
|
367
|
+
timeout;
|
368
|
+
|
369
|
+
return function() {
|
370
|
+
|
371
|
+
var args = arguments;
|
372
|
+
var context = this;
|
373
|
+
|
374
|
+
clearTimeout( timeout );
|
375
|
+
|
376
|
+
var timeSinceLastCall = Date.now() - lastTime;
|
377
|
+
if( timeSinceLastCall > ms ) {
|
378
|
+
fn.apply( context, args );
|
379
|
+
lastTime = Date.now();
|
380
|
+
}
|
381
|
+
else {
|
382
|
+
timeout = setTimeout( function() {
|
383
|
+
fn.apply( context, args );
|
384
|
+
lastTime = Date.now();
|
385
|
+
}, ms - timeSinceLastCall );
|
386
|
+
}
|
387
|
+
|
388
|
+
}
|
389
|
+
|
390
|
+
}
|
391
|
+
|
392
|
+
})();
|
393
|
+
</script>
|
394
|
+
|
395
|
+
</body>
|
396
|
+
</html>
|