asciidoctor-revealjs 1.1.3 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.adoc +72 -0
  3. data/Gemfile +2 -0
  4. data/HACKING.adoc +29 -14
  5. data/LICENSE.adoc +1 -1
  6. data/README.adoc +239 -23
  7. data/Rakefile +22 -1
  8. data/asciidoctor-revealjs.gemspec +6 -4
  9. data/examples/background-color.adoc +45 -0
  10. data/examples/background-color.css +18 -0
  11. data/examples/history-regression-tests.adoc +12 -2
  12. data/examples/images.adoc +32 -0
  13. data/examples/revealjs-features.adoc +23 -0
  14. data/examples/revealjs-plugin-activation.adoc +16 -0
  15. data/examples/revealjs-plugins-conf.js +10 -0
  16. data/examples/revealjs-plugins.adoc +16 -0
  17. data/examples/revealjs-plugins.js +2 -0
  18. data/examples/revealjs-plugins/chalkboard/README.md +124 -0
  19. data/examples/revealjs-plugins/chalkboard/chalkboard.js +1288 -0
  20. data/examples/revealjs-plugins/chalkboard/img/blackboard.png +0 -0
  21. data/examples/revealjs-plugins/chalkboard/img/boardmarker.png +0 -0
  22. data/examples/revealjs-plugins/chalkboard/img/chalk.png +0 -0
  23. data/examples/revealjs-plugins/chalkboard/img/sponge.png +0 -0
  24. data/examples/revealjs-plugins/chalkboard/img/whiteboard.png +0 -0
  25. data/examples/revealjs-plugins/reveal.js-menu/CONTRIBUTING.md +9 -0
  26. data/examples/revealjs-plugins/reveal.js-menu/LICENSE +19 -0
  27. data/examples/revealjs-plugins/reveal.js-menu/README.md +334 -0
  28. data/examples/revealjs-plugins/reveal.js-menu/bower.json +21 -0
  29. data/examples/revealjs-plugins/reveal.js-menu/font-awesome/LICENSE.txt +34 -0
  30. data/examples/revealjs-plugins/reveal.js-menu/font-awesome/css/all.css +5 -0
  31. data/examples/revealjs-plugins/reveal.js-menu/font-awesome/css/brands.css +5 -0
  32. data/examples/revealjs-plugins/reveal.js-menu/font-awesome/css/fontawesome.css +5 -0
  33. data/examples/revealjs-plugins/reveal.js-menu/font-awesome/css/regular.css +5 -0
  34. data/examples/revealjs-plugins/reveal.js-menu/font-awesome/css/solid.css +5 -0
  35. data/examples/revealjs-plugins/reveal.js-menu/font-awesome/css/svg-with-js.css +5 -0
  36. data/examples/revealjs-plugins/reveal.js-menu/font-awesome/css/v4-shims.css +2170 -0
  37. data/examples/revealjs-plugins/reveal.js-menu/font-awesome/css/v4-shims.min.css +5 -0
  38. data/examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-brands-400.eot +0 -0
  39. data/examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-brands-400.svg +1127 -0
  40. data/examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-brands-400.ttf +0 -0
  41. data/examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-brands-400.woff +0 -0
  42. data/examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-brands-400.woff2 +0 -0
  43. data/examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-regular-400.eot +0 -0
  44. data/examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-regular-400.svg +467 -0
  45. data/examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-regular-400.ttf +0 -0
  46. data/examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-regular-400.woff +0 -0
  47. data/examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-regular-400.woff2 +0 -0
  48. data/examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-solid-900.eot +0 -0
  49. data/examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-solid-900.svg +2231 -0
  50. data/examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-solid-900.ttf +0 -0
  51. data/examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-solid-900.woff +0 -0
  52. data/examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-solid-900.woff2 +0 -0
  53. data/examples/revealjs-plugins/reveal.js-menu/menu.css +345 -0
  54. data/examples/revealjs-plugins/reveal.js-menu/menu.js +949 -0
  55. data/examples/revealjs-plugins/reveal.js-menu/package.json +22 -0
  56. data/examples/slide-numbers-custom.adoc +18 -0
  57. data/examples/slide-numbers-for-speaker.adoc +23 -0
  58. data/examples/slide-numbers-no.adoc +18 -0
  59. data/examples/slide-numbers.adoc +28 -0
  60. data/examples/source-callouts.adoc +11 -1
  61. data/examples/source-highlightjs.adoc +9 -0
  62. data/examples/speaker-notes.adoc +25 -2
  63. data/lib/asciidoctor-revealjs.rb +1 -0
  64. data/lib/asciidoctor-revealjs/converter.rb +655 -542
  65. data/lib/asciidoctor-revealjs/version.rb +1 -1
  66. data/templates/admonition.html.slim +2 -3
  67. data/templates/asciidoctor_revealjs.css.slim +14 -0
  68. data/templates/document.html.slim +69 -26
  69. data/templates/helpers.rb +23 -0
  70. data/templates/listing.html.slim +35 -35
  71. data/templates/notes.html.slim +1 -0
  72. data/templates/open.html.slim +7 -4
  73. data/templates/section.html.slim +2 -8
  74. data/templates/sidebar.html.slim +8 -5
  75. data/templates/toc.html.slim +2 -2
  76. metadata +81 -11
