asciidoctor-revealjs 4.1.0 → 5.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +7 -2
  3. data/README.adoc +12 -1351
  4. data/asciidoctor-revealjs.gemspec +2 -3
  5. data/examples/auto-animate-code.adoc +47 -0
  6. data/examples/auto-animate.adoc +351 -0
  7. data/examples/favicon.adoc +13 -0
  8. data/examples/images/sample.svg +27 -0
  9. data/examples/mathjax-cdn.adoc +1 -1
  10. data/examples/mathjax.adoc +1 -1
  11. data/examples/revealjs-custom-theme.adoc +1 -1
  12. data/examples/revealjs-plugin-activation.adoc +3 -2
  13. data/examples/revealjs-plugins/chalkboard/README.md +94 -61
  14. data/examples/revealjs-plugins/chalkboard/img/boardmarker-black.png +0 -0
  15. data/examples/revealjs-plugins/chalkboard/img/boardmarker-blue.png +0 -0
  16. data/examples/revealjs-plugins/chalkboard/img/boardmarker-green.png +0 -0
  17. data/examples/revealjs-plugins/chalkboard/img/boardmarker-orange.png +0 -0
  18. data/examples/revealjs-plugins/chalkboard/img/boardmarker-purple.png +0 -0
  19. data/examples/revealjs-plugins/chalkboard/img/boardmarker-red.png +0 -0
  20. data/examples/revealjs-plugins/chalkboard/img/boardmarker-yellow.png +0 -0
  21. data/examples/revealjs-plugins/chalkboard/img/chalk-blue.png +0 -0
  22. data/examples/revealjs-plugins/chalkboard/img/chalk-green.png +0 -0
  23. data/examples/revealjs-plugins/chalkboard/img/chalk-orange.png +0 -0
  24. data/examples/revealjs-plugins/chalkboard/img/chalk-purple.png +0 -0
  25. data/examples/revealjs-plugins/chalkboard/img/chalk-red.png +0 -0
  26. data/examples/revealjs-plugins/chalkboard/img/chalk-yellow.png +0 -0
  27. data/examples/revealjs-plugins/chalkboard/plugin.js +1836 -0
  28. data/examples/revealjs-plugins/chalkboard/style.css +38 -0
  29. data/examples/revealjs-plugins/{reveal.js-menu → menu}/LICENSE +1 -1
  30. data/examples/revealjs-plugins/menu/README.md +368 -0
  31. data/examples/revealjs-plugins/{reveal.js-menu → menu}/menu.css +116 -115
  32. data/examples/revealjs-plugins/menu/menu.esm.js +1 -0
  33. data/examples/revealjs-plugins/menu/menu.js +1 -0
  34. data/examples/revealjs-plugins/menu/plugin.js +1252 -0
  35. data/examples/revealjs-plugins-docinfo-footer.html +20 -0
  36. data/examples/revealjs-plugins.adoc +2 -3
  37. data/examples/search-plugin.adoc +26 -0
  38. data/examples/source-rouge.adoc +1 -1
  39. data/examples/svg-images-docinfo-revealjs.html +15 -0
  40. data/examples/svg-images.adoc +41 -0
  41. data/examples/text-formatting.adoc +34 -0
  42. data/lib/asciidoctor-revealjs/converter.rb +819 -686
  43. data/lib/asciidoctor-revealjs/highlightjs.rb +155 -14
  44. data/lib/asciidoctor-revealjs/version.rb +1 -1
  45. data/templates/asciidoctor-compatibility.css +26 -1
  46. data/templates/document.html.slim +28 -44
  47. data/templates/helpers.rb +188 -10
  48. data/templates/image.html.slim +1 -16
  49. data/templates/inline_image.html.slim +1 -20
  50. data/templates/inline_quoted.html.slim +2 -2
  51. data/templates/listing.html.slim +2 -1
  52. data/templates/section.html.slim +7 -1
  53. data/templates/title_slide.html.slim +1 -2
  54. metadata +58 -81
  55. data/examples/revealjs-plugins/chalkboard/chalkboard.js +0 -1288
  56. data/examples/revealjs-plugins/chalkboard/img/boardmarker.png +0 -0
  57. data/examples/revealjs-plugins/reveal.js-menu/CONTRIBUTING.md +0 -9
  58. data/examples/revealjs-plugins/reveal.js-menu/README.md +0 -334
  59. data/examples/revealjs-plugins/reveal.js-menu/bower.json +0 -21
  60. data/examples/revealjs-plugins/reveal.js-menu/menu.js +0 -949
  61. data/examples/revealjs-plugins/reveal.js-menu/package.json +0 -22
  62. data/examples/revealjs-plugins-conf.js +0 -10
  63. data/examples/revealjs-plugins.js +0 -2
  64. /data/examples/revealjs-plugins/chalkboard/img/{chalk.png → chalk-white.png} +0 -0
  65. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/LICENSE.txt +0 -0
  66. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/all.css +0 -0
  67. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/brands.css +0 -0
  68. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/fontawesome.css +0 -0
  69. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/regular.css +0 -0
  70. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/solid.css +0 -0
  71. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/svg-with-js.css +0 -0
  72. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/v4-shims.css +0 -0
  73. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/v4-shims.min.css +0 -0
  74. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-brands-400.eot +0 -0
  75. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-brands-400.svg +0 -0
  76. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-brands-400.ttf +0 -0
  77. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-brands-400.woff +0 -0
  78. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-brands-400.woff2 +0 -0
  79. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-regular-400.eot +0 -0
  80. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-regular-400.svg +0 -0
  81. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-regular-400.ttf +0 -0
  82. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-regular-400.woff +0 -0
  83. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-regular-400.woff2 +0 -0
  84. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-solid-900.eot +0 -0
  85. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-solid-900.svg +0 -0
  86. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-solid-900.ttf +0 -0
  87. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-solid-900.woff +0 -0
  88. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-solid-900.woff2 +0 -0
