asciidoctor-revealjs 4.1.0 → 5.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +7 -2
- data/README.adoc +12 -1351
- data/asciidoctor-revealjs.gemspec +2 -3
- data/examples/auto-animate-code.adoc +47 -0
- data/examples/auto-animate.adoc +351 -0
- data/examples/favicon.adoc +13 -0
- data/examples/images/sample.svg +27 -0
- data/examples/mathjax-cdn.adoc +1 -1
- data/examples/mathjax.adoc +1 -1
- data/examples/revealjs-custom-theme.adoc +1 -1
- data/examples/revealjs-plugin-activation.adoc +3 -2
- data/examples/revealjs-plugins/chalkboard/README.md +94 -61
- data/examples/revealjs-plugins/chalkboard/img/boardmarker-black.png +0 -0
- data/examples/revealjs-plugins/chalkboard/img/boardmarker-blue.png +0 -0
- data/examples/revealjs-plugins/chalkboard/img/boardmarker-green.png +0 -0
- data/examples/revealjs-plugins/chalkboard/img/boardmarker-orange.png +0 -0
- data/examples/revealjs-plugins/chalkboard/img/boardmarker-purple.png +0 -0
- data/examples/revealjs-plugins/chalkboard/img/boardmarker-red.png +0 -0
- data/examples/revealjs-plugins/chalkboard/img/boardmarker-yellow.png +0 -0
- data/examples/revealjs-plugins/chalkboard/img/chalk-blue.png +0 -0
- data/examples/revealjs-plugins/chalkboard/img/chalk-green.png +0 -0
- data/examples/revealjs-plugins/chalkboard/img/chalk-orange.png +0 -0
- data/examples/revealjs-plugins/chalkboard/img/chalk-purple.png +0 -0
- data/examples/revealjs-plugins/chalkboard/img/chalk-red.png +0 -0
- data/examples/revealjs-plugins/chalkboard/img/chalk-yellow.png +0 -0
- data/examples/revealjs-plugins/chalkboard/plugin.js +1836 -0
- data/examples/revealjs-plugins/chalkboard/style.css +38 -0
- data/examples/revealjs-plugins/{reveal.js-menu → menu}/LICENSE +1 -1
- data/examples/revealjs-plugins/menu/README.md +368 -0
- data/examples/revealjs-plugins/{reveal.js-menu → menu}/menu.css +116 -115
- data/examples/revealjs-plugins/menu/menu.esm.js +1 -0
- data/examples/revealjs-plugins/menu/menu.js +1 -0
- data/examples/revealjs-plugins/menu/plugin.js +1252 -0
- data/examples/revealjs-plugins-docinfo-footer.html +20 -0
- data/examples/revealjs-plugins.adoc +2 -3
- data/examples/search-plugin.adoc +26 -0
- data/examples/source-rouge.adoc +1 -1
- data/examples/svg-images-docinfo-revealjs.html +15 -0
- data/examples/svg-images.adoc +41 -0
- data/examples/text-formatting.adoc +34 -0
- data/lib/asciidoctor-revealjs/converter.rb +819 -686
- data/lib/asciidoctor-revealjs/highlightjs.rb +155 -14
- data/lib/asciidoctor-revealjs/version.rb +1 -1
- data/templates/asciidoctor-compatibility.css +26 -1
- data/templates/document.html.slim +28 -44
- data/templates/helpers.rb +188 -10
- data/templates/image.html.slim +1 -16
- data/templates/inline_image.html.slim +1 -20
- data/templates/inline_quoted.html.slim +2 -2
- data/templates/listing.html.slim +2 -1
- data/templates/section.html.slim +7 -1
- data/templates/title_slide.html.slim +1 -2
- metadata +58 -81
- data/examples/revealjs-plugins/chalkboard/chalkboard.js +0 -1288
- data/examples/revealjs-plugins/chalkboard/img/boardmarker.png +0 -0
- data/examples/revealjs-plugins/reveal.js-menu/CONTRIBUTING.md +0 -9
- data/examples/revealjs-plugins/reveal.js-menu/README.md +0 -334
- data/examples/revealjs-plugins/reveal.js-menu/bower.json +0 -21
- data/examples/revealjs-plugins/reveal.js-menu/menu.js +0 -949
- data/examples/revealjs-plugins/reveal.js-menu/package.json +0 -22
- data/examples/revealjs-plugins-conf.js +0 -10
- data/examples/revealjs-plugins.js +0 -2
- /data/examples/revealjs-plugins/chalkboard/img/{chalk.png → chalk-white.png} +0 -0
- /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/LICENSE.txt +0 -0
- /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/all.css +0 -0
- /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/brands.css +0 -0
- /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/fontawesome.css +0 -0
- /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/regular.css +0 -0
- /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/solid.css +0 -0
- /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/svg-with-js.css +0 -0
- /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/v4-shims.css +0 -0
- /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/v4-shims.min.css +0 -0
- /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-brands-400.eot +0 -0
- /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-brands-400.svg +0 -0
- /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-brands-400.ttf +0 -0
- /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-brands-400.woff +0 -0
- /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-brands-400.woff2 +0 -0
- /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-regular-400.eot +0 -0
- /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-regular-400.svg +0 -0
- /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-regular-400.ttf +0 -0
- /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-regular-400.woff +0 -0
- /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-regular-400.woff2 +0 -0
- /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-solid-900.eot +0 -0
- /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-solid-900.svg +0 -0
- /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-solid-900.ttf +0 -0
- /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-solid-900.woff +0 -0
- /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-solid-900.woff2 +0 -0
@@ -11,6 +11,8 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
11
11
|
require 'asciidoctor'
|
12
12
|
end
|
13
13
|
|
14
|
+
require 'json'
|
15
|
+
|
14
16
|
# This module gets mixed in to every node (the context of the template) at the
|
15
17
|
# time the node is being converted. The properties and methods in this module
|
16
18
|
# effectively become direct members of the template.
|
@@ -198,21 +200,102 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
198
200
|
end
|
199
201
|
end
|
200
202
|
|
203
|
+
# Retrieves the built-in html5 converter.
|
204
|
+
#
|
205
|
+
# Returns the instance of the Asciidoctor::Converter::Html5Converter
|
206
|
+
# associated with this node.
|
207
|
+
def html5_converter
|
208
|
+
converter.instance_variable_get("@delegate_converter")
|
209
|
+
end
|
210
|
+
|
211
|
+
def convert_inline_image(node = self)
|
212
|
+
target = node.target
|
213
|
+
if (node.type || 'image') == 'icon'
|
214
|
+
if (icons = node.document.attr 'icons') == 'font'
|
215
|
+
i_class_attr_val = %(#{node.attr(:set, 'fa')} fa-#{target})
|
216
|
+
i_class_attr_val = %(#{i_class_attr_val} fa-#{node.attr 'size'}) if node.attr? 'size'
|
217
|
+
if node.attr? 'flip'
|
218
|
+
i_class_attr_val = %(#{i_class_attr_val} fa-flip-#{node.attr 'flip'})
|
219
|
+
elsif node.attr? 'rotate'
|
220
|
+
i_class_attr_val = %(#{i_class_attr_val} fa-rotate-#{node.attr 'rotate'})
|
221
|
+
end
|
222
|
+
attrs = (node.attr? 'title') ? %( title="#{node.attr 'title'}") : ''
|
223
|
+
img = %(<i class="#{i_class_attr_val}"#{attrs}></i>)
|
224
|
+
elsif icons
|
225
|
+
attrs = (node.attr? 'width') ? %( width="#{node.attr 'width'}") : ''
|
226
|
+
attrs = %(#{attrs} height="#{node.attr 'height'}") if node.attr? 'height'
|
227
|
+
attrs = %(#{attrs} title="#{node.attr 'title'}") if node.attr? 'title'
|
228
|
+
img = %(<img src="#{src = node.icon_uri target}" alt="#{encode_attribute_value node.alt}"#{attrs}>)
|
229
|
+
else
|
230
|
+
img = %([#{node.alt}])
|
231
|
+
end
|
232
|
+
else
|
233
|
+
html_attrs = (node.attr? 'width') ? %( width="#{node.attr 'width'}") : ''
|
234
|
+
html_attrs = %(#{html_attrs} height="#{node.attr 'height'}") if node.attr? 'height'
|
235
|
+
html_attrs = %(#{html_attrs} title="#{node.attr 'title'}") if node.attr? 'title'
|
236
|
+
img, src = img_tag(node, target, html_attrs)
|
237
|
+
end
|
238
|
+
img_link(node, src, img)
|
239
|
+
end
|
240
|
+
|
241
|
+
def convert_image(node = self)
|
242
|
+
# When the stretch class is present, block images will take the most space
|
243
|
+
# they can take. Setting width and height can override that.
|
244
|
+
# We pinned the 100% to height to avoid aspect ratio breakage and since
|
245
|
+
# widescreen monitors are the most popular, chances are that height will
|
246
|
+
# be the biggest constraint
|
247
|
+
if node.has_role?('stretch') && !(node.attr?(:width) || node.attr?(:height))
|
248
|
+
height_value = "100%"
|
249
|
+
elsif node.attr? 'height'
|
250
|
+
height_value = node.attr 'height'
|
251
|
+
else
|
252
|
+
height_value = nil
|
253
|
+
end
|
254
|
+
html_attrs = (node.attr? 'width') ? %( width="#{node.attr 'width'}") : ''
|
255
|
+
html_attrs = %(#{html_attrs} height="#{height_value}") if height_value
|
256
|
+
html_attrs = %(#{html_attrs} title="#{node.attr 'title'}") if node.attr? 'title'
|
257
|
+
html_attrs = %(#{html_attrs} style="background: #{node.attr :background}") if node.attr? 'background'
|
258
|
+
img, src = img_tag(node, node.attr('target'), html_attrs)
|
259
|
+
img_link(node, src, img)
|
260
|
+
end
|
261
|
+
|
262
|
+
def img_tag(node = self, target, html_attrs)
|
263
|
+
if ((node.attr? 'format', 'svg') || (target.include? '.svg')) && node.document.safe < ::Asciidoctor::SafeMode::SECURE
|
264
|
+
if node.option? 'inline'
|
265
|
+
img = (html5_converter.read_svg_contents node, target) || %(<span class="alt">#{node.alt}</span>)
|
266
|
+
elsif node.option? 'interactive'
|
267
|
+
fallback = (node.attr? 'fallback') ? %(<img src="#{node.image_uri node.attr 'fallback'}" alt="#{encode_attribute_value node.alt}"#{html_attrs}>) : %(<span class="alt">#{node.alt}</span>)
|
268
|
+
img = %(<object type="image/svg+xml" data="#{src = node.image_uri target}"#{html_attrs}>#{fallback}</object>)
|
269
|
+
else
|
270
|
+
img = %(<img src="#{src = node.image_uri target}" alt="#{encode_attribute_value node.alt}"#{html_attrs}>)
|
271
|
+
end
|
272
|
+
else
|
273
|
+
img = %(<img src="#{src = node.image_uri target}" alt="#{encode_attribute_value node.alt}"#{html_attrs}>)
|
274
|
+
end
|
275
|
+
|
276
|
+
[img, src]
|
277
|
+
end
|
278
|
+
|
279
|
+
# Wrap the <img> element in a <a> element if the link attribute is defined
|
280
|
+
def img_link(node = self, src, content)
|
281
|
+
if (node.attr? 'link') && ((href_attr_val = node.attr 'link') != 'self' || (href_attr_val = src))
|
282
|
+
if (link_preview_value = bool_data_attr :link_preview)
|
283
|
+
data_preview_attr = %( data-preview-link="#{link_preview_value == true ? "" : link_preview_value}")
|
284
|
+
end
|
285
|
+
return %(<a class="image" href="#{href_attr_val}"#{(append_link_constraint_attrs node).join}#{data_preview_attr}>#{content}</a>)
|
286
|
+
end
|
287
|
+
|
288
|
+
content
|
289
|
+
end
|
290
|
+
|
201
291
|
def revealjs_dependencies(document, node, revealjsdir)
|
202
292
|
dependencies = []
|
203
|
-
dependencies << "{ src: '#{revealjsdir}/plugin/zoom
|
204
|
-
dependencies << "{ src: '#{revealjsdir}/plugin/notes/notes.js', async: true }" unless (node.attr? 'revealjs_plugin_notes', 'disabled')
|
205
|
-
dependencies << "{ src: '#{revealjsdir}/plugin/
|
206
|
-
dependencies << "{ src: '#{revealjsdir}/plugin/markdown/markdown.js', async: true }" if (node.attr? 'revealjs_plugin_markdown', 'enabled')
|
207
|
-
if (node.attr? 'revealjs_plugins') &&
|
208
|
-
!(revealjs_plugins_file = (node.attr 'revealjs_plugins', '').strip).empty? &&
|
209
|
-
!(revealjs_plugins_content = (File.read revealjs_plugins_file).strip).empty?
|
210
|
-
dependencies << revealjs_plugins_content
|
211
|
-
end
|
293
|
+
dependencies << "{ src: '#{revealjsdir}/plugin/zoom/zoom.js', async: true, callback: function () { Reveal.registerPlugin(RevealZoom) } }" unless (node.attr? 'revealjs_plugin_zoom', 'disabled')
|
294
|
+
dependencies << "{ src: '#{revealjsdir}/plugin/notes/notes.js', async: true, callback: function () { Reveal.registerPlugin(RevealNotes) } }" unless (node.attr? 'revealjs_plugin_notes', 'disabled')
|
295
|
+
dependencies << "{ src: '#{revealjsdir}/plugin/search/search.js', async: true, callback: function () { Reveal.registerPlugin(RevealSearch) } }" if (node.attr? 'revealjs_plugin_search', 'enabled')
|
212
296
|
dependencies.join(",\n ")
|
213
297
|
end
|
214
298
|
|
215
|
-
|
216
299
|
# Between delimiters (--) is code taken from asciidoctor-bespoke 1.0.0.alpha.1
|
217
300
|
# Licensed under MIT, Copyright (C) 2015-2016 Dan Allen and the Asciidoctor Project
|
218
301
|
#--
|
@@ -286,6 +369,101 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
286
369
|
end
|
287
370
|
nil
|
288
371
|
end
|
372
|
+
|
373
|
+
# Copied from asciidoctor/lib/asciidoctor/converter/html5.rb (method is private)
|
374
|
+
def append_link_constraint_attrs node, attrs = []
|
375
|
+
rel = 'nofollow' if node.option? 'nofollow'
|
376
|
+
if (window = node.attributes['window'])
|
377
|
+
attrs << %( target="#{window}")
|
378
|
+
attrs << (rel ? %( rel="#{rel} noopener") : ' rel="noopener"') if window == '_blank' || (node.option? 'noopener')
|
379
|
+
elsif rel
|
380
|
+
attrs << %( rel="#{rel}")
|
381
|
+
end
|
382
|
+
attrs
|
383
|
+
end
|
384
|
+
|
385
|
+
# Copied from asciidoctor/lib/asciidoctor/converter/html5.rb (method is private)
|
386
|
+
def encode_attribute_value val
|
387
|
+
(val.include? '"') ? (val.gsub '"', '"') : val
|
388
|
+
end
|
389
|
+
|
390
|
+
# Copied from asciidoctor/lib/asciidoctor/converter/semantic-html5.rb which is not yet shipped
|
391
|
+
# @todo remove this code when the new converter becomes available in the main gem
|
392
|
+
def generate_authors node
|
393
|
+
return if node.authors.empty?
|
394
|
+
|
395
|
+
if node.authors.length == 1
|
396
|
+
%(<p class="byline">
|
397
|
+
#{format_author node, node.authors.first}
|
398
|
+
</p>)
|
399
|
+
else
|
400
|
+
result = ['<ul class="byline">']
|
401
|
+
node.authors.each do |author|
|
402
|
+
result << "<li>#{format_author node, author}</li>"
|
403
|
+
end
|
404
|
+
result << '</ul>'
|
405
|
+
result.join Asciidoctor::LF
|
406
|
+
end
|
407
|
+
end
|
408
|
+
|
409
|
+
# Copied from asciidoctor/lib/asciidoctor/converter/semantic-html5.rb which is not yet shipped
|
410
|
+
# @todo remove this code when the new converter becomes available in the main gem
|
411
|
+
def format_author node, author
|
412
|
+
in_context 'author' do
|
413
|
+
%(<span class="author">#{node.sub_replacements author.name}#{author.email ? %( #{node.sub_macros author.email}) : ''}</span>)
|
414
|
+
end
|
415
|
+
end
|
416
|
+
|
417
|
+
# Copied from asciidoctor/lib/asciidoctor/converter/semantic-html5.rb which is not yet shipped
|
418
|
+
# @todo remove this code when the new converter becomes available in the main gem
|
419
|
+
def in_context name
|
420
|
+
(@convert_context ||= []).push name
|
421
|
+
result = yield
|
422
|
+
@convert_context.pop
|
423
|
+
result
|
424
|
+
end
|
425
|
+
|
426
|
+
STEM_EQNUMS_AMS = 'ams'
|
427
|
+
STEM_EQNUMS_NONE = 'none'
|
428
|
+
STEM_EQNUMS_VALID_VALUES = [
|
429
|
+
STEM_EQNUMS_NONE,
|
430
|
+
STEM_EQNUMS_AMS,
|
431
|
+
'all'
|
432
|
+
]
|
433
|
+
|
434
|
+
MATHJAX_VERSION = '3.2.0'
|
435
|
+
|
436
|
+
# Generate the Mathjax markup to process STEM expressions
|
437
|
+
# @param cdn_base [String]
|
438
|
+
# @return [String]
|
439
|
+
def generate_stem(cdn_base)
|
440
|
+
if attr?(:stem)
|
441
|
+
eqnums_val = attr('eqnums', STEM_EQNUMS_NONE).downcase
|
442
|
+
unless STEM_EQNUMS_VALID_VALUES.include?(eqnums_val)
|
443
|
+
eqnums_val = STEM_EQNUMS_AMS
|
444
|
+
end
|
445
|
+
mathjax_configuration = {
|
446
|
+
tex: {
|
447
|
+
inlineMath: [Asciidoctor::INLINE_MATH_DELIMITERS[:latexmath]],
|
448
|
+
displayMath: [Asciidoctor::BLOCK_MATH_DELIMITERS[:latexmath]],
|
449
|
+
processEscapes: false,
|
450
|
+
tags: eqnums_val,
|
451
|
+
},
|
452
|
+
options: {
|
453
|
+
ignoreHtmlClass: 'nostem|nolatexmath'
|
454
|
+
},
|
455
|
+
asciimath: {
|
456
|
+
delimiters: [Asciidoctor::BLOCK_MATH_DELIMITERS[:asciimath]],
|
457
|
+
},
|
458
|
+
loader: {
|
459
|
+
load: ['input/asciimath', 'output/chtml', 'ui/menu']
|
460
|
+
}
|
461
|
+
}
|
462
|
+
mathjaxdir = attr('mathjaxdir', "#{cdn_base}/mathjax/#{MATHJAX_VERSION}/es5")
|
463
|
+
%(<script>window.MathJax = #{JSON.generate(mathjax_configuration)};</script>) +
|
464
|
+
%(<script async src="#{mathjaxdir}/tex-mml-chtml.js"></script>)
|
465
|
+
end
|
466
|
+
end
|
289
467
|
#--
|
290
468
|
end
|
291
469
|
|
@@ -341,144 +519,39 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
341
519
|
#----------------- Begin of generated transformation methods -----------------#
|
342
520
|
|
343
521
|
|
344
|
-
def
|
522
|
+
def ruler(node, opts = {})
|
345
523
|
node.extend(Helpers)
|
346
524
|
node.instance_eval do
|
347
525
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
348
|
-
_buf = ''; _buf << ("<
|
349
|
-
;
|
350
|
-
;
|
351
|
-
;
|
352
|
-
;
|
353
|
-
;
|
354
|
-
;
|
355
|
-
;
|
356
|
-
;
|
357
|
-
;
|
358
|
-
;
|
359
|
-
;
|
360
|
-
;
|
361
|
-
;
|
362
|
-
;
|
363
|
-
;
|
364
|
-
;
|
365
|
-
;
|
366
|
-
;
|
367
|
-
;
|
368
|
-
;
|
369
|
-
;
|
370
|
-
;
|
371
|
-
;
|
372
|
-
;
|
373
|
-
;
|
374
|
-
;
|
375
|
-
;
|
376
|
-
;
|
377
|
-
;
|
378
|
-
;
|
379
|
-
;
|
380
|
-
;
|
381
|
-
;
|
382
|
-
;
|
383
|
-
;
|
384
|
-
;
|
385
|
-
;
|
386
|
-
;
|
387
|
-
;
|
388
|
-
;
|
389
|
-
;
|
390
|
-
;
|
391
|
-
;
|
392
|
-
;
|
393
|
-
;
|
394
|
-
;
|
395
|
-
;
|
396
|
-
;
|
397
|
-
;
|
398
|
-
;
|
399
|
-
;
|
400
|
-
;
|
401
|
-
;
|
402
|
-
;
|
403
|
-
;
|
404
|
-
;
|
405
|
-
; _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);
|
406
|
-
;
|
407
|
-
;
|
408
|
-
; _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);
|
409
|
-
;
|
410
|
-
;
|
411
|
-
; _buf << ((attr 'revealjs_width', 960).to_s); _buf << (", ".freeze); _buf << ((attr 'revealjs_height', 700).to_s); _buf << (")\n});</script>".freeze);
|
412
|
-
;
|
526
|
+
_buf = ''; _buf << ("<hr>".freeze);
|
413
527
|
; _buf
|
414
528
|
end
|
415
529
|
end
|
416
530
|
|
417
|
-
def
|
531
|
+
def pass(node, opts = {})
|
418
532
|
node.extend(Helpers)
|
419
533
|
node.instance_eval do
|
420
534
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
421
|
-
_buf = '';
|
422
|
-
; _buf
|
423
|
-
; _buf << ("</aside>".freeze);
|
424
|
-
; else;
|
425
|
-
; _slim_controls1 = html_tag('div', { :id => @id, :class => ['sidebarblock', role, ('fragment' if (option? :step) || (has_role? 'step') || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
426
|
-
; _slim_controls2 << ("<div class=\"content\">".freeze);
|
427
|
-
; if title?;
|
428
|
-
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
429
|
-
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ((content).to_s);
|
430
|
-
; _slim_controls2 << ("</div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); end; _buf
|
535
|
+
_buf = ''; _buf << ((content).to_s);
|
536
|
+
; _buf
|
431
537
|
end
|
432
538
|
end
|
433
539
|
|
434
|
-
def
|
540
|
+
def notes(node, opts = {})
|
435
541
|
node.extend(Helpers)
|
436
542
|
node.instance_eval do
|
437
543
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
438
|
-
_buf = '';
|
439
|
-
;
|
440
|
-
; marker_checked = '<input type="checkbox" data-item-complete="1" checked>';
|
441
|
-
; marker_unchecked = '<input type="checkbox" data-item-complete="0">';
|
442
|
-
; else;
|
443
|
-
; if @document.attr? :icons, 'font';
|
444
|
-
; marker_checked = '<i class="icon-check"></i>';
|
445
|
-
; marker_unchecked = '<i class="icon-check-empty"></i>';
|
446
|
-
; else;
|
447
|
-
;
|
448
|
-
; marker_checked = '<input type="checkbox" data-item-complete="1" checked disabled>';
|
449
|
-
; marker_unchecked = '<input type="checkbox" data-item-complete="0" disabled>';
|
450
|
-
; end; end; end; _slim_controls1 = html_tag('div', { :id => @id, :class => ['ulist', checklist, @style, role] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
451
|
-
; if title?;
|
452
|
-
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
453
|
-
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<ul".freeze); _temple_html_attributeremover1 = ''; _slim_codeattributes1 = (checklist || @style); if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes1.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes1).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _slim_controls2 << (" class=\"".freeze); _slim_controls2 << ((_temple_html_attributeremover1).to_s); _slim_controls2 << ("\"".freeze); end; _slim_controls2 << (">".freeze);
|
454
|
-
; items.each do |item|;
|
455
|
-
; _slim_controls2 << ("<li".freeze); _temple_html_attributeremover2 = ''; _slim_codeattributes2 = ('fragment' if (option? :step) || (has_role? 'step') || (attr? 'step')); if Array === _slim_codeattributes2; _slim_codeattributes2 = _slim_codeattributes2.flatten; _slim_codeattributes2.map!(&:to_s); _slim_codeattributes2.reject!(&:empty?); _temple_html_attributeremover2 << ((_slim_codeattributes2.join(" ")).to_s); else; _temple_html_attributeremover2 << ((_slim_codeattributes2).to_s); end; _temple_html_attributeremover2; if !_temple_html_attributeremover2.empty?; _slim_controls2 << (" class=\"".freeze); _slim_controls2 << ((_temple_html_attributeremover2).to_s); _slim_controls2 << ("\"".freeze); end; _slim_controls2 << ("><p>".freeze);
|
456
|
-
;
|
457
|
-
; if checklist && (item.attr? :checkbox);
|
458
|
-
; _slim_controls2 << ((%(#{(item.attr? :checked) ? marker_checked : marker_unchecked}#{item.text})).to_s);
|
459
|
-
; else;
|
460
|
-
; _slim_controls2 << ((item.text).to_s);
|
461
|
-
; end; _slim_controls2 << ("</p>".freeze); if item.blocks?;
|
462
|
-
; _slim_controls2 << ((item.content).to_s);
|
463
|
-
; end; _slim_controls2 << ("</li>".freeze); end; _slim_controls2 << ("</ul>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
544
|
+
_buf = ''; _buf << ("<aside class=\"notes\">".freeze); _buf << ((resolve_content).to_s);
|
545
|
+
; _buf << ("</aside>".freeze); _buf
|
464
546
|
end
|
465
547
|
end
|
466
548
|
|
467
|
-
def
|
549
|
+
def thematic_break(node, opts = {})
|
468
550
|
node.extend(Helpers)
|
469
551
|
node.instance_eval do
|
470
552
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
471
|
-
_buf = '';
|
472
|
-
;
|
473
|
-
; if (@subs.nil? || @subs.empty?) && !(attr? 'subs');
|
474
|
-
; equation = sub_specialcharacters equation;
|
475
|
-
; end; unless (equation.start_with? open) && (equation.end_with? close);
|
476
|
-
; equation = %(#{open}#{equation}#{close});
|
477
|
-
; end; _slim_controls1 = html_tag('div', { :id => @id, :class => ['stemblock', role, ('fragment' if (option? :step) || (has_role? 'step') || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
478
|
-
; if title?;
|
479
|
-
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
480
|
-
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<div class=\"content\">".freeze); _slim_controls2 << ((equation).to_s);
|
481
|
-
; _slim_controls2 << ("</div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
553
|
+
_buf = ''; _buf << ("<hr>".freeze);
|
554
|
+
; _buf
|
482
555
|
end
|
483
556
|
end
|
484
557
|
|
@@ -499,120 +572,394 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
499
572
|
end
|
500
573
|
end
|
501
574
|
|
502
|
-
def
|
575
|
+
def inline_button(node, opts = {})
|
503
576
|
node.extend(Helpers)
|
504
577
|
node.instance_eval do
|
505
578
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
506
|
-
_buf = ''; _slim_controls1 = html_tag('
|
579
|
+
_buf = ''; _slim_controls1 = html_tag('b', { :class => ['button'] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
580
|
+
; _slim_controls2 << ((@text).to_s);
|
581
|
+
; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
582
|
+
end
|
583
|
+
end
|
584
|
+
|
585
|
+
def audio(node, opts = {})
|
586
|
+
node.extend(Helpers)
|
587
|
+
node.instance_eval do
|
588
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
589
|
+
_buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['audioblock', @style, role] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
507
590
|
; if title?;
|
508
|
-
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((
|
509
|
-
; _slim_controls2 << ("</div>".freeze); end;
|
510
|
-
;
|
511
|
-
; _slim_controls2 << ("<table>".freeze);
|
512
|
-
; items.each_with_index do |item, i|;
|
513
|
-
; num = i + 1;
|
514
|
-
; _slim_controls2 << ("<tr><td>".freeze);
|
591
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
|
592
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<div class=\"content\"><audio".freeze);
|
593
|
+
; _slim_codeattributes1 = media_uri(attr :target); if _slim_codeattributes1; if _slim_codeattributes1 == true; _slim_controls2 << (" src".freeze); else; _slim_controls2 << (" src=\"".freeze); _slim_controls2 << ((_slim_codeattributes1).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes2 = (option? 'autoplay'); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls2 << (" autoplay".freeze); else; _slim_controls2 << (" autoplay=\"".freeze); _slim_controls2 << ((_slim_codeattributes2).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes3 = !(option? 'nocontrols'); if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls2 << (" controls".freeze); else; _slim_controls2 << (" controls=\"".freeze); _slim_controls2 << ((_slim_codeattributes3).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes4 = (option? 'loop'); if _slim_codeattributes4; if _slim_codeattributes4 == true; _slim_controls2 << (" loop".freeze); else; _slim_controls2 << (" loop=\"".freeze); _slim_controls2 << ((_slim_codeattributes4).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << (">Your browser does not support the audio tag.</audio></div>".freeze);
|
515
594
|
;
|
516
|
-
;
|
517
|
-
; _slim_controls2 << ("<i class=\"conum\"".freeze); _slim_codeattributes1 = num; if _slim_codeattributes1; if _slim_codeattributes1 == true; _slim_controls2 << (" data-value".freeze); else; _slim_controls2 << (" data-value=\"".freeze); _slim_controls2 << ((_slim_codeattributes1).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << ("></i><b>".freeze);
|
518
|
-
; _slim_controls2 << ((num).to_s);
|
519
|
-
; _slim_controls2 << ("</b>".freeze); else;
|
520
|
-
; _slim_controls2 << ("<img".freeze); _slim_codeattributes2 = icon_uri("callouts/#{num}"); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls2 << (" src".freeze); else; _slim_controls2 << (" src=\"".freeze); _slim_controls2 << ((_slim_codeattributes2).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes3 = num; if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls2 << (" alt".freeze); else; _slim_controls2 << (" alt=\"".freeze); _slim_controls2 << ((_slim_codeattributes3).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << (">".freeze);
|
521
|
-
; end; _slim_controls2 << ("</td><td>".freeze); _slim_controls2 << ((item.text).to_s);
|
522
|
-
; _slim_controls2 << ("</td></tr>".freeze); end; _slim_controls2 << ("</table>".freeze); else;
|
523
|
-
; _slim_controls2 << ("<ol>".freeze);
|
524
|
-
; items.each do |item|;
|
525
|
-
; _slim_controls2 << ("<li><p>".freeze); _slim_controls2 << ((item.text).to_s);
|
526
|
-
; _slim_controls2 << ("</p></li>".freeze); end; _slim_controls2 << ("</ol>".freeze); end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
595
|
+
; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
527
596
|
end
|
528
597
|
end
|
529
598
|
|
530
|
-
def
|
599
|
+
def quote(node, opts = {})
|
531
600
|
node.extend(Helpers)
|
532
601
|
node.instance_eval do
|
533
602
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
534
|
-
_buf = '';
|
535
|
-
;
|
536
|
-
;
|
537
|
-
;
|
538
|
-
;
|
539
|
-
;
|
540
|
-
;
|
541
|
-
;
|
542
|
-
;
|
543
|
-
;
|
603
|
+
_buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['quoteblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
604
|
+
; if title?;
|
605
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
606
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<blockquote>".freeze); _slim_controls2 << ((content).to_s);
|
607
|
+
; _slim_controls2 << ("</blockquote>".freeze); attribution = (attr? :attribution) ? (attr :attribution) : nil;
|
608
|
+
; citetitle = (attr? :citetitle) ? (attr :citetitle) : nil;
|
609
|
+
; if attribution || citetitle;
|
610
|
+
; _slim_controls2 << ("<div class=\"attribution\">".freeze);
|
611
|
+
; if citetitle;
|
612
|
+
; _slim_controls2 << ("<cite>".freeze); _slim_controls2 << ((citetitle).to_s);
|
613
|
+
; _slim_controls2 << ("</cite>".freeze); end; if attribution;
|
614
|
+
; if citetitle;
|
615
|
+
; _slim_controls2 << ("<br>".freeze);
|
616
|
+
; end; _slim_controls2 << ("— ".freeze); _slim_controls2 << ((attribution).to_s);
|
617
|
+
; end; _slim_controls2 << ("</div>".freeze); end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
618
|
+
end
|
619
|
+
end
|
620
|
+
|
621
|
+
def admonition(node, opts = {})
|
622
|
+
node.extend(Helpers)
|
623
|
+
node.instance_eval do
|
624
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
625
|
+
_buf = ''; if (has_role? 'aside') or (has_role? 'speaker') or (has_role? 'notes');
|
626
|
+
; _buf << ("<aside class=\"notes\">".freeze); _buf << ((resolve_content).to_s);
|
627
|
+
; _buf << ("</aside>".freeze);
|
544
628
|
; else;
|
545
|
-
;
|
546
|
-
;
|
547
|
-
; asset_uri_scheme = %(#{asset_uri_scheme}:);
|
548
|
-
; end; cdn_base = %(#{asset_uri_scheme}//cdnjs.cloudflare.com/ajax/libs);
|
549
|
-
; [:description, :keywords, :author, :copyright].each do |key|;
|
550
|
-
; if attr? key;
|
551
|
-
; _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);
|
552
|
-
; end; end; linkcss = (attr? 'linkcss');
|
553
|
-
; _buf << ("<link rel=\"stylesheet\" href=\"".freeze); _buf << ((revealjsdir).to_s); _buf << ("/css/reset.css\"><link rel=\"stylesheet\" href=\"".freeze);
|
554
|
-
; _buf << ((revealjsdir).to_s); _buf << ("/css/reveal.css\"><link rel=\"stylesheet\"".freeze);
|
555
|
-
;
|
629
|
+
; _slim_controls1 = html_tag('div', { :id => @id, :class => ['admonitionblock', (attr :name), role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
630
|
+
; _slim_controls2 << ("<table><tr><td class=\"icon\">".freeze);
|
556
631
|
;
|
557
|
-
;
|
632
|
+
; if @document.attr? :icons, 'font';
|
633
|
+
; icon_mapping = Hash['caution', 'fire', 'important', 'exclamation-circle', 'note', 'info-circle', 'tip', 'lightbulb-o', 'warning', 'warning'];
|
634
|
+
; _slim_controls2 << ("<i".freeze); _temple_html_attributeremover1 = ''; _slim_codeattributes1 = %(fa fa-#{icon_mapping[attr :name]}); if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes1.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes1).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _slim_controls2 << (" class=\"".freeze); _slim_controls2 << ((_temple_html_attributeremover1).to_s); _slim_controls2 << ("\"".freeze); end; _slim_codeattributes2 = (attr :textlabel || @caption); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls2 << (" title".freeze); else; _slim_controls2 << (" title=\"".freeze); _slim_controls2 << ((_slim_codeattributes2).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << ("></i>".freeze);
|
635
|
+
; elsif @document.attr? :icons;
|
636
|
+
; _slim_controls2 << ("<img".freeze); _slim_codeattributes3 = icon_uri(attr :name); if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls2 << (" src".freeze); else; _slim_controls2 << (" src=\"".freeze); _slim_controls2 << ((_slim_codeattributes3).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes4 = @caption; if _slim_codeattributes4; if _slim_codeattributes4 == true; _slim_controls2 << (" alt".freeze); else; _slim_controls2 << (" alt=\"".freeze); _slim_controls2 << ((_slim_codeattributes4).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << (">".freeze);
|
637
|
+
; else;
|
638
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << (((attr :textlabel) || @caption).to_s);
|
639
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("</td><td class=\"content\">".freeze);
|
640
|
+
; if title?;
|
641
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
642
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ((content).to_s);
|
643
|
+
; _slim_controls2 << ("</td></tr></table>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); end; _buf
|
644
|
+
end
|
645
|
+
end
|
646
|
+
|
647
|
+
def outline(node, opts = {})
|
648
|
+
node.extend(Helpers)
|
649
|
+
node.instance_eval do
|
650
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
651
|
+
_buf = ''; unless sections.empty?;
|
652
|
+
; toclevels ||= (document.attr 'toclevels', DEFAULT_TOCLEVELS).to_i;
|
653
|
+
; slevel = section_level sections.first;
|
654
|
+
; _buf << ("<ol class=\"sectlevel".freeze); _buf << ((slevel).to_s); _buf << ("\">".freeze);
|
655
|
+
; sections.each do |sec|;
|
656
|
+
; _buf << ("<li><a href=\"#".freeze);
|
657
|
+
; _buf << ((sec.id).to_s); _buf << ("\">".freeze); _buf << ((section_title sec).to_s);
|
658
|
+
; _buf << ("</a>".freeze); if (sec.level < toclevels) && (child_toc = converter.convert sec, 'outline');
|
659
|
+
; _buf << ((child_toc).to_s);
|
660
|
+
; end; _buf << ("</li>".freeze); end; _buf << ("</ol>".freeze); end; _buf
|
661
|
+
end
|
662
|
+
end
|
663
|
+
|
664
|
+
def video(node, opts = {})
|
665
|
+
node.extend(Helpers)
|
666
|
+
node.instance_eval do
|
667
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
668
|
+
_buf = '';
|
558
669
|
;
|
670
|
+
; no_stretch = ((attr? :width) || (attr? :height));
|
671
|
+
; width = (attr? :width) ? (attr :width) : "100%";
|
672
|
+
; height = (attr? :height) ? (attr :height) : "100%";
|
559
673
|
;
|
674
|
+
; _slim_controls1 = html_tag('div', { :id => @id, :class => ['videoblock', @style, role, (no_stretch ? nil : 'stretch'), ('fragment' if (option? :step) || (has_role? 'step') || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
675
|
+
; if title?;
|
676
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
|
677
|
+
; _slim_controls2 << ("</div>".freeze); end; case attr :poster;
|
678
|
+
; when 'vimeo';
|
679
|
+
; unless (asset_uri_scheme = (attr :asset_uri_scheme, 'https')).empty?;
|
680
|
+
; asset_uri_scheme = %(#{asset_uri_scheme}:);
|
681
|
+
; end; start_anchor = (attr? :start) ? "#at=#{attr :start}" : nil;
|
682
|
+
; delimiter = ['?'];
|
683
|
+
; loop_param = (option? 'loop') ? %(#{delimiter.pop || '&'}loop=1) : '';
|
684
|
+
; muted_param = (option? 'muted') ? %(#{delimiter.pop || '&'}muted=1) : '';
|
685
|
+
; src = %(#{asset_uri_scheme}//player.vimeo.com/video/#{attr :target}#{loop_param}#{muted_param}#{start_anchor});
|
560
686
|
;
|
561
|
-
; if attr? :icons, 'font';
|
562
687
|
;
|
563
|
-
;
|
564
|
-
;
|
565
|
-
;
|
688
|
+
;
|
689
|
+
;
|
690
|
+
;
|
691
|
+
; _slim_controls2 << ("<iframe".freeze); _slim_codeattributes1 = (width); if _slim_codeattributes1; if _slim_codeattributes1 == true; _slim_controls2 << (" width".freeze); else; _slim_controls2 << (" width=\"".freeze); _slim_controls2 << ((_slim_codeattributes1).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes2 = (height); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls2 << (" height".freeze); else; _slim_controls2 << (" height=\"".freeze); _slim_controls2 << ((_slim_codeattributes2).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes3 = src; if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls2 << (" src".freeze); else; _slim_controls2 << (" src=\"".freeze); _slim_controls2 << ((_slim_codeattributes3).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes4 = 0; if _slim_codeattributes4; if _slim_codeattributes4 == true; _slim_controls2 << (" frameborder".freeze); else; _slim_controls2 << (" frameborder=\"".freeze); _slim_controls2 << ((_slim_codeattributes4).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << (" webkitAllowFullScreen mozallowfullscreen allowFullScreen".freeze); _slim_codeattributes5 = (option? 'autoplay'); if _slim_codeattributes5; if _slim_codeattributes5 == true; _slim_controls2 << (" data-autoplay".freeze); else; _slim_controls2 << (" data-autoplay=\"".freeze); _slim_controls2 << ((_slim_codeattributes5).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes6 = ((option? 'autoplay') ? "autoplay" : nil); if _slim_codeattributes6; if _slim_codeattributes6 == true; _slim_controls2 << (" allow".freeze); else; _slim_controls2 << (" allow=\"".freeze); _slim_controls2 << ((_slim_codeattributes6).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << ("></iframe>".freeze);
|
692
|
+
; when 'youtube';
|
693
|
+
; unless (asset_uri_scheme = (attr :asset_uri_scheme, 'https')).empty?;
|
694
|
+
; asset_uri_scheme = %(#{asset_uri_scheme}:);
|
695
|
+
; end; params = ['rel=0'];
|
696
|
+
; params << "start=#{attr :start}" if attr? :start;
|
697
|
+
; params << "end=#{attr :end}" if attr? :end;
|
698
|
+
; params << "loop=1" if option? 'loop';
|
699
|
+
; params << "mute=1" if option? 'muted';
|
700
|
+
; params << "controls=0" if option? 'nocontrols';
|
701
|
+
; src = %(#{asset_uri_scheme}//www.youtube.com/embed/#{attr :target}?#{params * '&'});
|
702
|
+
;
|
703
|
+
;
|
704
|
+
;
|
705
|
+
;
|
706
|
+
;
|
707
|
+
; _slim_controls2 << ("<iframe".freeze); _slim_codeattributes7 = (width); if _slim_codeattributes7; if _slim_codeattributes7 == true; _slim_controls2 << (" width".freeze); else; _slim_controls2 << (" width=\"".freeze); _slim_controls2 << ((_slim_codeattributes7).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes8 = (height); if _slim_codeattributes8; if _slim_codeattributes8 == true; _slim_controls2 << (" height".freeze); else; _slim_controls2 << (" height=\"".freeze); _slim_controls2 << ((_slim_codeattributes8).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes9 = src; if _slim_codeattributes9; if _slim_codeattributes9 == true; _slim_controls2 << (" src".freeze); else; _slim_controls2 << (" src=\"".freeze); _slim_controls2 << ((_slim_codeattributes9).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes10 = 0; if _slim_codeattributes10; if _slim_codeattributes10 == true; _slim_controls2 << (" frameborder".freeze); else; _slim_controls2 << (" frameborder=\"".freeze); _slim_controls2 << ((_slim_codeattributes10).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes11 = !(option? 'nofullscreen'); if _slim_codeattributes11; if _slim_codeattributes11 == true; _slim_controls2 << (" allowfullscreen".freeze); else; _slim_controls2 << (" allowfullscreen=\"".freeze); _slim_controls2 << ((_slim_codeattributes11).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes12 = (option? 'autoplay'); if _slim_codeattributes12; if _slim_codeattributes12 == true; _slim_controls2 << (" data-autoplay".freeze); else; _slim_controls2 << (" data-autoplay=\"".freeze); _slim_controls2 << ((_slim_codeattributes12).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes13 = ((option? 'autoplay') ? "autoplay" : nil); if _slim_codeattributes13; if _slim_codeattributes13 == true; _slim_controls2 << (" allow".freeze); else; _slim_controls2 << (" allow=\"".freeze); _slim_controls2 << ((_slim_codeattributes13).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << ("></iframe>".freeze);
|
566
708
|
; else;
|
567
709
|
;
|
568
|
-
; font_awesome_version = (attr 'font-awesome-version', '5.15.1');
|
569
|
-
; _buf << ("<link rel=\"stylesheet\"".freeze); _slim_codeattributes6 = %(#{cdn_base}/font-awesome/#{font_awesome_version}/css/all.min.css); if _slim_codeattributes6; if _slim_codeattributes6 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes6).to_s); _buf << ("\"".freeze); end; end; _buf << ("><link rel=\"stylesheet\"".freeze);
|
570
|
-
; _slim_codeattributes7 = %(#{cdn_base}/font-awesome/#{font_awesome_version}/css/v4-shims.min.css); if _slim_codeattributes7; if _slim_codeattributes7 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes7).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
571
|
-
; end; else;
|
572
|
-
; _buf << ("<link rel=\"stylesheet\"".freeze); _slim_codeattributes8 = (normalize_web_path %(#{attr 'iconfont-name', 'font-awesome'}.css), (attr 'stylesdir', ''), false); 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);
|
573
|
-
; end; end; if attr? :stem;
|
574
|
-
; eqnums_val = (attr 'eqnums', 'none');
|
575
|
-
; eqnums_val = 'AMS' if eqnums_val == '';
|
576
|
-
; eqnums_opt = %( equationNumbers: { autoNumber: "#{eqnums_val}" } );
|
577
|
-
; mathjaxdir = (attr 'mathjaxdir', "#{cdn_base}/mathjax/2.7.6");
|
578
|
-
; _buf << ("<script type=\"text/x-mathjax-config\">MathJax.Hub.Config({\ntex2jax: {\n inlineMath: [".freeze);
|
579
710
|
;
|
580
711
|
;
|
581
|
-
;
|
582
|
-
;
|
712
|
+
; _slim_controls2 << ("<video".freeze); _slim_codeattributes14 = media_uri(attr :target); if _slim_codeattributes14; if _slim_codeattributes14 == true; _slim_controls2 << (" src".freeze); else; _slim_controls2 << (" src=\"".freeze); _slim_controls2 << ((_slim_codeattributes14).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes15 = (width); if _slim_codeattributes15; if _slim_codeattributes15 == true; _slim_controls2 << (" width".freeze); else; _slim_controls2 << (" width=\"".freeze); _slim_controls2 << ((_slim_codeattributes15).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes16 = (height); if _slim_codeattributes16; if _slim_codeattributes16 == true; _slim_controls2 << (" height".freeze); else; _slim_controls2 << (" height=\"".freeze); _slim_controls2 << ((_slim_codeattributes16).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes17 = ((attr :poster) ? media_uri(attr :poster) : nil); if _slim_codeattributes17; if _slim_codeattributes17 == true; _slim_controls2 << (" poster".freeze); else; _slim_controls2 << (" poster=\"".freeze); _slim_controls2 << ((_slim_codeattributes17).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes18 = (option? 'autoplay'); if _slim_codeattributes18; if _slim_codeattributes18 == true; _slim_controls2 << (" data-autoplay".freeze); else; _slim_controls2 << (" data-autoplay=\"".freeze); _slim_controls2 << ((_slim_codeattributes18).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes19 = !(option? 'nocontrols'); if _slim_codeattributes19; if _slim_codeattributes19 == true; _slim_controls2 << (" controls".freeze); else; _slim_controls2 << (" controls=\"".freeze); _slim_controls2 << ((_slim_codeattributes19).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes20 = (option? 'loop'); if _slim_codeattributes20; if _slim_codeattributes20 == true; _slim_controls2 << (" loop".freeze); else; _slim_controls2 << (" loop=\"".freeze); _slim_controls2 << ((_slim_codeattributes20).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << (">Your browser does not support the video tag.</video>".freeze);
|
713
|
+
;
|
714
|
+
; end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
715
|
+
end
|
716
|
+
end
|
717
|
+
|
718
|
+
def verse(node, opts = {})
|
719
|
+
node.extend(Helpers)
|
720
|
+
node.instance_eval do
|
721
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
722
|
+
_buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['verseblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
723
|
+
; if title?;
|
724
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
725
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<pre class=\"content\">".freeze); _slim_controls2 << ((content).to_s);
|
726
|
+
; _slim_controls2 << ("</pre>".freeze); attribution = (attr? :attribution) ? (attr :attribution) : nil;
|
727
|
+
; citetitle = (attr? :citetitle) ? (attr :citetitle) : nil;
|
728
|
+
; if attribution || citetitle;
|
729
|
+
; _slim_controls2 << ("<div class=\"attribution\">".freeze);
|
730
|
+
; if citetitle;
|
731
|
+
; _slim_controls2 << ("<cite>".freeze); _slim_controls2 << ((citetitle).to_s);
|
732
|
+
; _slim_controls2 << ("</cite>".freeze); end; if attribution;
|
733
|
+
; if citetitle;
|
734
|
+
; _slim_controls2 << ("<br>".freeze);
|
735
|
+
; end; _slim_controls2 << ("— ".freeze); _slim_controls2 << ((attribution).to_s);
|
736
|
+
; end; _slim_controls2 << ("</div>".freeze); end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
737
|
+
end
|
738
|
+
end
|
739
|
+
|
740
|
+
def inline_menu(node, opts = {})
|
741
|
+
node.extend(Helpers)
|
742
|
+
node.instance_eval do
|
743
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
744
|
+
_buf = ''; menu = attr 'menu';
|
745
|
+
; menuitem = attr 'menuitem';
|
746
|
+
; if !(submenus = attr 'submenus').empty?;
|
747
|
+
; _slim_controls1 = html_tag('span', { :class => ['menuseq'] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
748
|
+
; _slim_controls2 << ("<span class=\"menu\">".freeze); _slim_controls2 << ((menu).to_s);
|
749
|
+
; _slim_controls2 << ("</span> ▸ ".freeze);
|
750
|
+
; _slim_controls2 << ((submenus.map {|submenu| %(<span class="submenu">#{submenu}</span> ▸ ) }.join).to_s);
|
751
|
+
; _slim_controls2 << ("<span class=\"menuitem\">".freeze); _slim_controls2 << ((menuitem).to_s);
|
752
|
+
; _slim_controls2 << ("</span>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); elsif !menuitem.nil?;
|
753
|
+
; _slim_controls3 = html_tag('span', { :class => ['menuseq'] }.merge(data_attrs(@attributes))) do; _slim_controls4 = '';
|
754
|
+
; _slim_controls4 << ("<span class=\"menu\">".freeze); _slim_controls4 << ((menu).to_s);
|
755
|
+
; _slim_controls4 << ("</span> ▸ <span class=\"menuitem\">".freeze);
|
756
|
+
; _slim_controls4 << ((menuitem).to_s);
|
757
|
+
; _slim_controls4 << ("</span>".freeze); _slim_controls4; end; _buf << ((_slim_controls3).to_s); else;
|
758
|
+
; _slim_controls5 = html_tag('span', { :class => ['menu'] }.merge(data_attrs(@attributes))) do; _slim_controls6 = '';
|
759
|
+
; _slim_controls6 << ((menu).to_s);
|
760
|
+
; _slim_controls6; end; _buf << ((_slim_controls5).to_s); end; _buf
|
761
|
+
end
|
762
|
+
end
|
763
|
+
|
764
|
+
def toc(node, opts = {})
|
765
|
+
node.extend(Helpers)
|
766
|
+
node.instance_eval do
|
767
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
768
|
+
_buf = '';
|
769
|
+
;
|
770
|
+
;
|
771
|
+
;
|
772
|
+
;
|
773
|
+
;
|
774
|
+
;
|
775
|
+
;
|
776
|
+
;
|
777
|
+
;
|
778
|
+
;
|
779
|
+
;
|
780
|
+
;
|
781
|
+
; _buf << ("<div id=\"toc\"".freeze); _temple_html_attributeremover1 = ''; _slim_codeattributes1 = (document.attr 'toc-class', 'toc'); if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes1.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes1).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover1).to_s); _buf << ("\"".freeze); end; _buf << ("><div id=\"toctitle\">".freeze);
|
782
|
+
; _buf << (((document.attr 'toc-title')).to_s);
|
783
|
+
; _buf << ("</div>".freeze);
|
784
|
+
; _buf << ((converter.convert document, 'outline').to_s);
|
785
|
+
; _buf << ("</div>".freeze); _buf
|
786
|
+
end
|
787
|
+
end
|
788
|
+
|
789
|
+
def inline_kbd(node, opts = {})
|
790
|
+
node.extend(Helpers)
|
791
|
+
node.instance_eval do
|
792
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
793
|
+
_buf = ''; if (keys = attr 'keys').size == 1;
|
794
|
+
; _slim_controls1 = html_tag('kbd', data_attrs(@attributes)) do; _slim_controls2 = '';
|
795
|
+
; _slim_controls2 << ((keys.first).to_s);
|
796
|
+
; _slim_controls2; end; _buf << ((_slim_controls1).to_s); else;
|
797
|
+
; _slim_controls3 = html_tag('span', { :class => ['keyseq'] }.merge(data_attrs(@attributes))) do; _slim_controls4 = '';
|
798
|
+
; keys.each_with_index do |key, idx|;
|
799
|
+
; unless idx.zero?;
|
800
|
+
; _slim_controls4 << ("+".freeze);
|
801
|
+
; end; _slim_controls4 << ("<kbd>".freeze); _slim_controls4 << ((key).to_s);
|
802
|
+
; _slim_controls4 << ("</kbd>".freeze); end; _slim_controls4; end; _buf << ((_slim_controls3).to_s); end; _buf
|
803
|
+
end
|
804
|
+
end
|
805
|
+
|
806
|
+
def colist(node, opts = {})
|
807
|
+
node.extend(Helpers)
|
808
|
+
node.instance_eval do
|
809
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
810
|
+
_buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['colist', @style, role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
811
|
+
; if title?;
|
812
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
813
|
+
; _slim_controls2 << ("</div>".freeze); end; if @document.attr? :icons;
|
814
|
+
; font_icons = @document.attr? :icons, 'font';
|
815
|
+
; _slim_controls2 << ("<table>".freeze);
|
816
|
+
; items.each_with_index do |item, i|;
|
817
|
+
; num = i + 1;
|
818
|
+
; _slim_controls2 << ("<tr><td>".freeze);
|
819
|
+
;
|
820
|
+
; if font_icons;
|
821
|
+
; _slim_controls2 << ("<i class=\"conum\"".freeze); _slim_codeattributes1 = num; if _slim_codeattributes1; if _slim_codeattributes1 == true; _slim_controls2 << (" data-value".freeze); else; _slim_controls2 << (" data-value=\"".freeze); _slim_controls2 << ((_slim_codeattributes1).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << ("></i><b>".freeze);
|
822
|
+
; _slim_controls2 << ((num).to_s);
|
823
|
+
; _slim_controls2 << ("</b>".freeze); else;
|
824
|
+
; _slim_controls2 << ("<img".freeze); _slim_codeattributes2 = icon_uri("callouts/#{num}"); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls2 << (" src".freeze); else; _slim_controls2 << (" src=\"".freeze); _slim_controls2 << ((_slim_codeattributes2).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes3 = num; if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls2 << (" alt".freeze); else; _slim_controls2 << (" alt=\"".freeze); _slim_controls2 << ((_slim_codeattributes3).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << (">".freeze);
|
825
|
+
; end; _slim_controls2 << ("</td><td>".freeze); _slim_controls2 << ((item.text).to_s);
|
826
|
+
; _slim_controls2 << ("</td></tr>".freeze); end; _slim_controls2 << ("</table>".freeze); else;
|
827
|
+
; _slim_controls2 << ("<ol>".freeze);
|
828
|
+
; items.each do |item|;
|
829
|
+
; _slim_controls2 << ("<li><p>".freeze); _slim_controls2 << ((item.text).to_s);
|
830
|
+
; _slim_controls2 << ("</p></li>".freeze); end; _slim_controls2 << ("</ol>".freeze); end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
831
|
+
end
|
832
|
+
end
|
833
|
+
|
834
|
+
def stretch_nested_elements(node, opts = {})
|
835
|
+
node.extend(Helpers)
|
836
|
+
node.instance_eval do
|
837
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
838
|
+
_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);
|
839
|
+
;
|
840
|
+
;
|
841
|
+
;
|
842
|
+
;
|
843
|
+
;
|
844
|
+
;
|
845
|
+
;
|
846
|
+
;
|
847
|
+
;
|
848
|
+
;
|
849
|
+
;
|
850
|
+
;
|
851
|
+
;
|
852
|
+
;
|
853
|
+
;
|
854
|
+
;
|
855
|
+
;
|
856
|
+
;
|
857
|
+
;
|
858
|
+
;
|
859
|
+
;
|
860
|
+
;
|
861
|
+
;
|
862
|
+
;
|
863
|
+
;
|
864
|
+
;
|
865
|
+
;
|
583
866
|
;
|
584
867
|
;
|
585
868
|
;
|
586
|
-
; _buf << ((Asciidoctor::BLOCK_MATH_DELIMITERS[:asciimath].to_s).to_s); _buf << ("],\n ignoreClass: \"nostem|noasciimath\"\n},\nTeX: {".freeze);
|
587
869
|
;
|
588
870
|
;
|
589
|
-
; _buf << ((eqnums_opt).to_s); _buf << ("}\n});</script><script src=\"".freeze);
|
590
871
|
;
|
591
|
-
; _buf << ((mathjaxdir).to_s); _buf << ("/MathJax.js?config=TeX-MML-AM_HTMLorMML\"></script>".freeze);
|
592
872
|
;
|
593
|
-
; end; syntax_hl = self.syntax_highlighter;
|
594
|
-
; if syntax_hl && (syntax_hl.docinfo? :head);
|
595
|
-
; _buf << ((syntax_hl.docinfo :head, self, cdn_base_url: cdn_base, linkcss: linkcss, self_closing_tag_slash: '/').to_s);
|
596
873
|
;
|
597
|
-
; 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);
|
598
874
|
;
|
599
875
|
;
|
600
876
|
;
|
601
877
|
;
|
602
|
-
; _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);
|
603
878
|
;
|
604
879
|
;
|
605
|
-
; if attr? :customcss;
|
606
|
-
; _buf << ("<link rel=\"stylesheet\"".freeze); _slim_codeattributes9 = ((customcss = attr :customcss).empty? ? 'asciidoctor-revealjs.css' : customcss); if _slim_codeattributes9; if _slim_codeattributes9 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes9).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
607
|
-
; end; unless (_docinfo = docinfo :head, '-revealjs.html').empty?;
|
608
|
-
; _buf << ((_docinfo).to_s);
|
609
|
-
; end; _buf << ("</head><body><div class=\"reveal\"><div class=\"slides\">".freeze);
|
610
880
|
;
|
611
881
|
;
|
612
882
|
;
|
883
|
+
;
|
884
|
+
;
|
885
|
+
;
|
886
|
+
;
|
887
|
+
;
|
888
|
+
;
|
889
|
+
;
|
890
|
+
;
|
891
|
+
;
|
892
|
+
;
|
893
|
+
;
|
894
|
+
;
|
895
|
+
; _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);
|
896
|
+
;
|
897
|
+
;
|
898
|
+
; _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);
|
899
|
+
;
|
900
|
+
;
|
901
|
+
; _buf << ((attr 'revealjs_width', 960).to_s); _buf << (", ".freeze); _buf << ((attr 'revealjs_height', 700).to_s); _buf << (")\n});</script>".freeze);
|
902
|
+
;
|
903
|
+
; _buf
|
904
|
+
end
|
905
|
+
end
|
906
|
+
|
907
|
+
def stem(node, opts = {})
|
908
|
+
node.extend(Helpers)
|
909
|
+
node.instance_eval do
|
910
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
911
|
+
_buf = ''; open, close = Asciidoctor::BLOCK_MATH_DELIMITERS[@style.to_sym];
|
912
|
+
; equation = content.strip;
|
913
|
+
; if (@subs.nil? || @subs.empty?) && !(attr? 'subs');
|
914
|
+
; equation = sub_specialcharacters equation;
|
915
|
+
; end; unless (equation.start_with? open) && (equation.end_with? close);
|
916
|
+
; equation = %(#{open}#{equation}#{close});
|
917
|
+
; end; _slim_controls1 = html_tag('div', { :id => @id, :class => ['stemblock', role, ('fragment' if (option? :step) || (has_role? 'step') || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
918
|
+
; if title?;
|
919
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
920
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<div class=\"content\">".freeze); _slim_controls2 << ((equation).to_s);
|
921
|
+
; _slim_controls2 << ("</div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
922
|
+
end
|
923
|
+
end
|
924
|
+
|
925
|
+
def literal(node, opts = {})
|
926
|
+
node.extend(Helpers)
|
927
|
+
node.instance_eval do
|
928
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
929
|
+
_buf = ''; _slim_controls1 = html_tag('div', { :id => id, :class => ['literalblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
930
|
+
; if title?;
|
931
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
932
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<div class=\"content\"><pre".freeze); _temple_html_attributeremover1 = ''; _slim_codeattributes1 = (!(@document.attr? :prewrap) || (option? 'nowrap') ? 'nowrap' : nil); if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes1.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes1).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _slim_controls2 << (" class=\"".freeze); _slim_controls2 << ((_temple_html_attributeremover1).to_s); _slim_controls2 << ("\"".freeze); end; _slim_controls2 << (">".freeze); _slim_controls2 << ((content).to_s);
|
933
|
+
; _slim_controls2 << ("</pre></div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
934
|
+
end
|
935
|
+
end
|
936
|
+
|
937
|
+
def embedded(node, opts = {})
|
938
|
+
node.extend(Helpers)
|
939
|
+
node.instance_eval do
|
940
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
941
|
+
_buf = ''; unless notitle || !has_header?;
|
942
|
+
; _buf << ("<h1".freeze); _slim_codeattributes1 = @id; if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" id".freeze); else; _buf << (" id=\"".freeze); _buf << ((_slim_codeattributes1).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze); _buf << ((@header.title).to_s);
|
943
|
+
; _buf << ("</h1>".freeze); end; _buf << ((content).to_s);
|
944
|
+
; unless !footnotes? || attr?(:nofootnotes);
|
945
|
+
; _buf << ("<div id=\"footnotes\"><hr>".freeze);
|
946
|
+
;
|
947
|
+
; footnotes.each do |fn|;
|
948
|
+
; _buf << ("<div class=\"footnote\" id=\"_footnote_".freeze); _buf << ((fn.index).to_s); _buf << ("\"><a href=\"#_footnoteref_".freeze);
|
949
|
+
; _buf << ((fn.index).to_s); _buf << ("\">".freeze); _buf << ((fn.index).to_s); _buf << ("</a>. ".freeze); _buf << ((fn.text).to_s);
|
950
|
+
; _buf << ("</div>".freeze); end; _buf << ("</div>".freeze); end; _buf
|
951
|
+
end
|
952
|
+
end
|
953
|
+
|
954
|
+
def document(node, opts = {})
|
955
|
+
node.extend(Helpers)
|
956
|
+
node.instance_eval do
|
957
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
958
|
+
_buf = ''; slides_content = self.content;
|
959
|
+
; content_for :slides do;
|
613
960
|
; unless noheader;
|
614
|
-
; unless (
|
615
|
-
; _buf << ((
|
961
|
+
; unless (header_docinfo = docinfo :header, '-revealjs.html').empty?;
|
962
|
+
; _buf << ((header_docinfo).to_s);
|
616
963
|
; end; if header?;
|
617
964
|
; bg_image = (attr? 'title-slide-background-image') ? (image_uri(attr 'title-slide-background-image')) : nil;
|
618
965
|
; bg_video = (attr? 'title-slide-background-video') ? (media_uri(attr 'title-slide-background-video')) : nil;
|
@@ -631,7 +978,7 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
631
978
|
;
|
632
979
|
;
|
633
980
|
;
|
634
|
-
; _buf << ("<section".freeze); _temple_html_attributeremover1 = ''; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "title"; _temple_html_attributemerger1[1] = '';
|
981
|
+
; _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);
|
635
982
|
; if (_title_obj = doctitle partition: true, use_fallback: true).subtitle?;
|
636
983
|
; _buf << ("<h1>".freeze); _buf << ((slice_text _title_obj.title, (_slice = header.option? :slice)).to_s);
|
637
984
|
; _buf << ("</h1><h2>".freeze); _buf << ((slice_text _title_obj.subtitle, _slice).to_s);
|
@@ -640,13 +987,74 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
640
987
|
; _buf << ("</h1>".freeze); end; preamble = @document.find_by context: :preamble;
|
641
988
|
; unless preamble.nil? or preamble.length == 0;
|
642
989
|
; _buf << ("<div class=\"preamble\">".freeze); _buf << ((preamble.pop.content).to_s);
|
643
|
-
; _buf << ("</div>".freeze); end;
|
644
|
-
; _buf << ("
|
645
|
-
;
|
646
|
-
;
|
647
|
-
;
|
990
|
+
; _buf << ("</div>".freeze); end; _buf << ((generate_authors(@document)).to_s);
|
991
|
+
; _buf << ("</section>".freeze);
|
992
|
+
; end; end; _buf << ((slides_content).to_s);
|
993
|
+
; unless (footer_docinfo = docinfo :footer, '-revealjs.html').empty?;
|
994
|
+
; _buf << ((footer_docinfo).to_s);
|
995
|
+
;
|
996
|
+
; end; end; _buf << ("<!DOCTYPE html><html".freeze);
|
997
|
+
; _slim_codeattributes16 = (attr :lang, 'en' unless attr? :nolang); if _slim_codeattributes16; if _slim_codeattributes16 == true; _buf << (" lang".freeze); else; _buf << (" lang=\"".freeze); _buf << ((_slim_codeattributes16).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);
|
998
|
+
;
|
999
|
+
;
|
1000
|
+
;
|
1001
|
+
;
|
1002
|
+
; _buf << (((doctitle sanitize: true, use_fallback: true)).to_s);
|
1003
|
+
;
|
1004
|
+
; _buf << ("</title>".freeze); if RUBY_ENGINE == 'opal' && JAVASCRIPT_PLATFORM == 'node';
|
1005
|
+
; revealjsdir = (attr :revealjsdir, 'node_modules/reveal.js');
|
1006
|
+
; else;
|
1007
|
+
; revealjsdir = (attr :revealjsdir, 'reveal.js');
|
1008
|
+
; end; unless (asset_uri_scheme = (attr 'asset-uri-scheme', 'https')).empty?;
|
1009
|
+
; asset_uri_scheme = %(#{asset_uri_scheme}:);
|
1010
|
+
; end; cdn_base = %(#{asset_uri_scheme}//cdnjs.cloudflare.com/ajax/libs);
|
1011
|
+
; [:description, :keywords, :author, :copyright].each do |key|;
|
1012
|
+
; if attr? key;
|
1013
|
+
; _buf << ("<meta".freeze); _slim_codeattributes17 = key; if _slim_codeattributes17; if _slim_codeattributes17 == true; _buf << (" name".freeze); else; _buf << (" name=\"".freeze); _buf << ((_slim_codeattributes17).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes18 = (attr key); if _slim_codeattributes18; if _slim_codeattributes18 == true; _buf << (" content".freeze); else; _buf << (" content=\"".freeze); _buf << ((_slim_codeattributes18).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
1014
|
+
; end; end; if attr? 'favicon';
|
1015
|
+
; if (icon_href = attr 'favicon').empty?;
|
1016
|
+
; icon_href = 'favicon.ico';
|
1017
|
+
; icon_type = 'image/x-icon';
|
1018
|
+
; elsif (icon_ext = File.extname icon_href);
|
1019
|
+
; icon_type = icon_ext == '.ico' ? 'image/x-icon' : %(image/#{icon_ext.slice 1, icon_ext.length});
|
1020
|
+
; else;
|
1021
|
+
; icon_type = 'image/x-icon';
|
1022
|
+
; end; _buf << ("<link rel=\"icon\" type=\"".freeze); _buf << ((icon_type).to_s); _buf << ("\" href=\"".freeze); _buf << ((icon_href).to_s); _buf << ("\">".freeze);
|
1023
|
+
; end; linkcss = (attr? 'linkcss');
|
1024
|
+
; _buf << ("<link rel=\"stylesheet\" href=\"".freeze); _buf << ((revealjsdir).to_s); _buf << ("/dist/reset.css\"><link rel=\"stylesheet\" href=\"".freeze);
|
1025
|
+
; _buf << ((revealjsdir).to_s); _buf << ("/dist/reveal.css\"><link rel=\"stylesheet\"".freeze);
|
1026
|
+
;
|
1027
|
+
;
|
1028
|
+
; _slim_codeattributes19 = (attr :revealjs_customtheme, %(#{revealjsdir}/dist/theme/#{attr 'revealjs_theme', 'black'}.css)); if _slim_codeattributes19; if _slim_codeattributes19 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes19).to_s); _buf << ("\"".freeze); end; end; _buf << (" id=\"theme\"><!--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/* source blocks */\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/* auto-animate feature */\n/* hide the scrollbar when auto-animating source blocks */\n.reveal pre[data-auto-animate-target] {\n overflow: hidden;\n}\n\n.reveal pre[data-auto-animate-target] code {\n overflow: hidden;\n}\n\n/* add a min width to avoid horizontal shift on line numbers */\ncode.hljs .hljs-ln-line.hljs-ln-n {\n min-width: 1.25em;\n}\n\n/* tables */\ntable {\n border-collapse: collapse;\n border-spacing: 0\n}\n\ntable {\n margin-bottom: 1.25em;\n border: solid 1px #dedede\n}\n\ntable thead tr th, table thead tr td, table tfoot tr th, table tfoot tr td {\n padding: .5em .625em .625em;\n font-size: inherit;\n text-align: left\n}\n\ntable tr th, table tr td {\n padding: .5625em .625em;\n font-size: inherit\n}\n\ntable thead tr th, table tfoot tr th, table tbody tr td, table tr td, table tfoot tr td {\n display: table-cell;\n line-height: 1.6\n}\n\ntd.tableblock > .content {\n margin-bottom: 1.25em\n}\n\ntd.tableblock > .content > :last-child {\n margin-bottom: -1.25em\n}\n\ntable.tableblock, th.tableblock, td.tableblock {\n border: 0 solid #dedede\n}\n\ntable.grid-all > thead > tr > .tableblock, table.grid-all > tbody > tr > .tableblock {\n border-width: 0 1px 1px 0\n}\n\ntable.grid-all > tfoot > tr > .tableblock {\n border-width: 1px 1px 0 0\n}\n\ntable.grid-cols > * > tr > .tableblock {\n border-width: 0 1px 0 0\n}\n\ntable.grid-rows > thead > tr > .tableblock, table.grid-rows > tbody > tr > .tableblock {\n border-width: 0 0 1px\n}\n\ntable.grid-rows > tfoot > tr > .tableblock {\n border-width: 1px 0 0\n}\n\ntable.grid-all > * > tr > .tableblock:last-child, table.grid-cols > * > tr > .tableblock:last-child {\n border-right-width: 0\n}\n\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 {\n border-bottom-width: 0\n}\n\ntable.frame-all {\n border-width: 1px\n}\n\ntable.frame-sides {\n border-width: 0 1px\n}\n\ntable.frame-topbot, table.frame-ends {\n border-width: 1px 0\n}\n\n.reveal table th.halign-left, .reveal table td.halign-left {\n text-align: left\n}\n\n.reveal table th.halign-right, .reveal table td.halign-right {\n text-align: right\n}\n\n.reveal table th.halign-center, .reveal table td.halign-center {\n text-align: center\n}\n\n.reveal table th.valign-top, .reveal table td.valign-top {\n vertical-align: top\n}\n\n.reveal table th.valign-bottom, .reveal table td.valign-bottom {\n vertical-align: bottom\n}\n\n.reveal table th.valign-middle, .reveal table td.valign-middle {\n vertical-align: middle\n}\n\ntable thead th, table tfoot th {\n font-weight: bold\n}\n\ntbody tr th {\n display: table-cell;\n line-height: 1.6\n}\n\ntbody tr th, tbody tr th p, tfoot tr th, tfoot tr th p {\n font-weight: bold\n}\n\nthead {\n display: table-header-group\n}\n\n.reveal table.grid-none th, .reveal table.grid-none td {\n border-bottom: 0 !important\n}\n\n/* kbd macro */\nkbd {\n font-family: \"Droid Sans Mono\", \"DejaVu Sans Mono\", monospace;\n display: inline-block;\n color: rgba(0, 0, 0, .8);\n font-size: .65em;\n line-height: 1.45;\n background: #f7f7f7;\n border: 1px solid #ccc;\n -webkit-border-radius: 3px;\n border-radius: 3px;\n -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 0 0 .1em white inset;\n box-shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 0 0 .1em #fff inset;\n margin: 0 .15em;\n padding: .2em .5em;\n vertical-align: middle;\n position: relative;\n top: -.1em;\n white-space: nowrap\n}\n\n.keyseq kbd:first-child {\n margin-left: 0\n}\n\n.keyseq kbd:last-child {\n margin-right: 0\n}\n\n/* callouts */\n.conum[data-value] {\n display: inline-block;\n color: #fff !important;\n background: rgba(0, 0, 0, .8);\n -webkit-border-radius: 50%;\n border-radius: 50%;\n text-align: center;\n font-size: .75em;\n width: 1.67em;\n height: 1.67em;\n line-height: 1.67em;\n font-family: \"Open Sans\", \"DejaVu Sans\", sans-serif;\n font-style: normal;\n font-weight: bold\n}\n\n.conum[data-value] * {\n color: #fff !important\n}\n\n.conum[data-value] + b {\n display: none\n}\n\n.conum[data-value]:after {\n content: attr(data-value)\n}\n\npre .conum[data-value] {\n position: relative;\n top: -.125em\n}\n\nb.conum * {\n color: inherit !important\n}\n\n.conum:not([data-value]):empty {\n display: none\n}\n\n/* Callout list */\n.hdlist > table, .colist > table {\n border: 0;\n background: none\n}\n\n.hdlist > table > tbody > tr, .colist > table > tbody > tr {\n background: none\n}\n\ntd.hdlist1, td.hdlist2 {\n vertical-align: top;\n padding: 0 .625em\n}\n\ntd.hdlist1 {\n font-weight: bold;\n padding-bottom: 1.25em\n}\n\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 {\n padding: .4em .75em 0;\n line-height: 1;\n vertical-align: top\n}\n\n.colist td:not([class]):first-child img {\n max-width: none\n}\n\n.colist td:not([class]):last-child {\n padding: .25em 0\n}\n\n/* Override Asciidoctor CSS that causes issues with reveal.js features */\n.reveal .hljs table {\n border: 0\n}\n\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 {\n border-bottom: 0\n}\n\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 {\n line-height: inherit\n}\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}\n\n.columns .slide-content > .column > * {\n padding: .75rem;\n}\n\n/* See #353 */\n.columns.wrap .slide-content > .column {\n flex-basis: auto;\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\n.columns .slide-content > .column.has-text-left {\n text-align: left;\n}\n\n.columns .slide-content > .column.has-text-justified {\n text-align: justify;\n}\n\n.columns .slide-content > .column.has-text-right {\n text-align: right;\n}\n\n.columns .slide-content > .column.has-text-left {\n text-align: left;\n}\n\n.columns .slide-content > .column.has-text-justified {\n text-align: justify;\n}\n\n.columns .slide-content > .column.has-text-right {\n text-align: right;\n}\n\n.text-left {\n text-align: left !important\n}\n\n.text-right {\n text-align: right !important\n}\n\n.text-center {\n text-align: center !important\n}\n\n.text-justify {\n text-align: justify !important\n}\n\n.footnotes {\n border-top: 1px solid rgba(0, 0, 0, 0.2);\n padding: 0.5em 0 0 0;\n font-size: 0.65em;\n margin-top: 4em;\n}\n\n.byline {\n font-size:.8em\n}\nul.byline {\n list-style-type: none;\n}\nul.byline li + li {\n margin-top: 0.25em;\n}\n</style>".freeze);
|
1029
|
+
;
|
1030
|
+
;
|
1031
|
+
;
|
1032
|
+
; if attr? :icons, 'font';
|
1033
|
+
;
|
1034
|
+
; if attr? 'iconfont-remote';
|
1035
|
+
; if (iconfont_cdn = (attr 'iconfont-cdn'));
|
1036
|
+
; _buf << ("<link rel=\"stylesheet\"".freeze); _slim_codeattributes20 = iconfont_cdn; if _slim_codeattributes20; if _slim_codeattributes20 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes20).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
1037
|
+
; else;
|
1038
|
+
;
|
1039
|
+
; font_awesome_version = (attr 'font-awesome-version', '5.15.1');
|
1040
|
+
; _buf << ("<link rel=\"stylesheet\"".freeze); _slim_codeattributes21 = %(#{cdn_base}/font-awesome/#{font_awesome_version}/css/all.min.css); if _slim_codeattributes21; if _slim_codeattributes21 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes21).to_s); _buf << ("\"".freeze); end; end; _buf << ("><link rel=\"stylesheet\"".freeze);
|
1041
|
+
; _slim_codeattributes22 = %(#{cdn_base}/font-awesome/#{font_awesome_version}/css/v4-shims.min.css); if _slim_codeattributes22; if _slim_codeattributes22 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes22).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
1042
|
+
; end; else;
|
1043
|
+
; _buf << ("<link rel=\"stylesheet\"".freeze); _slim_codeattributes23 = (normalize_web_path %(#{attr 'iconfont-name', 'font-awesome'}.css), (attr 'stylesdir', ''), false); if _slim_codeattributes23; if _slim_codeattributes23 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes23).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
1044
|
+
; end; end; _buf << ((generate_stem(cdn_base)).to_s);
|
1045
|
+
; syntax_hl = self.syntax_highlighter;
|
1046
|
+
; if syntax_hl && (syntax_hl.docinfo? :head);
|
1047
|
+
; _buf << ((syntax_hl.docinfo :head, self, cdn_base_url: cdn_base, linkcss: linkcss, self_closing_tag_slash: '/').to_s);
|
1048
|
+
; end; if attr? :customcss;
|
1049
|
+
; _buf << ("<link rel=\"stylesheet\"".freeze); _slim_codeattributes24 = ((customcss = attr :customcss).empty? ? 'asciidoctor-revealjs.css' : customcss); if _slim_codeattributes24; if _slim_codeattributes24 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes24).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
1050
|
+
; end; unless (_docinfo = docinfo :head, '-revealjs.html').empty?;
|
648
1051
|
; _buf << ((_docinfo).to_s);
|
649
|
-
; end; _buf << ("</div
|
1052
|
+
; end; _buf << ("</head><body><div class=\"reveal\"><div class=\"slides\">".freeze);
|
1053
|
+
;
|
1054
|
+
;
|
1055
|
+
;
|
1056
|
+
; yield_content :slides;
|
1057
|
+
; _buf << ("</div></div><script src=\"".freeze); _buf << ((revealjsdir).to_s); _buf << ("/dist/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);
|
650
1058
|
;
|
651
1059
|
;
|
652
1060
|
;
|
@@ -808,10 +1216,9 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
808
1216
|
;
|
809
1217
|
;
|
810
1218
|
; _buf << ((revealjs_dependencies(document, self, revealjsdir)).to_s);
|
811
|
-
; _buf << ("\n ],\n\n ".freeze);
|
1219
|
+
; _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);
|
1220
|
+
;
|
812
1221
|
;
|
813
|
-
; _buf << (((attr? 'revealjs_plugins_configuration') ? File.read(attr('revealjs_plugins_configuration', '')) : "").to_s);
|
814
|
-
; _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);
|
815
1222
|
;
|
816
1223
|
;
|
817
1224
|
;
|
@@ -890,126 +1297,40 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
890
1297
|
end
|
891
1298
|
end
|
892
1299
|
|
893
|
-
def
|
894
|
-
node.extend(Helpers)
|
895
|
-
node.instance_eval do
|
896
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
897
|
-
_buf = ''; _buf << ("<hr>".freeze);
|
898
|
-
; _buf
|
899
|
-
end
|
900
|
-
end
|
901
|
-
|
902
|
-
def inline_quoted(node, opts = {})
|
1300
|
+
def sidebar(node, opts = {})
|
903
1301
|
node.extend(Helpers)
|
904
1302
|
node.instance_eval do
|
905
1303
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
906
|
-
_buf = '';
|
907
|
-
;
|
908
|
-
; _buf << (
|
909
|
-
; else;
|
910
|
-
; case @type;
|
911
|
-
; when :double;
|
912
|
-
; inline_text_container("“#{@text}”");
|
913
|
-
; when :single;
|
914
|
-
; _buf << ((inline_text_container("‘#{@text}’")).to_s);
|
915
|
-
; when :asciimath, :latexmath;
|
916
|
-
; open, close = Asciidoctor::INLINE_MATH_DELIMITERS[@type];
|
917
|
-
; _buf << ((inline_text_container("#{open}#{@text}#{close}")).to_s);
|
1304
|
+
_buf = ''; if (has_role? 'aside') or (has_role? 'speaker') or (has_role? 'notes');
|
1305
|
+
; _buf << ("<aside class=\"notes\">".freeze); _buf << ((resolve_content).to_s);
|
1306
|
+
; _buf << ("</aside>".freeze);
|
918
1307
|
; else;
|
919
|
-
;
|
920
|
-
;
|
921
|
-
end
|
922
|
-
end
|
923
|
-
|
924
|
-
def outline(node, opts = {})
|
925
|
-
node.extend(Helpers)
|
926
|
-
node.instance_eval do
|
927
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
928
|
-
_buf = ''; unless sections.empty?;
|
929
|
-
; toclevels ||= (document.attr 'toclevels', DEFAULT_TOCLEVELS).to_i;
|
930
|
-
; slevel = section_level sections.first;
|
931
|
-
; _buf << ("<ol class=\"sectlevel".freeze); _buf << ((slevel).to_s); _buf << ("\">".freeze);
|
932
|
-
; sections.each do |sec|;
|
933
|
-
; _buf << ("<li><a href=\"#".freeze);
|
934
|
-
; _buf << ((sec.id).to_s); _buf << ("\">".freeze); _buf << ((section_title sec).to_s);
|
935
|
-
; _buf << ("</a>".freeze); if (sec.level < toclevels) && (child_toc = converter.convert sec, 'outline');
|
936
|
-
; _buf << ((child_toc).to_s);
|
937
|
-
; end; _buf << ("</li>".freeze); end; _buf << ("</ol>".freeze); end; _buf
|
938
|
-
end
|
939
|
-
end
|
940
|
-
|
941
|
-
def inline_footnote(node, opts = {})
|
942
|
-
node.extend(Helpers)
|
943
|
-
node.instance_eval do
|
944
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
945
|
-
_buf = ''; footnote = slide_footnote(self);
|
946
|
-
; index = footnote.attr(:index);
|
947
|
-
; id = footnote.id;
|
948
|
-
; if @type == :xref;
|
949
|
-
; _slim_controls1 = html_tag('sup', { :class => ['footnoteref'] }.merge(data_attrs(footnote.attributes))) do; _slim_controls2 = '';
|
950
|
-
; _slim_controls2 << ("[<span class=\"footnote\" title=\"View footnote.\">".freeze);
|
951
|
-
; _slim_controls2 << ((index).to_s);
|
952
|
-
; _slim_controls2 << ("</span>]".freeze);
|
953
|
-
; _slim_controls2; end; _buf << ((_slim_controls1).to_s); else;
|
954
|
-
; _slim_controls3 = html_tag('sup', { :id => ("_footnote_#{id}" if id), :class => ['footnote'] }.merge(data_attrs(footnote.attributes))) do; _slim_controls4 = '';
|
955
|
-
; _slim_controls4 << ("[<span class=\"footnote\" title=\"View footnote.\">".freeze);
|
956
|
-
; _slim_controls4 << ((index).to_s);
|
957
|
-
; _slim_controls4 << ("</span>]".freeze);
|
958
|
-
; _slim_controls4; end; _buf << ((_slim_controls3).to_s); end; _buf
|
959
|
-
end
|
960
|
-
end
|
961
|
-
|
962
|
-
def video(node, opts = {})
|
963
|
-
node.extend(Helpers)
|
964
|
-
node.instance_eval do
|
965
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
966
|
-
_buf = '';
|
967
|
-
;
|
968
|
-
; no_stretch = ((attr? :width) || (attr? :height));
|
969
|
-
; width = (attr? :width) ? (attr :width) : "100%";
|
970
|
-
; height = (attr? :height) ? (attr :height) : "100%";
|
971
|
-
;
|
972
|
-
; _slim_controls1 = html_tag('div', { :id => @id, :class => ['videoblock', @style, role, (no_stretch ? nil : 'stretch'), ('fragment' if (option? :step) || (has_role? 'step') || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1308
|
+
; _slim_controls1 = html_tag('div', { :id => @id, :class => ['sidebarblock', role, ('fragment' if (option? :step) || (has_role? 'step') || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1309
|
+
; _slim_controls2 << ("<div class=\"content\">".freeze);
|
973
1310
|
; if title?;
|
974
|
-
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((
|
975
|
-
; _slim_controls2 << ("</div>".freeze); end;
|
976
|
-
;
|
977
|
-
|
978
|
-
|
979
|
-
|
980
|
-
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
;
|
985
|
-
;
|
986
|
-
;
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
;
|
996
|
-
;
|
997
|
-
; params << "mute=1" if option? 'muted';
|
998
|
-
; params << "controls=0" if option? 'nocontrols';
|
999
|
-
; src = %(#{asset_uri_scheme}//www.youtube.com/embed/#{attr :target}?#{params * '&'});
|
1000
|
-
;
|
1001
|
-
;
|
1002
|
-
;
|
1003
|
-
;
|
1004
|
-
;
|
1005
|
-
; _slim_controls2 << ("<iframe".freeze); _slim_codeattributes7 = (width); if _slim_codeattributes7; if _slim_codeattributes7 == true; _slim_controls2 << (" width".freeze); else; _slim_controls2 << (" width=\"".freeze); _slim_controls2 << ((_slim_codeattributes7).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes8 = (height); if _slim_codeattributes8; if _slim_codeattributes8 == true; _slim_controls2 << (" height".freeze); else; _slim_controls2 << (" height=\"".freeze); _slim_controls2 << ((_slim_codeattributes8).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes9 = src; if _slim_codeattributes9; if _slim_codeattributes9 == true; _slim_controls2 << (" src".freeze); else; _slim_controls2 << (" src=\"".freeze); _slim_controls2 << ((_slim_codeattributes9).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes10 = 0; if _slim_codeattributes10; if _slim_codeattributes10 == true; _slim_controls2 << (" frameborder".freeze); else; _slim_controls2 << (" frameborder=\"".freeze); _slim_controls2 << ((_slim_codeattributes10).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes11 = !(option? 'nofullscreen'); if _slim_codeattributes11; if _slim_codeattributes11 == true; _slim_controls2 << (" allowfullscreen".freeze); else; _slim_controls2 << (" allowfullscreen=\"".freeze); _slim_controls2 << ((_slim_codeattributes11).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes12 = (option? 'autoplay'); if _slim_codeattributes12; if _slim_codeattributes12 == true; _slim_controls2 << (" data-autoplay".freeze); else; _slim_controls2 << (" data-autoplay=\"".freeze); _slim_controls2 << ((_slim_codeattributes12).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes13 = ((option? 'autoplay') ? "autoplay" : nil); if _slim_codeattributes13; if _slim_codeattributes13 == true; _slim_controls2 << (" allow".freeze); else; _slim_controls2 << (" allow=\"".freeze); _slim_controls2 << ((_slim_codeattributes13).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << ("></iframe>".freeze);
|
1006
|
-
; else;
|
1007
|
-
;
|
1008
|
-
;
|
1009
|
-
;
|
1010
|
-
; _slim_controls2 << ("<video".freeze); _slim_codeattributes14 = media_uri(attr :target); if _slim_codeattributes14; if _slim_codeattributes14 == true; _slim_controls2 << (" src".freeze); else; _slim_controls2 << (" src=\"".freeze); _slim_controls2 << ((_slim_codeattributes14).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes15 = (width); if _slim_codeattributes15; if _slim_codeattributes15 == true; _slim_controls2 << (" width".freeze); else; _slim_controls2 << (" width=\"".freeze); _slim_controls2 << ((_slim_codeattributes15).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes16 = (height); if _slim_codeattributes16; if _slim_codeattributes16 == true; _slim_controls2 << (" height".freeze); else; _slim_controls2 << (" height=\"".freeze); _slim_controls2 << ((_slim_codeattributes16).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes17 = ((attr :poster) ? media_uri(attr :poster) : nil); if _slim_codeattributes17; if _slim_codeattributes17 == true; _slim_controls2 << (" poster".freeze); else; _slim_controls2 << (" poster=\"".freeze); _slim_controls2 << ((_slim_codeattributes17).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes18 = (option? 'autoplay'); if _slim_codeattributes18; if _slim_codeattributes18 == true; _slim_controls2 << (" data-autoplay".freeze); else; _slim_controls2 << (" data-autoplay=\"".freeze); _slim_controls2 << ((_slim_codeattributes18).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes19 = !(option? 'nocontrols'); if _slim_codeattributes19; if _slim_codeattributes19 == true; _slim_controls2 << (" controls".freeze); else; _slim_controls2 << (" controls=\"".freeze); _slim_controls2 << ((_slim_codeattributes19).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes20 = (option? 'loop'); if _slim_codeattributes20; if _slim_codeattributes20 == true; _slim_controls2 << (" loop".freeze); else; _slim_controls2 << (" loop=\"".freeze); _slim_controls2 << ((_slim_codeattributes20).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << (">Your browser does not support the video tag.</video>".freeze);
|
1011
|
-
;
|
1012
|
-
; end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1311
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
1312
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ((content).to_s);
|
1313
|
+
; _slim_controls2 << ("</div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); end; _buf
|
1314
|
+
end
|
1315
|
+
end
|
1316
|
+
|
1317
|
+
def inline_break(node, opts = {})
|
1318
|
+
node.extend(Helpers)
|
1319
|
+
node.instance_eval do
|
1320
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1321
|
+
_buf = ''; _buf << ((@text).to_s);
|
1322
|
+
; _buf << ("<br>".freeze);
|
1323
|
+
; _buf
|
1324
|
+
end
|
1325
|
+
end
|
1326
|
+
|
1327
|
+
def inline_indexterm(node, opts = {})
|
1328
|
+
node.extend(Helpers)
|
1329
|
+
node.instance_eval do
|
1330
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1331
|
+
_buf = ''; if @type == :visible;
|
1332
|
+
; _buf << ((@text).to_s);
|
1333
|
+
; end; _buf
|
1013
1334
|
end
|
1014
1335
|
end
|
1015
1336
|
|
@@ -1074,191 +1395,36 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
1074
1395
|
end
|
1075
1396
|
end
|
1076
1397
|
|
1077
|
-
def
|
1078
|
-
node.extend(Helpers)
|
1079
|
-
node.instance_eval do
|
1080
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
1081
|
-
_buf = ''; _buf << ((content).to_s);
|
1082
|
-
; _buf
|
1083
|
-
end
|
1084
|
-
end
|
1085
|
-
|
1086
|
-
def title_slide(node, opts = {})
|
1398
|
+
def ulist(node, opts = {})
|
1087
1399
|
node.extend(Helpers)
|
1088
1400
|
node.instance_eval do
|
1089
1401
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
1090
|
-
_buf = '';
|
1091
|
-
;
|
1092
|
-
;
|
1093
|
-
;
|
1094
|
-
;
|
1095
|
-
;
|
1096
|
-
;
|
1097
|
-
;
|
1098
|
-
;
|
1099
|
-
;
|
1100
|
-
;
|
1101
|
-
;
|
1102
|
-
;
|
1103
|
-
;
|
1104
|
-
;
|
1105
|
-
;
|
1402
|
+
_buf = ''; if (checklist = (option? :checklist) ? 'checklist' : nil);
|
1403
|
+
; if option? :interactive;
|
1404
|
+
; marker_checked = '<input type="checkbox" data-item-complete="1" checked>';
|
1405
|
+
; marker_unchecked = '<input type="checkbox" data-item-complete="0">';
|
1406
|
+
; else;
|
1407
|
+
; if @document.attr? :icons, 'font';
|
1408
|
+
; marker_checked = '<i class="icon-check"></i>';
|
1409
|
+
; marker_unchecked = '<i class="icon-check-empty"></i>';
|
1410
|
+
; else;
|
1106
1411
|
;
|
1107
|
-
;
|
1108
|
-
;
|
1109
|
-
;
|
1110
|
-
; _buf << ("</h1><h2>".freeze); _buf << ((slice_text _title_obj.subtitle, _slice).to_s);
|
1111
|
-
; _buf << ("</h2>".freeze); else;
|
1112
|
-
; _buf << ("<h1>".freeze); _buf << ((@header.title).to_s);
|
1113
|
-
; _buf << ("</h1>".freeze); end; preamble = @document.find_by context: :preamble;
|
1114
|
-
; unless preamble.nil? or preamble.length == 0;
|
1115
|
-
; _buf << ("<div class=\"preamble\">".freeze); _buf << ((preamble.pop.content).to_s);
|
1116
|
-
; _buf << ("</div>".freeze); end; unless author.nil?;
|
1117
|
-
; _buf << ("<p class=\"author\"><small>".freeze); _buf << ((author).to_s);
|
1118
|
-
; _buf << ("</small></p>".freeze); end; _buf << ("</section>".freeze); _buf
|
1119
|
-
end
|
1120
|
-
end
|
1121
|
-
|
1122
|
-
def inline_kbd(node, opts = {})
|
1123
|
-
node.extend(Helpers)
|
1124
|
-
node.instance_eval do
|
1125
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
1126
|
-
_buf = ''; if (keys = attr 'keys').size == 1;
|
1127
|
-
; _slim_controls1 = html_tag('kbd', data_attrs(@attributes)) do; _slim_controls2 = '';
|
1128
|
-
; _slim_controls2 << ((keys.first).to_s);
|
1129
|
-
; _slim_controls2; end; _buf << ((_slim_controls1).to_s); else;
|
1130
|
-
; _slim_controls3 = html_tag('span', { :class => ['keyseq'] }.merge(data_attrs(@attributes))) do; _slim_controls4 = '';
|
1131
|
-
; keys.each_with_index do |key, idx|;
|
1132
|
-
; unless idx.zero?;
|
1133
|
-
; _slim_controls4 << ("+".freeze);
|
1134
|
-
; end; _slim_controls4 << ("<kbd>".freeze); _slim_controls4 << ((key).to_s);
|
1135
|
-
; _slim_controls4 << ("</kbd>".freeze); end; _slim_controls4; end; _buf << ((_slim_controls3).to_s); end; _buf
|
1136
|
-
end
|
1137
|
-
end
|
1138
|
-
|
1139
|
-
def verse(node, opts = {})
|
1140
|
-
node.extend(Helpers)
|
1141
|
-
node.instance_eval do
|
1142
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
1143
|
-
_buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['verseblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1144
|
-
; if title?;
|
1145
|
-
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
1146
|
-
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<pre class=\"content\">".freeze); _slim_controls2 << ((content).to_s);
|
1147
|
-
; _slim_controls2 << ("</pre>".freeze); attribution = (attr? :attribution) ? (attr :attribution) : nil;
|
1148
|
-
; citetitle = (attr? :citetitle) ? (attr :citetitle) : nil;
|
1149
|
-
; if attribution || citetitle;
|
1150
|
-
; _slim_controls2 << ("<div class=\"attribution\">".freeze);
|
1151
|
-
; if citetitle;
|
1152
|
-
; _slim_controls2 << ("<cite>".freeze); _slim_controls2 << ((citetitle).to_s);
|
1153
|
-
; _slim_controls2 << ("</cite>".freeze); end; if attribution;
|
1154
|
-
; if citetitle;
|
1155
|
-
; _slim_controls2 << ("<br>".freeze);
|
1156
|
-
; end; _slim_controls2 << ("— ".freeze); _slim_controls2 << ((attribution).to_s);
|
1157
|
-
; end; _slim_controls2 << ("</div>".freeze); end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1158
|
-
end
|
1159
|
-
end
|
1160
|
-
|
1161
|
-
def literal(node, opts = {})
|
1162
|
-
node.extend(Helpers)
|
1163
|
-
node.instance_eval do
|
1164
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
1165
|
-
_buf = ''; _slim_controls1 = html_tag('div', { :id => id, :class => ['literalblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1412
|
+
; marker_checked = '<input type="checkbox" data-item-complete="1" checked disabled>';
|
1413
|
+
; marker_unchecked = '<input type="checkbox" data-item-complete="0" disabled>';
|
1414
|
+
; end; end; end; _slim_controls1 = html_tag('div', { :id => @id, :class => ['ulist', checklist, @style, role] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1166
1415
|
; if title?;
|
1167
1416
|
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
1168
|
-
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<
|
1169
|
-
;
|
1170
|
-
|
1171
|
-
end
|
1172
|
-
|
1173
|
-
def toc(node, opts = {})
|
1174
|
-
node.extend(Helpers)
|
1175
|
-
node.instance_eval do
|
1176
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
1177
|
-
_buf = '';
|
1178
|
-
;
|
1179
|
-
;
|
1180
|
-
;
|
1181
|
-
;
|
1182
|
-
;
|
1183
|
-
;
|
1184
|
-
;
|
1185
|
-
;
|
1186
|
-
;
|
1187
|
-
;
|
1188
|
-
;
|
1417
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<ul".freeze); _temple_html_attributeremover1 = ''; _slim_codeattributes1 = (checklist || @style); if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes1.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes1).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _slim_controls2 << (" class=\"".freeze); _slim_controls2 << ((_temple_html_attributeremover1).to_s); _slim_controls2 << ("\"".freeze); end; _slim_controls2 << (">".freeze);
|
1418
|
+
; items.each do |item|;
|
1419
|
+
; _slim_controls2 << ("<li".freeze); _temple_html_attributeremover2 = ''; _slim_codeattributes2 = ('fragment' if (option? :step) || (has_role? 'step') || (attr? 'step')); if Array === _slim_codeattributes2; _slim_codeattributes2 = _slim_codeattributes2.flatten; _slim_codeattributes2.map!(&:to_s); _slim_codeattributes2.reject!(&:empty?); _temple_html_attributeremover2 << ((_slim_codeattributes2.join(" ")).to_s); else; _temple_html_attributeremover2 << ((_slim_codeattributes2).to_s); end; _temple_html_attributeremover2; if !_temple_html_attributeremover2.empty?; _slim_controls2 << (" class=\"".freeze); _slim_controls2 << ((_temple_html_attributeremover2).to_s); _slim_controls2 << ("\"".freeze); end; _slim_controls2 << ("><p>".freeze);
|
1189
1420
|
;
|
1190
|
-
;
|
1191
|
-
;
|
1192
|
-
;
|
1193
|
-
;
|
1194
|
-
;
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
def notes(node, opts = {})
|
1199
|
-
node.extend(Helpers)
|
1200
|
-
node.instance_eval do
|
1201
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
1202
|
-
_buf = ''; _buf << ("<aside class=\"notes\">".freeze); _buf << ((resolve_content).to_s);
|
1203
|
-
; _buf << ("</aside>".freeze); _buf
|
1204
|
-
end
|
1205
|
-
end
|
1206
|
-
|
1207
|
-
def quote(node, opts = {})
|
1208
|
-
node.extend(Helpers)
|
1209
|
-
node.instance_eval do
|
1210
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
1211
|
-
_buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['quoteblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1212
|
-
; if title?;
|
1213
|
-
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
1214
|
-
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<blockquote>".freeze); _slim_controls2 << ((content).to_s);
|
1215
|
-
; _slim_controls2 << ("</blockquote>".freeze); attribution = (attr? :attribution) ? (attr :attribution) : nil;
|
1216
|
-
; citetitle = (attr? :citetitle) ? (attr :citetitle) : nil;
|
1217
|
-
; if attribution || citetitle;
|
1218
|
-
; _slim_controls2 << ("<div class=\"attribution\">".freeze);
|
1219
|
-
; if citetitle;
|
1220
|
-
; _slim_controls2 << ("<cite>".freeze); _slim_controls2 << ((citetitle).to_s);
|
1221
|
-
; _slim_controls2 << ("</cite>".freeze); end; if attribution;
|
1222
|
-
; if citetitle;
|
1223
|
-
; _slim_controls2 << ("<br>".freeze);
|
1224
|
-
; end; _slim_controls2 << ("— ".freeze); _slim_controls2 << ((attribution).to_s);
|
1225
|
-
; end; _slim_controls2 << ("</div>".freeze); end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1226
|
-
end
|
1227
|
-
end
|
1228
|
-
|
1229
|
-
def example(node, opts = {})
|
1230
|
-
node.extend(Helpers)
|
1231
|
-
node.instance_eval do
|
1232
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
1233
|
-
_buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['exampleblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1234
|
-
; if title?;
|
1235
|
-
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
|
1236
|
-
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<div class=\"content\">".freeze); _slim_controls2 << ((content).to_s);
|
1237
|
-
; _slim_controls2 << ("</div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1238
|
-
end
|
1239
|
-
end
|
1240
|
-
|
1241
|
-
def inline_menu(node, opts = {})
|
1242
|
-
node.extend(Helpers)
|
1243
|
-
node.instance_eval do
|
1244
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
1245
|
-
_buf = ''; menu = attr 'menu';
|
1246
|
-
; menuitem = attr 'menuitem';
|
1247
|
-
; if !(submenus = attr 'submenus').empty?;
|
1248
|
-
; _slim_controls1 = html_tag('span', { :class => ['menuseq'] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1249
|
-
; _slim_controls2 << ("<span class=\"menu\">".freeze); _slim_controls2 << ((menu).to_s);
|
1250
|
-
; _slim_controls2 << ("</span> ▸ ".freeze);
|
1251
|
-
; _slim_controls2 << ((submenus.map {|submenu| %(<span class="submenu">#{submenu}</span> ▸ ) }.join).to_s);
|
1252
|
-
; _slim_controls2 << ("<span class=\"menuitem\">".freeze); _slim_controls2 << ((menuitem).to_s);
|
1253
|
-
; _slim_controls2 << ("</span>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); elsif !menuitem.nil?;
|
1254
|
-
; _slim_controls3 = html_tag('span', { :class => ['menuseq'] }.merge(data_attrs(@attributes))) do; _slim_controls4 = '';
|
1255
|
-
; _slim_controls4 << ("<span class=\"menu\">".freeze); _slim_controls4 << ((menu).to_s);
|
1256
|
-
; _slim_controls4 << ("</span> ▸ <span class=\"menuitem\">".freeze);
|
1257
|
-
; _slim_controls4 << ((menuitem).to_s);
|
1258
|
-
; _slim_controls4 << ("</span>".freeze); _slim_controls4; end; _buf << ((_slim_controls3).to_s); else;
|
1259
|
-
; _slim_controls5 = html_tag('span', { :class => ['menu'] }.merge(data_attrs(@attributes))) do; _slim_controls6 = '';
|
1260
|
-
; _slim_controls6 << ((menu).to_s);
|
1261
|
-
; _slim_controls6; end; _buf << ((_slim_controls5).to_s); end; _buf
|
1421
|
+
; if checklist && (item.attr? :checkbox);
|
1422
|
+
; _slim_controls2 << ((%(#{(item.attr? :checked) ? marker_checked : marker_unchecked}#{item.text})).to_s);
|
1423
|
+
; else;
|
1424
|
+
; _slim_controls2 << ((item.text).to_s);
|
1425
|
+
; end; _slim_controls2 << ("</p>".freeze); if item.blocks?;
|
1426
|
+
; _slim_controls2 << ((item.content).to_s);
|
1427
|
+
; end; _slim_controls2 << ("</li>".freeze); end; _slim_controls2 << ("</ul>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1262
1428
|
end
|
1263
1429
|
end
|
1264
1430
|
|
@@ -1271,32 +1437,6 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
1271
1437
|
end
|
1272
1438
|
end
|
1273
1439
|
|
1274
|
-
def ruler(node, opts = {})
|
1275
|
-
node.extend(Helpers)
|
1276
|
-
node.instance_eval do
|
1277
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
1278
|
-
_buf = ''; _buf << ("<hr>".freeze);
|
1279
|
-
; _buf
|
1280
|
-
end
|
1281
|
-
end
|
1282
|
-
|
1283
|
-
def embedded(node, opts = {})
|
1284
|
-
node.extend(Helpers)
|
1285
|
-
node.instance_eval do
|
1286
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
1287
|
-
_buf = ''; unless notitle || !has_header?;
|
1288
|
-
; _buf << ("<h1".freeze); _slim_codeattributes1 = @id; if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" id".freeze); else; _buf << (" id=\"".freeze); _buf << ((_slim_codeattributes1).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze); _buf << ((@header.title).to_s);
|
1289
|
-
; _buf << ("</h1>".freeze); end; _buf << ((content).to_s);
|
1290
|
-
; unless !footnotes? || attr?(:nofootnotes);
|
1291
|
-
; _buf << ("<div id=\"footnotes\"><hr>".freeze);
|
1292
|
-
;
|
1293
|
-
; footnotes.each do |fn|;
|
1294
|
-
; _buf << ("<div class=\"footnote\" id=\"_footnote_".freeze); _buf << ((fn.index).to_s); _buf << ("\"><a href=\"#_footnoteref_".freeze);
|
1295
|
-
; _buf << ((fn.index).to_s); _buf << ("\">".freeze); _buf << ((fn.index).to_s); _buf << ("</a>. ".freeze); _buf << ((fn.text).to_s);
|
1296
|
-
; _buf << ("</div>".freeze); end; _buf << ("</div>".freeze); end; _buf
|
1297
|
-
end
|
1298
|
-
end
|
1299
|
-
|
1300
1440
|
def table(node, opts = {})
|
1301
1441
|
node.extend(Helpers)
|
1302
1442
|
node.instance_eval do
|
@@ -1351,6 +1491,16 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
1351
1491
|
end
|
1352
1492
|
end
|
1353
1493
|
|
1494
|
+
def preamble(node, opts = {})
|
1495
|
+
node.extend(Helpers)
|
1496
|
+
node.instance_eval do
|
1497
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1498
|
+
_buf = '';
|
1499
|
+
;
|
1500
|
+
; _buf
|
1501
|
+
end
|
1502
|
+
end
|
1503
|
+
|
1354
1504
|
def listing(node, opts = {})
|
1355
1505
|
node.extend(Helpers)
|
1356
1506
|
node.instance_eval do
|
@@ -1365,7 +1515,8 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
1365
1515
|
; style = doc_attrs[%(#{syntax_hl.name}-style)];
|
1366
1516
|
; opts = syntax_hl.highlight? ? { css_mode: css_mode, style: style } : {};
|
1367
1517
|
; opts[:nowrap] = nowrap;
|
1368
|
-
; end;
|
1518
|
+
; end;
|
1519
|
+
; end; _slim_controls1 = html_tag('div', { :id => id, :class => ['listingblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes.reject {|key, _| key == 'data-id' }))) do; _slim_controls2 = '';
|
1369
1520
|
; if title?;
|
1370
1521
|
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
|
1371
1522
|
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<div class=\"content\">".freeze);
|
@@ -1383,41 +1534,6 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
1383
1534
|
end
|
1384
1535
|
end
|
1385
1536
|
|
1386
|
-
def inline_callout(node, opts = {})
|
1387
|
-
node.extend(Helpers)
|
1388
|
-
node.instance_eval do
|
1389
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
1390
|
-
_buf = ''; if @document.attr? :icons, 'font';
|
1391
|
-
; _buf << ("<i class=\"conum\"".freeze); _slim_codeattributes1 = @text; if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" data-value".freeze); else; _buf << (" data-value=\"".freeze); _buf << ((_slim_codeattributes1).to_s); _buf << ("\"".freeze); end; end; _buf << ("></i><b>".freeze);
|
1392
|
-
; _buf << (("(#{@text})").to_s);
|
1393
|
-
; _buf << ("</b>".freeze); elsif @document.attr? :icons;
|
1394
|
-
; _buf << ("<img".freeze); _slim_codeattributes2 = icon_uri("callouts/#{@text}"); if _slim_codeattributes2; if _slim_codeattributes2 == true; _buf << (" src".freeze); else; _buf << (" src=\"".freeze); _buf << ((_slim_codeattributes2).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes3 = @text; if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" alt".freeze); else; _buf << (" alt=\"".freeze); _buf << ((_slim_codeattributes3).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
1395
|
-
; else;
|
1396
|
-
; _buf << ("<b>".freeze); _buf << (("(#{@text})").to_s);
|
1397
|
-
; _buf << ("</b>".freeze); end; _buf
|
1398
|
-
end
|
1399
|
-
end
|
1400
|
-
|
1401
|
-
def inline_indexterm(node, opts = {})
|
1402
|
-
node.extend(Helpers)
|
1403
|
-
node.instance_eval do
|
1404
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
1405
|
-
_buf = ''; if @type == :visible;
|
1406
|
-
; _buf << ((@text).to_s);
|
1407
|
-
; end; _buf
|
1408
|
-
end
|
1409
|
-
end
|
1410
|
-
|
1411
|
-
def floating_title(node, opts = {})
|
1412
|
-
node.extend(Helpers)
|
1413
|
-
node.instance_eval do
|
1414
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
1415
|
-
_buf = ''; _slim_htag_filter1 = ((level + 1)).to_s; _buf << ("<h".freeze); _buf << ((_slim_htag_filter1).to_s); _slim_codeattributes1 = 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 = [style, role]; 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; _buf << (">".freeze);
|
1416
|
-
; _buf << ((title).to_s);
|
1417
|
-
; _buf << ("</h".freeze); _buf << ((_slim_htag_filter1).to_s); _buf << (">".freeze); _buf
|
1418
|
-
end
|
1419
|
-
end
|
1420
|
-
|
1421
1537
|
def inline_anchor(node, opts = {})
|
1422
1538
|
node.extend(Helpers)
|
1423
1539
|
node.instance_eval do
|
@@ -1439,96 +1555,6 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
1439
1555
|
end
|
1440
1556
|
end
|
1441
1557
|
|
1442
|
-
def inline_break(node, opts = {})
|
1443
|
-
node.extend(Helpers)
|
1444
|
-
node.instance_eval do
|
1445
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
1446
|
-
_buf = ''; _buf << ((@text).to_s);
|
1447
|
-
; _buf << ("<br>".freeze);
|
1448
|
-
; _buf
|
1449
|
-
end
|
1450
|
-
end
|
1451
|
-
|
1452
|
-
def paragraph(node, opts = {})
|
1453
|
-
node.extend(Helpers)
|
1454
|
-
node.instance_eval do
|
1455
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
1456
|
-
_buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['paragraph', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1457
|
-
; if title?;
|
1458
|
-
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
1459
|
-
; _slim_controls2 << ("</div>".freeze); end; if has_role? 'small';
|
1460
|
-
; _slim_controls2 << ("<small>".freeze); _slim_controls2 << ((content).to_s);
|
1461
|
-
; _slim_controls2 << ("</small>".freeze); else;
|
1462
|
-
; _slim_controls2 << ("<p>".freeze); _slim_controls2 << ((content).to_s);
|
1463
|
-
; _slim_controls2 << ("</p>".freeze); end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1464
|
-
end
|
1465
|
-
end
|
1466
|
-
|
1467
|
-
def admonition(node, opts = {})
|
1468
|
-
node.extend(Helpers)
|
1469
|
-
node.instance_eval do
|
1470
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
1471
|
-
_buf = ''; if (has_role? 'aside') or (has_role? 'speaker') or (has_role? 'notes');
|
1472
|
-
; _buf << ("<aside class=\"notes\">".freeze); _buf << ((resolve_content).to_s);
|
1473
|
-
; _buf << ("</aside>".freeze);
|
1474
|
-
; else;
|
1475
|
-
; _slim_controls1 = html_tag('div', { :id => @id, :class => ['admonitionblock', (attr :name), role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1476
|
-
; _slim_controls2 << ("<table><tr><td class=\"icon\">".freeze);
|
1477
|
-
;
|
1478
|
-
; if @document.attr? :icons, 'font';
|
1479
|
-
; icon_mapping = Hash['caution', 'fire', 'important', 'exclamation-circle', 'note', 'info-circle', 'tip', 'lightbulb-o', 'warning', 'warning'];
|
1480
|
-
; _slim_controls2 << ("<i".freeze); _temple_html_attributeremover1 = ''; _slim_codeattributes1 = %(fa fa-#{icon_mapping[attr :name]}); if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes1.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes1).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _slim_controls2 << (" class=\"".freeze); _slim_controls2 << ((_temple_html_attributeremover1).to_s); _slim_controls2 << ("\"".freeze); end; _slim_codeattributes2 = (attr :textlabel || @caption); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls2 << (" title".freeze); else; _slim_controls2 << (" title=\"".freeze); _slim_controls2 << ((_slim_codeattributes2).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << ("></i>".freeze);
|
1481
|
-
; elsif @document.attr? :icons;
|
1482
|
-
; _slim_controls2 << ("<img".freeze); _slim_codeattributes3 = icon_uri(attr :name); if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls2 << (" src".freeze); else; _slim_controls2 << (" src=\"".freeze); _slim_controls2 << ((_slim_codeattributes3).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes4 = @caption; if _slim_codeattributes4; if _slim_codeattributes4 == true; _slim_controls2 << (" alt".freeze); else; _slim_controls2 << (" alt=\"".freeze); _slim_controls2 << ((_slim_codeattributes4).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << (">".freeze);
|
1483
|
-
; else;
|
1484
|
-
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << (((attr :textlabel) || @caption).to_s);
|
1485
|
-
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("</td><td class=\"content\">".freeze);
|
1486
|
-
; if title?;
|
1487
|
-
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
1488
|
-
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ((content).to_s);
|
1489
|
-
; _slim_controls2 << ("</td></tr></table>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); end; _buf
|
1490
|
-
end
|
1491
|
-
end
|
1492
|
-
|
1493
|
-
def image(node, opts = {})
|
1494
|
-
node.extend(Helpers)
|
1495
|
-
node.instance_eval do
|
1496
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
1497
|
-
_buf = ''; width = (attr? :width) ? (attr :width) : nil;
|
1498
|
-
; height = (attr? :height) ? (attr :height) : nil;
|
1499
|
-
;
|
1500
|
-
;
|
1501
|
-
;
|
1502
|
-
;
|
1503
|
-
;
|
1504
|
-
;
|
1505
|
-
; if (has_role? 'stretch') && !((attr? :width) || (attr? :height));
|
1506
|
-
; height = "100%";
|
1507
|
-
;
|
1508
|
-
; end; unless attributes[1] == 'background' || attributes[1] == 'canvas';
|
1509
|
-
; inline_style = [("text-align: #{attr :align}" if attr? :align),("float: #{attr :float}" if attr? :float)].compact.join('; ');
|
1510
|
-
; _slim_controls1 = html_tag('div', { :id => @id, :class => ['imageblock', role, ('fragment' if (option? :step) || (attr? 'step'))], :style => inline_style }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1511
|
-
; if attr? :link;
|
1512
|
-
; _slim_controls2 << ("<a class=\"image\"".freeze); _slim_codeattributes1 = (attr :link); if _slim_codeattributes1; if _slim_codeattributes1 == true; _slim_controls2 << (" href".freeze); else; _slim_controls2 << (" href=\"".freeze); _slim_controls2 << ((_slim_codeattributes1).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes2 = (attr :window); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls2 << (" target".freeze); else; _slim_controls2 << (" target=\"".freeze); _slim_controls2 << ((_slim_codeattributes2).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes3 = (bool_data_attr :link_preview); if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls2 << (" data-preview-link".freeze); else; _slim_controls2 << (" data-preview-link=\"".freeze); _slim_controls2 << ((_slim_codeattributes3).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << ("><img".freeze);
|
1513
|
-
; _slim_codeattributes4 = image_uri(attr :target); if _slim_codeattributes4; if _slim_codeattributes4 == true; _slim_controls2 << (" src".freeze); else; _slim_controls2 << (" src=\"".freeze); _slim_controls2 << ((_slim_codeattributes4).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes5 = (attr :alt); if _slim_codeattributes5; if _slim_codeattributes5 == true; _slim_controls2 << (" alt".freeze); else; _slim_controls2 << (" alt=\"".freeze); _slim_controls2 << ((_slim_codeattributes5).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes6 = (width); if _slim_codeattributes6; if _slim_codeattributes6 == true; _slim_controls2 << (" width".freeze); else; _slim_controls2 << (" width=\"".freeze); _slim_controls2 << ((_slim_codeattributes6).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes7 = (height); if _slim_codeattributes7; if _slim_codeattributes7 == true; _slim_controls2 << (" height".freeze); else; _slim_controls2 << (" height=\"".freeze); _slim_controls2 << ((_slim_codeattributes7).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes8 = ((attr? :background) ? "background: #{attr :background}" : nil); if _slim_codeattributes8; if _slim_codeattributes8 == true; _slim_controls2 << (" style".freeze); else; _slim_controls2 << (" style=\"".freeze); _slim_controls2 << ((_slim_codeattributes8).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << ("></a>".freeze);
|
1514
|
-
; else;
|
1515
|
-
; _slim_controls2 << ("<img".freeze); _slim_codeattributes9 = image_uri(attr :target); if _slim_codeattributes9; if _slim_codeattributes9 == true; _slim_controls2 << (" src".freeze); else; _slim_controls2 << (" src=\"".freeze); _slim_controls2 << ((_slim_codeattributes9).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes10 = (attr :alt); if _slim_codeattributes10; if _slim_codeattributes10 == true; _slim_controls2 << (" alt".freeze); else; _slim_controls2 << (" alt=\"".freeze); _slim_controls2 << ((_slim_codeattributes10).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes11 = (width); if _slim_codeattributes11; if _slim_codeattributes11 == true; _slim_controls2 << (" width".freeze); else; _slim_controls2 << (" width=\"".freeze); _slim_controls2 << ((_slim_codeattributes11).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes12 = (height); if _slim_codeattributes12; if _slim_codeattributes12 == true; _slim_controls2 << (" height".freeze); else; _slim_controls2 << (" height=\"".freeze); _slim_controls2 << ((_slim_codeattributes12).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes13 = ((attr? :background) ? "background: #{attr :background}" : nil); if _slim_codeattributes13; if _slim_codeattributes13 == true; _slim_controls2 << (" style".freeze); else; _slim_controls2 << (" style=\"".freeze); _slim_controls2 << ((_slim_codeattributes13).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << (">".freeze);
|
1516
|
-
; end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); if title?;
|
1517
|
-
; _buf << ("<div class=\"title\">".freeze); _buf << ((captioned_title).to_s);
|
1518
|
-
; _buf << ("</div>".freeze); end; end; _buf
|
1519
|
-
end
|
1520
|
-
end
|
1521
|
-
|
1522
|
-
def preamble(node, opts = {})
|
1523
|
-
node.extend(Helpers)
|
1524
|
-
node.instance_eval do
|
1525
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
1526
|
-
_buf = '';
|
1527
|
-
;
|
1528
|
-
; _buf
|
1529
|
-
end
|
1530
|
-
end
|
1531
|
-
|
1532
1558
|
def section(node, opts = {})
|
1533
1559
|
node.extend(Helpers)
|
1534
1560
|
node.instance_eval do
|
@@ -1598,7 +1624,13 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
1598
1624
|
;
|
1599
1625
|
;
|
1600
1626
|
;
|
1601
|
-
;
|
1627
|
+
;
|
1628
|
+
;
|
1629
|
+
;
|
1630
|
+
;
|
1631
|
+
;
|
1632
|
+
;
|
1633
|
+
; _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 = data_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 "autoslide"); if _slim_codeattributes16; if _slim_codeattributes16 == true; _buf << (" data-autoslide".freeze); else; _buf << (" data-autoslide=\"".freeze); _buf << ((_slim_codeattributes16).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes17 = (attr 'state'); if _slim_codeattributes17; if _slim_codeattributes17 == true; _buf << (" data-state".freeze); else; _buf << (" data-state=\"".freeze); _buf << ((_slim_codeattributes17).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes18 = ((attr? 'auto-animate') || (option? 'auto-animate')); if _slim_codeattributes18; if _slim_codeattributes18 == true; _buf << (" data-auto-animate".freeze); else; _buf << (" data-auto-animate=\"".freeze); _buf << ((_slim_codeattributes18).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes19 = ((attr 'auto-animate-easing') || (option? 'auto-animate-easing')); if _slim_codeattributes19; if _slim_codeattributes19 == true; _buf << (" data-auto-animate-easing".freeze); else; _buf << (" data-auto-animate-easing=\"".freeze); _buf << ((_slim_codeattributes19).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes20 = ((attr 'auto-animate-unmatched') || (option? 'auto-animate-unmatched')); if _slim_codeattributes20; if _slim_codeattributes20 == true; _buf << (" data-auto-animate-unmatched".freeze); else; _buf << (" data-auto-animate-unmatched=\"".freeze); _buf << ((_slim_codeattributes20).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes21 = ((attr 'auto-animate-duration') || (option? 'auto-animate-duration')); if _slim_codeattributes21; if _slim_codeattributes21 == true; _buf << (" data-auto-animate-duration".freeze); else; _buf << (" data-auto-animate-duration=\"".freeze); _buf << ((_slim_codeattributes21).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes22 = (attr 'auto-animate-id'); if _slim_codeattributes22; if _slim_codeattributes22 == true; _buf << (" data-auto-animate-id".freeze); else; _buf << (" data-auto-animate-id=\"".freeze); _buf << ((_slim_codeattributes22).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes23 = ((attr? 'auto-animate-restart') || (option? 'auto-animate-restart')); if _slim_codeattributes23; if _slim_codeattributes23 == true; _buf << (" data-auto-animate-restart".freeze); else; _buf << (" data-auto-animate-restart=\"".freeze); _buf << ((_slim_codeattributes23).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
1602
1634
|
; unless hide_title;
|
1603
1635
|
; _buf << ("<h2>".freeze); _buf << ((section_title).to_s);
|
1604
1636
|
; _buf << ("</h2>".freeze); end; if parent_section_with_vertical_slides;
|
@@ -1663,13 +1695,113 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
1663
1695
|
end
|
1664
1696
|
end
|
1665
1697
|
|
1666
|
-
def
|
1698
|
+
def inline_footnote(node, opts = {})
|
1667
1699
|
node.extend(Helpers)
|
1668
1700
|
node.instance_eval do
|
1669
1701
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
1670
|
-
_buf = '';
|
1671
|
-
;
|
1672
|
-
;
|
1702
|
+
_buf = ''; footnote = slide_footnote(self);
|
1703
|
+
; index = footnote.attr(:index);
|
1704
|
+
; id = footnote.id;
|
1705
|
+
; if @type == :xref;
|
1706
|
+
; _slim_controls1 = html_tag('sup', { :class => ['footnoteref'] }.merge(data_attrs(footnote.attributes))) do; _slim_controls2 = '';
|
1707
|
+
; _slim_controls2 << ("[<span class=\"footnote\" title=\"View footnote.\">".freeze);
|
1708
|
+
; _slim_controls2 << ((index).to_s);
|
1709
|
+
; _slim_controls2 << ("</span>]".freeze);
|
1710
|
+
; _slim_controls2; end; _buf << ((_slim_controls1).to_s); else;
|
1711
|
+
; _slim_controls3 = html_tag('sup', { :id => ("_footnote_#{id}" if id), :class => ['footnote'] }.merge(data_attrs(footnote.attributes))) do; _slim_controls4 = '';
|
1712
|
+
; _slim_controls4 << ("[<span class=\"footnote\" title=\"View footnote.\">".freeze);
|
1713
|
+
; _slim_controls4 << ((index).to_s);
|
1714
|
+
; _slim_controls4 << ("</span>]".freeze);
|
1715
|
+
; _slim_controls4; end; _buf << ((_slim_controls3).to_s); end; _buf
|
1716
|
+
end
|
1717
|
+
end
|
1718
|
+
|
1719
|
+
def image(node, opts = {})
|
1720
|
+
node.extend(Helpers)
|
1721
|
+
node.instance_eval do
|
1722
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1723
|
+
_buf = ''; unless attributes[1] == 'background' || attributes[1] == 'canvas';
|
1724
|
+
; inline_style = [("text-align: #{attr :align}" if attr? :align),("float: #{attr :float}" if attr? :float)].compact.join('; ');
|
1725
|
+
; _slim_controls1 = html_tag('div', { :id => @id, :class => ['imageblock', role, ('fragment' if (option? :step) || (attr? 'step'))], :style => inline_style }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1726
|
+
; _slim_controls2 << ((convert_image).to_s);
|
1727
|
+
; _slim_controls2; end; _buf << ((_slim_controls1).to_s); if title?;
|
1728
|
+
; _buf << ("<div class=\"title\">".freeze); _buf << ((captioned_title).to_s);
|
1729
|
+
; _buf << ("</div>".freeze); end; end; _buf
|
1730
|
+
end
|
1731
|
+
end
|
1732
|
+
|
1733
|
+
def title_slide(node, opts = {})
|
1734
|
+
node.extend(Helpers)
|
1735
|
+
node.instance_eval do
|
1736
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1737
|
+
_buf = ''; bg_image = (attr? 'title-slide-background-image') ? (image_uri(attr 'title-slide-background-image')) : nil;
|
1738
|
+
; bg_video = (attr? 'title-slide-background-video') ? (media_uri(attr 'title-slide-background-video')) : nil;
|
1739
|
+
;
|
1740
|
+
;
|
1741
|
+
;
|
1742
|
+
;
|
1743
|
+
;
|
1744
|
+
;
|
1745
|
+
;
|
1746
|
+
;
|
1747
|
+
;
|
1748
|
+
;
|
1749
|
+
;
|
1750
|
+
;
|
1751
|
+
;
|
1752
|
+
;
|
1753
|
+
;
|
1754
|
+
; _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);
|
1755
|
+
; if (_title_obj = doctitle partition: true, use_fallback: true).subtitle?;
|
1756
|
+
; _buf << ("<h1>".freeze); _buf << ((slice_text _title_obj.title, (_slice = header.option? :slice)).to_s);
|
1757
|
+
; _buf << ("</h1><h2>".freeze); _buf << ((slice_text _title_obj.subtitle, _slice).to_s);
|
1758
|
+
; _buf << ("</h2>".freeze); else;
|
1759
|
+
; _buf << ("<h1>".freeze); _buf << ((@header.title).to_s);
|
1760
|
+
; _buf << ("</h1>".freeze); end; preamble = @document.find_by context: :preamble;
|
1761
|
+
; unless preamble.nil? or preamble.length == 0;
|
1762
|
+
; _buf << ("<div class=\"preamble\">".freeze); _buf << ((preamble.pop.content).to_s);
|
1763
|
+
; _buf << ("</div>".freeze); end; _buf << ((generate_authors(@document)).to_s);
|
1764
|
+
; _buf << ("</section>".freeze); _buf
|
1765
|
+
end
|
1766
|
+
end
|
1767
|
+
|
1768
|
+
def paragraph(node, opts = {})
|
1769
|
+
node.extend(Helpers)
|
1770
|
+
node.instance_eval do
|
1771
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1772
|
+
_buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['paragraph', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1773
|
+
; if title?;
|
1774
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
1775
|
+
; _slim_controls2 << ("</div>".freeze); end; if has_role? 'small';
|
1776
|
+
; _slim_controls2 << ("<small>".freeze); _slim_controls2 << ((content).to_s);
|
1777
|
+
; _slim_controls2 << ("</small>".freeze); else;
|
1778
|
+
; _slim_controls2 << ("<p>".freeze); _slim_controls2 << ((content).to_s);
|
1779
|
+
; _slim_controls2 << ("</p>".freeze); end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1780
|
+
end
|
1781
|
+
end
|
1782
|
+
|
1783
|
+
def floating_title(node, opts = {})
|
1784
|
+
node.extend(Helpers)
|
1785
|
+
node.instance_eval do
|
1786
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1787
|
+
_buf = ''; _slim_htag_filter1 = ((level + 1)).to_s; _buf << ("<h".freeze); _buf << ((_slim_htag_filter1).to_s); _slim_codeattributes1 = 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 = [style, role]; 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; _buf << (">".freeze);
|
1788
|
+
; _buf << ((title).to_s);
|
1789
|
+
; _buf << ("</h".freeze); _buf << ((_slim_htag_filter1).to_s); _buf << (">".freeze); _buf
|
1790
|
+
end
|
1791
|
+
end
|
1792
|
+
|
1793
|
+
def inline_callout(node, opts = {})
|
1794
|
+
node.extend(Helpers)
|
1795
|
+
node.instance_eval do
|
1796
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1797
|
+
_buf = ''; if @document.attr? :icons, 'font';
|
1798
|
+
; _buf << ("<i class=\"conum\"".freeze); _slim_codeattributes1 = @text; if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" data-value".freeze); else; _buf << (" data-value=\"".freeze); _buf << ((_slim_codeattributes1).to_s); _buf << ("\"".freeze); end; end; _buf << ("></i><b>".freeze);
|
1799
|
+
; _buf << (("(#{@text})").to_s);
|
1800
|
+
; _buf << ("</b>".freeze); elsif @document.attr? :icons;
|
1801
|
+
; _buf << ("<img".freeze); _slim_codeattributes2 = icon_uri("callouts/#{@text}"); if _slim_codeattributes2; if _slim_codeattributes2 == true; _buf << (" src".freeze); else; _buf << (" src=\"".freeze); _buf << ((_slim_codeattributes2).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes3 = @text; if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" alt".freeze); else; _buf << (" alt=\"".freeze); _buf << ((_slim_codeattributes3).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
1802
|
+
; else;
|
1803
|
+
; _buf << ("<b>".freeze); _buf << (("(#{@text})").to_s);
|
1804
|
+
; _buf << ("</b>".freeze); end; _buf
|
1673
1805
|
end
|
1674
1806
|
end
|
1675
1807
|
|
@@ -1678,41 +1810,42 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
1678
1810
|
node.instance_eval do
|
1679
1811
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
1680
1812
|
_buf = ''; _slim_controls1 = html_tag('span', { :class => [@type, role, ('fragment' if (option? :step) || (attr? 'step'))], :style => ("float: #{attr :float}" if attr? :float) }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1681
|
-
;
|
1682
|
-
;
|
1683
|
-
|
1684
|
-
|
1685
|
-
|
1686
|
-
|
1687
|
-
|
1688
|
-
|
1689
|
-
|
1690
|
-
|
1691
|
-
;
|
1813
|
+
; _slim_controls2 << ((convert_inline_image).to_s);
|
1814
|
+
; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1815
|
+
end
|
1816
|
+
end
|
1817
|
+
|
1818
|
+
def inline_quoted(node, opts = {})
|
1819
|
+
node.extend(Helpers)
|
1820
|
+
node.instance_eval do
|
1821
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1822
|
+
_buf = ''; quote_tags = { emphasis: 'em', strong: 'strong', monospaced: 'code', superscript: 'sup', subscript: 'sub' };
|
1823
|
+
; if (quote_tag = quote_tags[@type]);
|
1824
|
+
; _buf << ((html_tag(quote_tag, { :id => @id, :class => [role, ('fragment' if (option? :step) || (attr? 'step'))].compact }.merge(data_attrs(@attributes)), @text)).to_s);
|
1692
1825
|
; else;
|
1693
|
-
;
|
1694
|
-
;
|
1695
|
-
;
|
1696
|
-
;
|
1697
|
-
;
|
1698
|
-
;
|
1826
|
+
; case @type;
|
1827
|
+
; when :double;
|
1828
|
+
; _buf << ((inline_text_container("“#{@text}”")).to_s);
|
1829
|
+
; when :single;
|
1830
|
+
; _buf << ((inline_text_container("‘#{@text}’")).to_s);
|
1831
|
+
; when :asciimath, :latexmath;
|
1832
|
+
; open, close = Asciidoctor::INLINE_MATH_DELIMITERS[@type];
|
1833
|
+
; _buf << ((inline_text_container("#{open}#{@text}#{close}")).to_s);
|
1699
1834
|
; else;
|
1700
|
-
;
|
1701
|
-
; end; end;
|
1835
|
+
; _buf << ((inline_text_container(@text)).to_s);
|
1836
|
+
; end; end; _buf
|
1702
1837
|
end
|
1703
1838
|
end
|
1704
1839
|
|
1705
|
-
def
|
1840
|
+
def example(node, opts = {})
|
1706
1841
|
node.extend(Helpers)
|
1707
1842
|
node.instance_eval do
|
1708
1843
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
1709
|
-
_buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['
|
1844
|
+
_buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['exampleblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1710
1845
|
; if title?;
|
1711
1846
|
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
|
1712
|
-
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<div class=\"content\"
|
1713
|
-
;
|
1714
|
-
;
|
1715
|
-
; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1847
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<div class=\"content\">".freeze); _slim_controls2 << ((content).to_s);
|
1848
|
+
; _slim_controls2 << ("</div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1716
1849
|
end
|
1717
1850
|
end
|
1718
1851
|
#------------------ End of generated transformation methods ------------------#
|