@@ -1,5 +1,5 @@
1
1
  module Asciidoctor
2
2
  module Revealjs
3
- VERSION = '1.1.3'
3
+ VERSION = '2.0.0'
4
4
  end
5
5
  end
@@ -1,6 +1,5 @@
1
- - if (has_role? 'aside') or (has_role? 'speaker')
2
- aside.notes
3
- =content
1
+ - if (has_role? 'aside') or (has_role? 'speaker') or (has_role? 'notes')
2
+ include notes.html.slim
4
3
  - else
5
4
  .admonitionblock id=@id class=[(attr :name),role]
6
5
  table: tr
@@ -0,0 +1,14 @@
1
+ /! This CSS is generated by the Asciidoctor-Reveal.js converter to further integrate AsciiDoc's existing semantic with Reveal.js
2
+ css:
3
+ .reveal div.right {
4
+ float: right;
5
+ }
6
+
7
+ /* callouts */
8
+ .conum[data-value] {display:inline-block;color:#fff!important;background-color:rgba(50,150,50,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
9
+ .conum[data-value] *{color:#fff!important}
10
+ .conum[data-value]+b{display:none}
11
+ .conum[data-value]:after{content:attr(data-value)}
12
+ pre .conum[data-value]{position:relative;top:-.125em}
13
+ b.conum *{color:inherit!important}
14
+ .conum:not([data-value]):empty{display:none}
@@ -2,7 +2,10 @@ doctype 5
2
2
  html lang=(attr :lang, 'en' unless attr? :nolang)
3
3
  head
4
4
  meta charset="utf-8"
5
- - revealjsdir = (attr :revealjsdir, 'reveal.js')
5
+ - if RUBY_ENGINE == 'opal' && JAVASCRIPT_PLATFORM == 'node'
6
+ - revealjsdir = (attr :revealjsdir, 'node_modules/reveal.js')
7
+ - else
8
+ - revealjsdir = (attr :revealjsdir, 'reveal.js')
6
9
  - unless (asset_uri_scheme = (attr 'asset-uri-scheme', 'https')).empty?
7
10
  - asset_uri_scheme = %(#{asset_uri_scheme}:)
8
11
  - cdn_base = %(#{asset_uri_scheme}//cdnjs.cloudflare.com/ajax/libs)
@@ -19,6 +22,7 @@ html lang=(attr :lang, 'en' unless attr? :nolang)
19
22
  link rel='stylesheet' href=(attr :revealjs_customtheme) id='theme'
20
23
  - else
21
24
  link rel='stylesheet' href='#{revealjsdir}/css/theme/#{attr 'revealjs_theme', 'black'}.css' id='theme'
25
+ include asciidoctor_revealjs.css.slim
22
26
  - if attr? :icons, 'font'
23
27
  - if attr? 'iconfont-remote'
24
28
  link rel='stylesheet' href=(attr 'iconfont-cdn', %(#{cdn_base}/font-awesome/4.3.0/css/font-awesome.min.css))
@@ -42,7 +46,7 @@ html lang=(attr :lang, 'en' unless attr? :nolang)
42
46
  TeX: {#{eqnums_opt}}
43
47
  });
44
48
  script src='#{cdn_base}/mathjax/2.4.0/MathJax.js?config=TeX-MML-AM_HTMLorMML'
45
- - case attr 'source-highlighter'
49
+ - case document.attr 'source-highlighter'
46
50
  - when 'coderay'
47
51
  - if (attr 'coderay-css', 'class') == 'class'
48
52
  - if @safe >= Asciidoctor::SafeMode::SECURE || (attr? :linkcss)
@@ -109,16 +113,35 @@ html lang=(attr :lang, 'en' unless attr? :nolang)
109
113
  script src="#{revealjsdir}/lib/js/head.min.js"
110
114
  script src="#{revealjsdir}/js/reveal.js"
111
115
  javascript:
116
+ Array.prototype.slice.call(document.querySelectorAll('.slides section')).forEach(function(slide) {
117
+ if (slide.getAttribute('data-background-color')) return;
118
+ // user needs to explicitly say he wants CSS color to override otherwise we might break custom css or theme (#226)
119
+ if (!(slide.classList.contains('canvas') || slide.classList.contains('background'))) return;
120
+ var bgColor = getComputedStyle(slide).backgroundColor;
121
+ if (bgColor !== 'rgba(0, 0, 0, 0)' && bgColor !== 'transparent') {
122
+ slide.setAttribute('data-background-color', bgColor);
123
+ slide.style.backgroundColor = 'transparent';
124
+ }
125
+ })
126
+
112
127
  // See https://github.com/hakimel/reveal.js#configuration for a full list of configuration options
113
128
  Reveal.initialize({
114
- // Display controls in the bottom right corner
129
+ // Display presentation control arrows
115
130
  controls: #{to_boolean(attr 'revealjs_controls', true)},
131
+ // Help the user learn the controls by providing hints, for example by
132
+ // bouncing the down arrow when they first encounter a vertical slide
133
+ controlsTutorial: #{to_boolean(attr 'revealjs_controlsTutorial', true)},
134
+ // Determines where controls appear, "edges" or "bottom-right"
135
+ controlsLayout: '#{attr 'revealjs_controlsLayout', 'bottom-right'}',
136
+ // Visibility rule for backwards navigation arrows; "faded", "hidden"
137
+ // or "visible"
138
+ controlsBackArrows: '#{attr 'revealjs_controlsBackArrows', 'faded'}',
116
139
  // Display a presentation progress bar
117
140
  progress: #{to_boolean(attr 'revealjs_progress', true)},
118
- // Set a per-slide timing for speaker notes, null means none
119
- defaultTiming: #{attr 'revealjs_defaultTiming', 'null'},
120
141
  // Display the page number of the current slide
121
- slideNumber: #{to_boolean(attr 'revealjs_slidenumber', false)},
142
+ slideNumber: #{to_valid_slidenumber(attr 'revealjs_slidenumber', false)},
143
+ // Control which views the slide number displays on
144
+ showSlideNumber: '#{attr 'revealjs_showslidenumber', 'all'}',
122
145
  // Push each slide change to the browser history
123
146
  history: #{to_boolean(attr 'revealjs_history', false)},
124
147
  // Enable keyboard shortcuts for navigation
@@ -137,6 +160,9 @@ html lang=(attr :lang, 'en' unless attr? :nolang)
137
160
  shuffle: #{to_boolean(attr 'revealjs_shuffle', false)},
138
161
  // Turns fragments on and off globally
139
162
  fragments: #{to_boolean(attr 'revealjs_fragments', true)},
163
+ // Flags whether to include the current fragment in the URL,
164
+ // so that reloading brings you to the same fragment position
165
+ fragmentInURL: #{to_boolean(attr 'revealjs_fragmentInURL', false)},
140
166
  // Flags if the presentation is running in an embedded mode,
141
167
  // i.e. contained within a limited portion of the screen
142
168
  embedded: #{to_boolean(attr 'revealjs_embedded', false)},
@@ -153,30 +179,42 @@ html lang=(attr :lang, 'en' unless attr? :nolang)
153
179
  // Number of milliseconds between automatically proceeding to the
154
180
  // next slide, disabled when set to 0, this value can be overwritten
155
181
  // by using a data-autoslide attribute on your slides
156
- autoSlide: #{attr 'revealjs_autoslide', 0},
182
+ autoSlide: #{attr 'revealjs_autoSlide', 0},
157
183
  // Stop auto-sliding after user input
158
- autoSlideStoppable: #{to_boolean(attr 'revealjs_autoslidestoppable', true)},
184
+ autoSlideStoppable: #{to_boolean(attr 'revealjs_autoSlideStoppable', true)},
185
+ // Use this method for navigation when auto-sliding
186
+ autoSlideMethod: #{attr 'revealjs_autoSlideMethod', 'Reveal.navigateNext'},
187
+ // Specify the average time in seconds that you think you will spend
188
+ // presenting each slide. This is used to show a pacing timer in the
189
+ // speaker view
190
+ defaultTiming: #{attr 'revealjs_defaultTiming', 120},
159
191
  // Enable slide navigation via mouse wheel
160
- mouseWheel: #{to_boolean(attr 'revealjs_mousewheel', false)},
192
+ mouseWheel: #{to_boolean(attr 'revealjs_mouseWheel', false)},
161
193
  // Hides the address bar on mobile devices
162
- hideAddressBar: #{to_boolean(attr 'revealjs_hideaddressbar', true)},
194
+ hideAddressBar: #{to_boolean(attr 'revealjs_hideAddressBar', true)},
163
195
  // Opens links in an iframe preview overlay
164
- previewLinks: #{to_boolean(attr 'revealjs_previewlinks', false)},
165
- // Theme (e.g., beige, black, league, night, serif, simple, sky, solarized, white)
166
- // NOTE setting the theme in the config no longer works in reveal.js 3.x
167
- //theme: Reveal.getQueryHash().theme || '#{attr 'revealjs_theme', 'black'}',
196
+ // Add `data-preview-link` and `data-preview-link="false"` to customise each link
197
+ // individually
198
+ previewLinks: #{to_boolean(attr 'revealjs_previewLinks', false)},
168
199
  // Transition style (e.g., none, fade, slide, convex, concave, zoom)
169
- transition: Reveal.getQueryHash().transition || '#{attr 'revealjs_transition', 'slide'}',
200
+ transition: '#{attr 'revealjs_transition', 'slide'}',
170
201
  // Transition speed (e.g., default, fast, slow)
171
- transitionSpeed: '#{attr 'revealjs_transitionspeed', 'default'}',
202
+ transitionSpeed: '#{attr 'revealjs_transitionSpeed', 'default'}',
172
203
  // Transition style for full page slide backgrounds (e.g., none, fade, slide, convex, concave, zoom)
173
- backgroundTransition: '#{attr 'revealjs_backgroundtransition', 'fade'}',
204
+ backgroundTransition: '#{attr 'revealjs_backgroundTransition', 'fade'}',
174
205
  // Number of slides away from the current that are visible
175
- viewDistance: #{attr 'revealjs_viewdistance', 3},
206
+ viewDistance: #{attr 'revealjs_viewDistance', 3},
176
207
  // Parallax background image (e.g., "'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'")
177
- parallaxBackgroundImage: '#{attr 'revealjs_parallaxbackgroundimage', ''}',
208
+ parallaxBackgroundImage: '#{attr 'revealjs_parallaxBackgroundImage', ''}',
178
209
  // Parallax background size in CSS syntax (e.g., "2100px 900px")
179
- parallaxBackgroundSize: '#{attr 'revealjs_parallaxbackgroundsize', ''}',
210
+ parallaxBackgroundSize: '#{attr 'revealjs_parallaxBackgroundSize', ''}',
211
+ // Number of pixels to move the parallax background per slide
212
+ // - Calculated automatically unless specified
213
+ // - Set to 0 to disable movement along an axis
214
+ parallaxBackgroundHorizontal: #{attr 'revealjs_parallaxBackgroundHorizontal', 'null'},
215
+ parallaxBackgroundVertical: #{attr 'revealjs_parallaxBackgroundVertical', 'null'},
216
+ // The display mode that will be used to show slides
217
+ display: '#{attr 'revealjs_display', 'block'}',
180
218
 
181
219
  // The "normal" size of the presentation, aspect ratio will be preserved
182
220
  // when the presentation is scaled to fit different resolutions. Can be
@@ -194,12 +232,17 @@ html lang=(attr :lang, 'en' unless attr? :nolang)
194
232
  // Optional libraries used to extend on reveal.js
195
233
  dependencies: [
196
234
  { src: '#{revealjsdir}/lib/js/classList.js', condition: function() { return !document.body.classList; } },
197
- { src: '#{revealjsdir}/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
198
- { src: '#{revealjsdir}/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
199
- #{(attr? 'source-highlighter', 'highlightjs') ? "{ src: '#{revealjsdir}/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }," : nil}
200
- { src: '#{revealjsdir}/plugin/zoom-js/zoom.js', async: true },
201
- { src: '#{revealjsdir}/plugin/notes/notes.js', async: true }
202
- ]
235
+ #{(document.attr? 'source-highlighter', 'highlightjs') ? "{ src: '#{revealjsdir}/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }," : nil}
236
+ #{(attr? 'revealjs_plugin_zoom', 'disabled') ? "" : "{ src: '#{revealjsdir}/plugin/zoom-js/zoom.js', async: true }," }
237
+ #{(attr? 'revealjs_plugin_notes', 'disabled') ? "" : "{ src: '#{revealjsdir}/plugin/notes/notes.js', async: true }," }
238
+ #{(attr? 'revealjs_plugin_marked', 'enabled') ? "{ src: '#{revealjsdir}/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }," : "" }
239
+ #{(attr? 'revealjs_plugin_markdown', 'enabled') ? "{ src: '#{revealjsdir}/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }," : "" }
240
+ #{(attr? 'revealjs_plugin_pdf', 'enabled') ? "{ src: '#{revealjsdir}/plugin/print-pdf/print-pdf.js', async: true }," : "" }
241
+ #{(attr? 'revealjs_plugins') ? File.read(attr('revealjs_plugins', '')) : ""}
242
+ ],
243
+
244
+ #{(attr? 'revealjs_plugins_configuration') ? File.read(attr('revealjs_plugins_configuration', '')) : ""}
245
+
203
246
  });
204
247
  - unless (docinfo_content = (docinfo :footer, '.html')).empty?
205
248
  =docinfo_content
@@ -24,6 +24,15 @@ module Slim::Helpers
24
24
  val && val != 'false' && val.to_s != '0' || false
25
25
  end
26
26
 
27
+ # false needs to be verbatim everything else is a string.
28
+ # Calling side isn't responsible for quoting so we are doing it here
29
+ def to_valid_slidenumber val
30
+ # corner case: empty is empty attribute which is true
31
+ return true if val == ""
32
+ # using to_s here handles both the 'false' string and the false boolean
33
+ val.to_s == 'false' ? false : "'#{val}'"
34
+ end
35
+
27
36
  ##
28
37
  # These constants and functions are from the asciidictor-html5s project
29
38
  # https://github.com/jirutka/asciidoctor-html5s/blob/a71db48a1dd5196b668b3a3d93693c5d877c5bf3/data/templates/helpers.rb
@@ -92,6 +101,20 @@ module Slim::Helpers
92
101
  end
93
102
  end
94
103
 
104
+
105
+ # Between delimiters (--) is code taken from asciidoctor-bespoke 1.0.0.alpha.1
106
+ # Licensed under MIT, Copyright (C) 2015-2016 Dan Allen and the Asciidoctor Project
107
+ #--
108
+ # Retrieve the converted content, wrap it in a `<p>` element if
109
+ # the content_model equals :simple and return the result.
110
+ #
111
+ # Returns the block content as a String, wrapped inside a `<p>` element if
112
+ # the content_model equals `:simple`.
113
+ def resolve_content
114
+ @content_model == :simple ? %(<p>#{content}</p>) : content
115
+ end
116
+ #--
117
+
95
118
  end
96
119
 
97
120
  # More custom functions can be added in another namespace if required
@@ -1,35 +1,35 @@
1
- .listingblock id=@id class=role
2
- - if title?
3
- .title=captioned_title
4
- .content
5
- - nowrap = !(@document.attr? :prewrap) || (option? 'nowrap')
6
- / implicit listing blocks and source blocks are rendered as code
7
- / explicit listing blocks stay listing
8
- - if @style == 'source' || (@style == 'listing' && attributes[1] != 'listing')
9
- - language = attr :language
10
- - code_class = language ? [language, "language-#{language}"] : nil
11
- - pre_class = ['highlight']
12
- - pre_lang = nil
13
- - code_noescape = false
14
- - case attr 'source-highlighter'
15
- - when 'coderay'
16
- - pre_class = ['CodeRay']
17
- - when 'pygments'
18
- - pre_class = ['pygments','highlight']
19
- - when 'prettify'
20
- - pre_class = ['prettyprint']
21
- - pre_class << 'linenums' if attr? :linenums
22
- - pre_class << language if language
23
- - pre_class << "language-#{language}" if language
24
- - code_class = nil
25
- - when 'html-pipeline'
26
- - pre_lang = language
27
- - pre_class = code_class = nil
28
- - nowrap = false
29
- - when 'highlightjs', 'highlight.js'
30
- - code_noescape=true
31
- - pre_class << 'nowrap' if nowrap
32
- pre class=pre_class lang=pre_lang
33
- code data-noescape=code_noescape class=code_class =content
34
- - else
35
- pre class=(nowrap ? 'nowrap' : nil) =content
1
+ - if title?
2
+ .title=captioned_title
3
+ - nowrap = !(@document.attr? :prewrap) || (option? 'nowrap')
4
+ / implicit listing blocks and source blocks are rendered as code
5
+ / explicit listing blocks stay listing
6
+ - if @style == 'source' || (@style == 'listing' && attributes[1] != 'listing')
7
+ - language = attr :language
8
+ - code_class = language ? [language, "language-#{language}"] : nil
9
+ - pre_class = ['highlight']
10
+ - pre_lang = nil
11
+ - code_noescape = false
12
+ - case document.attr 'source-highlighter'
13
+ - when 'coderay'
14
+ - pre_class = ['CodeRay']
15
+ - when 'pygments'
16
+ - pre_class = ['pygments','highlight']
17
+ - when 'prettify'
18
+ - pre_class = ['prettyprint']
19
+ - pre_class << 'linenums' if attr? :linenums
20
+ - pre_class << language if language
21
+ - pre_class << "language-#{language}" if language
22
+ - code_class = nil
23
+ - when 'html-pipeline'
24
+ - pre_lang = language
25
+ - pre_class = code_class = nil
26
+ - nowrap = false
27
+ - when 'highlightjs', 'highlight.js'
28
+ - code_noescape=true
29
+ - pre_class << 'nowrap' if nowrap
30
+ - pre_class << 'listingblock'
31
+ - pre_class << role if role
32
+ pre class=pre_class lang=pre_lang id=@id
33
+ code data-noescape=code_noescape class=code_class =content
34
+ - else
35
+ pre class=(nowrap ? 'nowrap' : nil) =content
@@ -0,0 +1 @@
1
+ aside.notes =resolve_content
@@ -9,7 +9,10 @@
9
9
  - elsif @style == 'partintro' && (@level != 0 || @parent.context != :section || @document.doctype != 'book')
10
10
  - puts 'asciidoctor: ERROR: partintro block can only be used when doctype is book and it\'s a child of a book part. Excluding block content.'
11
11
  - else
12
- .openblock id=@id class=[(@style != 'open' ? @style : nil),role]
13
- - if title?
14
- .title=title
15
- .content=content
12
+ - if (has_role? 'aside') or (has_role? 'speaker') or (has_role? 'notes')
13
+ include notes.html.slim
14
+ - else
15
+ .openblock id=@id class=[(@style != 'open' ? @style : nil),role]
16
+ - if title?
17
+ .title=title
18
+ .content=content
@@ -1,10 +1,4 @@
1
1
  / OPTIONS PROCESSING
2
- / strip IDs the same way revealjs does to make links to direct slides work using URL fragments gh#127
3
- / Strip unallowed characters globally then strip anything non a-Z from start of string until something matches
4
- / TODO remove when hakimel/reveal.js#1230 is fixed
5
- - _id = id.gsub(/[^a-zA-Z0-9\-\_\:\.]/, '').gsub(/^[^a-zA-Z]+/, '')
6
-
7
-
8
2
  / hide slides on %conceal, %notitle and named "!"
9
3
  - titleless = (title = self.title) == '!'
10
4
  - hide_title = (titleless || (option? :notitle) || (option? :conceal))
@@ -43,7 +37,7 @@
43
37
  - if @level == 1 && !vertical_slides.empty?
44
38
  section
45
39
  / TODO: try to get rid of duplication w/ standalone slide section
46
- section(id=(titleless ? nil : _id)
40
+ section(id=(titleless ? nil : id)
47
41
  class=roles
48
42
  data-transition=(attr 'transition')
49
43
  data-transition-speed=(attr 'transition-speed')
@@ -72,7 +66,7 @@
72
66
  h level=(@level) =title
73
67
  =content.chomp
74
68
  - else
75
- section(id=(titleless ? nil : _id)
69
+ section(id=(titleless ? nil : id)
76
70
  class=roles
77
71
  data-transition=(attr 'transition')
78
72
  data-transition-speed=(attr 'transition-speed')
@@ -1,5 +1,8 @@
1
- .sidebarblock id=@id class=role
2
- .content
3
- - if title?
4
- .title=title
5
- =content
1
+ - if (has_role? 'aside') or (has_role? 'speaker') or (has_role? 'notes')
2
+ include notes.html.slim
3
+ - else
4
+ .sidebarblock id=@id class=role
5
+ .content
6
+ - if title?
7
+ .title=title
8
+ =content
@@ -11,7 +11,7 @@
11
11
  / div id=toc_id class=toc_role
12
12
  / .title id=toc_title_id =toc_title
13
13
  / =Asciidoctor::HTML5::DocumentTemplate.outline(@document, toc_levels)
14
- #toc class=(attr 'toc-class', 'toc')
15
- #toctitle =(attr 'toc-title')
14
+ #toc class=(document.attr 'toc-class', 'toc')
15
+ #toctitle =(document.attr 'toc-title')
16
16
  / Renders block_outline.html.
17
17
  = converter.convert document, 'outline'
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: asciidoctor-revealjs
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.3
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Olivier Bilodeau
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-31 00:00:00.000000000 Z
11
+ date: 2019-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: asciidoctor
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 1.5.6
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '2.1'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: 1.5.6
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '2.1'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: thread_safe
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -38,6 +44,20 @@ dependencies:
38
44
  - - "~>"
39
45
  - !ruby/object:Gem::Version
40
46
  version: 0.3.5
47
+ - !ruby/object:Gem::Dependency
48
+ name: concurrent-ruby
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - "~>"
52
+ - !ruby/object:Gem::Version
53
+ version: '1.0'
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - "~>"
59
+ - !ruby/object:Gem::Version
60
+ version: '1.0'
41
61
  - !ruby/object:Gem::Dependency
42
62
  name: rake
43
63
  requirement: !ruby/object:Gem::Requirement
@@ -58,14 +78,14 @@ dependencies:
58
78
  requirements:
59
79
  - - '='
60
80
  - !ruby/object:Gem::Version
61
- version: 2.0.0.beta.4
81
+ version: 2.0.0.beta.5
62
82
  type: :development
63
83
  prerelease: false
64
84
  version_requirements: !ruby/object:Gem::Requirement
65
85
  requirements:
66
86
  - - '='
67
87
  - !ruby/object:Gem::Version
68
- version: 2.0.0.beta.4
88
+ version: 2.0.0.beta.5
69
89
  - !ruby/object:Gem::Dependency
70
90
  name: pry
71
91
  requirement: !ruby/object:Gem::Requirement
@@ -114,14 +134,14 @@ dependencies:
114
134
  requirements:
115
135
  - - "~>"
116
136
  - !ruby/object:Gem::Version
117
- version: 0.3.0
137
+ version: 0.4.2
118
138
  type: :development
119
139
  prerelease: false
120
140
  version_requirements: !ruby/object:Gem::Requirement
121
141
  requirements:
122
142
  - - "~>"
123
143
  - !ruby/object:Gem::Version
124
- version: 0.3.0
144
+ version: 0.4.2
125
145
  - !ruby/object:Gem::Dependency
126
146
  name: slim
127
147
  requirement: !ruby/object:Gem::Requirement
@@ -173,6 +193,8 @@ files:
173
193
  - examples/README.adoc
174
194
  - examples/admonitions-icons.adoc
175
195
  - examples/admonitions.adoc
196
+ - examples/background-color.adoc
197
+ - examples/background-color.css
176
198
  - examples/concealed-slide-titles.adoc
177
199
  - examples/customcss.adoc
178
200
  - examples/customcss.css
@@ -190,7 +212,54 @@ files:
190
212
  - examples/keyboard-shortcuts.adoc
191
213
  - examples/level-sections.adoc
192
214
  - examples/multi-destination-content.adoc
215
+ - examples/revealjs-features.adoc
216
+ - examples/revealjs-plugin-activation.adoc
217
+ - examples/revealjs-plugins-conf.js
218
+ - examples/revealjs-plugins.adoc
219
+ - examples/revealjs-plugins.js
220
+ - examples/revealjs-plugins/chalkboard/README.md
221
+ - examples/revealjs-plugins/chalkboard/chalkboard.js
222
+ - examples/revealjs-plugins/chalkboard/img/blackboard.png
223
+ - examples/revealjs-plugins/chalkboard/img/boardmarker.png
224
+ - examples/revealjs-plugins/chalkboard/img/chalk.png
225
+ - examples/revealjs-plugins/chalkboard/img/sponge.png
226
+ - examples/revealjs-plugins/chalkboard/img/whiteboard.png
227
+ - examples/revealjs-plugins/reveal.js-menu/CONTRIBUTING.md
228
+ - examples/revealjs-plugins/reveal.js-menu/LICENSE
229
+ - examples/revealjs-plugins/reveal.js-menu/README.md
230
+ - examples/revealjs-plugins/reveal.js-menu/bower.json
231
+ - examples/revealjs-plugins/reveal.js-menu/font-awesome/LICENSE.txt
232
+ - examples/revealjs-plugins/reveal.js-menu/font-awesome/css/all.css
233
+ - examples/revealjs-plugins/reveal.js-menu/font-awesome/css/brands.css
234
+ - examples/revealjs-plugins/reveal.js-menu/font-awesome/css/fontawesome.css
235
+ - examples/revealjs-plugins/reveal.js-menu/font-awesome/css/regular.css
236
+ - examples/revealjs-plugins/reveal.js-menu/font-awesome/css/solid.css
237
+ - examples/revealjs-plugins/reveal.js-menu/font-awesome/css/svg-with-js.css
238
+ - examples/revealjs-plugins/reveal.js-menu/font-awesome/css/v4-shims.css
239
+ - examples/revealjs-plugins/reveal.js-menu/font-awesome/css/v4-shims.min.css
240
+ - examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-brands-400.eot
241
+ - examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-brands-400.svg
242
+ - examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-brands-400.ttf
243
+ - examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-brands-400.woff
244
+ - examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-brands-400.woff2
245
+ - examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-regular-400.eot
246
+ - examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-regular-400.svg
247
+ - examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-regular-400.ttf
248
+ - examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-regular-400.woff
249
+ - examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-regular-400.woff2
250
+ - examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-solid-900.eot
251
+ - examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-solid-900.svg
252
+ - examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-solid-900.ttf
253
+ - examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-solid-900.woff
254
+ - examples/revealjs-plugins/reveal.js-menu/font-awesome/webfonts/fa-solid-900.woff2
255
+ - examples/revealjs-plugins/reveal.js-menu/menu.css
256
+ - examples/revealjs-plugins/reveal.js-menu/menu.js
257
+ - examples/revealjs-plugins/reveal.js-menu/package.json
193
258
  - examples/revealjs-stretch.adoc
259
+ - examples/slide-numbers-custom.adoc
260
+ - examples/slide-numbers-for-speaker.adoc
261
+ - examples/slide-numbers-no.adoc
262
+ - examples/slide-numbers.adoc
194
263
  - examples/slide-state.adoc
195
264
  - examples/slide-state.css
196
265
  - examples/source-callouts.adoc
@@ -215,6 +284,7 @@ files:
215
284
  - lib/asciidoctor-revealjs/version.rb
216
285
  - lib/asciidoctor-templates-compiler.rb
217
286
  - templates/admonition.html.slim
287
+ - templates/asciidoctor_revealjs.css.slim
218
288
  - templates/audio.html.slim
219
289
  - templates/colist.html.slim
220
290
  - templates/dlist.html.slim
@@ -236,6 +306,7 @@ files:
236
306
  - templates/inline_quoted.html.slim
237
307
  - templates/listing.html.slim
238
308
  - templates/literal.html.slim
309
+ - templates/notes.html.slim
239
310
  - templates/olist.html.slim
240
311
  - templates/open.html.slim
241
312
  - templates/outline.html.slim
@@ -266,15 +337,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
266
337
  requirements:
267
338
  - - ">="
268
339
  - !ruby/object:Gem::Version
269
- version: 1.9.3
340
+ version: '0'
270
341
  required_rubygems_version: !ruby/object:Gem::Requirement
271
342
  requirements:
272
343
  - - ">="
273
344
  - !ruby/object:Gem::Version
274
345
  version: '0'
275
346
  requirements: []
276
- rubyforge_project:
277
- rubygems_version: 2.7.3
347
+ rubygems_version: 3.0.2
278
348
  signing_key:
279
349
  specification_version: 4
280
350
  summary: Converts AsciiDoc to HTML for a Reveal.js presentation