asciidoctor-revealjs 3.1.0 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.adoc +86 -0
  3. data/HACKING.adoc +18 -11
  4. data/README.adoc +260 -27
  5. data/Rakefile +12 -4
  6. data/asciidoctor-revealjs.gemspec +4 -2
  7. data/examples/docinfo-footer-revealjs.html +10 -0
  8. data/examples/docinfo-revealjs.html +7 -0
  9. data/examples/font-awesome.adoc +2 -1
  10. data/examples/font-awesome.css +3 -0
  11. data/examples/fragments.adoc +32 -0
  12. data/examples/fragments.css +18 -0
  13. data/examples/grid-layout-docinfo-revealjs.html +11 -0
  14. data/examples/grid-layout.adoc +174 -0
  15. data/examples/history-hash.adoc +19 -0
  16. data/examples/history-regression-tests.adoc +0 -5
  17. data/examples/history.adoc +4 -4
  18. data/examples/images/asciidoctor-logo.svg +102 -0
  19. data/examples/level-sectnums.adoc +24 -0
  20. data/examples/links-preview.adoc +32 -0
  21. data/examples/links.adoc +39 -0
  22. data/examples/release-4.0.adoc +195 -0
  23. data/examples/release-4.0.css +23 -0
  24. data/examples/source-coderay.adoc +15 -0
  25. data/examples/source-emphasis.adoc +128 -0
  26. data/examples/source-highlightjs-html.adoc +1 -1
  27. data/examples/source-highlightjs-languages.adoc +27 -0
  28. data/examples/source-highlightjs.adoc +85 -2
  29. data/examples/source-pygments.adoc +12 -0
  30. data/examples/source-rouge-docinfo.html +8 -0
  31. data/examples/source-rouge.adoc +18 -0
  32. data/examples/video.adoc +12 -3
  33. data/examples/with-docinfo-shared.adoc +13 -0
  34. data/lib/asciidoctor-revealjs/converter.rb +312 -136
  35. data/lib/asciidoctor-revealjs/highlightjs.rb +333 -2
  36. data/lib/asciidoctor-revealjs/version.rb +1 -1
  37. data/templates/asciidoctor-compatibility.css +141 -0
  38. data/templates/document.html.slim +64 -53
  39. data/templates/helpers.rb +93 -1
  40. data/templates/image.html.slim +1 -1
  41. data/templates/inline_anchor.html.slim +2 -1
  42. data/templates/inline_image.html.slim +3 -3
  43. data/templates/listing.html.slim +1 -1
  44. data/templates/section.html.slim +34 -43
  45. data/templates/stretch_nested_elements.js.slim +65 -0
  46. data/templates/title_slide.html.slim +28 -0
  47. metadata +55 -8
  48. data/examples/revealjs-features.adoc +0 -23
  49. data/templates/asciidoctor_revealjs.css.slim +0 -59
@@ -2,7 +2,7 @@
2
2
  // Avoiding regressions with HTML source code inside source block
3
3
  // :include: //div[@class="slides"]
4
4
  // :header_footer:
5
- = HTML Source Code with Highlight.JS
5
+ = HTML Source Code with Highlight.js
6
6
  :icons: font
7
7
  :source-highlighter: highlightjs
8
8
 
@@ -0,0 +1,27 @@
1
+ // .source-highlightjs-languages
2
+ // Demonstration of source highlighting with highlight.js using additional languages
3
+ // :include: //div[@class="slides"] | //body/script
4
+ // :header_footer:
5
+ = Scilab Code with Highlight.js: using additional languages
6
+ :source-highlighter: highlight.js
7
+ :highlightjs-languages: yaml, scilab
8
+
9
+ == Use the Source
10
+
11
+ [source,scilab]
12
+ ----
13
+ function B=gauss_filter_3_3(A)
14
+ x=size(A,2);
15
+ y=size(A,1);
16
+ B = zeros(y, x);
17
+ for j = 2:y-1
18
+ for i= 2:x-1
19
+ val= 4*A(j,i)+2*(A(j,i-1)+A(j,i+1)+A(j+1,i)+A(j-1,i))+A(j+1,i+1)+A(j-1,i+1)+A(j+1,i-1)+A(j-1,i-1);
20
+ B(j,i) = val/16;
21
+ end
22
+ end
23
+ endfunction
24
+
25
+ A = rand(10, 10) * 256;
26
+ B = gauss_filter_3_3(A);
27
+ ----
@@ -1,10 +1,11 @@
1
1
  // .source-highlightjs
2
- // Demonstration of source highlighting with highlightjs
2
+ // Demonstration of source highlighting with highlight.js
3
3
  // :include: //div[@class="slides"]
4
4
  // :header_footer:
5
- = Source Code with Highlight.JS
5
+ = Source Code with Highlight.js
6
6
  :icons: font
7
7
  :source-highlighter: highlightjs
8
+ :highlightjs-languages: clojure
8
9
 
9
10
  == Use the Source
10
11
 
@@ -15,6 +16,17 @@ fn main() {
15
16
  }
16
17
  ----
17
18
 
19
+ == Numbered lines
20
+
21
+ With standard `linenums` attribute
22
+
23
+ [source, rust, linenums]
24
+ ----
25
+ fn main() {
26
+ println!("Hello World!");
27
+ }
28
+ ----
29
+
18
30
  == Stretch the Source
19
31
 
20
32
  [source, rust, role="stretch"]
@@ -23,3 +35,74 @@ fn main() {
23
35
  println!("Hello stretched World!");
24
36
  }
25
37
  ----
38
+
39
+ == Marked Source
40
+
41
+ // This example was taken from Reveal.js README
42
+ // https://github.com/hakimel/reveal.js/blob/master/README.md#code-syntax-highlighting
43
+ Using `<mark>` in source requires a `subs="none"` attribute to the source block.
44
+
45
+ [source, clojure, subs="none"]
46
+ ----
47
+ (def lazy-fib
48
+ (concat
49
+ [0 1]
50
+ <mark>((fn rfib [a b]</mark>
51
+ (lazy-cons (+ a b) (rfib b (+ a b)))) 0 1)))
52
+ ----
53
+
54
+ == Highlight Lines in Source
55
+
56
+ // This example was taken from Reveal.js README
57
+ // https://github.com/hakimel/reveal.js/blob/master/README.md#line-numbers--highlights
58
+
59
+ Highlights are using Asciidoctor syntax not reveal.js.
60
+ Ex: `4..8,11` instead of `4-8,11`.
61
+
62
+ [source, javascript, highlight="4..8,11"]
63
+ ----
64
+ import React, { useState } from 'react';
65
+
66
+ function Example() {
67
+ const [count, setCount] = useState(0);
68
+
69
+ return (
70
+ <div>
71
+ <p>You clicked {count} times</p>
72
+ <button onClick={() => setCount(count + 1)}>
73
+ Click me
74
+ </button>
75
+ </div>
76
+ );
77
+ }
78
+ ----
79
+
80
+ == Step by Step Highlights
81
+
82
+ // Requires reveal.js 3.9.0+
83
+ Highlights are using Asciidoctor syntax not reveal.js.
84
+ Ex: `1|2..3|4,6..10` instead of `1|2-3|4,6-10`.
85
+
86
+ [source, javascript, highlight="1|2..3|4,6..10"]
87
+ ----
88
+ import React, { useState } from 'react';
89
+
90
+ function Example() {
91
+ const [count, setCount] = useState(0);
92
+
93
+ return (
94
+ <div>
95
+ <p>You clicked {count} times</p>
96
+ <button onClick={() => setCount(count + 1)}>
97
+ Click me
98
+ </button>
99
+ </div>
100
+ );
101
+ }
102
+ ----
103
+
104
+ == Regression test for issue 338
105
+
106
+ [listing]
107
+ This is an example of a paragraph styled with `listing`.
108
+ Notice that the monospace markup is preserved in the output.
@@ -30,3 +30,15 @@ fn main() {
30
30
  println!("Hello World!");
31
31
  }
32
32
  ----
33
+
34
+ == Pygments Features
35
+
36
+ [source,ruby,highlight="1..2,4..5"]
37
+ ----
38
+ ORDERED_LIST_KEYWORDS = {
39
+ 'loweralpha' => 'a',
40
+ 'lowerroman' => 'i',
41
+ 'upperalpha' => 'A',
42
+ 'upperroman' => 'I',
43
+ }
44
+ ----
@@ -0,0 +1,8 @@
1
+ <style>
2
+ pre.rouge .hll {
3
+ background-color: #ffc;
4
+ }
5
+ pre.rouge .hll * {
6
+ background-color: initial;
7
+ }
8
+ </style>
@@ -6,6 +6,7 @@
6
6
  :icons: font
7
7
  :source-highlighter: rouge
8
8
  :rouge-style: monokai
9
+ :docinfo: private
9
10
 
10
11
  == Requirements
11
12
 
@@ -39,3 +40,20 @@ fn main() {
39
40
  println!("Hello stretched World!");
40
41
  }
41
42
  ----
43
+
44
+ == Rouge Features
45
+
46
+ // TODO missing `hll` class from styles provided Asciidoctor for rouge
47
+ // TODO linenums feature affects listing size
48
+
49
+ This is broken see `TODO` in this source
50
+
51
+ [source,ruby,highlight=2..4]
52
+ ----
53
+ ORDERED_LIST_KEYWORDS = {
54
+ 'loweralpha' => 'a',
55
+ 'lowerroman' => 'i',
56
+ 'upperalpha' => 'A',
57
+ 'upperroman' => 'I',
58
+ }
59
+ ----
@@ -3,17 +3,27 @@
3
3
  // :include: //div[@class="slides"]
4
4
  // :header_footer:
5
5
  = Video tests
6
+ :revealjs_hash: true
6
7
 
7
- == Auto-sized
8
+ == YouTube Auto-sized
8
9
 
9
10
  video::kZH9JtPBq7k[youtube, start=34, options=autoplay]
10
11
  //video::kZH9JtPBq7k[youtube, start=34, height=600, width=800, options=autoplay]
11
12
 
12
13
  [%notitle]
13
- == Auto-sized notitle
14
+ == YouTube Auto-sized notitle
14
15
 
15
16
  video::kZH9JtPBq7k[youtube, start=34, options=autoplay]
16
17
 
18
+ [.notes]
19
+ --
20
+ This video is auto-sized!
21
+ --
22
+
23
+ == Remote Video File Auto-sized
24
+
25
+ video::https://s3.amazonaws.com/static.slid.es/site/homepage/v1/homepage-video-editor.webm[]
26
+
17
27
  [%notitle,background-iframe="https://www.youtube.com/embed/LaApqL4QjH8?rel=0&start=3&enablejsapi=1&autoplay=1&loop=1&controls=0&modestbranding=1"]
18
28
  == background
19
29
 
@@ -23,7 +33,6 @@ video::kZH9JtPBq7k[youtube, start=34, options=autoplay]
23
33
  [background-video="https://s3.amazonaws.com/static.slid.es/site/homepage/v1/homepage-video-editor.mp4,https://s3.amazonaws.com/static.slid.es/site/homepage/v1/homepage-video-editor.webm",options="loop,muted,notitle"]
24
34
  == video file, options
25
35
 
26
-
27
36
  == vimeo autostart
28
37
 
29
38
  video::44878206[vimeo, options=autoplay]