@@ -0,0 +1,20 @@
1
+ <script src="revealjs-plugins/menu/menu.js"></script>
2
+ <link rel="stylesheet" href="revealjs-plugins/chalkboard/style.css">
3
+ <script src="revealjs-plugins/chalkboard/plugin.js"></script>
4
+ <script>
5
+ Reveal.configure({
6
+ menu: {
7
+ side: 'right',
8
+ openButton: false,
9
+ },
10
+ keyboard: {
11
+ 67: function() { RevealChalkboard.toggleNotesCanvas() }, // toggle notes canvas when 'c' is pressed
12
+ 66: function() { RevealChalkboard.toggleChalkboard() }, // toggle chalkboard when 'b' is pressed
13
+ 46: function() { RevealChalkboard.clear() }, // clear chalkboard when 'DEL' is pressed
14
+ 8: function() { RevealChalkboard.reset() }, // reset chalkboard data on current slide when 'BACKSPACE' is pressed
15
+ 68: function() { RevealChalkboard.download() }, // download recorded chalkboard drawing when 'd' is pressed
16
+ }
17
+ })
18
+ Reveal.registerPlugin(RevealMenu)
19
+ Reveal.registerPlugin(RevealChalkboard)
20
+ </script>
@@ -1,11 +1,10 @@
1
1
  // .revealjs-plugins
2
- // Use of the revealjs_plugins attribute to load custom revealjs plugins
2
+ // Use docinfo to load third party plugins
3
3
  // :include: //body/script | //div[@class="slides"]
4
4
  // :header_footer:
5
5
  = Custom Plugins
6
6
  Author
7
- :revealjs_plugins: examples/revealjs-plugins.js
8
- :revealjs_plugins_configuration: examples/revealjs-plugins-conf.js
7
+ :docinfo: private
9
8
 
10
9
  == Slide 1
11
10
 
