asciidoctor-revealjs 4.1.0 → 5.0.0.rc1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +11 -1350
- data/asciidoctor-revealjs.gemspec +0 -2
- data/examples/auto-animate-code.adoc +47 -0
- data/examples/auto-animate.adoc +351 -0
- data/examples/favicon.adoc +13 -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.png → chalk-white.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}/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
- 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/text-formatting.adoc +34 -0
- data/lib/asciidoctor-revealjs/converter.rb +1029 -966
- 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 +83 -9
- 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 +57 -69
- 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
@@ -0,0 +1,20 @@
|
|
1
|
+
<script src="revealjs-plugins/menu/menu.js"></script>
|
2
|
+
<link rel="stylesheet" href="revealjs-plugins/chalkboard/style.css">
|
3
|
+
<script src="revealjs-plugins/chalkboard/plugin.js"></script>
|
4
|
+
<script>
|
5
|
+
Reveal.configure({
|
6
|
+
menu: {
|
7
|
+
side: 'right',
|
8
|
+
openButton: false,
|
9
|
+
},
|
10
|
+
keyboard: {
|
11
|
+
67: function() { RevealChalkboard.toggleNotesCanvas() }, // toggle notes canvas when 'c' is pressed
|
12
|
+
66: function() { RevealChalkboard.toggleChalkboard() }, // toggle chalkboard when 'b' is pressed
|
13
|
+
46: function() { RevealChalkboard.clear() }, // clear chalkboard when 'DEL' is pressed
|
14
|
+
8: function() { RevealChalkboard.reset() }, // reset chalkboard data on current slide when 'BACKSPACE' is pressed
|
15
|
+
68: function() { RevealChalkboard.download() }, // download recorded chalkboard drawing when 'd' is pressed
|
16
|
+
}
|
17
|
+
})
|
18
|
+
Reveal.registerPlugin(RevealMenu)
|
19
|
+
Reveal.registerPlugin(RevealChalkboard)
|
20
|
+
</script>
|
@@ -1,11 +1,10 @@
|
|
1
1
|
// .revealjs-plugins
|
2
|
-
// Use
|
2
|
+
// Use docinfo to load third party plugins
|
3
3
|
// :include: //body/script | //div[@class="slides"]
|
4
4
|
// :header_footer:
|
5
5
|
= Custom Plugins
|
6
6
|
Author
|
7
|
-
:
|
8
|
-
:revealjs_plugins_configuration: examples/revealjs-plugins-conf.js
|
7
|
+
:docinfo: private
|
9
8
|
|
10
9
|
== Slide 1
|
11
10
|
|
@@ -0,0 +1,26 @@
|
|
1
|
+
= Search Plugin
|
2
|
+
:revealjs_plugin_search: enabled
|
3
|
+
:experimental:
|
4
|
+
|
5
|
+
== Search
|
6
|
+
|
7
|
+
Press kbd:[Ctrl+Shift+F] to search slide content. +
|
8
|
+
For instance, you can search "asciidoc".
|
9
|
+
|
10
|
+
Then, press kbd:[Enter] to navigate between search hits.
|
11
|
+
|
12
|
+
== Blank
|
13
|
+
|
14
|
+
😶
|
15
|
+
|
16
|
+
== Asciidoctor
|
17
|
+
|
18
|
+
Asciidoctor is a fast, open source text processor and publishing toolchain.
|
19
|
+
|
20
|
+
== Content
|
21
|
+
|
22
|
+
❔
|
23
|
+
|
24
|
+
== AsciiDoc
|
25
|
+
|
26
|
+
AsciiDoc is a lightweight and semantic markup language primarily designed for writing technical documentation.
|
data/examples/source-rouge.adoc
CHANGED
@@ -0,0 +1,34 @@
|
|
1
|
+
// .text-formatting
|
2
|
+
// :include: //div[@class="slides"]
|
3
|
+
// :header_footer:
|
4
|
+
= Text Formatting and Punctuation
|
5
|
+
|
6
|
+
== Emphasis
|
7
|
+
|
8
|
+
An italic _word_, and an italic _phrase of text_.
|
9
|
+
|
10
|
+
== Strong
|
11
|
+
|
12
|
+
A bold *word*, and a bold *phrase of text*.
|
13
|
+
|
14
|
+
== Code
|
15
|
+
|
16
|
+
"`Wait!`" Indigo plucked a small vial from her desk's top drawer
|
17
|
+
and held it toward us.
|
18
|
+
The vial's label read: `E=mc^2^`; the `E` represents _energy_,
|
19
|
+
but also pure _genius!_
|
20
|
+
|
21
|
+
== Superscript and Subscript
|
22
|
+
|
23
|
+
Well the H~2~O formula written on their whiteboard could be part
|
24
|
+
of a shopping list, but I don't think the local bodega sells
|
25
|
+
E=mc^2^.
|
26
|
+
|
27
|
+
== Quotation Marks and Apostrophes
|
28
|
+
|
29
|
+
"`What kind of charm?`" Lazarus asked.
|
30
|
+
"`An odoriferous one or a mineral one?`"
|
31
|
+
|
32
|
+
Kizmet shrugged.
|
33
|
+
"`The note from Olaf's desk says '`wormwood and licorice,`'
|
34
|
+
but these could be normal groceries for werewolves.`"
|
@@ -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.
|
@@ -200,15 +202,9 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
200
202
|
|
201
203
|
def revealjs_dependencies(document, node, revealjsdir)
|
202
204
|
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
|
205
|
+
dependencies << "{ src: '#{revealjsdir}/plugin/zoom/zoom.js', async: true, callback: function () { Reveal.registerPlugin(RevealZoom) } }" unless (node.attr? 'revealjs_plugin_zoom', 'disabled')
|
206
|
+
dependencies << "{ src: '#{revealjsdir}/plugin/notes/notes.js', async: true, callback: function () { Reveal.registerPlugin(RevealNotes) } }" unless (node.attr? 'revealjs_plugin_notes', 'disabled')
|
207
|
+
dependencies << "{ src: '#{revealjsdir}/plugin/search/search.js', async: true, callback: function () { Reveal.registerPlugin(RevealSearch) } }" if (node.attr? 'revealjs_plugin_search', 'enabled')
|
212
208
|
dependencies.join(",\n ")
|
213
209
|
end
|
214
210
|
|
@@ -286,6 +282,84 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
286
282
|
end
|
287
283
|
nil
|
288
284
|
end
|
285
|
+
|
286
|
+
# Copied from asciidoctor/lib/asciidoctor/converter/semantic-html5.rb which is not yet shipped
|
287
|
+
# @todo remove this code when the new converter becomes available in the main gem
|
288
|
+
def generate_authors node
|
289
|
+
return if node.authors.empty?
|
290
|
+
|
291
|
+
if node.authors.length == 1
|
292
|
+
%(<p class="byline">
|
293
|
+
#{format_author node, node.authors.first}
|
294
|
+
</p>)
|
295
|
+
else
|
296
|
+
result = ['<ul class="byline">']
|
297
|
+
node.authors.each do |author|
|
298
|
+
result << "<li>#{format_author node, author}</li>"
|
299
|
+
end
|
300
|
+
result << '</ul>'
|
301
|
+
result.join Asciidoctor::LF
|
302
|
+
end
|
303
|
+
end
|
304
|
+
|
305
|
+
# Copied from asciidoctor/lib/asciidoctor/converter/semantic-html5.rb which is not yet shipped
|
306
|
+
# @todo remove this code when the new converter becomes available in the main gem
|
307
|
+
def format_author node, author
|
308
|
+
in_context 'author' do
|
309
|
+
%(<span class="author">#{node.sub_replacements author.name}#{author.email ? %( #{node.sub_macros author.email}) : ''}</span>)
|
310
|
+
end
|
311
|
+
end
|
312
|
+
|
313
|
+
# Copied from asciidoctor/lib/asciidoctor/converter/semantic-html5.rb which is not yet shipped
|
314
|
+
# @todo remove this code when the new converter becomes available in the main gem
|
315
|
+
def in_context name
|
316
|
+
(@convert_context ||= []).push name
|
317
|
+
result = yield
|
318
|
+
@convert_context.pop
|
319
|
+
result
|
320
|
+
end
|
321
|
+
|
322
|
+
STEM_EQNUMS_AMS = 'ams'
|
323
|
+
STEM_EQNUMS_NONE = 'none'
|
324
|
+
STEM_EQNUMS_VALID_VALUES = [
|
325
|
+
STEM_EQNUMS_NONE,
|
326
|
+
STEM_EQNUMS_AMS,
|
327
|
+
'all'
|
328
|
+
]
|
329
|
+
|
330
|
+
MATHJAX_VERSION = '3.2.0'
|
331
|
+
|
332
|
+
# Generate the Mathjax markup to process STEM expressions
|
333
|
+
# @param cdn_base [String]
|
334
|
+
# @return [String]
|
335
|
+
def generate_stem(cdn_base)
|
336
|
+
if attr?(:stem)
|
337
|
+
eqnums_val = attr('eqnums', STEM_EQNUMS_NONE).downcase
|
338
|
+
unless STEM_EQNUMS_VALID_VALUES.include?(eqnums_val)
|
339
|
+
eqnums_val = STEM_EQNUMS_AMS
|
340
|
+
end
|
341
|
+
mathjax_configuration = {
|
342
|
+
tex: {
|
343
|
+
inlineMath: [Asciidoctor::INLINE_MATH_DELIMITERS[:latexmath]],
|
344
|
+
displayMath: [Asciidoctor::BLOCK_MATH_DELIMITERS[:latexmath]],
|
345
|
+
processEscapes: false,
|
346
|
+
tags: eqnums_val,
|
347
|
+
},
|
348
|
+
options: {
|
349
|
+
ignoreHtmlClass: 'nostem|nolatexmath'
|
350
|
+
},
|
351
|
+
asciimath: {
|
352
|
+
delimiters: [Asciidoctor::BLOCK_MATH_DELIMITERS[:asciimath]],
|
353
|
+
},
|
354
|
+
loader: {
|
355
|
+
load: ['input/asciimath', 'output/chtml', 'ui/menu']
|
356
|
+
}
|
357
|
+
}
|
358
|
+
mathjaxdir = attr('mathjaxdir', "#{cdn_base}/mathjax/#{MATHJAX_VERSION}/es5")
|
359
|
+
%(<script>window.MathJax = #{JSON.generate(mathjax_configuration)};</script>) +
|
360
|
+
%(<script async src="#{mathjaxdir}/tex-mml-chtml.js"></script>)
|
361
|
+
end
|
362
|
+
end
|
289
363
|
#--
|
290
364
|
end
|
291
365
|
|
@@ -341,6 +415,165 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
341
415
|
#----------------- Begin of generated transformation methods -----------------#
|
342
416
|
|
343
417
|
|
418
|
+
def inline_quoted(node, opts = {})
|
419
|
+
node.extend(Helpers)
|
420
|
+
node.instance_eval do
|
421
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
422
|
+
_buf = ''; quote_tags = { emphasis: 'em', strong: 'strong', monospaced: 'code', superscript: 'sup', subscript: 'sub' };
|
423
|
+
; if (quote_tag = quote_tags[@type]);
|
424
|
+
; _buf << ((html_tag(quote_tag, { :id => @id, :class => [role, ('fragment' if (option? :step) || (attr? 'step'))].compact }.merge(data_attrs(@attributes)), @text)).to_s);
|
425
|
+
; else;
|
426
|
+
; case @type;
|
427
|
+
; when :double;
|
428
|
+
; _buf << ((inline_text_container("“#{@text}”")).to_s);
|
429
|
+
; when :single;
|
430
|
+
; _buf << ((inline_text_container("‘#{@text}’")).to_s);
|
431
|
+
; when :asciimath, :latexmath;
|
432
|
+
; open, close = Asciidoctor::INLINE_MATH_DELIMITERS[@type];
|
433
|
+
; _buf << ((inline_text_container("#{open}#{@text}#{close}")).to_s);
|
434
|
+
; else;
|
435
|
+
; _buf << ((inline_text_container(@text)).to_s);
|
436
|
+
; end; end; _buf
|
437
|
+
end
|
438
|
+
end
|
439
|
+
|
440
|
+
def pass(node, opts = {})
|
441
|
+
node.extend(Helpers)
|
442
|
+
node.instance_eval do
|
443
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
444
|
+
_buf = ''; _buf << ((content).to_s);
|
445
|
+
; _buf
|
446
|
+
end
|
447
|
+
end
|
448
|
+
|
449
|
+
def sidebar(node, opts = {})
|
450
|
+
node.extend(Helpers)
|
451
|
+
node.instance_eval do
|
452
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
453
|
+
_buf = ''; if (has_role? 'aside') or (has_role? 'speaker') or (has_role? 'notes');
|
454
|
+
; _buf << ("<aside class=\"notes\">".freeze); _buf << ((resolve_content).to_s);
|
455
|
+
; _buf << ("</aside>".freeze);
|
456
|
+
; else;
|
457
|
+
; _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 = '';
|
458
|
+
; _slim_controls2 << ("<div class=\"content\">".freeze);
|
459
|
+
; if title?;
|
460
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
461
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ((content).to_s);
|
462
|
+
; _slim_controls2 << ("</div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); end; _buf
|
463
|
+
end
|
464
|
+
end
|
465
|
+
|
466
|
+
def thematic_break(node, opts = {})
|
467
|
+
node.extend(Helpers)
|
468
|
+
node.instance_eval do
|
469
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
470
|
+
_buf = ''; _buf << ("<hr>".freeze);
|
471
|
+
; _buf
|
472
|
+
end
|
473
|
+
end
|
474
|
+
|
475
|
+
def outline(node, opts = {})
|
476
|
+
node.extend(Helpers)
|
477
|
+
node.instance_eval do
|
478
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
479
|
+
_buf = ''; unless sections.empty?;
|
480
|
+
; toclevels ||= (document.attr 'toclevels', DEFAULT_TOCLEVELS).to_i;
|
481
|
+
; slevel = section_level sections.first;
|
482
|
+
; _buf << ("<ol class=\"sectlevel".freeze); _buf << ((slevel).to_s); _buf << ("\">".freeze);
|
483
|
+
; sections.each do |sec|;
|
484
|
+
; _buf << ("<li><a href=\"#".freeze);
|
485
|
+
; _buf << ((sec.id).to_s); _buf << ("\">".freeze); _buf << ((section_title sec).to_s);
|
486
|
+
; _buf << ("</a>".freeze); if (sec.level < toclevels) && (child_toc = converter.convert sec, 'outline');
|
487
|
+
; _buf << ((child_toc).to_s);
|
488
|
+
; end; _buf << ("</li>".freeze); end; _buf << ("</ol>".freeze); end; _buf
|
489
|
+
end
|
490
|
+
end
|
491
|
+
|
492
|
+
def inline_break(node, opts = {})
|
493
|
+
node.extend(Helpers)
|
494
|
+
node.instance_eval do
|
495
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
496
|
+
_buf = ''; _buf << ((@text).to_s);
|
497
|
+
; _buf << ("<br>".freeze);
|
498
|
+
; _buf
|
499
|
+
end
|
500
|
+
end
|
501
|
+
|
502
|
+
def video(node, opts = {})
|
503
|
+
node.extend(Helpers)
|
504
|
+
node.instance_eval do
|
505
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
506
|
+
_buf = '';
|
507
|
+
;
|
508
|
+
; no_stretch = ((attr? :width) || (attr? :height));
|
509
|
+
; width = (attr? :width) ? (attr :width) : "100%";
|
510
|
+
; height = (attr? :height) ? (attr :height) : "100%";
|
511
|
+
;
|
512
|
+
; _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 = '';
|
513
|
+
; if title?;
|
514
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
|
515
|
+
; _slim_controls2 << ("</div>".freeze); end; case attr :poster;
|
516
|
+
; when 'vimeo';
|
517
|
+
; unless (asset_uri_scheme = (attr :asset_uri_scheme, 'https')).empty?;
|
518
|
+
; asset_uri_scheme = %(#{asset_uri_scheme}:);
|
519
|
+
; end; start_anchor = (attr? :start) ? "#at=#{attr :start}" : nil;
|
520
|
+
; delimiter = ['?'];
|
521
|
+
; loop_param = (option? 'loop') ? %(#{delimiter.pop || '&'}loop=1) : '';
|
522
|
+
; muted_param = (option? 'muted') ? %(#{delimiter.pop || '&'}muted=1) : '';
|
523
|
+
; src = %(#{asset_uri_scheme}//player.vimeo.com/video/#{attr :target}#{loop_param}#{muted_param}#{start_anchor});
|
524
|
+
;
|
525
|
+
;
|
526
|
+
;
|
527
|
+
;
|
528
|
+
;
|
529
|
+
; _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);
|
530
|
+
; when 'youtube';
|
531
|
+
; unless (asset_uri_scheme = (attr :asset_uri_scheme, 'https')).empty?;
|
532
|
+
; asset_uri_scheme = %(#{asset_uri_scheme}:);
|
533
|
+
; end; params = ['rel=0'];
|
534
|
+
; params << "start=#{attr :start}" if attr? :start;
|
535
|
+
; params << "end=#{attr :end}" if attr? :end;
|
536
|
+
; params << "loop=1" if option? 'loop';
|
537
|
+
; params << "mute=1" if option? 'muted';
|
538
|
+
; params << "controls=0" if option? 'nocontrols';
|
539
|
+
; src = %(#{asset_uri_scheme}//www.youtube.com/embed/#{attr :target}?#{params * '&'});
|
540
|
+
;
|
541
|
+
;
|
542
|
+
;
|
543
|
+
;
|
544
|
+
;
|
545
|
+
; _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);
|
546
|
+
; else;
|
547
|
+
;
|
548
|
+
;
|
549
|
+
;
|
550
|
+
; _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);
|
551
|
+
;
|
552
|
+
; end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
553
|
+
end
|
554
|
+
end
|
555
|
+
|
556
|
+
def inline_footnote(node, opts = {})
|
557
|
+
node.extend(Helpers)
|
558
|
+
node.instance_eval do
|
559
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
560
|
+
_buf = ''; footnote = slide_footnote(self);
|
561
|
+
; index = footnote.attr(:index);
|
562
|
+
; id = footnote.id;
|
563
|
+
; if @type == :xref;
|
564
|
+
; _slim_controls1 = html_tag('sup', { :class => ['footnoteref'] }.merge(data_attrs(footnote.attributes))) do; _slim_controls2 = '';
|
565
|
+
; _slim_controls2 << ("[<span class=\"footnote\" title=\"View footnote.\">".freeze);
|
566
|
+
; _slim_controls2 << ((index).to_s);
|
567
|
+
; _slim_controls2 << ("</span>]".freeze);
|
568
|
+
; _slim_controls2; end; _buf << ((_slim_controls1).to_s); else;
|
569
|
+
; _slim_controls3 = html_tag('sup', { :id => ("_footnote_#{id}" if id), :class => ['footnote'] }.merge(data_attrs(footnote.attributes))) do; _slim_controls4 = '';
|
570
|
+
; _slim_controls4 << ("[<span class=\"footnote\" title=\"View footnote.\">".freeze);
|
571
|
+
; _slim_controls4 << ((index).to_s);
|
572
|
+
; _slim_controls4 << ("</span>]".freeze);
|
573
|
+
; _slim_controls4; end; _buf << ((_slim_controls3).to_s); end; _buf
|
574
|
+
end
|
575
|
+
end
|
576
|
+
|
344
577
|
def stretch_nested_elements(node, opts = {})
|
345
578
|
node.extend(Helpers)
|
346
579
|
node.instance_eval do
|
@@ -414,7 +647,36 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
414
647
|
end
|
415
648
|
end
|
416
649
|
|
417
|
-
def
|
650
|
+
def image(node, opts = {})
|
651
|
+
node.extend(Helpers)
|
652
|
+
node.instance_eval do
|
653
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
654
|
+
_buf = ''; width = (attr? :width) ? (attr :width) : nil;
|
655
|
+
; height = (attr? :height) ? (attr :height) : nil;
|
656
|
+
;
|
657
|
+
;
|
658
|
+
;
|
659
|
+
;
|
660
|
+
;
|
661
|
+
;
|
662
|
+
; if (has_role? 'stretch') && !((attr? :width) || (attr? :height));
|
663
|
+
; height = "100%";
|
664
|
+
;
|
665
|
+
; end; unless attributes[1] == 'background' || attributes[1] == 'canvas';
|
666
|
+
; inline_style = [("text-align: #{attr :align}" if attr? :align),("float: #{attr :float}" if attr? :float)].compact.join('; ');
|
667
|
+
; _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 = '';
|
668
|
+
; if attr? :link;
|
669
|
+
; _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);
|
670
|
+
; _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);
|
671
|
+
; else;
|
672
|
+
; _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);
|
673
|
+
; end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); if title?;
|
674
|
+
; _buf << ("<div class=\"title\">".freeze); _buf << ((captioned_title).to_s);
|
675
|
+
; _buf << ("</div>".freeze); end; end; _buf
|
676
|
+
end
|
677
|
+
end
|
678
|
+
|
679
|
+
def admonition(node, opts = {})
|
418
680
|
node.extend(Helpers)
|
419
681
|
node.instance_eval do
|
420
682
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
@@ -422,53 +684,47 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
422
684
|
; _buf << ("<aside class=\"notes\">".freeze); _buf << ((resolve_content).to_s);
|
423
685
|
; _buf << ("</aside>".freeze);
|
424
686
|
; else;
|
425
|
-
; _slim_controls1 = html_tag('div', { :id => @id, :class => ['
|
426
|
-
; _slim_controls2 << ("<
|
687
|
+
; _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 = '';
|
688
|
+
; _slim_controls2 << ("<table><tr><td class=\"icon\">".freeze);
|
689
|
+
;
|
690
|
+
; if @document.attr? :icons, 'font';
|
691
|
+
; icon_mapping = Hash['caution', 'fire', 'important', 'exclamation-circle', 'note', 'info-circle', 'tip', 'lightbulb-o', 'warning', 'warning'];
|
692
|
+
; _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);
|
693
|
+
; elsif @document.attr? :icons;
|
694
|
+
; _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);
|
695
|
+
; else;
|
696
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << (((attr :textlabel) || @caption).to_s);
|
697
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("</td><td class=\"content\">".freeze);
|
427
698
|
; if title?;
|
428
699
|
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
429
700
|
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ((content).to_s);
|
430
|
-
; _slim_controls2 << ("</
|
701
|
+
; _slim_controls2 << ("</td></tr></table>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); end; _buf
|
431
702
|
end
|
432
703
|
end
|
433
704
|
|
434
|
-
def
|
705
|
+
def ruler(node, opts = {})
|
435
706
|
node.extend(Helpers)
|
436
707
|
node.instance_eval do
|
437
708
|
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
|
709
|
+
_buf = ''; _buf << ("<hr>".freeze);
|
710
|
+
; _buf
|
464
711
|
end
|
465
712
|
end
|
466
713
|
|
467
|
-
def
|
714
|
+
def page_break(node, opts = {})
|
468
715
|
node.extend(Helpers)
|
469
716
|
node.instance_eval do
|
470
717
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
471
|
-
_buf = '';
|
718
|
+
_buf = ''; _buf << ("<div style=\"page-break-after: always;\"></div>".freeze);
|
719
|
+
; _buf
|
720
|
+
end
|
721
|
+
end
|
722
|
+
|
723
|
+
def stem(node, opts = {})
|
724
|
+
node.extend(Helpers)
|
725
|
+
node.instance_eval do
|
726
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
727
|
+
_buf = ''; open, close = Asciidoctor::BLOCK_MATH_DELIMITERS[@style.to_sym];
|
472
728
|
; equation = content.strip;
|
473
729
|
; if (@subs.nil? || @subs.empty?) && !(attr? 'subs');
|
474
730
|
; equation = sub_specialcharacters equation;
|
@@ -482,20 +738,95 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
482
738
|
end
|
483
739
|
end
|
484
740
|
|
485
|
-
def
|
741
|
+
def toc(node, opts = {})
|
486
742
|
node.extend(Helpers)
|
487
743
|
node.instance_eval do
|
488
744
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
489
|
-
_buf = '';
|
745
|
+
_buf = '';
|
746
|
+
;
|
747
|
+
;
|
748
|
+
;
|
749
|
+
;
|
750
|
+
;
|
751
|
+
;
|
752
|
+
;
|
753
|
+
;
|
754
|
+
;
|
755
|
+
;
|
756
|
+
;
|
757
|
+
;
|
758
|
+
; _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);
|
759
|
+
; _buf << (((document.attr 'toc-title')).to_s);
|
760
|
+
; _buf << ("</div>".freeze);
|
761
|
+
; _buf << ((converter.convert document, 'outline').to_s);
|
762
|
+
; _buf << ("</div>".freeze); _buf
|
763
|
+
end
|
764
|
+
end
|
765
|
+
|
766
|
+
def ulist(node, opts = {})
|
767
|
+
node.extend(Helpers)
|
768
|
+
node.instance_eval do
|
769
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
770
|
+
_buf = ''; if (checklist = (option? :checklist) ? 'checklist' : nil);
|
771
|
+
; if option? :interactive;
|
772
|
+
; marker_checked = '<input type="checkbox" data-item-complete="1" checked>';
|
773
|
+
; marker_unchecked = '<input type="checkbox" data-item-complete="0">';
|
774
|
+
; else;
|
775
|
+
; if @document.attr? :icons, 'font';
|
776
|
+
; marker_checked = '<i class="icon-check"></i>';
|
777
|
+
; marker_unchecked = '<i class="icon-check-empty"></i>';
|
778
|
+
; else;
|
779
|
+
;
|
780
|
+
; marker_checked = '<input type="checkbox" data-item-complete="1" checked disabled>';
|
781
|
+
; marker_unchecked = '<input type="checkbox" data-item-complete="0" disabled>';
|
782
|
+
; end; end; end; _slim_controls1 = html_tag('div', { :id => @id, :class => ['ulist', checklist, @style, role] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
490
783
|
; if title?;
|
491
784
|
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
492
|
-
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<
|
785
|
+
; _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);
|
493
786
|
; items.each do |item|;
|
494
|
-
; _slim_controls2 << ("<li".freeze); _temple_html_attributeremover2 = '';
|
787
|
+
; _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);
|
788
|
+
;
|
789
|
+
; if checklist && (item.attr? :checkbox);
|
790
|
+
; _slim_controls2 << ((%(#{(item.attr? :checked) ? marker_checked : marker_unchecked}#{item.text})).to_s);
|
791
|
+
; else;
|
495
792
|
; _slim_controls2 << ((item.text).to_s);
|
496
|
-
; _slim_controls2 << ("</p>".freeze); if item.blocks?;
|
793
|
+
; end; _slim_controls2 << ("</p>".freeze); if item.blocks?;
|
497
794
|
; _slim_controls2 << ((item.content).to_s);
|
498
|
-
; end; _slim_controls2 << ("</li>".freeze); end; _slim_controls2 << ("</
|
795
|
+
; end; _slim_controls2 << ("</li>".freeze); end; _slim_controls2 << ("</ul>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
796
|
+
end
|
797
|
+
end
|
798
|
+
|
799
|
+
def inline_indexterm(node, opts = {})
|
800
|
+
node.extend(Helpers)
|
801
|
+
node.instance_eval do
|
802
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
803
|
+
_buf = ''; if @type == :visible;
|
804
|
+
; _buf << ((@text).to_s);
|
805
|
+
; end; _buf
|
806
|
+
end
|
807
|
+
end
|
808
|
+
|
809
|
+
def inline_menu(node, opts = {})
|
810
|
+
node.extend(Helpers)
|
811
|
+
node.instance_eval do
|
812
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
813
|
+
_buf = ''; menu = attr 'menu';
|
814
|
+
; menuitem = attr 'menuitem';
|
815
|
+
; if !(submenus = attr 'submenus').empty?;
|
816
|
+
; _slim_controls1 = html_tag('span', { :class => ['menuseq'] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
817
|
+
; _slim_controls2 << ("<span class=\"menu\">".freeze); _slim_controls2 << ((menu).to_s);
|
818
|
+
; _slim_controls2 << ("</span> ▸ ".freeze);
|
819
|
+
; _slim_controls2 << ((submenus.map {|submenu| %(<span class="submenu">#{submenu}</span> ▸ ) }.join).to_s);
|
820
|
+
; _slim_controls2 << ("<span class=\"menuitem\">".freeze); _slim_controls2 << ((menuitem).to_s);
|
821
|
+
; _slim_controls2 << ("</span>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); elsif !menuitem.nil?;
|
822
|
+
; _slim_controls3 = html_tag('span', { :class => ['menuseq'] }.merge(data_attrs(@attributes))) do; _slim_controls4 = '';
|
823
|
+
; _slim_controls4 << ("<span class=\"menu\">".freeze); _slim_controls4 << ((menu).to_s);
|
824
|
+
; _slim_controls4 << ("</span> ▸ <span class=\"menuitem\">".freeze);
|
825
|
+
; _slim_controls4 << ((menuitem).to_s);
|
826
|
+
; _slim_controls4 << ("</span>".freeze); _slim_controls4; end; _buf << ((_slim_controls3).to_s); else;
|
827
|
+
; _slim_controls5 = html_tag('span', { :class => ['menu'] }.merge(data_attrs(@attributes))) do; _slim_controls6 = '';
|
828
|
+
; _slim_controls6 << ((menu).to_s);
|
829
|
+
; _slim_controls6; end; _buf << ((_slim_controls5).to_s); end; _buf
|
499
830
|
end
|
500
831
|
end
|
501
832
|
|
@@ -527,291 +858,376 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
527
858
|
end
|
528
859
|
end
|
529
860
|
|
530
|
-
def
|
861
|
+
def inline_anchor(node, opts = {})
|
531
862
|
node.extend(Helpers)
|
532
863
|
node.instance_eval do
|
533
864
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
534
|
-
_buf = '';
|
535
|
-
;
|
536
|
-
;
|
537
|
-
;
|
538
|
-
;
|
539
|
-
;
|
540
|
-
; _buf << (((
|
541
|
-
;
|
542
|
-
; _buf << (
|
543
|
-
;
|
544
|
-
; else;
|
545
|
-
; revealjsdir = (attr :revealjsdir, 'reveal.js');
|
546
|
-
; end; unless (asset_uri_scheme = (attr 'asset-uri-scheme', 'https')).empty?;
|
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
|
-
;
|
556
|
-
;
|
557
|
-
; _slim_codeattributes4 = (attr :revealjs_customtheme, %(#{revealjsdir}/css/theme/#{attr 'revealjs_theme', 'black'}.css)); if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes4).to_s); _buf << ("\"".freeze); end; end; _buf << (" id=\"theme\"><!--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/* listing block */\n.reveal .listingblock.stretch > .content {\n height: 100%\n}\n\n.reveal .listingblock.stretch > .content > pre {\n height: 100%\n}\n\n.reveal .listingblock.stretch > .content > pre > code {\n height: 100%;\n max-height: 100%\n}\n\n/* tables */\ntable {\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</style>".freeze);
|
558
|
-
;
|
559
|
-
;
|
560
|
-
;
|
561
|
-
; if attr? :icons, 'font';
|
562
|
-
;
|
563
|
-
; if attr? 'iconfont-remote';
|
564
|
-
; if (iconfont_cdn = (attr 'iconfont-cdn'));
|
565
|
-
; _buf << ("<link rel=\"stylesheet\"".freeze); _slim_codeattributes5 = iconfont_cdn; if _slim_codeattributes5; if _slim_codeattributes5 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes5).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
865
|
+
_buf = ''; case @type;
|
866
|
+
; when :xref;
|
867
|
+
; refid = (attr :refid) || @target;
|
868
|
+
; _slim_controls1 = html_tag('a', { :href => @target, :class => [role, ('fragment' if (option? :step) || (attr? 'step'))].compact }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
869
|
+
; _slim_controls2 << (((@text || @document.references[:ids].fetch(refid, "[#{refid}]")).tr_s("\n", ' ')).to_s);
|
870
|
+
; _slim_controls2; end; _buf << ((_slim_controls1).to_s); when :ref;
|
871
|
+
; _buf << ((html_tag('a', { :id => @target }.merge(data_attrs(@attributes)))).to_s);
|
872
|
+
; when :bibref;
|
873
|
+
; _buf << ((html_tag('a', { :id => @target }.merge(data_attrs(@attributes)))).to_s);
|
874
|
+
; _buf << ("[".freeze); _buf << ((@target).to_s); _buf << ("]".freeze);
|
566
875
|
; else;
|
876
|
+
; _slim_controls3 = html_tag('a', { :href => @target, :class => [role, ('fragment' if (option? :step) || (attr? 'step'))].compact, :target => (attr :window), 'data-preview-link' => (bool_data_attr :preview) }.merge(data_attrs(@attributes))) do; _slim_controls4 = '';
|
877
|
+
; _slim_controls4 << ((@text).to_s);
|
878
|
+
; _slim_controls4; end; _buf << ((_slim_controls3).to_s); end; _buf
|
879
|
+
end
|
880
|
+
end
|
881
|
+
|
882
|
+
def floating_title(node, opts = {})
|
883
|
+
node.extend(Helpers)
|
884
|
+
node.instance_eval do
|
885
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
886
|
+
_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);
|
887
|
+
; _buf << ((title).to_s);
|
888
|
+
; _buf << ("</h".freeze); _buf << ((_slim_htag_filter1).to_s); _buf << (">".freeze); _buf
|
889
|
+
end
|
890
|
+
end
|
891
|
+
|
892
|
+
def quote(node, opts = {})
|
893
|
+
node.extend(Helpers)
|
894
|
+
node.instance_eval do
|
895
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
896
|
+
_buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['quoteblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
897
|
+
; if title?;
|
898
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
899
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<blockquote>".freeze); _slim_controls2 << ((content).to_s);
|
900
|
+
; _slim_controls2 << ("</blockquote>".freeze); attribution = (attr? :attribution) ? (attr :attribution) : nil;
|
901
|
+
; citetitle = (attr? :citetitle) ? (attr :citetitle) : nil;
|
902
|
+
; if attribution || citetitle;
|
903
|
+
; _slim_controls2 << ("<div class=\"attribution\">".freeze);
|
904
|
+
; if citetitle;
|
905
|
+
; _slim_controls2 << ("<cite>".freeze); _slim_controls2 << ((citetitle).to_s);
|
906
|
+
; _slim_controls2 << ("</cite>".freeze); end; if attribution;
|
907
|
+
; if citetitle;
|
908
|
+
; _slim_controls2 << ("<br>".freeze);
|
909
|
+
; end; _slim_controls2 << ("— ".freeze); _slim_controls2 << ((attribution).to_s);
|
910
|
+
; end; _slim_controls2 << ("</div>".freeze); end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
911
|
+
end
|
912
|
+
end
|
913
|
+
|
914
|
+
def dlist(node, opts = {})
|
915
|
+
node.extend(Helpers)
|
916
|
+
node.instance_eval do
|
917
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
918
|
+
_buf = ''; case @style;
|
919
|
+
; when 'qanda';
|
920
|
+
; _slim_controls1 = html_tag('div', { :id => @id, :class => ['qlist', @style, role] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
921
|
+
; if title?;
|
922
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
923
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<ol>".freeze);
|
924
|
+
; items.each do |questions, answer|;
|
925
|
+
; _slim_controls2 << ("<li>".freeze);
|
926
|
+
; [*questions].each do |question|;
|
927
|
+
; _slim_controls2 << ("<p><em>".freeze); _slim_controls2 << ((question.text).to_s);
|
928
|
+
; _slim_controls2 << ("</em></p>".freeze); end; unless answer.nil?;
|
929
|
+
; if answer.text?;
|
930
|
+
; _slim_controls2 << ("<p>".freeze); _slim_controls2 << ((answer.text).to_s);
|
931
|
+
; _slim_controls2 << ("</p>".freeze); end; if answer.blocks?;
|
932
|
+
; _slim_controls2 << ((answer.content).to_s);
|
933
|
+
; end; end; _slim_controls2 << ("</li>".freeze); end; _slim_controls2 << ("</ol>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); when 'horizontal';
|
934
|
+
; _slim_controls3 = html_tag('div', { :id => @id, :class => ['hdlist', role] }.merge(data_attrs(@attributes))) do; _slim_controls4 = '';
|
935
|
+
; if title?;
|
936
|
+
; _slim_controls4 << ("<div class=\"title\">".freeze); _slim_controls4 << ((title).to_s);
|
937
|
+
; _slim_controls4 << ("</div>".freeze); end; _slim_controls4 << ("<table>".freeze);
|
938
|
+
; if (attr? :labelwidth) || (attr? :itemwidth);
|
939
|
+
; _slim_controls4 << ("<colgroup><col".freeze);
|
940
|
+
; _slim_codeattributes1 = ((attr? :labelwidth) ? %(width:#{(attr :labelwidth).chomp '%'}%;) : nil); if _slim_codeattributes1; if _slim_codeattributes1 == true; _slim_controls4 << (" style".freeze); else; _slim_controls4 << (" style=\"".freeze); _slim_controls4 << ((_slim_codeattributes1).to_s); _slim_controls4 << ("\"".freeze); end; end; _slim_controls4 << ("><col".freeze);
|
941
|
+
; _slim_codeattributes2 = ((attr? :itemwidth) ? %(width:#{(attr :itemwidth).chomp '%'}%;) : nil); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls4 << (" style".freeze); else; _slim_controls4 << (" style=\"".freeze); _slim_controls4 << ((_slim_codeattributes2).to_s); _slim_controls4 << ("\"".freeze); end; end; _slim_controls4 << ("></colgroup>".freeze);
|
942
|
+
; end; items.each do |terms, dd|;
|
943
|
+
; _slim_controls4 << ("<tr><td".freeze);
|
944
|
+
; _temple_html_attributeremover1 = ''; _slim_codeattributes3 = ['hdlist1',('strong' if option? 'strong')]; if Array === _slim_codeattributes3; _slim_codeattributes3 = _slim_codeattributes3.flatten; _slim_codeattributes3.map!(&:to_s); _slim_codeattributes3.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes3.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes3).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _slim_controls4 << (" class=\"".freeze); _slim_controls4 << ((_temple_html_attributeremover1).to_s); _slim_controls4 << ("\"".freeze); end; _slim_controls4 << (">".freeze);
|
945
|
+
; terms = [*terms];
|
946
|
+
; last_term = terms.last;
|
947
|
+
; terms.each do |dt|;
|
948
|
+
; _slim_controls4 << ((dt.text).to_s);
|
949
|
+
; if dt != last_term;
|
950
|
+
; _slim_controls4 << ("<br>".freeze);
|
951
|
+
; end; end; _slim_controls4 << ("</td><td class=\"hdlist2\">".freeze);
|
952
|
+
; unless dd.nil?;
|
953
|
+
; if dd.text?;
|
954
|
+
; _slim_controls4 << ("<p>".freeze); _slim_controls4 << ((dd.text).to_s);
|
955
|
+
; _slim_controls4 << ("</p>".freeze); end; if dd.blocks?;
|
956
|
+
; _slim_controls4 << ((dd.content).to_s);
|
957
|
+
; end; end; _slim_controls4 << ("</td></tr>".freeze); end; _slim_controls4 << ("</table>".freeze); _slim_controls4; end; _buf << ((_slim_controls3).to_s); else;
|
958
|
+
; _slim_controls5 = html_tag('div', { :id => @id, :class => ['dlist', @style, role] }.merge(data_attrs(@attributes))) do; _slim_controls6 = '';
|
959
|
+
; if title?;
|
960
|
+
; _slim_controls6 << ("<div class=\"title\">".freeze); _slim_controls6 << ((title).to_s);
|
961
|
+
; _slim_controls6 << ("</div>".freeze); end; _slim_controls6 << ("<dl>".freeze);
|
962
|
+
; items.each do |terms, dd|;
|
963
|
+
; [*terms].each do |dt|;
|
964
|
+
; _slim_controls6 << ("<dt".freeze); _temple_html_attributeremover2 = ''; _slim_codeattributes4 = ('hdlist1' unless @style); if Array === _slim_codeattributes4; _slim_codeattributes4 = _slim_codeattributes4.flatten; _slim_codeattributes4.map!(&:to_s); _slim_codeattributes4.reject!(&:empty?); _temple_html_attributeremover2 << ((_slim_codeattributes4.join(" ")).to_s); else; _temple_html_attributeremover2 << ((_slim_codeattributes4).to_s); end; _temple_html_attributeremover2; if !_temple_html_attributeremover2.empty?; _slim_controls6 << (" class=\"".freeze); _slim_controls6 << ((_temple_html_attributeremover2).to_s); _slim_controls6 << ("\"".freeze); end; _slim_controls6 << (">".freeze); _slim_controls6 << ((dt.text).to_s);
|
965
|
+
; _slim_controls6 << ("</dt>".freeze); end; unless dd.nil?;
|
966
|
+
; _slim_controls6 << ("<dd>".freeze);
|
967
|
+
; if dd.text?;
|
968
|
+
; _slim_controls6 << ("<p>".freeze); _slim_controls6 << ((dd.text).to_s);
|
969
|
+
; _slim_controls6 << ("</p>".freeze); end; if dd.blocks?;
|
970
|
+
; _slim_controls6 << ((dd.content).to_s);
|
971
|
+
; end; _slim_controls6 << ("</dd>".freeze); end; end; _slim_controls6 << ("</dl>".freeze); _slim_controls6; end; _buf << ((_slim_controls5).to_s); end; _buf
|
972
|
+
end
|
973
|
+
end
|
974
|
+
|
975
|
+
def example(node, opts = {})
|
976
|
+
node.extend(Helpers)
|
977
|
+
node.instance_eval do
|
978
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
979
|
+
_buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['exampleblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
980
|
+
; if title?;
|
981
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
|
982
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<div class=\"content\">".freeze); _slim_controls2 << ((content).to_s);
|
983
|
+
; _slim_controls2 << ("</div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
984
|
+
end
|
985
|
+
end
|
986
|
+
|
987
|
+
def listing(node, opts = {})
|
988
|
+
node.extend(Helpers)
|
989
|
+
node.instance_eval do
|
990
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
991
|
+
_buf = ''; nowrap = (option? 'nowrap') || !(document.attr? 'prewrap');
|
992
|
+
; if @style == 'source';
|
993
|
+
; syntax_hl = document.syntax_highlighter;
|
994
|
+
; lang = attr :language;
|
995
|
+
; if syntax_hl;
|
996
|
+
; doc_attrs = document.attributes;
|
997
|
+
; css_mode = (doc_attrs[%(#{syntax_hl.name}-css)] || :class).to_sym;
|
998
|
+
; style = doc_attrs[%(#{syntax_hl.name}-style)];
|
999
|
+
; opts = syntax_hl.highlight? ? { css_mode: css_mode, style: style } : {};
|
1000
|
+
; opts[:nowrap] = nowrap;
|
1001
|
+
; end;
|
1002
|
+
; 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 = '';
|
1003
|
+
; if title?;
|
1004
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
|
1005
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<div class=\"content\">".freeze);
|
1006
|
+
; if syntax_hl;
|
1007
|
+
; _slim_controls2 << (((syntax_hl.format self, lang, opts)).to_s);
|
1008
|
+
; else;
|
1009
|
+
; if @style == 'source';
|
1010
|
+
; _slim_controls2 << ("<pre".freeze); _temple_html_attributeremover1 = ''; _slim_codeattributes1 = ['highlight', ('nowrap' if nowrap)]; 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 << ("><code".freeze);
|
1011
|
+
; _temple_html_attributeremover2 = ''; _slim_codeattributes2 = [("language-#{lang}" if lang)]; 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_codeattributes3 = ("#{lang}" if lang); if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls2 << (" data-lang".freeze); else; _slim_controls2 << (" data-lang=\"".freeze); _slim_controls2 << ((_slim_codeattributes3).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << (">".freeze);
|
1012
|
+
; _slim_controls2 << ((content || '').to_s);
|
1013
|
+
; _slim_controls2 << ("</code></pre>".freeze); else;
|
1014
|
+
; _slim_controls2 << ("<pre".freeze); _temple_html_attributeremover3 = ''; _slim_codeattributes4 = [('nowrap' if nowrap)]; if Array === _slim_codeattributes4; _slim_codeattributes4 = _slim_codeattributes4.flatten; _slim_codeattributes4.map!(&:to_s); _slim_codeattributes4.reject!(&:empty?); _temple_html_attributeremover3 << ((_slim_codeattributes4.join(" ")).to_s); else; _temple_html_attributeremover3 << ((_slim_codeattributes4).to_s); end; _temple_html_attributeremover3; if !_temple_html_attributeremover3.empty?; _slim_controls2 << (" class=\"".freeze); _slim_controls2 << ((_temple_html_attributeremover3).to_s); _slim_controls2 << ("\"".freeze); end; _slim_controls2 << (">".freeze);
|
1015
|
+
; _slim_controls2 << ((content || '').to_s);
|
1016
|
+
; _slim_controls2 << ("</pre>".freeze); end; end; _slim_controls2 << ("</div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1017
|
+
end
|
1018
|
+
end
|
1019
|
+
|
1020
|
+
def inline_callout(node, opts = {})
|
1021
|
+
node.extend(Helpers)
|
1022
|
+
node.instance_eval do
|
1023
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1024
|
+
_buf = ''; if @document.attr? :icons, 'font';
|
1025
|
+
; _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);
|
1026
|
+
; _buf << (("(#{@text})").to_s);
|
1027
|
+
; _buf << ("</b>".freeze); elsif @document.attr? :icons;
|
1028
|
+
; _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);
|
1029
|
+
; else;
|
1030
|
+
; _buf << ("<b>".freeze); _buf << (("(#{@text})").to_s);
|
1031
|
+
; _buf << ("</b>".freeze); end; _buf
|
1032
|
+
end
|
1033
|
+
end
|
1034
|
+
|
1035
|
+
def section(node, opts = {})
|
1036
|
+
node.extend(Helpers)
|
1037
|
+
node.instance_eval do
|
1038
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1039
|
+
_buf = '';
|
567
1040
|
;
|
568
|
-
;
|
569
|
-
;
|
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
|
-
;
|
580
|
-
;
|
581
|
-
; _buf << ((Asciidoctor::INLINE_MATH_DELIMITERS[:latexmath].to_s).to_s); _buf << ("],\n displayMath: [".freeze);
|
582
|
-
; _buf << ((Asciidoctor::BLOCK_MATH_DELIMITERS[:latexmath].to_s).to_s); _buf << ("],\n ignoreClass: \"nostem|nolatexmath\"\n},\nasciimath2jax: {\n delimiters: [".freeze);
|
583
|
-
;
|
584
|
-
;
|
585
|
-
;
|
586
|
-
; _buf << ((Asciidoctor::BLOCK_MATH_DELIMITERS[:asciimath].to_s).to_s); _buf << ("],\n ignoreClass: \"nostem|noasciimath\"\n},\nTeX: {".freeze);
|
587
|
-
;
|
588
|
-
;
|
589
|
-
; _buf << ((eqnums_opt).to_s); _buf << ("}\n});</script><script src=\"".freeze);
|
590
|
-
;
|
591
|
-
; _buf << ((mathjaxdir).to_s); _buf << ("/MathJax.js?config=TeX-MML-AM_HTMLorMML\"></script>".freeze);
|
592
|
-
;
|
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
|
-
;
|
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
|
-
;
|
599
|
-
;
|
600
|
-
;
|
601
|
-
;
|
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
|
-
;
|
604
|
-
;
|
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
|
-
;
|
611
|
-
;
|
612
|
-
;
|
613
|
-
; unless noheader;
|
614
|
-
; unless (_docinfo = docinfo :header, '-revealjs.html').empty?;
|
615
|
-
; _buf << ((_docinfo).to_s);
|
616
|
-
; end; if header?;
|
617
|
-
; bg_image = (attr? 'title-slide-background-image') ? (image_uri(attr 'title-slide-background-image')) : nil;
|
618
|
-
; bg_video = (attr? 'title-slide-background-video') ? (media_uri(attr 'title-slide-background-video')) : nil;
|
619
|
-
;
|
620
|
-
;
|
621
|
-
;
|
622
|
-
;
|
623
|
-
;
|
624
|
-
;
|
625
|
-
;
|
626
|
-
;
|
627
|
-
;
|
628
|
-
;
|
629
|
-
;
|
630
|
-
;
|
631
|
-
;
|
632
|
-
;
|
633
|
-
;
|
634
|
-
; _buf << ("<section".freeze); _temple_html_attributeremover1 = ''; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "title"; _temple_html_attributemerger1[1] = ''; _slim_codeattributes10 = role; if Array === _slim_codeattributes10; _slim_codeattributes10 = _slim_codeattributes10.flatten; _slim_codeattributes10.map!(&:to_s); _slim_codeattributes10.reject!(&:empty?); _temple_html_attributemerger1[1] << ((_slim_codeattributes10.join(" ")).to_s); else; _temple_html_attributemerger1[1] << ((_slim_codeattributes10).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_codeattributes11 = (attr 'title-slide-transition'); if _slim_codeattributes11; if _slim_codeattributes11 == true; _buf << (" data-transition".freeze); else; _buf << (" data-transition=\"".freeze); _buf << ((_slim_codeattributes11).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes12 = (attr 'title-slide-transition-speed'); if _slim_codeattributes12; if _slim_codeattributes12 == true; _buf << (" data-transition-speed".freeze); else; _buf << (" data-transition-speed=\"".freeze); _buf << ((_slim_codeattributes12).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes13 = (attr 'title-slide-background'); if _slim_codeattributes13; if _slim_codeattributes13 == true; _buf << (" data-background".freeze); else; _buf << (" data-background=\"".freeze); _buf << ((_slim_codeattributes13).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes14 = (attr 'title-slide-background-size'); if _slim_codeattributes14; if _slim_codeattributes14 == true; _buf << (" data-background-size".freeze); else; _buf << (" data-background-size=\"".freeze); _buf << ((_slim_codeattributes14).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes15 = bg_image; if _slim_codeattributes15; if _slim_codeattributes15 == true; _buf << (" data-background-image".freeze); else; _buf << (" data-background-image=\"".freeze); _buf << ((_slim_codeattributes15).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes16 = bg_video; if _slim_codeattributes16; if _slim_codeattributes16 == true; _buf << (" data-background-video".freeze); else; _buf << (" data-background-video=\"".freeze); _buf << ((_slim_codeattributes16).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes17 = (attr 'title-slide-background-video-loop'); if _slim_codeattributes17; if _slim_codeattributes17 == true; _buf << (" data-background-video-loop".freeze); else; _buf << (" data-background-video-loop=\"".freeze); _buf << ((_slim_codeattributes17).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes18 = (attr 'title-slide-background-video-muted'); if _slim_codeattributes18; if _slim_codeattributes18 == true; _buf << (" data-background-video-muted".freeze); else; _buf << (" data-background-video-muted=\"".freeze); _buf << ((_slim_codeattributes18).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes19 = (attr 'title-slide-background-opacity'); if _slim_codeattributes19; if _slim_codeattributes19 == true; _buf << (" data-background-opacity".freeze); else; _buf << (" data-background-opacity=\"".freeze); _buf << ((_slim_codeattributes19).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes20 = (attr 'title-slide-background-iframe'); if _slim_codeattributes20; if _slim_codeattributes20 == true; _buf << (" data-background-iframe".freeze); else; _buf << (" data-background-iframe=\"".freeze); _buf << ((_slim_codeattributes20).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes21 = (attr 'title-slide-background-color'); if _slim_codeattributes21; if _slim_codeattributes21 == true; _buf << (" data-background-color".freeze); else; _buf << (" data-background-color=\"".freeze); _buf << ((_slim_codeattributes21).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes22 = (attr 'title-slide-background-repeat'); if _slim_codeattributes22; if _slim_codeattributes22 == true; _buf << (" data-background-repeat".freeze); else; _buf << (" data-background-repeat=\"".freeze); _buf << ((_slim_codeattributes22).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes23 = (attr 'title-slide-background-position'); if _slim_codeattributes23; if _slim_codeattributes23 == true; _buf << (" data-background-position".freeze); else; _buf << (" data-background-position=\"".freeze); _buf << ((_slim_codeattributes23).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes24 = (attr 'title-slide-background-transition'); if _slim_codeattributes24; if _slim_codeattributes24 == true; _buf << (" data-background-transition".freeze); else; _buf << (" data-background-transition=\"".freeze); _buf << ((_slim_codeattributes24).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
635
|
-
; if (_title_obj = doctitle partition: true, use_fallback: true).subtitle?;
|
636
|
-
; _buf << ("<h1>".freeze); _buf << ((slice_text _title_obj.title, (_slice = header.option? :slice)).to_s);
|
637
|
-
; _buf << ("</h1><h2>".freeze); _buf << ((slice_text _title_obj.subtitle, _slice).to_s);
|
638
|
-
; _buf << ("</h2>".freeze); else;
|
639
|
-
; _buf << ("<h1>".freeze); _buf << ((@header.title).to_s);
|
640
|
-
; _buf << ("</h1>".freeze); end; preamble = @document.find_by context: :preamble;
|
641
|
-
; unless preamble.nil? or preamble.length == 0;
|
642
|
-
; _buf << ("<div class=\"preamble\">".freeze); _buf << ((preamble.pop.content).to_s);
|
643
|
-
; _buf << ("</div>".freeze); end; unless author.nil?;
|
644
|
-
; _buf << ("<p class=\"author\"><small>".freeze); _buf << ((author).to_s);
|
645
|
-
; _buf << ("</small></p>".freeze); end; _buf << ("</section>".freeze);
|
646
|
-
; end; end; _buf << ((content).to_s);
|
647
|
-
; unless (_docinfo = docinfo :footer, '-revealjs.html').empty?;
|
648
|
-
; _buf << ((_docinfo).to_s);
|
649
|
-
; end; _buf << ("</div></div><script src=\"".freeze); _buf << ((revealjsdir).to_s); _buf << ("/js/reveal.js\"></script><script>Array.prototype.slice.call(document.querySelectorAll('.slides section')).forEach(function(slide) {\n if (slide.getAttribute('data-background-color')) return;\n // user needs to explicitly say he wants CSS color to override otherwise we might break custom css or theme (#226)\n if (!(slide.classList.contains('canvas') || slide.classList.contains('background'))) return;\n var bgColor = getComputedStyle(slide).backgroundColor;\n if (bgColor !== 'rgba(0, 0, 0, 0)' && bgColor !== 'transparent') {\n slide.setAttribute('data-background-color', bgColor);\n slide.style.backgroundColor = 'transparent';\n }\n});\n\n// More info about config & dependencies:\n// - https://github.com/hakimel/reveal.js#configuration\n// - https://github.com/hakimel/reveal.js#dependencies\nReveal.initialize({\n // Display presentation control arrows\n controls: ".freeze);
|
650
|
-
;
|
651
|
-
;
|
652
|
-
;
|
653
|
-
;
|
654
|
-
;
|
655
|
-
;
|
656
|
-
;
|
657
|
-
;
|
658
|
-
;
|
659
|
-
;
|
660
|
-
;
|
661
|
-
;
|
662
|
-
;
|
663
|
-
;
|
664
|
-
;
|
665
|
-
;
|
666
|
-
;
|
667
|
-
;
|
668
|
-
; _buf << ((to_boolean(attr 'revealjs_controls', true)).to_s); _buf << (",\n // Help the user learn the controls by providing hints, for example by\n // bouncing the down arrow when they first encounter a vertical slide\n controlsTutorial: ".freeze);
|
669
|
-
;
|
670
|
-
;
|
671
|
-
; _buf << ((to_boolean(attr 'revealjs_controlstutorial', true)).to_s); _buf << (",\n // Determines where controls appear, \"edges\" or \"bottom-right\"\n controlsLayout: '".freeze);
|
672
|
-
;
|
673
|
-
; _buf << ((attr 'revealjs_controlslayout', 'bottom-right').to_s); _buf << ("',\n // Visibility rule for backwards navigation arrows; \"faded\", \"hidden\"\n // or \"visible\"\n controlsBackArrows: '".freeze);
|
674
|
-
;
|
675
|
-
;
|
676
|
-
; _buf << ((attr 'revealjs_controlsbackarrows', 'faded').to_s); _buf << ("',\n // Display a presentation progress bar\n progress: ".freeze);
|
677
|
-
;
|
678
|
-
; _buf << ((to_boolean(attr 'revealjs_progress', true)).to_s); _buf << (",\n // Display the page number of the current slide\n slideNumber: ".freeze);
|
679
|
-
;
|
680
|
-
; _buf << ((to_valid_slidenumber(attr 'revealjs_slidenumber', false)).to_s); _buf << (",\n // Control which views the slide number displays on\n showSlideNumber: '".freeze);
|
681
|
-
;
|
682
|
-
; _buf << ((attr 'revealjs_showslidenumber', 'all').to_s); _buf << ("',\n // Add the current slide number to the URL hash so that reloading the\n // page/copying the URL will return you to the same slide\n hash: ".freeze);
|
683
|
-
;
|
684
|
-
;
|
685
|
-
; _buf << ((to_boolean(attr 'revealjs_hash', false)).to_s); _buf << (",\n // Push each slide change to the browser history. Implies `hash: true`\n history: ".freeze);
|
686
|
-
;
|
687
|
-
; _buf << ((to_boolean(attr 'revealjs_history', false)).to_s); _buf << (",\n // Enable keyboard shortcuts for navigation\n keyboard: ".freeze);
|
688
|
-
;
|
689
|
-
; _buf << ((to_boolean(attr 'revealjs_keyboard', true)).to_s); _buf << (",\n // Enable the slide overview mode\n overview: ".freeze);
|
690
|
-
;
|
691
|
-
; _buf << ((to_boolean(attr 'revealjs_overview', true)).to_s); _buf << (",\n // Disables the default reveal.js slide layout so that you can use custom CSS layout\n disableLayout: ".freeze);
|
692
|
-
;
|
693
|
-
; _buf << ((to_boolean(attr 'revealjs_disablelayout', false)).to_s); _buf << (",\n // Vertical centering of slides\n center: ".freeze);
|
694
|
-
;
|
695
|
-
; _buf << ((to_boolean(attr 'revealjs_center', true)).to_s); _buf << (",\n // Enables touch navigation on devices with touch input\n touch: ".freeze);
|
696
|
-
;
|
697
|
-
; _buf << ((to_boolean(attr 'revealjs_touch', true)).to_s); _buf << (",\n // Loop the presentation\n loop: ".freeze);
|
698
|
-
;
|
699
|
-
; _buf << ((to_boolean(attr 'revealjs_loop', false)).to_s); _buf << (",\n // Change the presentation direction to be RTL\n rtl: ".freeze);
|
700
|
-
;
|
701
|
-
; _buf << ((to_boolean(attr 'revealjs_rtl', false)).to_s); _buf << (",\n // See https://github.com/hakimel/reveal.js/#navigation-mode\n navigationMode: '".freeze);
|
702
|
-
;
|
703
|
-
; _buf << ((attr 'revealjs_navigationmode', 'default').to_s); _buf << ("',\n // Randomizes the order of slides each time the presentation loads\n shuffle: ".freeze);
|
704
|
-
;
|
705
|
-
; _buf << ((to_boolean(attr 'revealjs_shuffle', false)).to_s); _buf << (",\n // Turns fragments on and off globally\n fragments: ".freeze);
|
706
|
-
;
|
707
|
-
; _buf << ((to_boolean(attr 'revealjs_fragments', true)).to_s); _buf << (",\n // Flags whether to include the current fragment in the URL,\n // so that reloading brings you to the same fragment position\n fragmentInURL: ".freeze);
|
708
|
-
;
|
709
|
-
;
|
710
|
-
; _buf << ((to_boolean(attr 'revealjs_fragmentinurl', false)).to_s); _buf << (",\n // Flags if the presentation is running in an embedded mode,\n // i.e. contained within a limited portion of the screen\n embedded: ".freeze);
|
711
|
-
;
|
712
|
-
;
|
713
|
-
; _buf << ((to_boolean(attr 'revealjs_embedded', false)).to_s); _buf << (",\n // Flags if we should show a help overlay when the questionmark\n // key is pressed\n help: ".freeze);
|
714
|
-
;
|
715
|
-
;
|
716
|
-
; _buf << ((to_boolean(attr 'revealjs_help', true)).to_s); _buf << (",\n // Flags if speaker notes should be visible to all viewers\n showNotes: ".freeze);
|
717
|
-
;
|
718
|
-
; _buf << ((to_boolean(attr 'revealjs_shownotes', false)).to_s); _buf << (",\n // Global override for autolaying embedded media (video/audio/iframe)\n // - null: Media will only autoplay if data-autoplay is present\n // - true: All media will autoplay, regardless of individual setting\n // - false: No media will autoplay, regardless of individual setting\n autoPlayMedia: ".freeze);
|
719
|
-
;
|
720
|
-
;
|
721
|
-
;
|
722
|
-
;
|
723
|
-
; _buf << ((attr 'revealjs_autoplaymedia', 'null').to_s); _buf << (",\n // Global override for preloading lazy-loaded iframes\n // - null: Iframes with data-src AND data-preload will be loaded when within\n // the viewDistance, iframes with only data-src will be loaded when visible\n // - true: All iframes with data-src will be loaded when within the viewDistance\n // - false: All iframes with data-src will be loaded only when visible\n preloadIframes: ".freeze);
|
724
|
-
;
|
725
|
-
;
|
726
|
-
;
|
727
|
-
;
|
728
|
-
;
|
729
|
-
; _buf << ((attr 'revealjs_preloadiframes', 'null').to_s); _buf << (",\n // Number of milliseconds between automatically proceeding to the\n // next slide, disabled when set to 0, this value can be overwritten\n // by using a data-autoslide attribute on your slides\n autoSlide: ".freeze);
|
730
|
-
;
|
731
|
-
;
|
1041
|
+
; titleless = (title = self.title) == '!';
|
1042
|
+
; hide_title = (titleless || (option? :notitle) || (option? :conceal));
|
732
1043
|
;
|
733
|
-
;
|
1044
|
+
; vertical_slides = find_by(context: :section) {|section| section.level == 2 };
|
734
1045
|
;
|
735
|
-
; _buf << ((to_boolean(attr 'revealjs_autoslidestoppable', true)).to_s); _buf << (",\n // Use this method for navigation when auto-sliding\n autoSlideMethod: ".freeze);
|
736
1046
|
;
|
737
|
-
; _buf << ((attr 'revealjs_autoslidemethod', 'Reveal.navigateNext').to_s); _buf << (",\n // Specify the average time in seconds that you think you will spend\n // presenting each slide. This is used to show a pacing timer in the\n // speaker view\n defaultTiming: ".freeze);
|
738
1047
|
;
|
1048
|
+
; data_background_image, data_background_size, data_background_repeat,
|
1049
|
+
data_background_position, data_background_transition = nil;
|
739
1050
|
;
|
740
1051
|
;
|
741
|
-
;
|
1052
|
+
; section_images = blocks.map do |block|;
|
1053
|
+
; if (ctx = block.context) == :image;
|
1054
|
+
; ['background', 'canvas'].include?(block.attributes[1]) ? block : [];
|
1055
|
+
; elsif ctx == :section;
|
1056
|
+
; [];
|
1057
|
+
; else;
|
1058
|
+
; block.find_by(context: :image) {|image| ['background', 'canvas'].include?(image.attributes[1]) } || [];
|
1059
|
+
; end; end; if (bg_image = section_images.flatten.first);
|
1060
|
+
; data_background_image = image_uri(bg_image.attr 'target');
|
742
1061
|
;
|
1062
|
+
; data_background_size = bg_image.attr 'size';
|
1063
|
+
; data_background_repeat = bg_image.attr 'repeat';
|
1064
|
+
; data_background_transition = bg_image.attr 'transition';
|
1065
|
+
; data_background_position = bg_image.attr 'position';
|
743
1066
|
;
|
744
1067
|
;
|
1068
|
+
; end; if attr? 'background-image';
|
1069
|
+
; data_background_image = image_uri(attr 'background-image');
|
745
1070
|
;
|
746
|
-
;
|
1071
|
+
; end; if attr? 'background-video';
|
1072
|
+
; data_background_video = media_uri(attr 'background-video');
|
747
1073
|
;
|
1074
|
+
; end; if attr? 'background-color';
|
1075
|
+
; data_background_color = attr 'background-color';
|
748
1076
|
;
|
1077
|
+
; end; parent_section_with_vertical_slides = @level == 1 && !vertical_slides.empty?;
|
749
1078
|
;
|
1079
|
+
; content_for :footnotes do;
|
1080
|
+
; slide_footnotes = slide_footnotes(self);
|
1081
|
+
; if document.footnotes? && !(parent.attr? 'nofootnotes') && !slide_footnotes.empty?;
|
1082
|
+
; _buf << ("<div class=\"footnotes\">".freeze);
|
1083
|
+
; slide_footnotes.each do |footnote|;
|
1084
|
+
; _buf << ("<div class=\"footnote\">".freeze);
|
1085
|
+
; _buf << (("#{footnote.index}. #{footnote.text}").to_s);
|
750
1086
|
;
|
1087
|
+
; _buf << ("</div>".freeze); end; _buf << ("</div>".freeze); end; end; content_for :section do;
|
751
1088
|
;
|
752
|
-
; _buf << ((attr 'revealjs_minimumtimeperslide', 0).to_s); _buf << (",\n // Enable slide navigation via mouse wheel\n mouseWheel: ".freeze);
|
753
1089
|
;
|
754
|
-
; _buf << ((to_boolean(attr 'revealjs_mousewheel', false)).to_s); _buf << (",\n // Hide cursor if inactive\n hideInactiveCursor: ".freeze);
|
755
1090
|
;
|
756
|
-
; _buf << ((to_boolean(attr 'revealjs_hideinactivecursor', true)).to_s); _buf << (",\n // Time before the cursor is hidden (in ms)\n hideCursorTime: ".freeze);
|
757
1091
|
;
|
758
|
-
; _buf << ((attr 'revealjs_hidecursortime', 5000).to_s); _buf << (",\n // Hides the address bar on mobile devices\n hideAddressBar: ".freeze);
|
759
1092
|
;
|
760
|
-
; _buf << ((to_boolean(attr 'revealjs_hideaddressbar', true)).to_s); _buf << (",\n // Opens links in an iframe preview overlay\n // Add `data-preview-link` and `data-preview-link=\"false\"` to customise each link\n // individually\n previewLinks: ".freeze);
|
761
1093
|
;
|
762
1094
|
;
|
763
1095
|
;
|
764
|
-
; _buf << ((to_boolean(attr 'revealjs_previewlinks', false)).to_s); _buf << (",\n // Transition style (e.g., none, fade, slide, convex, concave, zoom)\n transition: '".freeze);
|
765
1096
|
;
|
766
|
-
; _buf << ((attr 'revealjs_transition', 'slide').to_s); _buf << ("',\n // Transition speed (e.g., default, fast, slow)\n transitionSpeed: '".freeze);
|
767
1097
|
;
|
768
|
-
; _buf << ((attr 'revealjs_transitionspeed', 'default').to_s); _buf << ("',\n // Transition style for full page slide backgrounds (e.g., none, fade, slide, convex, concave, zoom)\n backgroundTransition: '".freeze);
|
769
1098
|
;
|
770
|
-
; _buf << ((attr 'revealjs_backgroundtransition', 'fade').to_s); _buf << ("',\n // Number of slides away from the current that are visible\n viewDistance: ".freeze);
|
771
1099
|
;
|
772
|
-
; _buf << ((attr 'revealjs_viewdistance', 3).to_s); _buf << (",\n // Number of slides away from the current that are visible on mobile\n // devices. It is advisable to set this to a lower number than\n // viewDistance in order to save resources.\n mobileViewDistance: ".freeze);
|
773
1100
|
;
|
774
1101
|
;
|
775
1102
|
;
|
776
|
-
; _buf << ((attr 'revealjs_mobileviewdistance', 3).to_s); _buf << (",\n // Parallax background image (e.g., \"'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'\")\n parallaxBackgroundImage: '".freeze);
|
777
1103
|
;
|
778
|
-
; _buf << ((attr 'revealjs_parallaxbackgroundimage', '').to_s); _buf << ("',\n // Parallax background size in CSS syntax (e.g., \"2100px 900px\")\n parallaxBackgroundSize: '".freeze);
|
779
1104
|
;
|
780
|
-
; _buf << ((attr 'revealjs_parallaxbackgroundsize', '').to_s); _buf << ("',\n // Number of pixels to move the parallax background per slide\n // - Calculated automatically unless specified\n // - Set to 0 to disable movement along an axis\n parallaxBackgroundHorizontal: ".freeze);
|
781
1105
|
;
|
782
1106
|
;
|
783
1107
|
;
|
784
|
-
; _buf << ((attr 'revealjs_parallaxbackgroundhorizontal', 'null').to_s); _buf << (",\n parallaxBackgroundVertical: ".freeze);
|
785
|
-
; _buf << ((attr 'revealjs_parallaxbackgroundvertical', 'null').to_s); _buf << (",\n // The display mode that will be used to show slides\n display: '".freeze);
|
786
1108
|
;
|
787
|
-
; _buf << ((attr 'revealjs_display', 'block').to_s); _buf << ("',\n\n // The \"normal\" size of the presentation, aspect ratio will be preserved\n // when the presentation is scaled to fit different resolutions. Can be\n // specified using percentage units.\n width: ".freeze);
|
788
1109
|
;
|
1110
|
+
; _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);
|
1111
|
+
; unless hide_title;
|
1112
|
+
; _buf << ("<h2>".freeze); _buf << ((section_title).to_s);
|
1113
|
+
; _buf << ("</h2>".freeze); end; if parent_section_with_vertical_slides;
|
1114
|
+
; unless (_blocks = blocks - vertical_slides).empty?;
|
1115
|
+
; _buf << ("<div class=\"slide-content\">".freeze);
|
1116
|
+
; _blocks.each do |block|;
|
1117
|
+
; _buf << ((block.convert).to_s);
|
1118
|
+
; end; _buf << ("</div>".freeze); end; yield_content :footnotes;
|
789
1119
|
;
|
1120
|
+
; else;
|
1121
|
+
; unless (_content = content.chomp).empty?;
|
1122
|
+
; _buf << ("<div class=\"slide-content\">".freeze);
|
1123
|
+
; _buf << ((_content).to_s);
|
1124
|
+
; _buf << ("</div>".freeze); end; yield_content :footnotes;
|
790
1125
|
;
|
1126
|
+
; end; clear_slide_footnotes;
|
791
1127
|
;
|
792
|
-
; _buf << (
|
793
|
-
; _buf << ((attr 'revealjs_height', 700).to_s); _buf << (",\n\n // Factor of the display size that should remain empty around the content\n margin: ".freeze);
|
1128
|
+
; _buf << ("</section>".freeze);
|
794
1129
|
;
|
1130
|
+
; end; if parent_section_with_vertical_slides;
|
1131
|
+
; _buf << ("<section>".freeze);
|
1132
|
+
; yield_content :section;
|
1133
|
+
; vertical_slides.each do |subsection|;
|
1134
|
+
; _buf << ((subsection.convert).to_s);
|
795
1135
|
;
|
796
|
-
;
|
1136
|
+
; end; _buf << ("</section>".freeze);
|
1137
|
+
; else;
|
1138
|
+
; if @level >= 3;
|
797
1139
|
;
|
1140
|
+
; _slim_htag_filter1 = ((@level)).to_s; _buf << ("<h".freeze); _buf << ((_slim_htag_filter1).to_s); _buf << (">".freeze); _buf << ((title).to_s);
|
1141
|
+
; _buf << ("</h".freeze); _buf << ((_slim_htag_filter1).to_s); _buf << (">".freeze); _buf << ((content.chomp).to_s);
|
1142
|
+
; else;
|
1143
|
+
; yield_content :section;
|
1144
|
+
; end; end; _buf
|
1145
|
+
end
|
1146
|
+
end
|
1147
|
+
|
1148
|
+
def inline_button(node, opts = {})
|
1149
|
+
node.extend(Helpers)
|
1150
|
+
node.instance_eval do
|
1151
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1152
|
+
_buf = ''; _slim_controls1 = html_tag('b', { :class => ['button'] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1153
|
+
; _slim_controls2 << ((@text).to_s);
|
1154
|
+
; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1155
|
+
end
|
1156
|
+
end
|
1157
|
+
|
1158
|
+
def table(node, opts = {})
|
1159
|
+
node.extend(Helpers)
|
1160
|
+
node.instance_eval do
|
1161
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1162
|
+
_buf = ''; classes = ['tableblock', "frame-#{attr :frame, 'all'}", "grid-#{attr :grid, 'all'}", role, ('fragment' if (option? :step) || (attr? 'step'))];
|
1163
|
+
; styles = [("width:#{attr :tablepcwidth}%" unless option? 'autowidth'), ("float:#{attr :float}" if attr? :float)].compact.join('; ');
|
1164
|
+
; _slim_controls1 = html_tag('table', { :id => @id, :class => classes, :style => styles }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1165
|
+
; if title?;
|
1166
|
+
; _slim_controls2 << ("<caption class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
|
1167
|
+
; _slim_controls2 << ("</caption>".freeze); end; unless (attr :rowcount).zero?;
|
1168
|
+
; _slim_controls2 << ("<colgroup>".freeze);
|
1169
|
+
; if option? 'autowidth';
|
1170
|
+
; @columns.each do;
|
1171
|
+
; _slim_controls2 << ("<col>".freeze);
|
1172
|
+
; end; else;
|
1173
|
+
; @columns.each do |col|;
|
1174
|
+
; _slim_controls2 << ("<col style=\"width:".freeze); _slim_controls2 << ((col.attr :colpcwidth).to_s); _slim_controls2 << ("%\">".freeze);
|
1175
|
+
; end; end; _slim_controls2 << ("</colgroup>".freeze); [:head, :foot, :body].select {|tblsec| !@rows[tblsec].empty? }.each do |tblsec|;
|
798
1176
|
;
|
799
|
-
;
|
800
|
-
;
|
1177
|
+
; _slim_controls2 << ("<t".freeze); _slim_controls2 << ((tblsec).to_s); _slim_controls2 << (">".freeze);
|
1178
|
+
; @rows[tblsec].each do |row|;
|
1179
|
+
; _slim_controls2 << ("<tr>".freeze);
|
1180
|
+
; row.each do |cell|;
|
801
1181
|
;
|
1182
|
+
; if tblsec == :head;
|
1183
|
+
; cell_content = cell.text;
|
1184
|
+
; else;
|
1185
|
+
; case cell.style;
|
1186
|
+
; when :literal;
|
1187
|
+
; cell_content = cell.text;
|
1188
|
+
; else;
|
1189
|
+
; cell_content = cell.content;
|
1190
|
+
; end; end; _slim_controls3 = html_tag(tblsec == :head || cell.style == :header ? 'th' : 'td',
|
1191
|
+
:class=>['tableblock', "halign-#{cell.attr :halign}", "valign-#{cell.attr :valign}"],
|
1192
|
+
:colspan=>cell.colspan, :rowspan=>cell.rowspan,
|
1193
|
+
:style=>((@document.attr? :cellbgcolor) ? %(background-color:#{@document.attr :cellbgcolor};) : nil)) do; _slim_controls4 = '';
|
1194
|
+
; if tblsec == :head;
|
1195
|
+
; _slim_controls4 << ((cell_content).to_s);
|
1196
|
+
; else;
|
1197
|
+
; case cell.style;
|
1198
|
+
; when :asciidoc;
|
1199
|
+
; _slim_controls4 << ("<div>".freeze); _slim_controls4 << ((cell_content).to_s);
|
1200
|
+
; _slim_controls4 << ("</div>".freeze); when :literal;
|
1201
|
+
; _slim_controls4 << ("<div class=\"literal\"><pre>".freeze); _slim_controls4 << ((cell_content).to_s);
|
1202
|
+
; _slim_controls4 << ("</pre></div>".freeze); when :header;
|
1203
|
+
; cell_content.each do |text|;
|
1204
|
+
; _slim_controls4 << ("<p class=\"tableblock header\">".freeze); _slim_controls4 << ((text).to_s);
|
1205
|
+
; _slim_controls4 << ("</p>".freeze); end; else;
|
1206
|
+
; cell_content.each do |text|;
|
1207
|
+
; _slim_controls4 << ("<p class=\"tableblock\">".freeze); _slim_controls4 << ((text).to_s);
|
1208
|
+
; _slim_controls4 << ("</p>".freeze); end; end; end; _slim_controls4; end; _slim_controls2 << ((_slim_controls3).to_s); end; _slim_controls2 << ("</tr>".freeze); end; end; end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1209
|
+
end
|
1210
|
+
end
|
1211
|
+
|
1212
|
+
def document(node, opts = {})
|
1213
|
+
node.extend(Helpers)
|
1214
|
+
node.instance_eval do
|
1215
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1216
|
+
_buf = ''; slides_content = self.content;
|
1217
|
+
; content_for :slides do;
|
1218
|
+
; unless noheader;
|
1219
|
+
; unless (header_docinfo = docinfo :header, '-revealjs.html').empty?;
|
1220
|
+
; _buf << ((header_docinfo).to_s);
|
1221
|
+
; end; if header?;
|
1222
|
+
; bg_image = (attr? 'title-slide-background-image') ? (image_uri(attr 'title-slide-background-image')) : nil;
|
1223
|
+
; bg_video = (attr? 'title-slide-background-video') ? (media_uri(attr 'title-slide-background-video')) : nil;
|
802
1224
|
;
|
803
1225
|
;
|
804
|
-
; _buf << ((to_boolean(attr 'revealjs_pdfseparatefragments', true)).to_s); _buf << (",\n // For slides that do not fit on a page, max number of pages\n pdfMaxPagesPerSlide: ".freeze);
|
805
1226
|
;
|
806
|
-
; _buf << ((attr 'revealjs_pdfmaxpagesperslide', 1).to_s); _buf << (",\n\n // Optional libraries used to extend on reveal.js\n dependencies: [\n ".freeze);
|
807
1227
|
;
|
808
1228
|
;
|
809
1229
|
;
|
810
|
-
; _buf << ((revealjs_dependencies(document, self, revealjsdir)).to_s);
|
811
|
-
; _buf << ("\n ],\n\n ".freeze);
|
812
1230
|
;
|
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
1231
|
;
|
816
1232
|
;
|
817
1233
|
;
|
@@ -820,22 +1236,83 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
820
1236
|
;
|
821
1237
|
;
|
822
1238
|
;
|
1239
|
+
; _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);
|
1240
|
+
; if (_title_obj = doctitle partition: true, use_fallback: true).subtitle?;
|
1241
|
+
; _buf << ("<h1>".freeze); _buf << ((slice_text _title_obj.title, (_slice = header.option? :slice)).to_s);
|
1242
|
+
; _buf << ("</h1><h2>".freeze); _buf << ((slice_text _title_obj.subtitle, _slice).to_s);
|
1243
|
+
; _buf << ("</h2>".freeze); else;
|
1244
|
+
; _buf << ("<h1>".freeze); _buf << ((@header.title).to_s);
|
1245
|
+
; _buf << ("</h1>".freeze); end; preamble = @document.find_by context: :preamble;
|
1246
|
+
; unless preamble.nil? or preamble.length == 0;
|
1247
|
+
; _buf << ("<div class=\"preamble\">".freeze); _buf << ((preamble.pop.content).to_s);
|
1248
|
+
; _buf << ("</div>".freeze); end; _buf << ((generate_authors(@document)).to_s);
|
1249
|
+
; _buf << ("</section>".freeze);
|
1250
|
+
; end; end; _buf << ((slides_content).to_s);
|
1251
|
+
; unless (footer_docinfo = docinfo :footer, '-revealjs.html').empty?;
|
1252
|
+
; _buf << ((footer_docinfo).to_s);
|
823
1253
|
;
|
1254
|
+
; end; end; _buf << ("<!DOCTYPE html><html".freeze);
|
1255
|
+
; _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);
|
824
1256
|
;
|
825
1257
|
;
|
826
1258
|
;
|
827
1259
|
;
|
1260
|
+
; _buf << (((doctitle sanitize: true, use_fallback: true)).to_s);
|
828
1261
|
;
|
1262
|
+
; _buf << ("</title>".freeze); if RUBY_ENGINE == 'opal' && JAVASCRIPT_PLATFORM == 'node';
|
1263
|
+
; revealjsdir = (attr :revealjsdir, 'node_modules/reveal.js');
|
1264
|
+
; else;
|
1265
|
+
; revealjsdir = (attr :revealjsdir, 'reveal.js');
|
1266
|
+
; end; unless (asset_uri_scheme = (attr 'asset-uri-scheme', 'https')).empty?;
|
1267
|
+
; asset_uri_scheme = %(#{asset_uri_scheme}:);
|
1268
|
+
; end; cdn_base = %(#{asset_uri_scheme}//cdnjs.cloudflare.com/ajax/libs);
|
1269
|
+
; [:description, :keywords, :author, :copyright].each do |key|;
|
1270
|
+
; if attr? key;
|
1271
|
+
; _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);
|
1272
|
+
; end; end; if attr? 'favicon';
|
1273
|
+
; if (icon_href = attr 'favicon').empty?;
|
1274
|
+
; icon_href = 'favicon.ico';
|
1275
|
+
; icon_type = 'image/x-icon';
|
1276
|
+
; elsif (icon_ext = File.extname icon_href);
|
1277
|
+
; icon_type = icon_ext == '.ico' ? 'image/x-icon' : %(image/#{icon_ext.slice 1, icon_ext.length});
|
1278
|
+
; else;
|
1279
|
+
; icon_type = 'image/x-icon';
|
1280
|
+
; end; _buf << ("<link rel=\"icon\" type=\"".freeze); _buf << ((icon_type).to_s); _buf << ("\" href=\"".freeze); _buf << ((icon_href).to_s); _buf << ("\">".freeze);
|
1281
|
+
; end; linkcss = (attr? 'linkcss');
|
1282
|
+
; _buf << ("<link rel=\"stylesheet\" href=\"".freeze); _buf << ((revealjsdir).to_s); _buf << ("/dist/reset.css\"><link rel=\"stylesheet\" href=\"".freeze);
|
1283
|
+
; _buf << ((revealjsdir).to_s); _buf << ("/dist/reveal.css\"><link rel=\"stylesheet\"".freeze);
|
829
1284
|
;
|
830
1285
|
;
|
1286
|
+
; _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);
|
831
1287
|
;
|
832
1288
|
;
|
833
1289
|
;
|
1290
|
+
; if attr? :icons, 'font';
|
834
1291
|
;
|
1292
|
+
; if attr? 'iconfont-remote';
|
1293
|
+
; if (iconfont_cdn = (attr 'iconfont-cdn'));
|
1294
|
+
; _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);
|
1295
|
+
; else;
|
835
1296
|
;
|
1297
|
+
; font_awesome_version = (attr 'font-awesome-version', '5.15.1');
|
1298
|
+
; _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);
|
1299
|
+
; _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);
|
1300
|
+
; end; else;
|
1301
|
+
; _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);
|
1302
|
+
; end; end; _buf << ((generate_stem(cdn_base)).to_s);
|
1303
|
+
; syntax_hl = self.syntax_highlighter;
|
1304
|
+
; if syntax_hl && (syntax_hl.docinfo? :head);
|
1305
|
+
; _buf << ((syntax_hl.docinfo :head, self, cdn_base_url: cdn_base, linkcss: linkcss, self_closing_tag_slash: '/').to_s);
|
1306
|
+
; end; if attr? :customcss;
|
1307
|
+
; _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);
|
1308
|
+
; end; unless (_docinfo = docinfo :head, '-revealjs.html').empty?;
|
1309
|
+
; _buf << ((_docinfo).to_s);
|
1310
|
+
; end; _buf << ("</head><body><div class=\"reveal\"><div class=\"slides\">".freeze);
|
836
1311
|
;
|
837
1312
|
;
|
838
1313
|
;
|
1314
|
+
; yield_content :slides;
|
1315
|
+
; _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);
|
839
1316
|
;
|
840
1317
|
;
|
841
1318
|
;
|
@@ -854,327 +1331,153 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
854
1331
|
;
|
855
1332
|
;
|
856
1333
|
;
|
1334
|
+
; _buf << ((to_boolean(attr 'revealjs_controls', true)).to_s); _buf << (",\n // Help the user learn the controls by providing hints, for example by\n // bouncing the down arrow when they first encounter a vertical slide\n controlsTutorial: ".freeze);
|
857
1335
|
;
|
858
1336
|
;
|
1337
|
+
; _buf << ((to_boolean(attr 'revealjs_controlstutorial', true)).to_s); _buf << (",\n // Determines where controls appear, \"edges\" or \"bottom-right\"\n controlsLayout: '".freeze);
|
859
1338
|
;
|
1339
|
+
; _buf << ((attr 'revealjs_controlslayout', 'bottom-right').to_s); _buf << ("',\n // Visibility rule for backwards navigation arrows; \"faded\", \"hidden\"\n // or \"visible\"\n controlsBackArrows: '".freeze);
|
860
1340
|
;
|
861
1341
|
;
|
1342
|
+
; _buf << ((attr 'revealjs_controlsbackarrows', 'faded').to_s); _buf << ("',\n // Display a presentation progress bar\n progress: ".freeze);
|
862
1343
|
;
|
1344
|
+
; _buf << ((to_boolean(attr 'revealjs_progress', true)).to_s); _buf << (",\n // Display the page number of the current slide\n slideNumber: ".freeze);
|
863
1345
|
;
|
1346
|
+
; _buf << ((to_valid_slidenumber(attr 'revealjs_slidenumber', false)).to_s); _buf << (",\n // Control which views the slide number displays on\n showSlideNumber: '".freeze);
|
864
1347
|
;
|
1348
|
+
; _buf << ((attr 'revealjs_showslidenumber', 'all').to_s); _buf << ("',\n // Add the current slide number to the URL hash so that reloading the\n // page/copying the URL will return you to the same slide\n hash: ".freeze);
|
865
1349
|
;
|
866
1350
|
;
|
1351
|
+
; _buf << ((to_boolean(attr 'revealjs_hash', false)).to_s); _buf << (",\n // Push each slide change to the browser history. Implies `hash: true`\n history: ".freeze);
|
867
1352
|
;
|
1353
|
+
; _buf << ((to_boolean(attr 'revealjs_history', false)).to_s); _buf << (",\n // Enable keyboard shortcuts for navigation\n keyboard: ".freeze);
|
868
1354
|
;
|
1355
|
+
; _buf << ((to_boolean(attr 'revealjs_keyboard', true)).to_s); _buf << (",\n // Enable the slide overview mode\n overview: ".freeze);
|
869
1356
|
;
|
1357
|
+
; _buf << ((to_boolean(attr 'revealjs_overview', true)).to_s); _buf << (",\n // Disables the default reveal.js slide layout so that you can use custom CSS layout\n disableLayout: ".freeze);
|
870
1358
|
;
|
1359
|
+
; _buf << ((to_boolean(attr 'revealjs_disablelayout', false)).to_s); _buf << (",\n // Vertical centering of slides\n center: ".freeze);
|
871
1360
|
;
|
1361
|
+
; _buf << ((to_boolean(attr 'revealjs_center', true)).to_s); _buf << (",\n // Enables touch navigation on devices with touch input\n touch: ".freeze);
|
872
1362
|
;
|
1363
|
+
; _buf << ((to_boolean(attr 'revealjs_touch', true)).to_s); _buf << (",\n // Loop the presentation\n loop: ".freeze);
|
873
1364
|
;
|
1365
|
+
; _buf << ((to_boolean(attr 'revealjs_loop', false)).to_s); _buf << (",\n // Change the presentation direction to be RTL\n rtl: ".freeze);
|
874
1366
|
;
|
875
|
-
; _buf << ((attr '
|
1367
|
+
; _buf << ((to_boolean(attr 'revealjs_rtl', false)).to_s); _buf << (",\n // See https://github.com/hakimel/reveal.js/#navigation-mode\n navigationMode: '".freeze);
|
876
1368
|
;
|
1369
|
+
; _buf << ((attr 'revealjs_navigationmode', 'default').to_s); _buf << ("',\n // Randomizes the order of slides each time the presentation loads\n shuffle: ".freeze);
|
877
1370
|
;
|
878
|
-
; _buf << ((attr '
|
1371
|
+
; _buf << ((to_boolean(attr 'revealjs_shuffle', false)).to_s); _buf << (",\n // Turns fragments on and off globally\n fragments: ".freeze);
|
879
1372
|
;
|
1373
|
+
; _buf << ((to_boolean(attr 'revealjs_fragments', true)).to_s); _buf << (",\n // Flags whether to include the current fragment in the URL,\n // so that reloading brings you to the same fragment position\n fragmentInURL: ".freeze);
|
880
1374
|
;
|
881
|
-
; _buf << ((attr 'revealjs_width', 960).to_s); _buf << (", ".freeze); _buf << ((attr 'revealjs_height', 700).to_s); _buf << (")\n});</script>".freeze);
|
882
1375
|
;
|
1376
|
+
; _buf << ((to_boolean(attr 'revealjs_fragmentinurl', false)).to_s); _buf << (",\n // Flags if the presentation is running in an embedded mode,\n // i.e. contained within a limited portion of the screen\n embedded: ".freeze);
|
883
1377
|
;
|
884
|
-
; if syntax_hl && (syntax_hl.docinfo? :footer);
|
885
|
-
; _buf << ((syntax_hl.docinfo :footer, self, cdn_base_url: cdn_base, linkcss: linkcss, self_closing_tag_slash: '/').to_s);
|
886
1378
|
;
|
887
|
-
;
|
888
|
-
; _buf << ((docinfo_content).to_s);
|
889
|
-
; end; _buf << ("</body></html>".freeze); _buf
|
890
|
-
end
|
891
|
-
end
|
892
|
-
|
893
|
-
def thematic_break(node, opts = {})
|
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 = {})
|
903
|
-
node.extend(Helpers)
|
904
|
-
node.instance_eval do
|
905
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
906
|
-
_buf = ''; quote_tags = { emphasis: 'em', strong: 'strong', monospaced: 'code', superscript: 'sup', subscript: 'sup' };
|
907
|
-
; if (quote_tag = quote_tags[@type]);
|
908
|
-
; _buf << ((html_tag(quote_tag, { :id => @id, :class => [role, ('fragment' if (option? :step) || (attr? 'step'))].compact }.merge(data_attrs(@attributes)), @text)).to_s);
|
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);
|
918
|
-
; else;
|
919
|
-
; _buf << ((inline_text_container(@text)).to_s);
|
920
|
-
; end; end; _buf
|
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 = '';
|
1379
|
+
; _buf << ((to_boolean(attr 'revealjs_embedded', false)).to_s); _buf << (",\n // Flags if we should show a help overlay when the questionmark\n // key is pressed\n help: ".freeze);
|
967
1380
|
;
|
968
|
-
; no_stretch = ((attr? :width) || (attr? :height));
|
969
|
-
; width = (attr? :width) ? (attr :width) : "100%";
|
970
|
-
; height = (attr? :height) ? (attr :height) : "100%";
|
971
1381
|
;
|
972
|
-
;
|
973
|
-
; if title?;
|
974
|
-
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
|
975
|
-
; _slim_controls2 << ("</div>".freeze); end; case attr :poster;
|
976
|
-
; when 'vimeo';
|
977
|
-
; unless (asset_uri_scheme = (attr :asset_uri_scheme, 'https')).empty?;
|
978
|
-
; asset_uri_scheme = %(#{asset_uri_scheme}:);
|
979
|
-
; end; start_anchor = (attr? :start) ? "#at=#{attr :start}" : nil;
|
980
|
-
; delimiter = ['?'];
|
981
|
-
; loop_param = (option? 'loop') ? %(#{delimiter.pop || '&'}loop=1) : '';
|
982
|
-
; muted_param = (option? 'muted') ? %(#{delimiter.pop || '&'}muted=1) : '';
|
983
|
-
; src = %(#{asset_uri_scheme}//player.vimeo.com/video/#{attr :target}#{loop_param}#{muted_param}#{start_anchor});
|
1382
|
+
; _buf << ((to_boolean(attr 'revealjs_help', true)).to_s); _buf << (",\n // Flags if speaker notes should be visible to all viewers\n showNotes: ".freeze);
|
984
1383
|
;
|
1384
|
+
; _buf << ((to_boolean(attr 'revealjs_shownotes', false)).to_s); _buf << (",\n // Global override for autolaying embedded media (video/audio/iframe)\n // - null: Media will only autoplay if data-autoplay is present\n // - true: All media will autoplay, regardless of individual setting\n // - false: No media will autoplay, regardless of individual setting\n autoPlayMedia: ".freeze);
|
985
1385
|
;
|
986
1386
|
;
|
987
1387
|
;
|
988
1388
|
;
|
989
|
-
;
|
990
|
-
; when 'youtube';
|
991
|
-
; unless (asset_uri_scheme = (attr :asset_uri_scheme, 'https')).empty?;
|
992
|
-
; asset_uri_scheme = %(#{asset_uri_scheme}:);
|
993
|
-
; end; params = ['rel=0'];
|
994
|
-
; params << "start=#{attr :start}" if attr? :start;
|
995
|
-
; params << "end=#{attr :end}" if attr? :end;
|
996
|
-
; params << "loop=1" if option? 'loop';
|
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 * '&'});
|
1389
|
+
; _buf << ((attr 'revealjs_autoplaymedia', 'null').to_s); _buf << (",\n // Global override for preloading lazy-loaded iframes\n // - null: Iframes with data-src AND data-preload will be loaded when within\n // the viewDistance, iframes with only data-src will be loaded when visible\n // - true: All iframes with data-src will be loaded when within the viewDistance\n // - false: All iframes with data-src will be loaded only when visible\n preloadIframes: ".freeze);
|
1000
1390
|
;
|
1001
1391
|
;
|
1002
1392
|
;
|
1003
1393
|
;
|
1004
1394
|
;
|
1005
|
-
;
|
1006
|
-
; else;
|
1395
|
+
; _buf << ((attr 'revealjs_preloadiframes', 'null').to_s); _buf << (",\n // Number of milliseconds between automatically proceeding to the\n // next slide, disabled when set to 0, this value can be overwritten\n // by using a data-autoslide attribute on your slides\n autoSlide: ".freeze);
|
1007
1396
|
;
|
1008
1397
|
;
|
1009
1398
|
;
|
1010
|
-
;
|
1399
|
+
; _buf << ((attr 'revealjs_autoslide', 0).to_s); _buf << (",\n // Stop auto-sliding after user input\n autoSlideStoppable: ".freeze);
|
1011
1400
|
;
|
1012
|
-
;
|
1013
|
-
end
|
1014
|
-
end
|
1015
|
-
|
1016
|
-
def dlist(node, opts = {})
|
1017
|
-
node.extend(Helpers)
|
1018
|
-
node.instance_eval do
|
1019
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
1020
|
-
_buf = ''; case @style;
|
1021
|
-
; when 'qanda';
|
1022
|
-
; _slim_controls1 = html_tag('div', { :id => @id, :class => ['qlist', @style, role] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1023
|
-
; if title?;
|
1024
|
-
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
1025
|
-
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<ol>".freeze);
|
1026
|
-
; items.each do |questions, answer|;
|
1027
|
-
; _slim_controls2 << ("<li>".freeze);
|
1028
|
-
; [*questions].each do |question|;
|
1029
|
-
; _slim_controls2 << ("<p><em>".freeze); _slim_controls2 << ((question.text).to_s);
|
1030
|
-
; _slim_controls2 << ("</em></p>".freeze); end; unless answer.nil?;
|
1031
|
-
; if answer.text?;
|
1032
|
-
; _slim_controls2 << ("<p>".freeze); _slim_controls2 << ((answer.text).to_s);
|
1033
|
-
; _slim_controls2 << ("</p>".freeze); end; if answer.blocks?;
|
1034
|
-
; _slim_controls2 << ((answer.content).to_s);
|
1035
|
-
; end; end; _slim_controls2 << ("</li>".freeze); end; _slim_controls2 << ("</ol>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); when 'horizontal';
|
1036
|
-
; _slim_controls3 = html_tag('div', { :id => @id, :class => ['hdlist', role] }.merge(data_attrs(@attributes))) do; _slim_controls4 = '';
|
1037
|
-
; if title?;
|
1038
|
-
; _slim_controls4 << ("<div class=\"title\">".freeze); _slim_controls4 << ((title).to_s);
|
1039
|
-
; _slim_controls4 << ("</div>".freeze); end; _slim_controls4 << ("<table>".freeze);
|
1040
|
-
; if (attr? :labelwidth) || (attr? :itemwidth);
|
1041
|
-
; _slim_controls4 << ("<colgroup><col".freeze);
|
1042
|
-
; _slim_codeattributes1 = ((attr? :labelwidth) ? %(width:#{(attr :labelwidth).chomp '%'}%;) : nil); if _slim_codeattributes1; if _slim_codeattributes1 == true; _slim_controls4 << (" style".freeze); else; _slim_controls4 << (" style=\"".freeze); _slim_controls4 << ((_slim_codeattributes1).to_s); _slim_controls4 << ("\"".freeze); end; end; _slim_controls4 << ("><col".freeze);
|
1043
|
-
; _slim_codeattributes2 = ((attr? :itemwidth) ? %(width:#{(attr :itemwidth).chomp '%'}%;) : nil); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls4 << (" style".freeze); else; _slim_controls4 << (" style=\"".freeze); _slim_controls4 << ((_slim_codeattributes2).to_s); _slim_controls4 << ("\"".freeze); end; end; _slim_controls4 << ("></colgroup>".freeze);
|
1044
|
-
; end; items.each do |terms, dd|;
|
1045
|
-
; _slim_controls4 << ("<tr><td".freeze);
|
1046
|
-
; _temple_html_attributeremover1 = ''; _slim_codeattributes3 = ['hdlist1',('strong' if option? 'strong')]; if Array === _slim_codeattributes3; _slim_codeattributes3 = _slim_codeattributes3.flatten; _slim_codeattributes3.map!(&:to_s); _slim_codeattributes3.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes3.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes3).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _slim_controls4 << (" class=\"".freeze); _slim_controls4 << ((_temple_html_attributeremover1).to_s); _slim_controls4 << ("\"".freeze); end; _slim_controls4 << (">".freeze);
|
1047
|
-
; terms = [*terms];
|
1048
|
-
; last_term = terms.last;
|
1049
|
-
; terms.each do |dt|;
|
1050
|
-
; _slim_controls4 << ((dt.text).to_s);
|
1051
|
-
; if dt != last_term;
|
1052
|
-
; _slim_controls4 << ("<br>".freeze);
|
1053
|
-
; end; end; _slim_controls4 << ("</td><td class=\"hdlist2\">".freeze);
|
1054
|
-
; unless dd.nil?;
|
1055
|
-
; if dd.text?;
|
1056
|
-
; _slim_controls4 << ("<p>".freeze); _slim_controls4 << ((dd.text).to_s);
|
1057
|
-
; _slim_controls4 << ("</p>".freeze); end; if dd.blocks?;
|
1058
|
-
; _slim_controls4 << ((dd.content).to_s);
|
1059
|
-
; end; end; _slim_controls4 << ("</td></tr>".freeze); end; _slim_controls4 << ("</table>".freeze); _slim_controls4; end; _buf << ((_slim_controls3).to_s); else;
|
1060
|
-
; _slim_controls5 = html_tag('div', { :id => @id, :class => ['dlist', @style, role] }.merge(data_attrs(@attributes))) do; _slim_controls6 = '';
|
1061
|
-
; if title?;
|
1062
|
-
; _slim_controls6 << ("<div class=\"title\">".freeze); _slim_controls6 << ((title).to_s);
|
1063
|
-
; _slim_controls6 << ("</div>".freeze); end; _slim_controls6 << ("<dl>".freeze);
|
1064
|
-
; items.each do |terms, dd|;
|
1065
|
-
; [*terms].each do |dt|;
|
1066
|
-
; _slim_controls6 << ("<dt".freeze); _temple_html_attributeremover2 = ''; _slim_codeattributes4 = ('hdlist1' unless @style); if Array === _slim_codeattributes4; _slim_codeattributes4 = _slim_codeattributes4.flatten; _slim_codeattributes4.map!(&:to_s); _slim_codeattributes4.reject!(&:empty?); _temple_html_attributeremover2 << ((_slim_codeattributes4.join(" ")).to_s); else; _temple_html_attributeremover2 << ((_slim_codeattributes4).to_s); end; _temple_html_attributeremover2; if !_temple_html_attributeremover2.empty?; _slim_controls6 << (" class=\"".freeze); _slim_controls6 << ((_temple_html_attributeremover2).to_s); _slim_controls6 << ("\"".freeze); end; _slim_controls6 << (">".freeze); _slim_controls6 << ((dt.text).to_s);
|
1067
|
-
; _slim_controls6 << ("</dt>".freeze); end; unless dd.nil?;
|
1068
|
-
; _slim_controls6 << ("<dd>".freeze);
|
1069
|
-
; if dd.text?;
|
1070
|
-
; _slim_controls6 << ("<p>".freeze); _slim_controls6 << ((dd.text).to_s);
|
1071
|
-
; _slim_controls6 << ("</p>".freeze); end; if dd.blocks?;
|
1072
|
-
; _slim_controls6 << ((dd.content).to_s);
|
1073
|
-
; end; _slim_controls6 << ("</dd>".freeze); end; end; _slim_controls6 << ("</dl>".freeze); _slim_controls6; end; _buf << ((_slim_controls5).to_s); end; _buf
|
1074
|
-
end
|
1075
|
-
end
|
1076
|
-
|
1077
|
-
def pass(node, opts = {})
|
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 = {})
|
1087
|
-
node.extend(Helpers)
|
1088
|
-
node.instance_eval do
|
1089
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
1090
|
-
_buf = ''; bg_image = (attr? 'title-slide-background-image') ? (image_uri(attr 'title-slide-background-image')) : nil;
|
1091
|
-
; bg_video = (attr? 'title-slide-background-video') ? (media_uri(attr 'title-slide-background-video')) : nil;
|
1401
|
+
; _buf << ((to_boolean(attr 'revealjs_autoslidestoppable', true)).to_s); _buf << (",\n // Use this method for navigation when auto-sliding\n autoSlideMethod: ".freeze);
|
1092
1402
|
;
|
1403
|
+
; _buf << ((attr 'revealjs_autoslidemethod', 'Reveal.navigateNext').to_s); _buf << (",\n // Specify the average time in seconds that you think you will spend\n // presenting each slide. This is used to show a pacing timer in the\n // speaker view\n defaultTiming: ".freeze);
|
1093
1404
|
;
|
1094
1405
|
;
|
1095
1406
|
;
|
1407
|
+
; _buf << ((attr 'revealjs_defaulttiming', 120).to_s); _buf << (",\n // Specify the total time in seconds that is available to\n // present. If this is set to a nonzero value, the pacing\n // timer will work out the time available for each slide,\n // instead of using the defaultTiming value\n totalTime: ".freeze);
|
1096
1408
|
;
|
1097
1409
|
;
|
1098
1410
|
;
|
1099
1411
|
;
|
1412
|
+
; _buf << ((attr 'revealjs_totaltime', 0).to_s); _buf << (",\n // Specify the minimum amount of time you want to allot to\n // each slide, if using the totalTime calculation method. If\n // the automated time allocation causes slide pacing to fall\n // below this threshold, then you will see an alert in the\n // speaker notes window\n minimumTimePerSlide: ".freeze);
|
1100
1413
|
;
|
1101
1414
|
;
|
1102
1415
|
;
|
1103
1416
|
;
|
1104
1417
|
;
|
1418
|
+
; _buf << ((attr 'revealjs_minimumtimeperslide', 0).to_s); _buf << (",\n // Enable slide navigation via mouse wheel\n mouseWheel: ".freeze);
|
1419
|
+
;
|
1420
|
+
; _buf << ((to_boolean(attr 'revealjs_mousewheel', false)).to_s); _buf << (",\n // Hide cursor if inactive\n hideInactiveCursor: ".freeze);
|
1421
|
+
;
|
1422
|
+
; _buf << ((to_boolean(attr 'revealjs_hideinactivecursor', true)).to_s); _buf << (",\n // Time before the cursor is hidden (in ms)\n hideCursorTime: ".freeze);
|
1423
|
+
;
|
1424
|
+
; _buf << ((attr 'revealjs_hidecursortime', 5000).to_s); _buf << (",\n // Hides the address bar on mobile devices\n hideAddressBar: ".freeze);
|
1425
|
+
;
|
1426
|
+
; _buf << ((to_boolean(attr 'revealjs_hideaddressbar', true)).to_s); _buf << (",\n // Opens links in an iframe preview overlay\n // Add `data-preview-link` and `data-preview-link=\"false\"` to customise each link\n // individually\n previewLinks: ".freeze);
|
1427
|
+
;
|
1428
|
+
;
|
1429
|
+
;
|
1430
|
+
; _buf << ((to_boolean(attr 'revealjs_previewlinks', false)).to_s); _buf << (",\n // Transition style (e.g., none, fade, slide, convex, concave, zoom)\n transition: '".freeze);
|
1431
|
+
;
|
1432
|
+
; _buf << ((attr 'revealjs_transition', 'slide').to_s); _buf << ("',\n // Transition speed (e.g., default, fast, slow)\n transitionSpeed: '".freeze);
|
1433
|
+
;
|
1434
|
+
; _buf << ((attr 'revealjs_transitionspeed', 'default').to_s); _buf << ("',\n // Transition style for full page slide backgrounds (e.g., none, fade, slide, convex, concave, zoom)\n backgroundTransition: '".freeze);
|
1435
|
+
;
|
1436
|
+
; _buf << ((attr 'revealjs_backgroundtransition', 'fade').to_s); _buf << ("',\n // Number of slides away from the current that are visible\n viewDistance: ".freeze);
|
1437
|
+
;
|
1438
|
+
; _buf << ((attr 'revealjs_viewdistance', 3).to_s); _buf << (",\n // Number of slides away from the current that are visible on mobile\n // devices. It is advisable to set this to a lower number than\n // viewDistance in order to save resources.\n mobileViewDistance: ".freeze);
|
1439
|
+
;
|
1440
|
+
;
|
1441
|
+
;
|
1442
|
+
; _buf << ((attr 'revealjs_mobileviewdistance', 3).to_s); _buf << (",\n // Parallax background image (e.g., \"'https://s3.amazonaws.com/hakim-static/reveal-js/reveal-parallax-1.jpg'\")\n parallaxBackgroundImage: '".freeze);
|
1443
|
+
;
|
1444
|
+
; _buf << ((attr 'revealjs_parallaxbackgroundimage', '').to_s); _buf << ("',\n // Parallax background size in CSS syntax (e.g., \"2100px 900px\")\n parallaxBackgroundSize: '".freeze);
|
1445
|
+
;
|
1446
|
+
; _buf << ((attr 'revealjs_parallaxbackgroundsize', '').to_s); _buf << ("',\n // Number of pixels to move the parallax background per slide\n // - Calculated automatically unless specified\n // - Set to 0 to disable movement along an axis\n parallaxBackgroundHorizontal: ".freeze);
|
1447
|
+
;
|
1448
|
+
;
|
1449
|
+
;
|
1450
|
+
; _buf << ((attr 'revealjs_parallaxbackgroundhorizontal', 'null').to_s); _buf << (",\n parallaxBackgroundVertical: ".freeze);
|
1451
|
+
; _buf << ((attr 'revealjs_parallaxbackgroundvertical', 'null').to_s); _buf << (",\n // The display mode that will be used to show slides\n display: '".freeze);
|
1452
|
+
;
|
1453
|
+
; _buf << ((attr 'revealjs_display', 'block').to_s); _buf << ("',\n\n // The \"normal\" size of the presentation, aspect ratio will be preserved\n // when the presentation is scaled to fit different resolutions. Can be\n // specified using percentage units.\n width: ".freeze);
|
1454
|
+
;
|
1455
|
+
;
|
1456
|
+
;
|
1457
|
+
;
|
1458
|
+
; _buf << ((attr 'revealjs_width', 960).to_s); _buf << (",\n height: ".freeze);
|
1459
|
+
; _buf << ((attr 'revealjs_height', 700).to_s); _buf << (",\n\n // Factor of the display size that should remain empty around the content\n margin: ".freeze);
|
1460
|
+
;
|
1461
|
+
;
|
1462
|
+
; _buf << ((attr 'revealjs_margin', 0.1).to_s); _buf << (",\n\n // Bounds for smallest/largest possible scale to apply to content\n minScale: ".freeze);
|
1463
|
+
;
|
1464
|
+
;
|
1465
|
+
; _buf << ((attr 'revealjs_minscale', 0.2).to_s); _buf << (",\n maxScale: ".freeze);
|
1466
|
+
; _buf << ((attr 'revealjs_maxscale', 1.5).to_s); _buf << (",\n\n // PDF Export Options\n // Put each fragment on a separate page\n pdfSeparateFragments: ".freeze);
|
1467
|
+
;
|
1468
|
+
;
|
1469
|
+
;
|
1470
|
+
; _buf << ((to_boolean(attr 'revealjs_pdfseparatefragments', true)).to_s); _buf << (",\n // For slides that do not fit on a page, max number of pages\n pdfMaxPagesPerSlide: ".freeze);
|
1471
|
+
;
|
1472
|
+
; _buf << ((attr 'revealjs_pdfmaxpagesperslide', 1).to_s); _buf << (",\n\n // Optional libraries used to extend on reveal.js\n dependencies: [\n ".freeze);
|
1473
|
+
;
|
1474
|
+
;
|
1475
|
+
;
|
1476
|
+
; _buf << ((revealjs_dependencies(document, self, revealjsdir)).to_s);
|
1477
|
+
; _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);
|
1478
|
+
;
|
1105
1479
|
;
|
1106
1480
|
;
|
1107
|
-
; _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);
|
1108
|
-
; if (_title_obj = doctitle partition: true, use_fallback: true).subtitle?;
|
1109
|
-
; _buf << ("<h1>".freeze); _buf << ((slice_text _title_obj.title, (_slice = header.option? :slice)).to_s);
|
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 = '';
|
1166
|
-
; if title?;
|
1167
|
-
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
1168
|
-
; _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);
|
1169
|
-
; _slim_controls2 << ("</pre></div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1170
|
-
end
|
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
1481
|
;
|
1179
1482
|
;
|
1180
1483
|
;
|
@@ -1187,401 +1490,33 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
1187
1490
|
;
|
1188
1491
|
;
|
1189
1492
|
;
|
1190
|
-
; _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);
|
1191
|
-
; _buf << (((document.attr 'toc-title')).to_s);
|
1192
|
-
; _buf << ("</div>".freeze);
|
1193
|
-
; _buf << ((converter.convert document, 'outline').to_s);
|
1194
|
-
; _buf << ("</div>".freeze); _buf
|
1195
|
-
end
|
1196
|
-
end
|
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
|
1262
|
-
end
|
1263
|
-
end
|
1264
|
-
|
1265
|
-
def page_break(node, opts = {})
|
1266
|
-
node.extend(Helpers)
|
1267
|
-
node.instance_eval do
|
1268
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
1269
|
-
_buf = ''; _buf << ("<div style=\"page-break-after: always;\"></div>".freeze);
|
1270
|
-
; _buf
|
1271
|
-
end
|
1272
|
-
end
|
1273
|
-
|
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
1493
|
;
|
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
|
-
def table(node, opts = {})
|
1301
|
-
node.extend(Helpers)
|
1302
|
-
node.instance_eval do
|
1303
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
1304
|
-
_buf = ''; classes = ['tableblock', "frame-#{attr :frame, 'all'}", "grid-#{attr :grid, 'all'}", role, ('fragment' if (option? :step) || (attr? 'step'))];
|
1305
|
-
; styles = [("width:#{attr :tablepcwidth}%" unless option? 'autowidth'), ("float:#{attr :float}" if attr? :float)].compact.join('; ');
|
1306
|
-
; _slim_controls1 = html_tag('table', { :id => @id, :class => classes, :style => styles }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1307
|
-
; if title?;
|
1308
|
-
; _slim_controls2 << ("<caption class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
|
1309
|
-
; _slim_controls2 << ("</caption>".freeze); end; unless (attr :rowcount).zero?;
|
1310
|
-
; _slim_controls2 << ("<colgroup>".freeze);
|
1311
|
-
; if option? 'autowidth';
|
1312
|
-
; @columns.each do;
|
1313
|
-
; _slim_controls2 << ("<col>".freeze);
|
1314
|
-
; end; else;
|
1315
|
-
; @columns.each do |col|;
|
1316
|
-
; _slim_controls2 << ("<col style=\"width:".freeze); _slim_controls2 << ((col.attr :colpcwidth).to_s); _slim_controls2 << ("%\">".freeze);
|
1317
|
-
; end; end; _slim_controls2 << ("</colgroup>".freeze); [:head, :foot, :body].select {|tblsec| !@rows[tblsec].empty? }.each do |tblsec|;
|
1318
1494
|
;
|
1319
|
-
; _slim_controls2 << ("<t".freeze); _slim_controls2 << ((tblsec).to_s); _slim_controls2 << (">".freeze);
|
1320
|
-
; @rows[tblsec].each do |row|;
|
1321
|
-
; _slim_controls2 << ("<tr>".freeze);
|
1322
|
-
; row.each do |cell|;
|
1323
1495
|
;
|
1324
|
-
; if tblsec == :head;
|
1325
|
-
; cell_content = cell.text;
|
1326
|
-
; else;
|
1327
|
-
; case cell.style;
|
1328
|
-
; when :literal;
|
1329
|
-
; cell_content = cell.text;
|
1330
|
-
; else;
|
1331
|
-
; cell_content = cell.content;
|
1332
|
-
; end; end; _slim_controls3 = html_tag(tblsec == :head || cell.style == :header ? 'th' : 'td',
|
1333
|
-
:class=>['tableblock', "halign-#{cell.attr :halign}", "valign-#{cell.attr :valign}"],
|
1334
|
-
:colspan=>cell.colspan, :rowspan=>cell.rowspan,
|
1335
|
-
:style=>((@document.attr? :cellbgcolor) ? %(background-color:#{@document.attr :cellbgcolor};) : nil)) do; _slim_controls4 = '';
|
1336
|
-
; if tblsec == :head;
|
1337
|
-
; _slim_controls4 << ((cell_content).to_s);
|
1338
|
-
; else;
|
1339
|
-
; case cell.style;
|
1340
|
-
; when :asciidoc;
|
1341
|
-
; _slim_controls4 << ("<div>".freeze); _slim_controls4 << ((cell_content).to_s);
|
1342
|
-
; _slim_controls4 << ("</div>".freeze); when :literal;
|
1343
|
-
; _slim_controls4 << ("<div class=\"literal\"><pre>".freeze); _slim_controls4 << ((cell_content).to_s);
|
1344
|
-
; _slim_controls4 << ("</pre></div>".freeze); when :header;
|
1345
|
-
; cell_content.each do |text|;
|
1346
|
-
; _slim_controls4 << ("<p class=\"tableblock header\">".freeze); _slim_controls4 << ((text).to_s);
|
1347
|
-
; _slim_controls4 << ("</p>".freeze); end; else;
|
1348
|
-
; cell_content.each do |text|;
|
1349
|
-
; _slim_controls4 << ("<p class=\"tableblock\">".freeze); _slim_controls4 << ((text).to_s);
|
1350
|
-
; _slim_controls4 << ("</p>".freeze); end; end; end; _slim_controls4; end; _slim_controls2 << ((_slim_controls3).to_s); end; _slim_controls2 << ("</tr>".freeze); end; end; end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1351
|
-
end
|
1352
|
-
end
|
1353
|
-
|
1354
|
-
def listing(node, opts = {})
|
1355
|
-
node.extend(Helpers)
|
1356
|
-
node.instance_eval do
|
1357
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
1358
|
-
_buf = ''; nowrap = (option? 'nowrap') || !(document.attr? 'prewrap');
|
1359
|
-
; if @style == 'source';
|
1360
|
-
; syntax_hl = document.syntax_highlighter;
|
1361
|
-
; lang = attr :language;
|
1362
|
-
; if syntax_hl;
|
1363
|
-
; doc_attrs = document.attributes;
|
1364
|
-
; css_mode = (doc_attrs[%(#{syntax_hl.name}-css)] || :class).to_sym;
|
1365
|
-
; style = doc_attrs[%(#{syntax_hl.name}-style)];
|
1366
|
-
; opts = syntax_hl.highlight? ? { css_mode: css_mode, style: style } : {};
|
1367
|
-
; opts[:nowrap] = nowrap;
|
1368
|
-
; end; end; _slim_controls1 = html_tag('div', { :id => id, :class => ['listingblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1369
|
-
; if title?;
|
1370
|
-
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
|
1371
|
-
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<div class=\"content\">".freeze);
|
1372
|
-
; if syntax_hl;
|
1373
|
-
; _slim_controls2 << (((syntax_hl.format self, lang, opts)).to_s);
|
1374
|
-
; else;
|
1375
|
-
; if @style == 'source';
|
1376
|
-
; _slim_controls2 << ("<pre".freeze); _temple_html_attributeremover1 = ''; _slim_codeattributes1 = ['highlight', ('nowrap' if nowrap)]; 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 << ("><code".freeze);
|
1377
|
-
; _temple_html_attributeremover2 = ''; _slim_codeattributes2 = [("language-#{lang}" if lang)]; 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_codeattributes3 = ("#{lang}" if lang); if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls2 << (" data-lang".freeze); else; _slim_controls2 << (" data-lang=\"".freeze); _slim_controls2 << ((_slim_codeattributes3).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << (">".freeze);
|
1378
|
-
; _slim_controls2 << ((content || '').to_s);
|
1379
|
-
; _slim_controls2 << ("</code></pre>".freeze); else;
|
1380
|
-
; _slim_controls2 << ("<pre".freeze); _temple_html_attributeremover3 = ''; _slim_codeattributes4 = [('nowrap' if nowrap)]; if Array === _slim_codeattributes4; _slim_codeattributes4 = _slim_codeattributes4.flatten; _slim_codeattributes4.map!(&:to_s); _slim_codeattributes4.reject!(&:empty?); _temple_html_attributeremover3 << ((_slim_codeattributes4.join(" ")).to_s); else; _temple_html_attributeremover3 << ((_slim_codeattributes4).to_s); end; _temple_html_attributeremover3; if !_temple_html_attributeremover3.empty?; _slim_controls2 << (" class=\"".freeze); _slim_controls2 << ((_temple_html_attributeremover3).to_s); _slim_controls2 << ("\"".freeze); end; _slim_controls2 << (">".freeze);
|
1381
|
-
; _slim_controls2 << ((content || '').to_s);
|
1382
|
-
; _slim_controls2 << ("</pre>".freeze); end; end; _slim_controls2 << ("</div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1383
|
-
end
|
1384
|
-
end
|
1385
|
-
|
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
|
-
def inline_anchor(node, opts = {})
|
1422
|
-
node.extend(Helpers)
|
1423
|
-
node.instance_eval do
|
1424
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
1425
|
-
_buf = ''; case @type;
|
1426
|
-
; when :xref;
|
1427
|
-
; refid = (attr :refid) || @target;
|
1428
|
-
; _slim_controls1 = html_tag('a', { :href => @target, :class => [role, ('fragment' if (option? :step) || (attr? 'step'))].compact }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1429
|
-
; _slim_controls2 << (((@text || @document.references[:ids].fetch(refid, "[#{refid}]")).tr_s("\n", ' ')).to_s);
|
1430
|
-
; _slim_controls2; end; _buf << ((_slim_controls1).to_s); when :ref;
|
1431
|
-
; _buf << ((html_tag('a', { :id => @target }.merge(data_attrs(@attributes)))).to_s);
|
1432
|
-
; when :bibref;
|
1433
|
-
; _buf << ((html_tag('a', { :id => @target }.merge(data_attrs(@attributes)))).to_s);
|
1434
|
-
; _buf << ("[".freeze); _buf << ((@target).to_s); _buf << ("]".freeze);
|
1435
|
-
; else;
|
1436
|
-
; _slim_controls3 = html_tag('a', { :href => @target, :class => [role, ('fragment' if (option? :step) || (attr? 'step'))].compact, :target => (attr :window), 'data-preview-link' => (bool_data_attr :preview) }.merge(data_attrs(@attributes))) do; _slim_controls4 = '';
|
1437
|
-
; _slim_controls4 << ((@text).to_s);
|
1438
|
-
; _slim_controls4; end; _buf << ((_slim_controls3).to_s); end; _buf
|
1439
|
-
end
|
1440
|
-
end
|
1441
|
-
|
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
1496
|
;
|
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
1497
|
;
|
1500
1498
|
;
|
1501
1499
|
;
|
1502
1500
|
;
|
1503
1501
|
;
|
1504
1502
|
;
|
1505
|
-
; if (has_role? 'stretch') && !((attr? :width) || (attr? :height));
|
1506
|
-
; height = "100%";
|
1507
1503
|
;
|
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
1504
|
;
|
1528
|
-
; _buf
|
1529
|
-
end
|
1530
|
-
end
|
1531
|
-
|
1532
|
-
def section(node, opts = {})
|
1533
|
-
node.extend(Helpers)
|
1534
|
-
node.instance_eval do
|
1535
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
1536
|
-
_buf = '';
|
1537
1505
|
;
|
1538
|
-
; titleless = (title = self.title) == '!';
|
1539
|
-
; hide_title = (titleless || (option? :notitle) || (option? :conceal));
|
1540
1506
|
;
|
1541
|
-
; vertical_slides = find_by(context: :section) {|section| section.level == 2 };
|
1542
1507
|
;
|
1543
1508
|
;
|
1544
1509
|
;
|
1545
|
-
; data_background_image, data_background_size, data_background_repeat,
|
1546
|
-
data_background_position, data_background_transition = nil;
|
1547
1510
|
;
|
1548
1511
|
;
|
1549
|
-
; section_images = blocks.map do |block|;
|
1550
|
-
; if (ctx = block.context) == :image;
|
1551
|
-
; ['background', 'canvas'].include?(block.attributes[1]) ? block : [];
|
1552
|
-
; elsif ctx == :section;
|
1553
|
-
; [];
|
1554
|
-
; else;
|
1555
|
-
; block.find_by(context: :image) {|image| ['background', 'canvas'].include?(image.attributes[1]) } || [];
|
1556
|
-
; end; end; if (bg_image = section_images.flatten.first);
|
1557
|
-
; data_background_image = image_uri(bg_image.attr 'target');
|
1558
1512
|
;
|
1559
|
-
; data_background_size = bg_image.attr 'size';
|
1560
|
-
; data_background_repeat = bg_image.attr 'repeat';
|
1561
|
-
; data_background_transition = bg_image.attr 'transition';
|
1562
|
-
; data_background_position = bg_image.attr 'position';
|
1563
1513
|
;
|
1564
1514
|
;
|
1565
|
-
; end; if attr? 'background-image';
|
1566
|
-
; data_background_image = image_uri(attr 'background-image');
|
1567
1515
|
;
|
1568
|
-
; end; if attr? 'background-video';
|
1569
|
-
; data_background_video = media_uri(attr 'background-video');
|
1570
1516
|
;
|
1571
|
-
; end; if attr? 'background-color';
|
1572
|
-
; data_background_color = attr 'background-color';
|
1573
1517
|
;
|
1574
|
-
; end; parent_section_with_vertical_slides = @level == 1 && !vertical_slides.empty?;
|
1575
1518
|
;
|
1576
|
-
; content_for :footnotes do;
|
1577
|
-
; slide_footnotes = slide_footnotes(self);
|
1578
|
-
; if document.footnotes? && !(parent.attr? 'nofootnotes') && !slide_footnotes.empty?;
|
1579
|
-
; _buf << ("<div class=\"footnotes\">".freeze);
|
1580
|
-
; slide_footnotes.each do |footnote|;
|
1581
|
-
; _buf << ("<div class=\"footnote\">".freeze);
|
1582
|
-
; _buf << (("#{footnote.index}. #{footnote.text}").to_s);
|
1583
1519
|
;
|
1584
|
-
; _buf << ("</div>".freeze); end; _buf << ("</div>".freeze); end; end; content_for :section do;
|
1585
1520
|
;
|
1586
1521
|
;
|
1587
1522
|
;
|
@@ -1598,77 +1533,72 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
1598
1533
|
;
|
1599
1534
|
;
|
1600
1535
|
;
|
1601
|
-
; _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; _buf << (">".freeze);
|
1602
|
-
; unless hide_title;
|
1603
|
-
; _buf << ("<h2>".freeze); _buf << ((section_title).to_s);
|
1604
|
-
; _buf << ("</h2>".freeze); end; if parent_section_with_vertical_slides;
|
1605
|
-
; unless (_blocks = blocks - vertical_slides).empty?;
|
1606
|
-
; _buf << ("<div class=\"slide-content\">".freeze);
|
1607
|
-
; _blocks.each do |block|;
|
1608
|
-
; _buf << ((block.convert).to_s);
|
1609
|
-
; end; _buf << ("</div>".freeze); end; yield_content :footnotes;
|
1610
1536
|
;
|
1611
|
-
; else;
|
1612
|
-
; unless (_content = content.chomp).empty?;
|
1613
|
-
; _buf << ("<div class=\"slide-content\">".freeze);
|
1614
|
-
; _buf << ((_content).to_s);
|
1615
|
-
; _buf << ("</div>".freeze); end; yield_content :footnotes;
|
1616
1537
|
;
|
1617
|
-
; end; clear_slide_footnotes;
|
1618
1538
|
;
|
1619
|
-
; _buf << ("</section>".freeze);
|
1620
1539
|
;
|
1621
|
-
;
|
1622
|
-
; _buf << ("<section>".freeze);
|
1623
|
-
; yield_content :section;
|
1624
|
-
; vertical_slides.each do |subsection|;
|
1625
|
-
; _buf << ((subsection.convert).to_s);
|
1540
|
+
; _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);
|
1626
1541
|
;
|
1627
|
-
; end; _buf << ("</section>".freeze);
|
1628
|
-
; else;
|
1629
|
-
; if @level >= 3;
|
1630
1542
|
;
|
1631
|
-
;
|
1632
|
-
;
|
1633
|
-
;
|
1634
|
-
;
|
1635
|
-
;
|
1543
|
+
; _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);
|
1544
|
+
;
|
1545
|
+
;
|
1546
|
+
; _buf << ((attr 'revealjs_width', 960).to_s); _buf << (", ".freeze); _buf << ((attr 'revealjs_height', 700).to_s); _buf << (")\n});</script>".freeze);
|
1547
|
+
;
|
1548
|
+
;
|
1549
|
+
; if syntax_hl && (syntax_hl.docinfo? :footer);
|
1550
|
+
; _buf << ((syntax_hl.docinfo :footer, self, cdn_base_url: cdn_base, linkcss: linkcss, self_closing_tag_slash: '/').to_s);
|
1551
|
+
;
|
1552
|
+
; end; unless (docinfo_content = (docinfo :footer, '.html')).empty?;
|
1553
|
+
; _buf << ((docinfo_content).to_s);
|
1554
|
+
; end; _buf << ("</body></html>".freeze); _buf
|
1636
1555
|
end
|
1637
1556
|
end
|
1638
1557
|
|
1639
|
-
def
|
1558
|
+
def literal(node, opts = {})
|
1640
1559
|
node.extend(Helpers)
|
1641
1560
|
node.instance_eval do
|
1642
1561
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
1643
|
-
_buf = ''; if @
|
1644
|
-
; if @parent == @document && @document.doctype == 'book';
|
1645
|
-
; puts 'asciidoctor: WARNING: abstract block cannot be used in a document without a title when doctype is book. Excluding block content.';
|
1646
|
-
; else;
|
1647
|
-
; _slim_controls1 = html_tag('div', { :id => @id, :class => ['quoteblock', 'abstract', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1562
|
+
_buf = ''; _slim_controls1 = html_tag('div', { :id => id, :class => ['literalblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1648
1563
|
; if title?;
|
1649
1564
|
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
1650
|
-
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<
|
1651
|
-
; _slim_controls2 << ("</
|
1652
|
-
|
1653
|
-
|
1654
|
-
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1658
|
-
|
1565
|
+
; _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);
|
1566
|
+
; _slim_controls2 << ("</pre></div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1567
|
+
end
|
1568
|
+
end
|
1569
|
+
|
1570
|
+
def verse(node, opts = {})
|
1571
|
+
node.extend(Helpers)
|
1572
|
+
node.instance_eval do
|
1573
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1574
|
+
_buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['verseblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1659
1575
|
; if title?;
|
1660
|
-
;
|
1661
|
-
;
|
1662
|
-
;
|
1576
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
1577
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<pre class=\"content\">".freeze); _slim_controls2 << ((content).to_s);
|
1578
|
+
; _slim_controls2 << ("</pre>".freeze); attribution = (attr? :attribution) ? (attr :attribution) : nil;
|
1579
|
+
; citetitle = (attr? :citetitle) ? (attr :citetitle) : nil;
|
1580
|
+
; if attribution || citetitle;
|
1581
|
+
; _slim_controls2 << ("<div class=\"attribution\">".freeze);
|
1582
|
+
; if citetitle;
|
1583
|
+
; _slim_controls2 << ("<cite>".freeze); _slim_controls2 << ((citetitle).to_s);
|
1584
|
+
; _slim_controls2 << ("</cite>".freeze); end; if attribution;
|
1585
|
+
; if citetitle;
|
1586
|
+
; _slim_controls2 << ("<br>".freeze);
|
1587
|
+
; end; _slim_controls2 << ("— ".freeze); _slim_controls2 << ((attribution).to_s);
|
1588
|
+
; end; _slim_controls2 << ("</div>".freeze); end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1663
1589
|
end
|
1664
1590
|
end
|
1665
1591
|
|
1666
|
-
def
|
1592
|
+
def audio(node, opts = {})
|
1667
1593
|
node.extend(Helpers)
|
1668
1594
|
node.instance_eval do
|
1669
1595
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
1670
|
-
_buf = ''; _slim_controls1 = html_tag('
|
1671
|
-
;
|
1596
|
+
_buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['audioblock', @style, role] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1597
|
+
; if title?;
|
1598
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
|
1599
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<div class=\"content\"><audio".freeze);
|
1600
|
+
; _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);
|
1601
|
+
;
|
1672
1602
|
; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1673
1603
|
end
|
1674
1604
|
end
|
@@ -1702,17 +1632,150 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
1702
1632
|
end
|
1703
1633
|
end
|
1704
1634
|
|
1705
|
-
def
|
1635
|
+
def notes(node, opts = {})
|
1706
1636
|
node.extend(Helpers)
|
1707
1637
|
node.instance_eval do
|
1708
1638
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
1709
|
-
_buf = '';
|
1639
|
+
_buf = ''; _buf << ("<aside class=\"notes\">".freeze); _buf << ((resolve_content).to_s);
|
1640
|
+
; _buf << ("</aside>".freeze); _buf
|
1641
|
+
end
|
1642
|
+
end
|
1643
|
+
|
1644
|
+
def open(node, opts = {})
|
1645
|
+
node.extend(Helpers)
|
1646
|
+
node.instance_eval do
|
1647
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1648
|
+
_buf = ''; if @style == 'abstract';
|
1649
|
+
; if @parent == @document && @document.doctype == 'book';
|
1650
|
+
; puts 'asciidoctor: WARNING: abstract block cannot be used in a document without a title when doctype is book. Excluding block content.';
|
1651
|
+
; else;
|
1652
|
+
; _slim_controls1 = html_tag('div', { :id => @id, :class => ['quoteblock', 'abstract', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1710
1653
|
; if title?;
|
1711
|
-
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((
|
1712
|
-
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<
|
1713
|
-
;
|
1654
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
1655
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<blockquote>".freeze); _slim_controls2 << ((content).to_s);
|
1656
|
+
; _slim_controls2 << ("</blockquote>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); end; elsif @style == 'partintro' && (@level != 0 || @parent.context != :section || @document.doctype != 'book');
|
1657
|
+
; puts 'asciidoctor: ERROR: partintro block can only be used when doctype is book and it\'s a child of a book part. Excluding block content.';
|
1658
|
+
; else;
|
1659
|
+
; if (has_role? 'aside') or (has_role? 'speaker') or (has_role? 'notes');
|
1660
|
+
; _buf << ("<aside class=\"notes\">".freeze); _buf << ((resolve_content).to_s);
|
1661
|
+
; _buf << ("</aside>".freeze);
|
1662
|
+
; else;
|
1663
|
+
; _slim_controls3 = html_tag('div', { :id => @id, :class => ['openblock', (@style != 'open' ? @style : nil), role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls4 = '';
|
1664
|
+
; if title?;
|
1665
|
+
; _slim_controls4 << ("<div class=\"title\">".freeze); _slim_controls4 << ((title).to_s);
|
1666
|
+
; _slim_controls4 << ("</div>".freeze); end; _slim_controls4 << ("<div class=\"content\">".freeze); _slim_controls4 << ((content).to_s);
|
1667
|
+
; _slim_controls4 << ("</div>".freeze); _slim_controls4; end; _buf << ((_slim_controls3).to_s); end; end; _buf
|
1668
|
+
end
|
1669
|
+
end
|
1670
|
+
|
1671
|
+
def preamble(node, opts = {})
|
1672
|
+
node.extend(Helpers)
|
1673
|
+
node.instance_eval do
|
1674
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1675
|
+
_buf = '';
|
1714
1676
|
;
|
1715
|
-
;
|
1677
|
+
; _buf
|
1678
|
+
end
|
1679
|
+
end
|
1680
|
+
|
1681
|
+
def inline_kbd(node, opts = {})
|
1682
|
+
node.extend(Helpers)
|
1683
|
+
node.instance_eval do
|
1684
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1685
|
+
_buf = ''; if (keys = attr 'keys').size == 1;
|
1686
|
+
; _slim_controls1 = html_tag('kbd', data_attrs(@attributes)) do; _slim_controls2 = '';
|
1687
|
+
; _slim_controls2 << ((keys.first).to_s);
|
1688
|
+
; _slim_controls2; end; _buf << ((_slim_controls1).to_s); else;
|
1689
|
+
; _slim_controls3 = html_tag('span', { :class => ['keyseq'] }.merge(data_attrs(@attributes))) do; _slim_controls4 = '';
|
1690
|
+
; keys.each_with_index do |key, idx|;
|
1691
|
+
; unless idx.zero?;
|
1692
|
+
; _slim_controls4 << ("+".freeze);
|
1693
|
+
; end; _slim_controls4 << ("<kbd>".freeze); _slim_controls4 << ((key).to_s);
|
1694
|
+
; _slim_controls4 << ("</kbd>".freeze); end; _slim_controls4; end; _buf << ((_slim_controls3).to_s); end; _buf
|
1695
|
+
end
|
1696
|
+
end
|
1697
|
+
|
1698
|
+
def title_slide(node, opts = {})
|
1699
|
+
node.extend(Helpers)
|
1700
|
+
node.instance_eval do
|
1701
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1702
|
+
_buf = ''; bg_image = (attr? 'title-slide-background-image') ? (image_uri(attr 'title-slide-background-image')) : nil;
|
1703
|
+
; bg_video = (attr? 'title-slide-background-video') ? (media_uri(attr 'title-slide-background-video')) : nil;
|
1704
|
+
;
|
1705
|
+
;
|
1706
|
+
;
|
1707
|
+
;
|
1708
|
+
;
|
1709
|
+
;
|
1710
|
+
;
|
1711
|
+
;
|
1712
|
+
;
|
1713
|
+
;
|
1714
|
+
;
|
1715
|
+
;
|
1716
|
+
;
|
1717
|
+
;
|
1718
|
+
;
|
1719
|
+
; _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);
|
1720
|
+
; if (_title_obj = doctitle partition: true, use_fallback: true).subtitle?;
|
1721
|
+
; _buf << ("<h1>".freeze); _buf << ((slice_text _title_obj.title, (_slice = header.option? :slice)).to_s);
|
1722
|
+
; _buf << ("</h1><h2>".freeze); _buf << ((slice_text _title_obj.subtitle, _slice).to_s);
|
1723
|
+
; _buf << ("</h2>".freeze); else;
|
1724
|
+
; _buf << ("<h1>".freeze); _buf << ((@header.title).to_s);
|
1725
|
+
; _buf << ("</h1>".freeze); end; preamble = @document.find_by context: :preamble;
|
1726
|
+
; unless preamble.nil? or preamble.length == 0;
|
1727
|
+
; _buf << ("<div class=\"preamble\">".freeze); _buf << ((preamble.pop.content).to_s);
|
1728
|
+
; _buf << ("</div>".freeze); end; _buf << ((generate_authors(@document)).to_s);
|
1729
|
+
; _buf << ("</section>".freeze); _buf
|
1730
|
+
end
|
1731
|
+
end
|
1732
|
+
|
1733
|
+
def embedded(node, opts = {})
|
1734
|
+
node.extend(Helpers)
|
1735
|
+
node.instance_eval do
|
1736
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1737
|
+
_buf = ''; unless notitle || !has_header?;
|
1738
|
+
; _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);
|
1739
|
+
; _buf << ("</h1>".freeze); end; _buf << ((content).to_s);
|
1740
|
+
; unless !footnotes? || attr?(:nofootnotes);
|
1741
|
+
; _buf << ("<div id=\"footnotes\"><hr>".freeze);
|
1742
|
+
;
|
1743
|
+
; footnotes.each do |fn|;
|
1744
|
+
; _buf << ("<div class=\"footnote\" id=\"_footnote_".freeze); _buf << ((fn.index).to_s); _buf << ("\"><a href=\"#_footnoteref_".freeze);
|
1745
|
+
; _buf << ((fn.index).to_s); _buf << ("\">".freeze); _buf << ((fn.index).to_s); _buf << ("</a>. ".freeze); _buf << ((fn.text).to_s);
|
1746
|
+
; _buf << ("</div>".freeze); end; _buf << ("</div>".freeze); end; _buf
|
1747
|
+
end
|
1748
|
+
end
|
1749
|
+
|
1750
|
+
def paragraph(node, opts = {})
|
1751
|
+
node.extend(Helpers)
|
1752
|
+
node.instance_eval do
|
1753
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1754
|
+
_buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['paragraph', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1755
|
+
; if title?;
|
1756
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
1757
|
+
; _slim_controls2 << ("</div>".freeze); end; if has_role? 'small';
|
1758
|
+
; _slim_controls2 << ("<small>".freeze); _slim_controls2 << ((content).to_s);
|
1759
|
+
; _slim_controls2 << ("</small>".freeze); else;
|
1760
|
+
; _slim_controls2 << ("<p>".freeze); _slim_controls2 << ((content).to_s);
|
1761
|
+
; _slim_controls2 << ("</p>".freeze); end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1762
|
+
end
|
1763
|
+
end
|
1764
|
+
|
1765
|
+
def olist(node, opts = {})
|
1766
|
+
node.extend(Helpers)
|
1767
|
+
node.instance_eval do
|
1768
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1769
|
+
_buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['olist', @style, role] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1770
|
+
; if title?;
|
1771
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
1772
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<ol".freeze); _temple_html_attributeremover1 = ''; _slim_codeattributes1 = @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_codeattributes2 = (attr :start); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls2 << (" start".freeze); else; _slim_controls2 << (" start=\"".freeze); _slim_controls2 << ((_slim_codeattributes2).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes3 = list_marker_keyword; if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls2 << (" type".freeze); else; _slim_controls2 << (" type=\"".freeze); _slim_controls2 << ((_slim_codeattributes3).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << (">".freeze);
|
1773
|
+
; items.each do |item|;
|
1774
|
+
; _slim_controls2 << ("<li".freeze); _temple_html_attributeremover2 = ''; _slim_codeattributes4 = ('fragment' if (option? :step) || (has_role? 'step') || (attr? 'step')); if Array === _slim_codeattributes4; _slim_codeattributes4 = _slim_codeattributes4.flatten; _slim_codeattributes4.map!(&:to_s); _slim_codeattributes4.reject!(&:empty?); _temple_html_attributeremover2 << ((_slim_codeattributes4.join(" ")).to_s); else; _temple_html_attributeremover2 << ((_slim_codeattributes4).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);
|
1775
|
+
; _slim_controls2 << ((item.text).to_s);
|
1776
|
+
; _slim_controls2 << ("</p>".freeze); if item.blocks?;
|
1777
|
+
; _slim_controls2 << ((item.content).to_s);
|
1778
|
+
; end; _slim_controls2 << ("</li>".freeze); end; _slim_controls2 << ("</ol>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1716
1779
|
end
|
1717
1780
|
end
|
1718
1781
|
#------------------ End of generated transformation methods ------------------#
|