@@ -0,0 +1,13 @@
1
+ // .docinfo-shared
2
+ // Demonstration of docinfo attribute and we provide only head and footer values
3
+ // :include: //head/*[last()] | //div[@class="slides"]/*[last()]
4
+ // :header_footer:
5
+ = Docinfo shared
6
+ :docinfo: shared
7
+
8
+ == Tweet
9
+
10
+ // placeholder
11
+ [#tweet]
12
+ --
13
+ --
@@ -31,6 +31,23 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
31
31
  val && val != 'false' && val.to_s != '0' || false
32
32
  end
33
33
 
34
+ # bool_data_attr
35
+ # If the AsciiDoc attribute doesn't exist, no HTML attribute is added
36
+ # If the AsciiDoc attribute exist and is a true value, HTML attribute is enabled (bool)
37
+ # If the AsciiDoc attribute exist and is a false value, HTML attribute is a false string
38
+ # Ex: a feature is enabled globally but can be disabled using a data- attribute on individual items
39
+ # :revealjs_previewlinks: True
40
+ # then link::example.com[Link text, preview=false]
41
+ # Here the template must have data-preview-link="false" not just no data-preview-link attribute
42
+ def bool_data_attr val
43
+ return false if !attr?(val)
44
+ if attr(val).downcase == 'false' || attr(val) == '0'
45
+ return 'false'
46
+ else
47
+ return true
48
+ end
49
+ end
50
+
34
51
  # false needs to be verbatim everything else is a string.
35
52
  # Calling side isn't responsible for quoting so we are doing it here
36
53
  def to_valid_slidenumber val
@@ -108,6 +125,20 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
108
125
  end
109
126
  end
110
127
 
128
+ def revealjs_dependencies(document, node, revealjsdir)
129
+ dependencies = []
130
+ dependencies << "{ src: '#{revealjsdir}/plugin/zoom-js/zoom.js', async: true }" unless (node.attr? 'revealjs_plugin_zoom', 'disabled')
131
+ dependencies << "{ src: '#{revealjsdir}/plugin/notes/notes.js', async: true }" unless (node.attr? 'revealjs_plugin_notes', 'disabled')
132
+ dependencies << "{ src: '#{revealjsdir}/plugin/markdown/marked.js', async: true }" if (node.attr? 'revealjs_plugin_marked', 'enabled')
133
+ dependencies << "{ src: '#{revealjsdir}/plugin/markdown/markdown.js', async: true }" if (node.attr? 'revealjs_plugin_markdown', 'enabled')
134
+ if (node.attr? 'revealjs_plugins') &&
135
+ !(revealjs_plugins_file = (node.attr 'revealjs_plugins', '').strip).empty? &&
136
+ !(revealjs_plugins_content = (File.read revealjs_plugins_file).strip).empty?
137
+ dependencies << revealjs_plugins_content
138
+ end
139
+ dependencies.join(",\n ")
140
+ end
141
+
111
142
 
112
143
  # Between delimiters (--) is code taken from asciidoctor-bespoke 1.0.0.alpha.1
113
144
  # Licensed under MIT, Copyright (C) 2015-2016 Dan Allen and the Asciidoctor Project
@@ -120,8 +151,69 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
120
151
  def resolve_content
121
152
  @content_model == :simple ? %(<p>#{content}</p>) : content
122
153
  end
123
- #--
124
154
 
155
+ # Capture nested template content and register it with the specified key, to
156
+ # be executed at a later time.
157
+ #
158
+ # This method must be invoked using the control code directive (i.e., -). By
159
+ # using a control code directive, the block is set up to append the result
160
+ # directly to the output buffer. (Integrations often hide the distinction
161
+ # between a control code directive and an output directive in this context).
162
+ #
163
+ # key - The Symbol under which to save the template block.
164
+ # opts - A Hash of options to control processing (default: {}):
165
+ # * :append - A Boolean that indicates whether to append this block
166
+ # to others registered with this key (default: false).
167
+ # * :content - String content to be used if template content is not
168
+ # provided (optional).
169
+ # block - The template content (in Slim template syntax).
170
+ #
171
+ # Examples
172
+ #
173
+ # - content_for :body
174
+ # p content
175
+ # - content_for :body, append: true
176
+ # p more content
177
+ #
178
+ # Returns nothing.
179
+ def content_for key, opts = {}, &block
180
+ @content = {} unless defined? @content
181
+ (opts[:append] ? (@content[key] ||= []) : (@content[key] = [])) << (block_given? ? block : lambda { opts[:content] })
182
+ nil
183
+ end
184
+
185
+ # Checks whether deferred template content has been registered for the specified key.
186
+ #
187
+ # key - The Symbol under which to look for saved template blocks.
188
+ #
189
+ # Returns a Boolean indicating whether content has been registered for this key.
190
+ def content_for? key
191
+ (defined? @content) && (@content.key? key)
192
+ end
193
+
194
+ # Evaluates the deferred template content registered with the specified key.
195
+ #
196
+ # When the corresponding content_for method is invoked using a control code
197
+ # directive, the block is set up to append the result to the output buffer
198
+ # directly.
199
+ #
200
+ # key - The Symbol under which to look for template blocks to yield.
201
+ # opts - A Hash of options to control processing (default: {}):
202
+ # * :drain - A Boolean indicating whether to drain the key of blocks
203
+ # after calling them (default: true).
204
+ #
205
+ # Examples
206
+ #
207
+ # - yield_content :body
208
+ #
209
+ # Returns nothing (assuming the content has been captured in the context of control code).
210
+ def yield_content key, opts = {}
211
+ if (defined? @content) && (blks = (opts.fetch :drain, true) ? (@content.delete key) : @content[key])
212
+ blks.map {|b| b.call }.join
213
+ end
214
+ nil
215
+ end
216
+ #--
125
217
  end
126
218
 
127
219
  # More custom functions can be added in another namespace if required
@@ -144,6 +236,7 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
144
236
  basebackend "html" if respond_to? :basebackend
145
237
  outfilesuffix ".html" if respond_to? :outfilesuffix
146
238
  filetype "html" if respond_to? :filetype
239
+ supports_templates if respond_to? :supports_templates
147
240
 
148
241
  delegate_backend = (opts[:delegate_backend] || "html5").to_s
149
242
  factory = ::Asciidoctor::Converter::Factory
@@ -158,6 +251,7 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
158
251
 
159
252
  def convert(node, transform = nil, opts = {})
160
253
  transform ||= node.node_name
254
+ opts ||= {}
161
255
  converter = respond_to?(transform) ? self : @delegate_converter
162
256
 
163
257
  if opts.empty?
@@ -167,6 +261,10 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
167
261
  end
168
262
  end
169
263
 
264
+ def handles?(transform)
265
+ respond_to?("convert_#{transform}") || respond_to?(transform)
266
+ end
267
+
170
268
  #----------------- Begin of generated transformation methods -----------------#
171
269
 
172
270
 
@@ -343,11 +441,13 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
343
441
  end
344
442
  end
345
443
 
346
- def asciidoctor_revealjs(node, opts = {})
444
+ def stretch_nested_elements(node, opts = {})
347
445
  node.extend(Helpers)
348
446
  node.instance_eval do
349
447
  converter.set_local_variables(binding, opts) unless opts.empty?
350
- _buf = ''; _buf << ("<!--This CSS is generated by the Asciidoctor-Reveal.js converter to further integrate AsciiDoc's existing semantic with Reveal.js--><style type=\"text/css\">.reveal div.right {\n float: right;\n}\n\n.reveal .listingblock.stretch > .content {\n height: 100%;\n}\n\n.reveal .listingblock.stretch > .content > pre {\n height: 100%;\n}\n\n.reveal .listingblock.stretch > .content > pre > code {\n height: 100%;\n max-height: 100%;\n}\n\n/* tables */\ntable{border-collapse:collapse;border-spacing:0}\ntable{margin-bottom:1.25em;border:solid 1px #dedede}\ntable thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;text-align:left}\ntable tr th,table tr td{padding:.5625em .625em;font-size:inherit}\ntable thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.6}\ntd.tableblock>.content{margin-bottom:1.25em}\ntd.tableblock>.content>:last-child{margin-bottom:-1.25em}\ntable.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}\ntable.grid-all>thead>tr>.tableblock,table.grid-all>tbody>tr>.tableblock{border-width:0 1px 1px 0}\ntable.grid-all>tfoot>tr>.tableblock{border-width:1px 1px 0 0}\ntable.grid-cols>*>tr>.tableblock{border-width:0 1px 0 0}\ntable.grid-rows>thead>tr>.tableblock,table.grid-rows>tbody>tr>.tableblock{border-width:0 0 1px}\ntable.grid-rows>tfoot>tr>.tableblock{border-width:1px 0 0}\ntable.grid-all>*>tr>.tableblock:last-child,table.grid-cols>*>tr>.tableblock:last-child{border-right-width:0}\ntable.grid-all>tbody>tr:last-child>.tableblock,table.grid-all>thead:last-child>tr>.tableblock,table.grid-rows>tbody>tr:last-child>.tableblock,table.grid-rows>thead:last-child>tr>.tableblock{border-bottom-width:0}\ntable.frame-all{border-width:1px}\ntable.frame-sides{border-width:0 1px}\ntable.frame-topbot,table.frame-ends{border-width:1px 0}\n.reveal table th.halign-left,.reveal table td.halign-left{text-align:left}\n.reveal table th.halign-right,.reveal table td.halign-right{text-align:right}\n.reveal table th.halign-center,.reveal table td.halign-center{text-align:center}\n.reveal table th.valign-top,.reveal table td.valign-top{vertical-align:top}\n.reveal table th.valign-bottom,.reveal table td.valign-bottom{vertical-align:bottom}\n.reveal table th.valign-middle,.reveal table td.valign-middle{vertical-align:middle}\ntable thead th,table tfoot th{font-weight:bold}\ntbody tr th{display:table-cell;line-height:1.6}\ntbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{font-weight:bold}\nthead{display:table-header-group}\n\n.reveal table.grid-none th,.reveal table.grid-none td{border-bottom:0!important}\n\n/* callouts */\n.conum[data-value]{display:inline-block;color:#fff!important;background:rgba(0,0,0,.8);-webkit-border-radius:50%;border-radius:50%;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}\n.conum[data-value] *{color:#fff!important}\n.conum[data-value]+b{display:none}\n.conum[data-value]::after{content:attr(data-value)}\npre .conum[data-value]{position:relative;top:-.125em}\nb.conum *{color:inherit!important}\n.conum:not([data-value]):empty{display:none}</style>".freeze);
448
+ _buf = ''; _buf << ("<script>var dom = {};\ndom.slides = document.querySelector('.reveal .slides');\n\nfunction getRemainingHeight(element, slideElement, height) {\n height = height || 0;\n if (element) {\n var newHeight, oldHeight = element.style.height;\n // Change the .stretch element height to 0 in order find the height of all\n // the other elements\n element.style.height = '0px';\n // In Overview mode, the parent (.slide) height is set of 700px.\n // Restore it temporarily to its natural height.\n slideElement.style.height = 'auto';\n newHeight = height - slideElement.offsetHeight;\n // Restore the old height, just in case\n element.style.height = oldHeight + 'px';\n // Clear the parent (.slide) height. .removeProperty works in IE9+\n slideElement.style.removeProperty('height');\n return newHeight;\n }\n return height;\n}\n\nfunction layoutSlideContents(width, height) {\n // Handle sizing of elements with the 'stretch' class\n toArray(dom.slides.querySelectorAll('section .stretch')).forEach(function (element) {\n // Determine how much vertical space we can use\n var limit = 5; // hard limit\n var parent = element.parentNode;\n while (parent.nodeName !== 'SECTION' && limit > 0) {\n parent = parent.parentNode;\n limit--;\n }\n if (limit === 0) {\n // unable to find parent, aborting!\n return;\n }\n var remainingHeight = getRemainingHeight(element, parent, height);\n // Consider the aspect ratio of media elements\n if (/(img|video)/gi.test(element.nodeName)) {\n var nw = element.naturalWidth || element.videoWidth, nh = element.naturalHeight || element.videoHeight;\n var es = Math.min(width / nw, remainingHeight / nh);\n element.style.width = (nw * es) + 'px';\n element.style.height = (nh * es) + 'px';\n } else {\n element.style.width = width + 'px';\n element.style.height = remainingHeight + 'px';\n }\n });\n}\n\nfunction toArray(o) {\n return Array.prototype.slice.call(o);\n}\n\nReveal.addEventListener('slidechanged', function () {\n layoutSlideContents(".freeze);
449
+ ;
450
+ ;
351
451
  ;
352
452
  ;
353
453
  ;
@@ -402,10 +502,14 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
402
502
  ;
403
503
  ;
404
504
  ;
505
+ ; _buf << ((attr 'revealjs_width', 960).to_s); _buf << (", ".freeze); _buf << ((attr 'revealjs_height', 700).to_s); _buf << (")\n});\nReveal.addEventListener('ready', function () {\n layoutSlideContents(".freeze);
405
506
  ;
406
507
  ;
508
+ ; _buf << ((attr 'revealjs_width', 960).to_s); _buf << (", ".freeze); _buf << ((attr 'revealjs_height', 700).to_s); _buf << (")\n});\nReveal.addEventListener('resize', function () {\n layoutSlideContents(".freeze);
407
509
  ;
408
510
  ;
511
+ ; _buf << ((attr 'revealjs_width', 960).to_s); _buf << (", ".freeze); _buf << ((attr 'revealjs_height', 700).to_s); _buf << (")\n});</script>".freeze);
512
+ ;
409
513
  ; _buf
410
514
  end
411
515
  end
@@ -429,10 +533,10 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
429
533
  ;
430
534
  ; _buf << ("<div".freeze); _temple_html_attributeremover1 = ''; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "imageblock"; _temple_html_attributemerger1[1] = ''; _slim_codeattributes1 = roles; if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributemerger1[1] << ((_slim_codeattributes1.join(" ")).to_s); else; _temple_html_attributemerger1[1] << ((_slim_codeattributes1).to_s); end; _temple_html_attributemerger1[1]; _temple_html_attributeremover1 << ((_temple_html_attributemerger1.reject(&:empty?).join(" ")).to_s); _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover1).to_s); _buf << ("\"".freeze); end; _slim_codeattributes2 = @id; if _slim_codeattributes2; if _slim_codeattributes2 == true; _buf << (" id".freeze); else; _buf << (" id=\"".freeze); _buf << ((_slim_codeattributes2).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes3 = [("text-align: #{attr :align}" if attr? :align),("float: #{attr :float}" if attr? :float)].compact.join('; '); if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" style".freeze); else; _buf << (" style=\"".freeze); _buf << ((_slim_codeattributes3).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
431
535
  ; if attr? :link;
432
- ; _buf << ("<a class=\"image\"".freeze); _slim_codeattributes4 = (attr :link); if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes4).to_s); _buf << ("\"".freeze); end; end; _buf << ("><img".freeze);
433
- ; _slim_codeattributes5 = image_uri(attr :target); if _slim_codeattributes5; if _slim_codeattributes5 == true; _buf << (" src".freeze); else; _buf << (" src=\"".freeze); _buf << ((_slim_codeattributes5).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes6 = (attr :alt); if _slim_codeattributes6; if _slim_codeattributes6 == true; _buf << (" alt".freeze); else; _buf << (" alt=\"".freeze); _buf << ((_slim_codeattributes6).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes7 = (width); if _slim_codeattributes7; if _slim_codeattributes7 == true; _buf << (" width".freeze); else; _buf << (" width=\"".freeze); _buf << ((_slim_codeattributes7).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes8 = (height); if _slim_codeattributes8; if _slim_codeattributes8 == true; _buf << (" height".freeze); else; _buf << (" height=\"".freeze); _buf << ((_slim_codeattributes8).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes9 = ((attr? :background) ? "background: #{attr :background}" : nil); if _slim_codeattributes9; if _slim_codeattributes9 == true; _buf << (" style".freeze); else; _buf << (" style=\"".freeze); _buf << ((_slim_codeattributes9).to_s); _buf << ("\"".freeze); end; end; _buf << ("></a>".freeze);
536
+ ; _buf << ("<a class=\"image\"".freeze); _slim_codeattributes4 = (attr :link); if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes4).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes5 = (attr :window); if _slim_codeattributes5; if _slim_codeattributes5 == true; _buf << (" target".freeze); else; _buf << (" target=\"".freeze); _buf << ((_slim_codeattributes5).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes6 = (bool_data_attr :link_preview); if _slim_codeattributes6; if _slim_codeattributes6 == true; _buf << (" data-preview-link".freeze); else; _buf << (" data-preview-link=\"".freeze); _buf << ((_slim_codeattributes6).to_s); _buf << ("\"".freeze); end; end; _buf << ("><img".freeze);
537
+ ; _slim_codeattributes7 = image_uri(attr :target); if _slim_codeattributes7; if _slim_codeattributes7 == true; _buf << (" src".freeze); else; _buf << (" src=\"".freeze); _buf << ((_slim_codeattributes7).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes8 = (attr :alt); if _slim_codeattributes8; if _slim_codeattributes8 == true; _buf << (" alt".freeze); else; _buf << (" alt=\"".freeze); _buf << ((_slim_codeattributes8).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes9 = (width); if _slim_codeattributes9; if _slim_codeattributes9 == true; _buf << (" width".freeze); else; _buf << (" width=\"".freeze); _buf << ((_slim_codeattributes9).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes10 = (height); if _slim_codeattributes10; if _slim_codeattributes10 == true; _buf << (" height".freeze); else; _buf << (" height=\"".freeze); _buf << ((_slim_codeattributes10).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes11 = ((attr? :background) ? "background: #{attr :background}" : nil); if _slim_codeattributes11; if _slim_codeattributes11 == true; _buf << (" style".freeze); else; _buf << (" style=\"".freeze); _buf << ((_slim_codeattributes11).to_s); _buf << ("\"".freeze); end; end; _buf << ("></a>".freeze);
434
538
  ; else;
435
- ; _buf << ("<img".freeze); _slim_codeattributes10 = image_uri(attr :target); if _slim_codeattributes10; if _slim_codeattributes10 == true; _buf << (" src".freeze); else; _buf << (" src=\"".freeze); _buf << ((_slim_codeattributes10).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes11 = (attr :alt); if _slim_codeattributes11; if _slim_codeattributes11 == true; _buf << (" alt".freeze); else; _buf << (" alt=\"".freeze); _buf << ((_slim_codeattributes11).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes12 = (width); if _slim_codeattributes12; if _slim_codeattributes12 == true; _buf << (" width".freeze); else; _buf << (" width=\"".freeze); _buf << ((_slim_codeattributes12).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes13 = (height); if _slim_codeattributes13; if _slim_codeattributes13 == true; _buf << (" height".freeze); else; _buf << (" height=\"".freeze); _buf << ((_slim_codeattributes13).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes14 = ((attr? :background) ? "background: #{attr :background}" : nil); if _slim_codeattributes14; if _slim_codeattributes14 == true; _buf << (" style".freeze); else; _buf << (" style=\"".freeze); _buf << ((_slim_codeattributes14).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
539
+ ; _buf << ("<img".freeze); _slim_codeattributes12 = image_uri(attr :target); if _slim_codeattributes12; if _slim_codeattributes12 == true; _buf << (" src".freeze); else; _buf << (" src=\"".freeze); _buf << ((_slim_codeattributes12).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes13 = (attr :alt); if _slim_codeattributes13; if _slim_codeattributes13 == true; _buf << (" alt".freeze); else; _buf << (" alt=\"".freeze); _buf << ((_slim_codeattributes13).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes14 = (width); if _slim_codeattributes14; if _slim_codeattributes14 == true; _buf << (" width".freeze); else; _buf << (" width=\"".freeze); _buf << ((_slim_codeattributes14).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes15 = (height); if _slim_codeattributes15; if _slim_codeattributes15 == true; _buf << (" height".freeze); else; _buf << (" height=\"".freeze); _buf << ((_slim_codeattributes15).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes16 = ((attr? :background) ? "background: #{attr :background}" : nil); if _slim_codeattributes16; if _slim_codeattributes16 == true; _buf << (" style".freeze); else; _buf << (" style=\"".freeze); _buf << ((_slim_codeattributes16).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
436
540
  ; end; _buf << ("</div>".freeze); if title?;
437
541
  ; _buf << ("<div class=\"title\">".freeze); _buf << ((captioned_title).to_s);
438
542
  ; _buf << ("</div>".freeze); end; end; _buf
@@ -567,10 +671,14 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
567
671
  node.instance_eval do
568
672
  converter.set_local_variables(binding, opts) unless opts.empty?
569
673
  _buf = ''; _buf << ("<!DOCTYPE html><html".freeze);
570
- ; _slim_codeattributes1 = (attr :lang, 'en' unless attr? :nolang); if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" lang".freeze); else; _buf << (" lang=\"".freeze); _buf << ((_slim_codeattributes1).to_s); _buf << ("\"".freeze); end; end; _buf << ("><head><meta charset=\"utf-8\">".freeze);
674
+ ; _slim_codeattributes1 = (attr :lang, 'en' unless attr? :nolang); if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" lang".freeze); else; _buf << (" lang=\"".freeze); _buf << ((_slim_codeattributes1).to_s); _buf << ("\"".freeze); end; end; _buf << ("><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui\"><title>".freeze);
675
+ ;
676
+ ;
677
+ ;
571
678
  ;
679
+ ; _buf << (((doctitle sanitize: true, use_fallback: true)).to_s);
572
680
  ;
573
- ; if RUBY_ENGINE == 'opal' && JAVASCRIPT_PLATFORM == 'node';
681
+ ; _buf << ("</title>".freeze); if RUBY_ENGINE == 'opal' && JAVASCRIPT_PLATFORM == 'node';
574
682
  ; revealjsdir = (attr :revealjsdir, 'node_modules/reveal.js');
575
683
  ; else;
576
684
  ; revealjsdir = (attr :revealjsdir, 'reveal.js');
@@ -581,74 +689,15 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
581
689
  ; if attr? key;
582
690
  ; _buf << ("<meta".freeze); _slim_codeattributes2 = key; if _slim_codeattributes2; if _slim_codeattributes2 == true; _buf << (" name".freeze); else; _buf << (" name=\"".freeze); _buf << ((_slim_codeattributes2).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes3 = (attr key); if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" content".freeze); else; _buf << (" content=\"".freeze); _buf << ((_slim_codeattributes3).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
583
691
  ; end; end; linkcss = (attr? 'linkcss');
584
- ; _buf << ("<title>".freeze); _buf << (((doctitle sanitize: true, use_fallback: true)).to_s);
585
- ; _buf << ("</title><meta content=\"yes\" name=\"apple-mobile-web-app-capable\"><meta content=\"black-translucent\" name=\"apple-mobile-web-app-status-bar-style\"><meta content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui\" name=\"viewport\"><link href=\"".freeze);
692
+ ; _buf << ("<link rel=\"stylesheet\" href=\"".freeze); _buf << ((revealjsdir).to_s); _buf << ("/css/reset.css\"><link rel=\"stylesheet\" href=\"".freeze);
693
+ ; _buf << ((revealjsdir).to_s); _buf << ("/css/reveal.css\">".freeze);
586
694
  ;
587
695
  ;
588
- ; _buf << ((revealjsdir).to_s); _buf << ("/css/reveal.css\" rel=\"stylesheet\">".freeze);
589
- ;
590
696
  ; if attr? :revealjs_customtheme;
591
697
  ; _buf << ("<link rel=\"stylesheet\"".freeze); _slim_codeattributes4 = (attr :revealjs_customtheme); if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes4).to_s); _buf << ("\"".freeze); end; end; _buf << (" id=\"theme\">".freeze);
592
698
  ; else;
593
699
  ; _buf << ("<link rel=\"stylesheet\" href=\"".freeze); _buf << ((revealjsdir).to_s); _buf << ("/css/theme/".freeze); _buf << ((attr 'revealjs_theme', 'black').to_s); _buf << (".css\" id=\"theme\">".freeze);
594
- ; end; _buf << ("<!--This CSS is generated by the Asciidoctor-Reveal.js converter to further integrate AsciiDoc's existing semantic with Reveal.js--><style type=\"text/css\">.reveal div.right {\n float: right;\n}\n\n.reveal .listingblock.stretch > .content {\n height: 100%;\n}\n\n.reveal .listingblock.stretch > .content > pre {\n height: 100%;\n}\n\n.reveal .listingblock.stretch > .content > pre > code {\n height: 100%;\n max-height: 100%;\n}\n\n/* tables */\ntable{border-collapse:collapse;border-spacing:0}\ntable{margin-bottom:1.25em;border:solid 1px #dedede}\ntable thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;text-align:left}\ntable tr th,table tr td{padding:.5625em .625em;font-size:inherit}\ntable thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.6}\ntd.tableblock>.content{margin-bottom:1.25em}\ntd.tableblock>.content>:last-child{margin-bottom:-1.25em}\ntable.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}\ntable.grid-all>thead>tr>.tableblock,table.grid-all>tbody>tr>.tableblock{border-width:0 1px 1px 0}\ntable.grid-all>tfoot>tr>.tableblock{border-width:1px 1px 0 0}\ntable.grid-cols>*>tr>.tableblock{border-width:0 1px 0 0}\ntable.grid-rows>thead>tr>.tableblock,table.grid-rows>tbody>tr>.tableblock{border-width:0 0 1px}\ntable.grid-rows>tfoot>tr>.tableblock{border-width:1px 0 0}\ntable.grid-all>*>tr>.tableblock:last-child,table.grid-cols>*>tr>.tableblock:last-child{border-right-width:0}\ntable.grid-all>tbody>tr:last-child>.tableblock,table.grid-all>thead:last-child>tr>.tableblock,table.grid-rows>tbody>tr:last-child>.tableblock,table.grid-rows>thead:last-child>tr>.tableblock{border-bottom-width:0}\ntable.frame-all{border-width:1px}\ntable.frame-sides{border-width:0 1px}\ntable.frame-topbot,table.frame-ends{border-width:1px 0}\n.reveal table th.halign-left,.reveal table td.halign-left{text-align:left}\n.reveal table th.halign-right,.reveal table td.halign-right{text-align:right}\n.reveal table th.halign-center,.reveal table td.halign-center{text-align:center}\n.reveal table th.valign-top,.reveal table td.valign-top{vertical-align:top}\n.reveal table th.valign-bottom,.reveal table td.valign-bottom{vertical-align:bottom}\n.reveal table th.valign-middle,.reveal table td.valign-middle{vertical-align:middle}\ntable thead th,table tfoot th{font-weight:bold}\ntbody tr th{display:table-cell;line-height:1.6}\ntbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{font-weight:bold}\nthead{display:table-header-group}\n\n.reveal table.grid-none th,.reveal table.grid-none td{border-bottom:0!important}\n\n/* callouts */\n.conum[data-value]{display:inline-block;color:#fff!important;background:rgba(0,0,0,.8);-webkit-border-radius:50%;border-radius:50%;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}\n.conum[data-value] *{color:#fff!important}\n.conum[data-value]+b{display:none}\n.conum[data-value]::after{content:attr(data-value)}\npre .conum[data-value]{position:relative;top:-.125em}\nb.conum *{color:inherit!important}\n.conum:not([data-value]):empty{display:none}</style>".freeze);
595
- ;
596
- ;
597
- ;
598
- ;
599
- ;
600
- ;
601
- ;
602
- ;
603
- ;
604
- ;
605
- ;
606
- ;
607
- ;
608
- ;
609
- ;
610
- ;
611
- ;
612
- ;
613
- ;
614
- ;
615
- ;
616
- ;
617
- ;
618
- ;
619
- ;
620
- ;
621
- ;
622
- ;
623
- ;
624
- ;
625
- ;
626
- ;
627
- ;
628
- ;
629
- ;
630
- ;
631
- ;
632
- ;
633
- ;
634
- ;
635
- ;
636
- ;
637
- ;
638
- ;
639
- ;
640
- ;
641
- ;
642
- ;
643
- ;
644
- ;
645
- ;
646
- ;
647
- ;
648
- ;
649
- ;
650
- ;
651
- ;
700
+ ; end; _buf << ("<!--This CSS is generated by the Asciidoctor reveal.js converter to further integrate AsciiDoc's existing semantic with reveal.js--><style type=\"text/css\">.reveal div.right{float:right}\n\n/* listing block */\n.reveal .listingblock.stretch>.content{height: 100%}\n.reveal .listingblock.stretch>.content>pre{height: 100%}\n.reveal .listingblock.stretch>.content>pre>code{height:100%;max-height:100%}\n\n/* tables */\ntable{border-collapse:collapse;border-spacing:0}\ntable{margin-bottom:1.25em;border:solid 1px #dedede}\ntable thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;text-align:left}\ntable tr th,table tr td{padding:.5625em .625em;font-size:inherit}\ntable thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.6}\ntd.tableblock>.content{margin-bottom:1.25em}\ntd.tableblock>.content>:last-child{margin-bottom:-1.25em}\ntable.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}\ntable.grid-all>thead>tr>.tableblock,table.grid-all>tbody>tr>.tableblock{border-width:0 1px 1px 0}\ntable.grid-all>tfoot>tr>.tableblock{border-width:1px 1px 0 0}\ntable.grid-cols>*>tr>.tableblock{border-width:0 1px 0 0}\ntable.grid-rows>thead>tr>.tableblock,table.grid-rows>tbody>tr>.tableblock{border-width:0 0 1px}\ntable.grid-rows>tfoot>tr>.tableblock{border-width:1px 0 0}\ntable.grid-all>*>tr>.tableblock:last-child,table.grid-cols>*>tr>.tableblock:last-child{border-right-width:0}\ntable.grid-all>tbody>tr:last-child>.tableblock,table.grid-all>thead:last-child>tr>.tableblock,table.grid-rows>tbody>tr:last-child>.tableblock,table.grid-rows>thead:last-child>tr>.tableblock{border-bottom-width:0}\ntable.frame-all{border-width:1px}\ntable.frame-sides{border-width:0 1px}\ntable.frame-topbot,table.frame-ends{border-width:1px 0}\n.reveal table th.halign-left,.reveal table td.halign-left{text-align:left}\n.reveal table th.halign-right,.reveal table td.halign-right{text-align:right}\n.reveal table th.halign-center,.reveal table td.halign-center{text-align:center}\n.reveal table th.valign-top,.reveal table td.valign-top{vertical-align:top}\n.reveal table th.valign-bottom,.reveal table td.valign-bottom{vertical-align:bottom}\n.reveal table th.valign-middle,.reveal table td.valign-middle{vertical-align:middle}\ntable thead th,table tfoot th{font-weight:bold}\ntbody tr th{display:table-cell;line-height:1.6}\ntbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{font-weight:bold}\nthead{display:table-header-group}\n\n.reveal table.grid-none th,.reveal table.grid-none td{border-bottom:0!important}\n\n/* kbd macro */\nkbd{font-family:\"Droid Sans Mono\",\"DejaVu Sans Mono\",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap}\n.keyseq kbd:first-child{margin-left:0}\n.keyseq kbd:last-child{margin-right:0}\n\n/* callouts */\n.conum[data-value] {display:inline-block;color:#fff!important;background:rgba(0,0,0,.8);-webkit-border-radius:50%;border-radius:50%;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}\n.conum[data-value] *{color:#fff!important}\n.conum[data-value]+b{display:none}\n.conum[data-value]:after{content:attr(data-value)}\npre .conum[data-value]{position:relative;top:-.125em}\nb.conum *{color:inherit!important}\n.conum:not([data-value]):empty{display:none}\n/* Callout list */\n.hdlist>table,.colist>table{border:0;background:none}\n.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}\ntd.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}\ntd.hdlist1{font-weight:bold;padding-bottom:1.25em}\n/* Disabled from Asciidoctor CSS because it caused callout list to go under the\n * source listing when .stretch is applied (see #335)\n * .literalblock+.colist,.listingblock+.colist{margin-top:-.5em} */\n.colist td:not([class]):first-child{padding:.4em .75em 0;line-height:1;vertical-align:top}\n.colist td:not([class]):first-child img{max-width:none}\n.colist td:not([class]):last-child{padding:.25em 0}\n\n/* Override Asciidoctor CSS that causes issues with reveal.js features */\n.reveal .hljs table{border: 0}\n/* Callout list rows would have a bottom border with some reveal.js themes (see #335) */\n.reveal .colist>table th, .reveal .colist>table td {border-bottom:0}\n/* Fixes line height with Highlight.js source listing when linenums enabled (see #331) */\n.reveal .hljs table thead tr th, .reveal .hljs table tfoot tr th, .reveal .hljs table tbody tr td, .reveal .hljs table tr td, .reveal .hljs table tfoot tr td{line-height:inherit}\n\n/* Columns layout */\n.columns .slide-content {\n display: flex;\n}\n\n.columns.wrap .slide-content {\n flex-wrap: wrap;\n}\n\n.columns.is-vcentered .slide-content {\n align-items: center;\n}\n\n.columns .slide-content > .column {\n display: block;\n flex-basis: 0;\n flex-grow: 1;\n flex-shrink: 1;\n padding: .75rem;\n}\n\n.columns .slide-content > .column.is-full {\n flex: none;\n width: 100%;\n}\n\n.columns .slide-content > .column.is-four-fifths {\n flex: none;\n width: 80%;\n}\n\n.columns .slide-content > .column.is-three-quarters {\n flex: none;\n width: 75%;\n}\n\n.columns .slide-content > .column.is-two-thirds {\n flex: none;\n width: 66.6666%;\n}\n\n.columns .slide-content > .column.is-three-fifths {\n flex: none;\n width: 60%;\n}\n\n.columns .slide-content > .column.is-half {\n flex: none;\n width: 50%;\n}\n\n.columns .slide-content > .column.is-two-fifths {\n flex: none;\n width: 40%;\n}\n\n.columns .slide-content > .column.is-one-third {\n flex: none;\n width: 33.3333%;\n}\n\n.columns .slide-content > .column.is-one-quarter {\n flex: none;\n width: 25%;\n}\n\n.columns .slide-content > .column.is-one-fifth {\n flex: none;\n width: 20%;\n}\n</style>".freeze);
652
701
  ;
653
702
  ;
654
703
  ; if attr? :icons, 'font';
@@ -681,23 +730,26 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
681
730
  ; if syntax_hl && (syntax_hl.docinfo? :head);
682
731
  ; _buf << ((syntax_hl.docinfo :head, self, cdn_base_url: cdn_base, linkcss: linkcss, self_closing_tag_slash: '/').to_s);
683
732
  ;
684
- ; end; _buf << ("<script>var link = document.createElement( 'link' );\nlink.rel = 'stylesheet';\nlink.type = 'text/css';\nlink.href = window.location.search.match( /print-pdf/gi ) ? \"".freeze);
733
+ ; end; _buf << ("<!--Printing and PDF exports--><script>var link = document.createElement( 'link' );\nlink.rel = 'stylesheet';\nlink.type = 'text/css';\nlink.href = window.location.search.match( /print-pdf/gi ) ? \"".freeze);
685
734
  ;
686
735
  ;
687
736
  ;
688
- ; _buf << ((revealjsdir).to_s); _buf << ("/css/print/pdf.css\" : \"".freeze); _buf << ((revealjsdir).to_s); _buf << ("/css/print/paper.css\";\ndocument.getElementsByTagName( 'head' )[0].appendChild( link );</script><!--[if lt IE 9]><script src=\"".freeze);
689
737
  ;
738
+ ; _buf << ((revealjsdir).to_s); _buf << ("/css/print/pdf.css\" : \"".freeze); _buf << ((revealjsdir).to_s); _buf << ("/css/print/paper.css\";\ndocument.getElementsByTagName( 'head' )[0].appendChild( link );</script>".freeze);
690
739
  ;
691
- ; _buf << ((revealjsdir).to_s); _buf << ("/lib/js/html5shiv.js\"></script><![endif]-->".freeze);
692
- ; unless (docinfo_content = docinfo :header, '.html').empty?;
693
- ; _buf << ((docinfo_content).to_s);
694
- ; end; if attr? :customcss;
740
+ ;
741
+ ; if attr? :customcss;
695
742
  ; _buf << ("<link rel=\"stylesheet\"".freeze); _slim_codeattributes8 = ((customcss = attr :customcss).empty? ? 'asciidoctor-revealjs.css' : customcss); if _slim_codeattributes8; if _slim_codeattributes8 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes8).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
743
+ ; end; unless (_docinfo = docinfo :head, '-revealjs.html').empty?;
744
+ ; _buf << ((_docinfo).to_s);
696
745
  ; end; _buf << ("</head><body><div class=\"reveal\"><div class=\"slides\">".freeze);
697
746
  ;
698
747
  ;
699
748
  ;
700
- ; unless notitle || !has_header?;
749
+ ; unless noheader;
750
+ ; unless (_docinfo = docinfo :header, '-revealjs.html').empty?;
751
+ ; _buf << ((_docinfo).to_s);
752
+ ; end; if header?;
701
753
  ; bg_image = (attr? 'title-slide-background-image') ? (image_uri(attr 'title-slide-background-image')) : nil;
702
754
  ; bg_video = (attr? 'title-slide-background-video') ? (media_uri(attr 'title-slide-background-video')) : nil;
703
755
  ;
@@ -715,7 +767,7 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
715
767
  ;
716
768
  ;
717
769
  ;
718
- ; _buf << ("<section".freeze); _temple_html_attributeremover1 = ''; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "title"; _temple_html_attributemerger1[1] = ''; _slim_codeattributes9 = role; if Array === _slim_codeattributes9; _slim_codeattributes9 = _slim_codeattributes9.flatten; _slim_codeattributes9.map!(&:to_s); _slim_codeattributes9.reject!(&:empty?); _temple_html_attributemerger1[1] << ((_slim_codeattributes9.join(" ")).to_s); else; _temple_html_attributemerger1[1] << ((_slim_codeattributes9).to_s); end; _temple_html_attributemerger1[1]; _temple_html_attributeremover1 << ((_temple_html_attributemerger1.reject(&:empty?).join(" ")).to_s); _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover1).to_s); _buf << ("\"".freeze); end; _buf << (" data-state=\"title\"".freeze); _slim_codeattributes10 = (attr 'title-slide-transition'); if _slim_codeattributes10; if _slim_codeattributes10 == true; _buf << (" data-transition".freeze); else; _buf << (" data-transition=\"".freeze); _buf << ((_slim_codeattributes10).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes11 = (attr 'title-slide-transition-speed'); if _slim_codeattributes11; if _slim_codeattributes11 == true; _buf << (" data-transition-speed".freeze); else; _buf << (" data-transition-speed=\"".freeze); _buf << ((_slim_codeattributes11).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes12 = (attr 'title-slide-background'); if _slim_codeattributes12; if _slim_codeattributes12 == true; _buf << (" data-background".freeze); else; _buf << (" data-background=\"".freeze); _buf << ((_slim_codeattributes12).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes13 = (attr 'title-slide-background-size'); if _slim_codeattributes13; if _slim_codeattributes13 == true; _buf << (" data-background-size".freeze); else; _buf << (" data-background-size=\"".freeze); _buf << ((_slim_codeattributes13).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes14 = bg_image; if _slim_codeattributes14; if _slim_codeattributes14 == true; _buf << (" data-background-image".freeze); else; _buf << (" data-background-image=\"".freeze); _buf << ((_slim_codeattributes14).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes15 = bg_video; if _slim_codeattributes15; if _slim_codeattributes15 == true; _buf << (" data-background-video".freeze); else; _buf << (" data-background-video=\"".freeze); _buf << ((_slim_codeattributes15).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes16 = (attr 'title-slide-background-video-loop'); if _slim_codeattributes16; if _slim_codeattributes16 == true; _buf << (" data-background-video-loop".freeze); else; _buf << (" data-background-video-loop=\"".freeze); _buf << ((_slim_codeattributes16).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes17 = (attr 'title-slide-background-video-muted'); if _slim_codeattributes17; if _slim_codeattributes17 == true; _buf << (" data-background-video-muted".freeze); else; _buf << (" data-background-video-muted=\"".freeze); _buf << ((_slim_codeattributes17).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes18 = (attr "background-opacity"); if _slim_codeattributes18; if _slim_codeattributes18 == true; _buf << (" data-background-opacity".freeze); else; _buf << (" data-background-opacity=\"".freeze); _buf << ((_slim_codeattributes18).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes19 = (attr 'title-slide-background-iframe'); if _slim_codeattributes19; if _slim_codeattributes19 == true; _buf << (" data-background-iframe".freeze); else; _buf << (" data-background-iframe=\"".freeze); _buf << ((_slim_codeattributes19).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes20 = (attr 'title-slide-background-color'); if _slim_codeattributes20; if _slim_codeattributes20 == true; _buf << (" data-background-color".freeze); else; _buf << (" data-background-color=\"".freeze); _buf << ((_slim_codeattributes20).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes21 = (attr 'title-slide-background-repeat'); if _slim_codeattributes21; if _slim_codeattributes21 == true; _buf << (" data-background-repeat".freeze); else; _buf << (" data-background-repeat=\"".freeze); _buf << ((_slim_codeattributes21).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes22 = (attr 'title-slide-background-position'); if _slim_codeattributes22; if _slim_codeattributes22 == true; _buf << (" data-background-position".freeze); else; _buf << (" data-background-position=\"".freeze); _buf << ((_slim_codeattributes22).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes23 = (attr 'title-slide-background-transition'); if _slim_codeattributes23; if _slim_codeattributes23 == true; _buf << (" data-background-transition".freeze); else; _buf << (" data-background-transition=\"".freeze); _buf << ((_slim_codeattributes23).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
770
+ ; _buf << ("<section".freeze); _temple_html_attributeremover1 = ''; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "title"; _temple_html_attributemerger1[1] = ''; _slim_codeattributes9 = role; if Array === _slim_codeattributes9; _slim_codeattributes9 = _slim_codeattributes9.flatten; _slim_codeattributes9.map!(&:to_s); _slim_codeattributes9.reject!(&:empty?); _temple_html_attributemerger1[1] << ((_slim_codeattributes9.join(" ")).to_s); else; _temple_html_attributemerger1[1] << ((_slim_codeattributes9).to_s); end; _temple_html_attributemerger1[1]; _temple_html_attributeremover1 << ((_temple_html_attributemerger1.reject(&:empty?).join(" ")).to_s); _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover1).to_s); _buf << ("\"".freeze); end; _buf << (" data-state=\"title\"".freeze); _slim_codeattributes10 = (attr 'title-slide-transition'); if _slim_codeattributes10; if _slim_codeattributes10 == true; _buf << (" data-transition".freeze); else; _buf << (" data-transition=\"".freeze); _buf << ((_slim_codeattributes10).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes11 = (attr 'title-slide-transition-speed'); if _slim_codeattributes11; if _slim_codeattributes11 == true; _buf << (" data-transition-speed".freeze); else; _buf << (" data-transition-speed=\"".freeze); _buf << ((_slim_codeattributes11).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes12 = (attr 'title-slide-background'); if _slim_codeattributes12; if _slim_codeattributes12 == true; _buf << (" data-background".freeze); else; _buf << (" data-background=\"".freeze); _buf << ((_slim_codeattributes12).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes13 = (attr 'title-slide-background-size'); if _slim_codeattributes13; if _slim_codeattributes13 == true; _buf << (" data-background-size".freeze); else; _buf << (" data-background-size=\"".freeze); _buf << ((_slim_codeattributes13).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes14 = bg_image; if _slim_codeattributes14; if _slim_codeattributes14 == true; _buf << (" data-background-image".freeze); else; _buf << (" data-background-image=\"".freeze); _buf << ((_slim_codeattributes14).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes15 = bg_video; if _slim_codeattributes15; if _slim_codeattributes15 == true; _buf << (" data-background-video".freeze); else; _buf << (" data-background-video=\"".freeze); _buf << ((_slim_codeattributes15).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes16 = (attr 'title-slide-background-video-loop'); if _slim_codeattributes16; if _slim_codeattributes16 == true; _buf << (" data-background-video-loop".freeze); else; _buf << (" data-background-video-loop=\"".freeze); _buf << ((_slim_codeattributes16).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes17 = (attr 'title-slide-background-video-muted'); if _slim_codeattributes17; if _slim_codeattributes17 == true; _buf << (" data-background-video-muted".freeze); else; _buf << (" data-background-video-muted=\"".freeze); _buf << ((_slim_codeattributes17).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes18 = (attr 'title-slide-background-opacity'); if _slim_codeattributes18; if _slim_codeattributes18 == true; _buf << (" data-background-opacity".freeze); else; _buf << (" data-background-opacity=\"".freeze); _buf << ((_slim_codeattributes18).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes19 = (attr 'title-slide-background-iframe'); if _slim_codeattributes19; if _slim_codeattributes19 == true; _buf << (" data-background-iframe".freeze); else; _buf << (" data-background-iframe=\"".freeze); _buf << ((_slim_codeattributes19).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes20 = (attr 'title-slide-background-color'); if _slim_codeattributes20; if _slim_codeattributes20 == true; _buf << (" data-background-color".freeze); else; _buf << (" data-background-color=\"".freeze); _buf << ((_slim_codeattributes20).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes21 = (attr 'title-slide-background-repeat'); if _slim_codeattributes21; if _slim_codeattributes21 == true; _buf << (" data-background-repeat".freeze); else; _buf << (" data-background-repeat=\"".freeze); _buf << ((_slim_codeattributes21).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes22 = (attr 'title-slide-background-position'); if _slim_codeattributes22; if _slim_codeattributes22 == true; _buf << (" data-background-position".freeze); else; _buf << (" data-background-position=\"".freeze); _buf << ((_slim_codeattributes22).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes23 = (attr 'title-slide-background-transition'); if _slim_codeattributes23; if _slim_codeattributes23 == true; _buf << (" data-background-transition".freeze); else; _buf << (" data-background-transition=\"".freeze); _buf << ((_slim_codeattributes23).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
719
771
  ; if (_title_obj = doctitle partition: true, use_fallback: true).subtitle?;
720
772
  ; _buf << ("<h1>".freeze); _buf << ((slice_text _title_obj.title, (_slice = header.option? :slice)).to_s);
721
773
  ; _buf << ("</h1><h2>".freeze); _buf << ((slice_text _title_obj.subtitle, _slice).to_s);
@@ -726,9 +778,14 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
726
778
  ; _buf << ("<div class=\"preamble\">".freeze); _buf << ((preamble.pop.content).to_s);
727
779
  ; _buf << ("</div>".freeze); end; unless author.nil?;
728
780
  ; _buf << ("<p class=\"author\"><small>".freeze); _buf << ((author).to_s);
729
- ; _buf << ("</small></p>".freeze); end; _buf << ("</section>".freeze); end; _buf << ((content).to_s);
730
- ; _buf << ("</div></div><script src=\"".freeze); _buf << ((revealjsdir).to_s); _buf << ("/lib/js/head.min.js\"></script><script src=\"".freeze);
731
- ; _buf << ((revealjsdir).to_s); _buf << ("/js/reveal.js\"></script><script>Array.prototype.slice.call(document.querySelectorAll('.slides section')).forEach(function(slide) {\n if (slide.getAttribute('data-background-color')) return;\n // user needs to explicitly say he wants CSS color to override otherwise we might break custom css or theme (#226)\n if (!(slide.classList.contains('canvas') || slide.classList.contains('background'))) return;\n var bgColor = getComputedStyle(slide).backgroundColor;\n if (bgColor !== 'rgba(0, 0, 0, 0)' && bgColor !== 'transparent') {\n slide.setAttribute('data-background-color', bgColor);\n slide.style.backgroundColor = 'transparent';\n }\n})\n\n// See https://github.com/hakimel/reveal.js#configuration for a full list of configuration options\nReveal.initialize({\n // Display presentation control arrows\n controls: ".freeze);
781
+ ; _buf << ("</small></p>".freeze); end; _buf << ("</section>".freeze);
782
+ ; end; end; _buf << ((content).to_s);
783
+ ; unless (_docinfo = docinfo :footer, '-revealjs.html').empty?;
784
+ ; _buf << ((_docinfo).to_s);
785
+ ; end; _buf << ("</div></div><script src=\"".freeze); _buf << ((revealjsdir).to_s); _buf << ("/js/reveal.js\"></script><script>Array.prototype.slice.call(document.querySelectorAll('.slides section')).forEach(function(slide) {\n if (slide.getAttribute('data-background-color')) return;\n // user needs to explicitly say he wants CSS color to override otherwise we might break custom css or theme (#226)\n if (!(slide.classList.contains('canvas') || slide.classList.contains('background'))) return;\n var bgColor = getComputedStyle(slide).backgroundColor;\n if (bgColor !== 'rgba(0, 0, 0, 0)' && bgColor !== 'transparent') {\n slide.setAttribute('data-background-color', bgColor);\n slide.style.backgroundColor = 'transparent';\n }\n});\n\n// More info about config & dependencies:\n// - https://github.com/hakimel/reveal.js#configuration\n// - https://github.com/hakimel/reveal.js#dependencies\nReveal.initialize({\n // Display presentation control arrows\n controls: ".freeze);
786
+ ;
787
+ ;
788
+ ;
732
789
  ;
733
790
  ;
734
791
  ;
@@ -758,7 +815,10 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
758
815
  ;
759
816
  ; _buf << ((to_valid_slidenumber(attr 'revealjs_slidenumber', false)).to_s); _buf << (",\n // Control which views the slide number displays on\n showSlideNumber: '".freeze);
760
817
  ;
761
- ; _buf << ((attr 'revealjs_showslidenumber', 'all').to_s); _buf << ("',\n // Push each slide change to the browser history\n history: ".freeze);
818
+ ; _buf << ((attr 'revealjs_showslidenumber', 'all').to_s); _buf << ("',\n // Add the current slide number to the URL hash so that reloading the\n // page/copying the URL will return you to the same slide\n hash: ".freeze);
819
+ ;
820
+ ;
821
+ ; _buf << ((to_boolean(attr 'revealjs_hash', false)).to_s); _buf << (",\n // Push each slide change to the browser history. Implies `hash: true`\n history: ".freeze);
762
822
  ;
763
823
  ; _buf << ((to_boolean(attr 'revealjs_history', false)).to_s); _buf << (",\n // Enable keyboard shortcuts for navigation\n keyboard: ".freeze);
764
824
  ;
@@ -772,7 +832,9 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
772
832
  ;
773
833
  ; _buf << ((to_boolean(attr 'revealjs_loop', false)).to_s); _buf << (",\n // Change the presentation direction to be RTL\n rtl: ".freeze);
774
834
  ;
775
- ; _buf << ((to_boolean(attr 'revealjs_rtl', false)).to_s); _buf << (",\n // Randomizes the order of slides each time the presentation loads\n shuffle: ".freeze);
835
+ ; _buf << ((to_boolean(attr 'revealjs_rtl', false)).to_s); _buf << (",\n // See https://github.com/hakimel/reveal.js/#navigation-mode\n navigationMode: '".freeze);
836
+ ;
837
+ ; _buf << ((attr 'revealjs_navigationmode', 'default').to_s); _buf << ("',\n // Randomizes the order of slides each time the presentation loads\n shuffle: ".freeze);
776
838
  ;
777
839
  ; _buf << ((to_boolean(attr 'revealjs_shuffle', false)).to_s); _buf << (",\n // Turns fragments on and off globally\n fragments: ".freeze);
778
840
  ;
@@ -792,7 +854,13 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
792
854
  ;
793
855
  ;
794
856
  ;
795
- ; _buf << ((attr 'revealjs_autoplaymedia', 'null').to_s); _buf << (",\n // Number of milliseconds between automatically proceeding to the\n // next slide, disabled when set to 0, this value can be overwritten\n // by using a data-autoslide attribute on your slides\n autoSlide: ".freeze);
857
+ ; _buf << ((attr 'revealjs_autoplaymedia', 'null').to_s); _buf << (",\n // Global override for preloading lazy-loaded iframes\n // - null: Iframes with data-src AND data-preload will be loaded when within\n // the viewDistance, iframes with only data-src will be loaded when visible\n // - true: All iframes with data-src will be loaded when within the viewDistance\n // - false: All iframes with data-src will be loaded only when visible\n preloadIframes: ".freeze);
858
+ ;
859
+ ;
860
+ ;
861
+ ;
862
+ ;
863
+ ; _buf << ((attr 'revealjs_preloadiframes', 'null').to_s); _buf << (",\n // Number of milliseconds between automatically proceeding to the\n // next slide, disabled when set to 0, this value can be overwritten\n // by using a data-autoslide attribute on your slides\n autoSlide: ".freeze);
796
864
  ;
797
865
  ;
798
866
  ;
@@ -804,9 +872,24 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
804
872
  ;
805
873
  ;
806
874
  ;
807
- ; _buf << ((attr 'revealjs_defaulttiming', 120).to_s); _buf << (",\n // Enable slide navigation via mouse wheel\n mouseWheel: ".freeze);
875
+ ; _buf << ((attr 'revealjs_defaulttiming', 120).to_s); _buf << (",\n // Specify the total time in seconds that is available to\n // present. If this is set to a nonzero value, the pacing\n // timer will work out the time available for each slide,\n // instead of using the defaultTiming value\n totalTime: ".freeze);
808
876
  ;
809
- ; _buf << ((to_boolean(attr 'revealjs_mousewheel', false)).to_s); _buf << (",\n // Hides the address bar on mobile devices\n hideAddressBar: ".freeze);
877
+ ;
878
+ ;
879
+ ;
880
+ ; _buf << ((attr 'revealjs_totaltime', 0).to_s); _buf << (",\n // Specify the minimum amount of time you want to allot to\n // each slide, if using the totalTime calculation method. If\n // the automated time allocation causes slide pacing to fall\n // below this threshold, then you will see an alert in the\n // speaker notes window\n minimumTimePerSlide: ".freeze);
881
+ ;
882
+ ;
883
+ ;
884
+ ;
885
+ ;
886
+ ; _buf << ((attr 'revealjs_minimumtimeperslide', 0).to_s); _buf << (",\n // Enable slide navigation via mouse wheel\n mouseWheel: ".freeze);
887
+ ;
888
+ ; _buf << ((to_boolean(attr 'revealjs_mousewheel', false)).to_s); _buf << (",\n // Hide cursor if inactive\n hideInactiveCursor: ".freeze);
889
+ ;
890
+ ; _buf << ((to_boolean(attr 'revealjs_hideinactivecursor', true)).to_s); _buf << (",\n // Time before the cursor is hidden (in ms)\n hideCursorTime: ".freeze);
891
+ ;
892
+ ; _buf << ((attr 'revealjs_hidecursortime', 5000).to_s); _buf << (",\n // Hides the address bar on mobile devices\n hideAddressBar: ".freeze);
810
893
  ;
811
894
  ; _buf << ((to_boolean(attr 'revealjs_hideaddressbar', true)).to_s); _buf << (",\n // Opens links in an iframe preview overlay\n // Add `data-preview-link` and `data-preview-link=\"false\"` to customise each link\n // individually\n previewLinks: ".freeze);
812
895
  ;
@@ -820,7 +903,11 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
820
903
  ;
821
904
  ; _buf << ((attr 'revealjs_backgroundtransition', 'fade').to_s); _buf << ("',\n // Number of slides away from the current that are visible\n viewDistance: ".freeze);
822
905
  ;
823
- ; _buf << ((attr 'revealjs_viewdistance', 3).to_s); _buf << (",\n // Parallax background image (e.g., \"'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'\")\n parallaxBackgroundImage: '".freeze);
906
+ ; _buf << ((attr 'revealjs_viewdistance', 3).to_s); _buf << (",\n // Number of slides away from the current that are visible on mobile\n // devices. It is advisable to set this to a lower number than\n // viewDistance in order to save resources.\n mobileViewDistance: ".freeze);
907
+ ;
908
+ ;
909
+ ;
910
+ ; _buf << ((attr 'revealjs_mobileviewdistance', 3).to_s); _buf << (",\n // Parallax background image (e.g., \"'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'\")\n parallaxBackgroundImage: '".freeze);
824
911
  ;
825
912
  ; _buf << ((attr 'revealjs_parallaxbackgroundimage', '').to_s); _buf << ("',\n // Parallax background size in CSS syntax (e.g., \"2100px 900px\")\n parallaxBackgroundSize: '".freeze);
826
913
  ;
@@ -850,22 +937,83 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
850
937
  ;
851
938
  ; _buf << ((to_boolean(attr 'revealjs_pdfseparatefragments', true)).to_s); _buf << (",\n // For slides that do not fit on a page, max number of pages\n pdfMaxPagesPerSlide: ".freeze);
852
939
  ;
853
- ; _buf << ((attr 'revealjs_pdfmaxpagesperslide', 1).to_s); _buf << (",\n\n // Optional libraries used to extend on reveal.js\n dependencies: [\n { src: '".freeze);
940
+ ; _buf << ((attr 'revealjs_pdfmaxpagesperslide', 1).to_s); _buf << (",\n\n // Optional libraries used to extend on reveal.js\n dependencies: [\n ".freeze);
854
941
  ;
855
942
  ;
856
943
  ;
857
- ; _buf << ((revealjsdir).to_s); _buf << ("/lib/js/classList.js', condition: function() { return !document.body.classList; } },\n ".freeze);
858
- ; _buf << (((document.attr? 'source-highlighter', 'highlightjs') ? "{ src: '#{revealjsdir}/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }," : nil).to_s);
859
- ; _buf << ("\n ".freeze); _buf << (((attr? 'revealjs_plugin_zoom', 'disabled') ? "" : "{ src: '#{revealjsdir}/plugin/zoom-js/zoom.js', async: true }," ).to_s);
860
- ; _buf << ("\n ".freeze); _buf << (((attr? 'revealjs_plugin_notes', 'disabled') ? "" : "{ src: '#{revealjsdir}/plugin/notes/notes.js', async: true }," ).to_s);
861
- ; _buf << ("\n ".freeze); _buf << (((attr? 'revealjs_plugin_marked', 'enabled') ? "{ src: '#{revealjsdir}/plugin/markdown/marked.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }," : "" ).to_s);
862
- ; _buf << ("\n ".freeze); _buf << (((attr? 'revealjs_plugin_markdown', 'enabled') ? "{ src: '#{revealjsdir}/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } }," : "" ).to_s);
863
- ; _buf << ("\n ".freeze); _buf << (((attr? 'revealjs_plugin_pdf', 'enabled') ? "{ src: '#{revealjsdir}/plugin/print-pdf/print-pdf.js', async: true }," : "" ).to_s);
864
- ; _buf << ("\n ".freeze); _buf << (((attr? 'revealjs_plugins') ? File.read(attr('revealjs_plugins', '')) : "").to_s);
944
+ ; _buf << ((revealjs_dependencies(document, self, revealjsdir)).to_s);
865
945
  ; _buf << ("\n ],\n\n ".freeze);
866
946
  ;
867
947
  ; _buf << (((attr? 'revealjs_plugins_configuration') ? File.read(attr('revealjs_plugins_configuration', '')) : "").to_s);
868
- ; _buf << ("\n\n});</script>".freeze);
948
+ ; _buf << ("\n\n});</script><script>var dom = {};\ndom.slides = document.querySelector('.reveal .slides');\n\nfunction getRemainingHeight(element, slideElement, height) {\n height = height || 0;\n if (element) {\n var newHeight, oldHeight = element.style.height;\n // Change the .stretch element height to 0 in order find the height of all\n // the other elements\n element.style.height = '0px';\n // In Overview mode, the parent (.slide) height is set of 700px.\n // Restore it temporarily to its natural height.\n slideElement.style.height = 'auto';\n newHeight = height - slideElement.offsetHeight;\n // Restore the old height, just in case\n element.style.height = oldHeight + 'px';\n // Clear the parent (.slide) height. .removeProperty works in IE9+\n slideElement.style.removeProperty('height');\n return newHeight;\n }\n return height;\n}\n\nfunction layoutSlideContents(width, height) {\n // Handle sizing of elements with the 'stretch' class\n toArray(dom.slides.querySelectorAll('section .stretch')).forEach(function (element) {\n // Determine how much vertical space we can use\n var limit = 5; // hard limit\n var parent = element.parentNode;\n while (parent.nodeName !== 'SECTION' && limit > 0) {\n parent = parent.parentNode;\n limit--;\n }\n if (limit === 0) {\n // unable to find parent, aborting!\n return;\n }\n var remainingHeight = getRemainingHeight(element, parent, height);\n // Consider the aspect ratio of media elements\n if (/(img|video)/gi.test(element.nodeName)) {\n var nw = element.naturalWidth || element.videoWidth, nh = element.naturalHeight || element.videoHeight;\n var es = Math.min(width / nw, remainingHeight / nh);\n element.style.width = (nw * es) + 'px';\n element.style.height = (nh * es) + 'px';\n } else {\n element.style.width = width + 'px';\n element.style.height = remainingHeight + 'px';\n }\n });\n}\n\nfunction toArray(o) {\n return Array.prototype.slice.call(o);\n}\n\nReveal.addEventListener('slidechanged', function () {\n layoutSlideContents(".freeze);
949
+ ;
950
+ ;
951
+ ;
952
+ ;
953
+ ;
954
+ ;
955
+ ;
956
+ ;
957
+ ;
958
+ ;
959
+ ;
960
+ ;
961
+ ;
962
+ ;
963
+ ;
964
+ ;
965
+ ;
966
+ ;
967
+ ;
968
+ ;
969
+ ;
970
+ ;
971
+ ;
972
+ ;
973
+ ;
974
+ ;
975
+ ;
976
+ ;
977
+ ;
978
+ ;
979
+ ;
980
+ ;
981
+ ;
982
+ ;
983
+ ;
984
+ ;
985
+ ;
986
+ ;
987
+ ;
988
+ ;
989
+ ;
990
+ ;
991
+ ;
992
+ ;
993
+ ;
994
+ ;
995
+ ;
996
+ ;
997
+ ;
998
+ ;
999
+ ;
1000
+ ;
1001
+ ;
1002
+ ;
1003
+ ;
1004
+ ;
1005
+ ;
1006
+ ;
1007
+ ;
1008
+ ;
1009
+ ; _buf << ((attr 'revealjs_width', 960).to_s); _buf << (", ".freeze); _buf << ((attr 'revealjs_height', 700).to_s); _buf << (")\n});\nReveal.addEventListener('ready', function () {\n layoutSlideContents(".freeze);
1010
+ ;
1011
+ ;
1012
+ ; _buf << ((attr 'revealjs_width', 960).to_s); _buf << (", ".freeze); _buf << ((attr 'revealjs_height', 700).to_s); _buf << (")\n});\nReveal.addEventListener('resize', function () {\n layoutSlideContents(".freeze);
1013
+ ;
1014
+ ;
1015
+ ; _buf << ((attr 'revealjs_width', 960).to_s); _buf << (", ".freeze); _buf << ((attr 'revealjs_height', 700).to_s); _buf << (")\n});</script>".freeze);
1016
+ ;
869
1017
  ;
870
1018
  ; if syntax_hl && (syntax_hl.docinfo? :footer);
871
1019
  ; _buf << ((syntax_hl.docinfo :footer, self, cdn_base_url: cdn_base, linkcss: linkcss, self_closing_tag_slash: '/').to_s);
@@ -911,23 +1059,23 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
911
1059
  ; style_class << "fa-rotate-#{attr :rotate}" if attr? :rotate;
912
1060
  ; style_class << "fa-flip-#{attr :flip}" if attr? :flip;
913
1061
  ; if attr? :link;
914
- ; _buf << ("<a class=\"image\"".freeze); _slim_codeattributes3 = (attr :link); if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes3).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes4 = (attr :window); if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" target".freeze); else; _buf << (" target=\"".freeze); _buf << ((_slim_codeattributes4).to_s); _buf << ("\"".freeze); end; end; _buf << ("><i".freeze);
915
- ; _temple_html_attributeremover2 = ''; _slim_codeattributes5 = style_class; if Array === _slim_codeattributes5; _slim_codeattributes5 = _slim_codeattributes5.flatten; _slim_codeattributes5.map!(&:to_s); _slim_codeattributes5.reject!(&:empty?); _temple_html_attributeremover2 << ((_slim_codeattributes5.join(" ")).to_s); else; _temple_html_attributeremover2 << ((_slim_codeattributes5).to_s); end; _temple_html_attributeremover2; if !_temple_html_attributeremover2.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover2).to_s); _buf << ("\"".freeze); end; _slim_codeattributes6 = (attr :title); if _slim_codeattributes6; if _slim_codeattributes6 == true; _buf << (" title".freeze); else; _buf << (" title=\"".freeze); _buf << ((_slim_codeattributes6).to_s); _buf << ("\"".freeze); end; end; _buf << ("></i></a>".freeze);
1062
+ ; _buf << ("<a class=\"image\"".freeze); _slim_codeattributes3 = (attr :link); if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes3).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes4 = (attr :window); if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" target".freeze); else; _buf << (" target=\"".freeze); _buf << ((_slim_codeattributes4).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes5 = (bool_data_attr :link_preview); if _slim_codeattributes5; if _slim_codeattributes5 == true; _buf << (" data-preview-link".freeze); else; _buf << (" data-preview-link=\"".freeze); _buf << ((_slim_codeattributes5).to_s); _buf << ("\"".freeze); end; end; _buf << ("><i".freeze);
1063
+ ; _temple_html_attributeremover2 = ''; _slim_codeattributes6 = style_class; if Array === _slim_codeattributes6; _slim_codeattributes6 = _slim_codeattributes6.flatten; _slim_codeattributes6.map!(&:to_s); _slim_codeattributes6.reject!(&:empty?); _temple_html_attributeremover2 << ((_slim_codeattributes6.join(" ")).to_s); else; _temple_html_attributeremover2 << ((_slim_codeattributes6).to_s); end; _temple_html_attributeremover2; if !_temple_html_attributeremover2.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover2).to_s); _buf << ("\"".freeze); end; _slim_codeattributes7 = (attr :title); if _slim_codeattributes7; if _slim_codeattributes7 == true; _buf << (" title".freeze); else; _buf << (" title=\"".freeze); _buf << ((_slim_codeattributes7).to_s); _buf << ("\"".freeze); end; end; _buf << ("></i></a>".freeze);
916
1064
  ; else;
917
- ; _buf << ("<i".freeze); _temple_html_attributeremover3 = ''; _slim_codeattributes7 = style_class; if Array === _slim_codeattributes7; _slim_codeattributes7 = _slim_codeattributes7.flatten; _slim_codeattributes7.map!(&:to_s); _slim_codeattributes7.reject!(&:empty?); _temple_html_attributeremover3 << ((_slim_codeattributes7.join(" ")).to_s); else; _temple_html_attributeremover3 << ((_slim_codeattributes7).to_s); end; _temple_html_attributeremover3; if !_temple_html_attributeremover3.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover3).to_s); _buf << ("\"".freeze); end; _slim_codeattributes8 = (attr :title); if _slim_codeattributes8; if _slim_codeattributes8 == true; _buf << (" title".freeze); else; _buf << (" title=\"".freeze); _buf << ((_slim_codeattributes8).to_s); _buf << ("\"".freeze); end; end; _buf << ("></i>".freeze);
1065
+ ; _buf << ("<i".freeze); _temple_html_attributeremover3 = ''; _slim_codeattributes8 = style_class; if Array === _slim_codeattributes8; _slim_codeattributes8 = _slim_codeattributes8.flatten; _slim_codeattributes8.map!(&:to_s); _slim_codeattributes8.reject!(&:empty?); _temple_html_attributeremover3 << ((_slim_codeattributes8.join(" ")).to_s); else; _temple_html_attributeremover3 << ((_slim_codeattributes8).to_s); end; _temple_html_attributeremover3; if !_temple_html_attributeremover3.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover3).to_s); _buf << ("\"".freeze); end; _slim_codeattributes9 = (attr :title); if _slim_codeattributes9; if _slim_codeattributes9 == true; _buf << (" title".freeze); else; _buf << (" title=\"".freeze); _buf << ((_slim_codeattributes9).to_s); _buf << ("\"".freeze); end; end; _buf << ("></i>".freeze);
918
1066
  ; end; elsif @type == 'icon' && !(@document.attr? :icons);
919
1067
  ; if attr? :link;
920
- ; _buf << ("<a class=\"image\"".freeze); _slim_codeattributes9 = (attr :link); if _slim_codeattributes9; if _slim_codeattributes9 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes9).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes10 = (attr :window); if _slim_codeattributes10; if _slim_codeattributes10 == true; _buf << (" target".freeze); else; _buf << (" target=\"".freeze); _buf << ((_slim_codeattributes10).to_s); _buf << ("\"".freeze); end; end; _buf << (">[".freeze);
1068
+ ; _buf << ("<a class=\"image\"".freeze); _slim_codeattributes10 = (attr :link); if _slim_codeattributes10; if _slim_codeattributes10 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes10).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes11 = (attr :window); if _slim_codeattributes11; if _slim_codeattributes11 == true; _buf << (" target".freeze); else; _buf << (" target=\"".freeze); _buf << ((_slim_codeattributes11).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes12 = (bool_data_attr :link_preview); if _slim_codeattributes12; if _slim_codeattributes12 == true; _buf << (" data-preview-link".freeze); else; _buf << (" data-preview-link=\"".freeze); _buf << ((_slim_codeattributes12).to_s); _buf << ("\"".freeze); end; end; _buf << (">[".freeze);
921
1069
  ; _buf << ((attr :alt).to_s); _buf << ("]</a>".freeze);
922
1070
  ; else;
923
1071
  ; _buf << ("[".freeze); _buf << ((attr :alt).to_s); _buf << ("]".freeze);
924
1072
  ; end; else;
925
1073
  ; src = (@type == 'icon' ? (icon_uri @target) : (image_uri @target));
926
1074
  ; if attr? :link;
927
- ; _buf << ("<a class=\"image\"".freeze); _slim_codeattributes11 = (attr :link); if _slim_codeattributes11; if _slim_codeattributes11 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes11).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes12 = (attr :window); if _slim_codeattributes12; if _slim_codeattributes12 == true; _buf << (" target".freeze); else; _buf << (" target=\"".freeze); _buf << ((_slim_codeattributes12).to_s); _buf << ("\"".freeze); end; end; _buf << ("><img".freeze);
928
- ; _slim_codeattributes13 = src; if _slim_codeattributes13; if _slim_codeattributes13 == true; _buf << (" src".freeze); else; _buf << (" src=\"".freeze); _buf << ((_slim_codeattributes13).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes14 = (attr :alt); if _slim_codeattributes14; if _slim_codeattributes14 == true; _buf << (" alt".freeze); else; _buf << (" alt=\"".freeze); _buf << ((_slim_codeattributes14).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes15 = (attr :width); if _slim_codeattributes15; if _slim_codeattributes15 == true; _buf << (" width".freeze); else; _buf << (" width=\"".freeze); _buf << ((_slim_codeattributes15).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes16 = (attr :height); if _slim_codeattributes16; if _slim_codeattributes16 == true; _buf << (" height".freeze); else; _buf << (" height=\"".freeze); _buf << ((_slim_codeattributes16).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes17 = (attr :title); if _slim_codeattributes17; if _slim_codeattributes17 == true; _buf << (" title".freeze); else; _buf << (" title=\"".freeze); _buf << ((_slim_codeattributes17).to_s); _buf << ("\"".freeze); end; end; _buf << ("></a>".freeze);
1075
+ ; _buf << ("<a class=\"image\"".freeze); _slim_codeattributes13 = (attr :link); if _slim_codeattributes13; if _slim_codeattributes13 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes13).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes14 = (attr :window); if _slim_codeattributes14; if _slim_codeattributes14 == true; _buf << (" target".freeze); else; _buf << (" target=\"".freeze); _buf << ((_slim_codeattributes14).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes15 = (bool_data_attr :link_preview); if _slim_codeattributes15; if _slim_codeattributes15 == true; _buf << (" data-preview-link".freeze); else; _buf << (" data-preview-link=\"".freeze); _buf << ((_slim_codeattributes15).to_s); _buf << ("\"".freeze); end; end; _buf << ("><img".freeze);
1076
+ ; _slim_codeattributes16 = src; if _slim_codeattributes16; if _slim_codeattributes16 == true; _buf << (" src".freeze); else; _buf << (" src=\"".freeze); _buf << ((_slim_codeattributes16).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes17 = (attr :alt); if _slim_codeattributes17; if _slim_codeattributes17 == true; _buf << (" alt".freeze); else; _buf << (" alt=\"".freeze); _buf << ((_slim_codeattributes17).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes18 = (attr :width); if _slim_codeattributes18; if _slim_codeattributes18 == true; _buf << (" width".freeze); else; _buf << (" width=\"".freeze); _buf << ((_slim_codeattributes18).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes19 = (attr :height); if _slim_codeattributes19; if _slim_codeattributes19 == true; _buf << (" height".freeze); else; _buf << (" height=\"".freeze); _buf << ((_slim_codeattributes19).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes20 = (attr :title); if _slim_codeattributes20; if _slim_codeattributes20 == true; _buf << (" title".freeze); else; _buf << (" title=\"".freeze); _buf << ((_slim_codeattributes20).to_s); _buf << ("\"".freeze); end; end; _buf << ("></a>".freeze);
929
1077
  ; else;
930
- ; _buf << ("<img".freeze); _slim_codeattributes18 = src; if _slim_codeattributes18; if _slim_codeattributes18 == true; _buf << (" src".freeze); else; _buf << (" src=\"".freeze); _buf << ((_slim_codeattributes18).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes19 = (attr :alt); if _slim_codeattributes19; if _slim_codeattributes19 == true; _buf << (" alt".freeze); else; _buf << (" alt=\"".freeze); _buf << ((_slim_codeattributes19).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes20 = (attr :width); if _slim_codeattributes20; if _slim_codeattributes20 == true; _buf << (" width".freeze); else; _buf << (" width=\"".freeze); _buf << ((_slim_codeattributes20).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes21 = (attr :height); if _slim_codeattributes21; if _slim_codeattributes21 == true; _buf << (" height".freeze); else; _buf << (" height=\"".freeze); _buf << ((_slim_codeattributes21).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes22 = (attr :title); if _slim_codeattributes22; if _slim_codeattributes22 == true; _buf << (" title".freeze); else; _buf << (" title=\"".freeze); _buf << ((_slim_codeattributes22).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
1078
+ ; _buf << ("<img".freeze); _slim_codeattributes21 = src; if _slim_codeattributes21; if _slim_codeattributes21 == true; _buf << (" src".freeze); else; _buf << (" src=\"".freeze); _buf << ((_slim_codeattributes21).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes22 = (attr :alt); if _slim_codeattributes22; if _slim_codeattributes22 == true; _buf << (" alt".freeze); else; _buf << (" alt=\"".freeze); _buf << ((_slim_codeattributes22).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes23 = (attr :width); if _slim_codeattributes23; if _slim_codeattributes23 == true; _buf << (" width".freeze); else; _buf << (" width=\"".freeze); _buf << ((_slim_codeattributes23).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes24 = (attr :height); if _slim_codeattributes24; if _slim_codeattributes24 == true; _buf << (" height".freeze); else; _buf << (" height=\"".freeze); _buf << ((_slim_codeattributes24).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes25 = (attr :title); if _slim_codeattributes25; if _slim_codeattributes25 == true; _buf << (" title".freeze); else; _buf << (" title=\"".freeze); _buf << ((_slim_codeattributes25).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
931
1079
  ; end; end; _buf << ("</span>".freeze); _buf
932
1080
  end
933
1081
  end
@@ -1019,6 +1167,42 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
1019
1167
  end
1020
1168
  end
1021
1169
 
1170
+ def title_slide(node, opts = {})
1171
+ node.extend(Helpers)
1172
+ node.instance_eval do
1173
+ converter.set_local_variables(binding, opts) unless opts.empty?
1174
+ _buf = ''; bg_image = (attr? 'title-slide-background-image') ? (image_uri(attr 'title-slide-background-image')) : nil;
1175
+ ; bg_video = (attr? 'title-slide-background-video') ? (media_uri(attr 'title-slide-background-video')) : nil;
1176
+ ;
1177
+ ;
1178
+ ;
1179
+ ;
1180
+ ;
1181
+ ;
1182
+ ;
1183
+ ;
1184
+ ;
1185
+ ;
1186
+ ;
1187
+ ;
1188
+ ;
1189
+ ;
1190
+ ;
1191
+ ; _buf << ("<section".freeze); _temple_html_attributeremover1 = ''; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "title"; _temple_html_attributemerger1[1] = ''; _slim_codeattributes1 = role; if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributemerger1[1] << ((_slim_codeattributes1.join(" ")).to_s); else; _temple_html_attributemerger1[1] << ((_slim_codeattributes1).to_s); end; _temple_html_attributemerger1[1]; _temple_html_attributeremover1 << ((_temple_html_attributemerger1.reject(&:empty?).join(" ")).to_s); _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover1).to_s); _buf << ("\"".freeze); end; _buf << (" data-state=\"title\"".freeze); _slim_codeattributes2 = (attr 'title-slide-transition'); if _slim_codeattributes2; if _slim_codeattributes2 == true; _buf << (" data-transition".freeze); else; _buf << (" data-transition=\"".freeze); _buf << ((_slim_codeattributes2).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes3 = (attr 'title-slide-transition-speed'); if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" data-transition-speed".freeze); else; _buf << (" data-transition-speed=\"".freeze); _buf << ((_slim_codeattributes3).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes4 = (attr 'title-slide-background'); if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" data-background".freeze); else; _buf << (" data-background=\"".freeze); _buf << ((_slim_codeattributes4).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes5 = (attr 'title-slide-background-size'); if _slim_codeattributes5; if _slim_codeattributes5 == true; _buf << (" data-background-size".freeze); else; _buf << (" data-background-size=\"".freeze); _buf << ((_slim_codeattributes5).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes6 = bg_image; if _slim_codeattributes6; if _slim_codeattributes6 == true; _buf << (" data-background-image".freeze); else; _buf << (" data-background-image=\"".freeze); _buf << ((_slim_codeattributes6).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes7 = bg_video; if _slim_codeattributes7; if _slim_codeattributes7 == true; _buf << (" data-background-video".freeze); else; _buf << (" data-background-video=\"".freeze); _buf << ((_slim_codeattributes7).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes8 = (attr 'title-slide-background-video-loop'); if _slim_codeattributes8; if _slim_codeattributes8 == true; _buf << (" data-background-video-loop".freeze); else; _buf << (" data-background-video-loop=\"".freeze); _buf << ((_slim_codeattributes8).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes9 = (attr 'title-slide-background-video-muted'); if _slim_codeattributes9; if _slim_codeattributes9 == true; _buf << (" data-background-video-muted".freeze); else; _buf << (" data-background-video-muted=\"".freeze); _buf << ((_slim_codeattributes9).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes10 = (attr 'title-slide-background-opacity'); if _slim_codeattributes10; if _slim_codeattributes10 == true; _buf << (" data-background-opacity".freeze); else; _buf << (" data-background-opacity=\"".freeze); _buf << ((_slim_codeattributes10).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes11 = (attr 'title-slide-background-iframe'); if _slim_codeattributes11; if _slim_codeattributes11 == true; _buf << (" data-background-iframe".freeze); else; _buf << (" data-background-iframe=\"".freeze); _buf << ((_slim_codeattributes11).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes12 = (attr 'title-slide-background-color'); if _slim_codeattributes12; if _slim_codeattributes12 == true; _buf << (" data-background-color".freeze); else; _buf << (" data-background-color=\"".freeze); _buf << ((_slim_codeattributes12).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes13 = (attr 'title-slide-background-repeat'); if _slim_codeattributes13; if _slim_codeattributes13 == true; _buf << (" data-background-repeat".freeze); else; _buf << (" data-background-repeat=\"".freeze); _buf << ((_slim_codeattributes13).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes14 = (attr 'title-slide-background-position'); if _slim_codeattributes14; if _slim_codeattributes14 == true; _buf << (" data-background-position".freeze); else; _buf << (" data-background-position=\"".freeze); _buf << ((_slim_codeattributes14).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes15 = (attr 'title-slide-background-transition'); if _slim_codeattributes15; if _slim_codeattributes15 == true; _buf << (" data-background-transition".freeze); else; _buf << (" data-background-transition=\"".freeze); _buf << ((_slim_codeattributes15).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
1192
+ ; if (_title_obj = doctitle partition: true, use_fallback: true).subtitle?;
1193
+ ; _buf << ("<h1>".freeze); _buf << ((slice_text _title_obj.title, (_slice = header.option? :slice)).to_s);
1194
+ ; _buf << ("</h1><h2>".freeze); _buf << ((slice_text _title_obj.subtitle, _slice).to_s);
1195
+ ; _buf << ("</h2>".freeze); else;
1196
+ ; _buf << ("<h1>".freeze); _buf << ((@header.title).to_s);
1197
+ ; _buf << ("</h1>".freeze); end; preamble = @document.find_by context: :preamble;
1198
+ ; unless preamble.nil? or preamble.length == 0;
1199
+ ; _buf << ("<div class=\"preamble\">".freeze); _buf << ((preamble.pop.content).to_s);
1200
+ ; _buf << ("</div>".freeze); end; unless author.nil?;
1201
+ ; _buf << ("<p class=\"author\"><small>".freeze); _buf << ((author).to_s);
1202
+ ; _buf << ("</small></p>".freeze); end; _buf << ("</section>".freeze); _buf
1203
+ end
1204
+ end
1205
+
1022
1206
  def sidebar(node, opts = {})
1023
1207
  node.extend(Helpers)
1024
1208
  node.instance_eval do
@@ -1058,8 +1242,8 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
1058
1242
  node.instance_eval do
1059
1243
  converter.set_local_variables(binding, opts) unless opts.empty?
1060
1244
  _buf = ''; nowrap = (option? 'nowrap') || !(document.attr? 'prewrap');
1061
- ; syntax_hl = document.syntax_highlighter;
1062
1245
  ; if @style == 'source';
1246
+ ; syntax_hl = document.syntax_highlighter;
1063
1247
  ; lang = attr :language;
1064
1248
  ; if syntax_hl;
1065
1249
  ; doc_attrs = document.attributes;
@@ -1135,10 +1319,9 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
1135
1319
  ; end; if attr? 'background-color';
1136
1320
  ; data_background_color = attr 'background-color';
1137
1321
  ;
1322
+ ; end; parent_section_with_vertical_slides = @level == 1 && !vertical_slides.empty?;
1138
1323
  ;
1139
- ;
1140
- ; end; if @level == 1 && !vertical_slides.empty?;
1141
- ; _buf << ("<section><section".freeze);
1324
+ ; content_for :section do;
1142
1325
  ;
1143
1326
  ;
1144
1327
  ;
@@ -1154,14 +1337,25 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
1154
1337
  ;
1155
1338
  ;
1156
1339
  ;
1157
- ;
1158
- ; _slim_codeattributes1 = (titleless ? nil : id); if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" id".freeze); else; _buf << (" id=\"".freeze); _buf << ((_slim_codeattributes1).to_s); _buf << ("\"".freeze); end; end; _temple_html_attributeremover1 = ''; _slim_codeattributes2 = roles; if Array === _slim_codeattributes2; _slim_codeattributes2 = _slim_codeattributes2.flatten; _slim_codeattributes2.map!(&:to_s); _slim_codeattributes2.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes2.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes2).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover1).to_s); _buf << ("\"".freeze); end; _slim_codeattributes3 = (attr 'transition'); if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" data-transition".freeze); else; _buf << (" data-transition=\"".freeze); _buf << ((_slim_codeattributes3).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes4 = (attr 'transition-speed'); if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" data-transition-speed".freeze); else; _buf << (" data-transition-speed=\"".freeze); _buf << ((_slim_codeattributes4).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes5 = data_background_color; if _slim_codeattributes5; if _slim_codeattributes5 == true; _buf << (" data-background-color".freeze); else; _buf << (" data-background-color=\"".freeze); _buf << ((_slim_codeattributes5).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes6 = data_background_image; if _slim_codeattributes6; if _slim_codeattributes6 == true; _buf << (" data-background-image".freeze); else; _buf << (" data-background-image=\"".freeze); _buf << ((_slim_codeattributes6).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes7 = (data_background_size || attr('background-size')); if _slim_codeattributes7; if _slim_codeattributes7 == true; _buf << (" data-background-size".freeze); else; _buf << (" data-background-size=\"".freeze); _buf << ((_slim_codeattributes7).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes8 = (data_background_repeat || attr('background-repeat')); if _slim_codeattributes8; if _slim_codeattributes8 == true; _buf << (" data-background-repeat".freeze); else; _buf << (" data-background-repeat=\"".freeze); _buf << ((_slim_codeattributes8).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes9 = (data_background_transition || attr('background-transition')); if _slim_codeattributes9; if _slim_codeattributes9 == true; _buf << (" data-background-transition".freeze); else; _buf << (" data-background-transition=\"".freeze); _buf << ((_slim_codeattributes9).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes10 = (data_background_position || attr('background-position')); if _slim_codeattributes10; if _slim_codeattributes10 == true; _buf << (" data-background-position".freeze); else; _buf << (" data-background-position=\"".freeze); _buf << ((_slim_codeattributes10).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes11 = (attr "background-iframe"); if _slim_codeattributes11; if _slim_codeattributes11 == true; _buf << (" data-background-iframe".freeze); else; _buf << (" data-background-iframe=\"".freeze); _buf << ((_slim_codeattributes11).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes12 = (attr "background-video"); if _slim_codeattributes12; if _slim_codeattributes12 == true; _buf << (" data-background-video".freeze); else; _buf << (" data-background-video=\"".freeze); _buf << ((_slim_codeattributes12).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes13 = ((attr? 'background-video-loop') || (option? 'loop')); if _slim_codeattributes13; if _slim_codeattributes13 == true; _buf << (" data-background-video-loop".freeze); else; _buf << (" data-background-video-loop=\"".freeze); _buf << ((_slim_codeattributes13).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes14 = ((attr? 'background-video-muted') || (option? 'muted')); if _slim_codeattributes14; if _slim_codeattributes14 == true; _buf << (" data-background-video-muted".freeze); else; _buf << (" data-background-video-muted=\"".freeze); _buf << ((_slim_codeattributes14).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes15 = (attr "background-opacity"); if _slim_codeattributes15; if _slim_codeattributes15 == true; _buf << (" data-background-opacity".freeze); else; _buf << (" data-background-opacity=\"".freeze); _buf << ((_slim_codeattributes15).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes16 = (attr 'state'); if _slim_codeattributes16; if _slim_codeattributes16 == true; _buf << (" data-state".freeze); else; _buf << (" data-state=\"".freeze); _buf << ((_slim_codeattributes16).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
1159
- ;
1340
+ ; _buf << ("<section".freeze); _slim_codeattributes1 = (titleless ? nil : id); if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" id".freeze); else; _buf << (" id=\"".freeze); _buf << ((_slim_codeattributes1).to_s); _buf << ("\"".freeze); end; end; _temple_html_attributeremover1 = ''; _slim_codeattributes2 = roles; if Array === _slim_codeattributes2; _slim_codeattributes2 = _slim_codeattributes2.flatten; _slim_codeattributes2.map!(&:to_s); _slim_codeattributes2.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes2.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes2).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover1).to_s); _buf << ("\"".freeze); end; _slim_codeattributes3 = (attr 'transition'); if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" data-transition".freeze); else; _buf << (" data-transition=\"".freeze); _buf << ((_slim_codeattributes3).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes4 = (attr 'transition-speed'); if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" data-transition-speed".freeze); else; _buf << (" data-transition-speed=\"".freeze); _buf << ((_slim_codeattributes4).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes5 = data_background_color; if _slim_codeattributes5; if _slim_codeattributes5 == true; _buf << (" data-background-color".freeze); else; _buf << (" data-background-color=\"".freeze); _buf << ((_slim_codeattributes5).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes6 = data_background_image; if _slim_codeattributes6; if _slim_codeattributes6 == true; _buf << (" data-background-image".freeze); else; _buf << (" data-background-image=\"".freeze); _buf << ((_slim_codeattributes6).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes7 = (data_background_size || attr('background-size')); if _slim_codeattributes7; if _slim_codeattributes7 == true; _buf << (" data-background-size".freeze); else; _buf << (" data-background-size=\"".freeze); _buf << ((_slim_codeattributes7).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes8 = (data_background_repeat || attr('background-repeat')); if _slim_codeattributes8; if _slim_codeattributes8 == true; _buf << (" data-background-repeat".freeze); else; _buf << (" data-background-repeat=\"".freeze); _buf << ((_slim_codeattributes8).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes9 = (data_background_transition || attr('background-transition')); if _slim_codeattributes9; if _slim_codeattributes9 == true; _buf << (" data-background-transition".freeze); else; _buf << (" data-background-transition=\"".freeze); _buf << ((_slim_codeattributes9).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes10 = (data_background_position || attr('background-position')); if _slim_codeattributes10; if _slim_codeattributes10 == true; _buf << (" data-background-position".freeze); else; _buf << (" data-background-position=\"".freeze); _buf << ((_slim_codeattributes10).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes11 = (attr "background-iframe"); if _slim_codeattributes11; if _slim_codeattributes11 == true; _buf << (" data-background-iframe".freeze); else; _buf << (" data-background-iframe=\"".freeze); _buf << ((_slim_codeattributes11).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes12 = (attr "background-video"); if _slim_codeattributes12; if _slim_codeattributes12 == true; _buf << (" data-background-video".freeze); else; _buf << (" data-background-video=\"".freeze); _buf << ((_slim_codeattributes12).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes13 = ((attr? 'background-video-loop') || (option? 'loop')); if _slim_codeattributes13; if _slim_codeattributes13 == true; _buf << (" data-background-video-loop".freeze); else; _buf << (" data-background-video-loop=\"".freeze); _buf << ((_slim_codeattributes13).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes14 = ((attr? 'background-video-muted') || (option? 'muted')); if _slim_codeattributes14; if _slim_codeattributes14 == true; _buf << (" data-background-video-muted".freeze); else; _buf << (" data-background-video-muted=\"".freeze); _buf << ((_slim_codeattributes14).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes15 = (attr "background-opacity"); if _slim_codeattributes15; if _slim_codeattributes15 == true; _buf << (" data-background-opacity".freeze); else; _buf << (" data-background-opacity=\"".freeze); _buf << ((_slim_codeattributes15).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes16 = (attr 'state'); if _slim_codeattributes16; if _slim_codeattributes16 == true; _buf << (" data-state".freeze); else; _buf << (" data-state=\"".freeze); _buf << ((_slim_codeattributes16).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
1160
1341
  ; unless hide_title;
1161
- ; _buf << ("<h2>".freeze); _buf << ((title).to_s);
1162
- ; _buf << ("</h2>".freeze); end; (blocks - vertical_slides).each do |block|;
1342
+ ; _buf << ("<h2>".freeze); _buf << ((section_title).to_s);
1343
+ ; _buf << ("</h2>".freeze); end; if parent_section_with_vertical_slides;
1344
+ ; unless (_blocks = blocks - vertical_slides).empty?;
1345
+ ; _buf << ("<div class=\"slide-content\">".freeze);
1346
+ ; _blocks.each do |block|;
1163
1347
  ; _buf << ((block.convert).to_s);
1164
- ; end; _buf << ("</section>".freeze); vertical_slides.each do |subsection|;
1348
+ ; end; _buf << ("</div>".freeze); end; else;
1349
+ ; unless (_content = content.chomp).empty?;
1350
+ ; _buf << ("<div class=\"slide-content\">".freeze);
1351
+ ; _buf << ((_content).to_s);
1352
+ ;
1353
+ ; _buf << ("</div>".freeze); end; end; _buf << ("</section>".freeze);
1354
+ ;
1355
+ ; end; if parent_section_with_vertical_slides;
1356
+ ; _buf << ("<section>".freeze);
1357
+ ; yield_content :section;
1358
+ ; vertical_slides.each do |subsection|;
1165
1359
  ; _buf << ((subsection.convert).to_s);
1166
1360
  ;
1167
1361
  ; end; _buf << ("</section>".freeze);
@@ -1171,27 +1365,8 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
1171
1365
  ; _slim_htag_filter1 = ((@level)).to_s; _buf << ("<h".freeze); _buf << ((_slim_htag_filter1).to_s); _buf << (">".freeze); _buf << ((title).to_s);
1172
1366
  ; _buf << ("</h".freeze); _buf << ((_slim_htag_filter1).to_s); _buf << (">".freeze); _buf << ((content.chomp).to_s);
1173
1367
  ; else;
1174
- ;
1175
- ;
1176
- ;
1177
- ;
1178
- ;
1179
- ;
1180
- ;
1181
- ;
1182
- ;
1183
- ;
1184
- ;
1185
- ;
1186
- ;
1187
- ;
1188
- ;
1189
- ; _buf << ("<section".freeze); _slim_codeattributes17 = (titleless ? nil : id); if _slim_codeattributes17; if _slim_codeattributes17 == true; _buf << (" id".freeze); else; _buf << (" id=\"".freeze); _buf << ((_slim_codeattributes17).to_s); _buf << ("\"".freeze); end; end; _temple_html_attributeremover2 = ''; _slim_codeattributes18 = roles; if Array === _slim_codeattributes18; _slim_codeattributes18 = _slim_codeattributes18.flatten; _slim_codeattributes18.map!(&:to_s); _slim_codeattributes18.reject!(&:empty?); _temple_html_attributeremover2 << ((_slim_codeattributes18.join(" ")).to_s); else; _temple_html_attributeremover2 << ((_slim_codeattributes18).to_s); end; _temple_html_attributeremover2; if !_temple_html_attributeremover2.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover2).to_s); _buf << ("\"".freeze); end; _slim_codeattributes19 = (attr 'transition'); if _slim_codeattributes19; if _slim_codeattributes19 == true; _buf << (" data-transition".freeze); else; _buf << (" data-transition=\"".freeze); _buf << ((_slim_codeattributes19).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes20 = (attr 'transition-speed'); if _slim_codeattributes20; if _slim_codeattributes20 == true; _buf << (" data-transition-speed".freeze); else; _buf << (" data-transition-speed=\"".freeze); _buf << ((_slim_codeattributes20).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes21 = data_background_color; if _slim_codeattributes21; if _slim_codeattributes21 == true; _buf << (" data-background-color".freeze); else; _buf << (" data-background-color=\"".freeze); _buf << ((_slim_codeattributes21).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes22 = data_background_image; if _slim_codeattributes22; if _slim_codeattributes22 == true; _buf << (" data-background-image".freeze); else; _buf << (" data-background-image=\"".freeze); _buf << ((_slim_codeattributes22).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes23 = (data_background_size || attr('background-size')); if _slim_codeattributes23; if _slim_codeattributes23 == true; _buf << (" data-background-size".freeze); else; _buf << (" data-background-size=\"".freeze); _buf << ((_slim_codeattributes23).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes24 = (data_background_repeat || attr('background-repeat')); if _slim_codeattributes24; if _slim_codeattributes24 == true; _buf << (" data-background-repeat".freeze); else; _buf << (" data-background-repeat=\"".freeze); _buf << ((_slim_codeattributes24).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes25 = (data_background_transition || attr('background-transition')); if _slim_codeattributes25; if _slim_codeattributes25 == true; _buf << (" data-background-transition".freeze); else; _buf << (" data-background-transition=\"".freeze); _buf << ((_slim_codeattributes25).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes26 = (data_background_position || attr('background-position')); if _slim_codeattributes26; if _slim_codeattributes26 == true; _buf << (" data-background-position".freeze); else; _buf << (" data-background-position=\"".freeze); _buf << ((_slim_codeattributes26).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes27 = (attr "background-iframe"); if _slim_codeattributes27; if _slim_codeattributes27 == true; _buf << (" data-background-iframe".freeze); else; _buf << (" data-background-iframe=\"".freeze); _buf << ((_slim_codeattributes27).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes28 = (attr "background-video"); if _slim_codeattributes28; if _slim_codeattributes28 == true; _buf << (" data-background-video".freeze); else; _buf << (" data-background-video=\"".freeze); _buf << ((_slim_codeattributes28).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes29 = ((attr? 'background-video-loop') || (option? 'loop')); if _slim_codeattributes29; if _slim_codeattributes29 == true; _buf << (" data-background-video-loop".freeze); else; _buf << (" data-background-video-loop=\"".freeze); _buf << ((_slim_codeattributes29).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes30 = ((attr? 'background-video-muted') || (option? 'muted')); if _slim_codeattributes30; if _slim_codeattributes30 == true; _buf << (" data-background-video-muted".freeze); else; _buf << (" data-background-video-muted=\"".freeze); _buf << ((_slim_codeattributes30).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes31 = (attr "background-opacity"); if _slim_codeattributes31; if _slim_codeattributes31 == true; _buf << (" data-background-opacity".freeze); else; _buf << (" data-background-opacity=\"".freeze); _buf << ((_slim_codeattributes31).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes32 = (attr 'state'); if _slim_codeattributes32; if _slim_codeattributes32 == true; _buf << (" data-state".freeze); else; _buf << (" data-state=\"".freeze); _buf << ((_slim_codeattributes32).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
1190
- ;
1191
- ; unless hide_title;
1192
- ; _buf << ("<h2>".freeze); _buf << ((title).to_s);
1193
- ; _buf << ("</h2>".freeze); end; _buf << ((content.chomp).to_s);
1194
- ; _buf << ("</section>".freeze); end; end; _buf
1368
+ ; yield_content :section;
1369
+ ; end; end; _buf
1195
1370
  end
1196
1371
  end
1197
1372
 
@@ -1302,7 +1477,8 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
1302
1477
  ; _buf << ("<a".freeze); _slim_codeattributes3 = @target; if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" id".freeze); else; _buf << (" id=\"".freeze); _buf << ((_slim_codeattributes3).to_s); _buf << ("\"".freeze); end; end; _buf << ("></a>[".freeze);
1303
1478
  ; _buf << ((@target).to_s); _buf << ("]".freeze);
1304
1479
  ; else;
1305
- ; _buf << ("<a".freeze); _slim_codeattributes4 = @target; if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes4).to_s); _buf << ("\"".freeze); end; end; _temple_html_attributeremover1 = ''; _slim_codeattributes5 = role; if Array === _slim_codeattributes5; _slim_codeattributes5 = _slim_codeattributes5.flatten; _slim_codeattributes5.map!(&:to_s); _slim_codeattributes5.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes5.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes5).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover1).to_s); _buf << ("\"".freeze); end; _slim_codeattributes6 = (attr :window); if _slim_codeattributes6; if _slim_codeattributes6 == true; _buf << (" target".freeze); else; _buf << (" target=\"".freeze); _buf << ((_slim_codeattributes6).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze); _buf << ((@text).to_s);
1480
+ ; _buf << ("<a".freeze); _slim_codeattributes4 = @target; if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes4).to_s); _buf << ("\"".freeze); end; end; _temple_html_attributeremover1 = ''; _slim_codeattributes5 = role; if Array === _slim_codeattributes5; _slim_codeattributes5 = _slim_codeattributes5.flatten; _slim_codeattributes5.map!(&:to_s); _slim_codeattributes5.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes5.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes5).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover1).to_s); _buf << ("\"".freeze); end; _slim_codeattributes6 = (attr :window); if _slim_codeattributes6; if _slim_codeattributes6 == true; _buf << (" target".freeze); else; _buf << (" target=\"".freeze); _buf << ((_slim_codeattributes6).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes7 = (bool_data_attr :preview); if _slim_codeattributes7; if _slim_codeattributes7 == true; _buf << (" data-preview-link".freeze); else; _buf << (" data-preview-link=\"".freeze); _buf << ((_slim_codeattributes7).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
1481
+ ; _buf << ((@text).to_s);
1306
1482
  ; _buf << ("</a>".freeze); end; _buf
1307
1483
  end
1308
1484
  end