@@ -0,0 +1,26 @@
1
+ = Search Plugin
2
+ :revealjs_plugin_search: enabled
3
+ :experimental:
4
+
5
+ == Search
6
+
7
+ Press kbd:[Ctrl+Shift+F] to search slide content. +
8
+ For instance, you can search "asciidoc".
9
+
10
+ Then, press kbd:[Enter] to navigate between search hits.
11
+
12
+ == Blank
13
+
14
+ 😶
15
+
16
+ == Asciidoctor
17
+
18
+ Asciidoctor is a fast, open source text processor and publishing toolchain.
19
+
20
+ == Content
21
+
22
+
23
+
24
+ == AsciiDoc
25
+
26
+ AsciiDoc is a lightweight and semantic markup language primarily designed for writing technical documentation.
@@ -1,6 +1,6 @@
1
1
  // .source-rouge
2
2
  // Demonstration of source highlighting with Rouge
3
- // :include: //div[@class="slides"]
3
+ // :include: //div[@class="slides"] | //head//style[last()]
4
4
  // :header_footer:
5
5
  = Source Code with Rouge
6
6
  :icons: font
@@ -0,0 +1,15 @@
1
+ <style>
2
+ svg rect,
3
+ svg ellipse,
4
+ svg path {
5
+ transition: transform 330ms ease-in-out
6
+ }
7
+ svg rect:hover,
8
+ svg ellipse:hover {
9
+ transform: translateX(5px);
10
+ }
11
+
12
+ svg path:hover {
13
+ transform: translateX(-5px);
14
+ }
15
+ </style>
@@ -0,0 +1,41 @@
1
+ = SVG Images
2
+ :imagesdir: images/
3
+ :docinfo: private
4
+
5
+ == Options for SVG images
6
+
7
+ When the image target is an SVG, the `options` attribute (often abbreviated as `opts`) on the macro accepts one of the following values to control how the SVG is referenced:
8
+
9
+ * _none_ (default)
10
+ * `interactive`
11
+ * `inline`
12
+
13
+ The following slide demonstrates the impact these options have.
14
+
15
+ == None (default)
16
+
17
+ Observe that the SVG does not respond to the hover event.
18
+
19
+ [literal]
20
+ image::sample.svg[Static,300]
21
+
22
+ image::sample.svg[Static,300]
23
+
24
+ == Interactive
25
+
26
+ Observe that the color changes when hovering over the SVG.
27
+
28
+ [literal]
29
+ image::sample.svg[Interactive,300,opts=interactive]
30
+
31
+ image::sample.svg[Interactive,300,opts=interactive]
32
+
33
+ == Inline
34
+
35
+ Observe that the color changes when hovering over the SVG.
36
+ The SVG also inherits CSS from the document stylesheets.
37
+
38
+ [literal]
39
+ image::sample.svg[Embedded,300,opts=inline]
40
+
41
+ image::sample.svg[Embedded,300,opts=inline]
@@ -0,0 +1,34 @@
1
+ // .text-formatting
2
+ // :include: //div[@class="slides"]
3
+ // :header_footer:
4
+ = Text Formatting and Punctuation
5
+
6
+ == Emphasis
7
+
8
+ An italic _word_, and an italic _phrase of text_.
9
+
10
+ == Strong
11
+
12
+ A bold *word*, and a bold *phrase of text*.
13
+
14
+ == Code
15
+
16
+ "`Wait!`" Indigo plucked a small vial from her desk's top drawer
17
+ and held it toward us.
18
+ The vial's label read: `E=mc^2^`; the `E` represents _energy_,
19
+ but also pure _genius!_
20
+
21
+ == Superscript and Subscript
22
+
23
+ Well the H~2~O formula written on their whiteboard could be part
24
+ of a shopping list, but I don't think the local bodega sells
25
+ E=mc^2^.
26
+
27
+ == Quotation Marks and Apostrophes
28
+
29
+ "`What kind of charm?`" Lazarus asked.
30
+ "`An odoriferous one or a mineral one?`"
31
+
32
+ Kizmet shrugged.
33
+ "`The note from Olaf's desk says '`wormwood and licorice,`'
34
+ but these could be normal groceries for werewolves.`"