asciidoctor-revealjs 5.0.0.rc1 → 5.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -200,6 +200,94 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
200
200
  end
201
201
  end
202
202
 
203
+ # Retrieves the built-in html5 converter.
204
+ #
205
+ # Returns the instance of the Asciidoctor::Converter::Html5Converter
206
+ # associated with this node.
207
+ def html5_converter
208
+ converter.instance_variable_get("@delegate_converter")
209
+ end
210
+
211
+ def convert_inline_image(node = self)
212
+ target = node.target
213
+ if (node.type || 'image') == 'icon'
214
+ if (icons = node.document.attr 'icons') == 'font'
215
+ i_class_attr_val = %(#{node.attr(:set, 'fa')} fa-#{target})
216
+ i_class_attr_val = %(#{i_class_attr_val} fa-#{node.attr 'size'}) if node.attr? 'size'
217
+ if node.attr? 'flip'
218
+ i_class_attr_val = %(#{i_class_attr_val} fa-flip-#{node.attr 'flip'})
219
+ elsif node.attr? 'rotate'
220
+ i_class_attr_val = %(#{i_class_attr_val} fa-rotate-#{node.attr 'rotate'})
221
+ end
222
+ attrs = (node.attr? 'title') ? %( title="#{node.attr 'title'}") : ''
223
+ img = %(<i class="#{i_class_attr_val}"#{attrs}></i>)
224
+ elsif icons
225
+ attrs = (node.attr? 'width') ? %( width="#{node.attr 'width'}") : ''
226
+ attrs = %(#{attrs} height="#{node.attr 'height'}") if node.attr? 'height'
227
+ attrs = %(#{attrs} title="#{node.attr 'title'}") if node.attr? 'title'
228
+ img = %(<img src="#{src = node.icon_uri target}" alt="#{encode_attribute_value node.alt}"#{attrs}>)
229
+ else
230
+ img = %([#{node.alt}&#93;)
231
+ end
232
+ else
233
+ html_attrs = (node.attr? 'width') ? %( width="#{node.attr 'width'}") : ''
234
+ html_attrs = %(#{html_attrs} height="#{node.attr 'height'}") if node.attr? 'height'
235
+ html_attrs = %(#{html_attrs} title="#{node.attr 'title'}") if node.attr? 'title'
236
+ img, src = img_tag(node, target, html_attrs)
237
+ end
238
+ img_link(node, src, img)
239
+ end
240
+
241
+ def convert_image(node = self)
242
+ # When the stretch class is present, block images will take the most space
243
+ # they can take. Setting width and height can override that.
244
+ # We pinned the 100% to height to avoid aspect ratio breakage and since
245
+ # widescreen monitors are the most popular, chances are that height will
246
+ # be the biggest constraint
247
+ if node.has_role?('stretch') && !(node.attr?(:width) || node.attr?(:height))
248
+ height_value = "100%"
249
+ elsif node.attr? 'height'
250
+ height_value = node.attr 'height'
251
+ else
252
+ height_value = nil
253
+ end
254
+ html_attrs = (node.attr? 'width') ? %( width="#{node.attr 'width'}") : ''
255
+ html_attrs = %(#{html_attrs} height="#{height_value}") if height_value
256
+ html_attrs = %(#{html_attrs} title="#{node.attr 'title'}") if node.attr? 'title'
257
+ html_attrs = %(#{html_attrs} style="background: #{node.attr :background}") if node.attr? 'background'
258
+ img, src = img_tag(node, node.attr('target'), html_attrs)
259
+ img_link(node, src, img)
260
+ end
261
+
262
+ def img_tag(node = self, target, html_attrs)
263
+ if ((node.attr? 'format', 'svg') || (target.include? '.svg')) && node.document.safe < ::Asciidoctor::SafeMode::SECURE
264
+ if node.option? 'inline'
265
+ img = (html5_converter.read_svg_contents node, target) || %(<span class="alt">#{node.alt}</span>)
266
+ elsif node.option? 'interactive'
267
+ fallback = (node.attr? 'fallback') ? %(<img src="#{node.image_uri node.attr 'fallback'}" alt="#{encode_attribute_value node.alt}"#{html_attrs}>) : %(<span class="alt">#{node.alt}</span>)
268
+ img = %(<object type="image/svg+xml" data="#{src = node.image_uri target}"#{html_attrs}>#{fallback}</object>)
269
+ else
270
+ img = %(<img src="#{src = node.image_uri target}" alt="#{encode_attribute_value node.alt}"#{html_attrs}>)
271
+ end
272
+ else
273
+ img = %(<img src="#{src = node.image_uri target}" alt="#{encode_attribute_value node.alt}"#{html_attrs}>)
274
+ end
275
+
276
+ [img, src]
277
+ end
278
+
279
+ # Wrap the <img> element in a <a> element if the link attribute is defined
280
+ def img_link(node = self, src, content)
281
+ if (node.attr? 'link') && ((href_attr_val = node.attr 'link') != 'self' || (href_attr_val = src))
282
+ if (link_preview_value = bool_data_attr :link_preview)
283
+ data_preview_attr = %( data-preview-link="#{link_preview_value == true ? "" : link_preview_value}")
284
+ end
285
+ return %(<a class="image" href="#{href_attr_val}"#{(append_link_constraint_attrs node).join}#{data_preview_attr}>#{content}</a>)
286
+ end
287
+
288
+ content
289
+ end
290
+
203
291
  def revealjs_dependencies(document, node, revealjsdir)
204
292
  dependencies = []
205
293
  dependencies << "{ src: '#{revealjsdir}/plugin/zoom/zoom.js', async: true, callback: function () { Reveal.registerPlugin(RevealZoom) } }" unless (node.attr? 'revealjs_plugin_zoom', 'disabled')
@@ -208,7 +296,6 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
208
296
  dependencies.join(",\n ")
209
297
  end
210
298
 
211
-
212
299
  # Between delimiters (--) is code taken from asciidoctor-bespoke 1.0.0.alpha.1
213
300
  # Licensed under MIT, Copyright (C) 2015-2016 Dan Allen and the Asciidoctor Project
214
301
  #--
@@ -283,6 +370,23 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
283
370
  nil
284
371
  end
285
372
 
373
+ # Copied from asciidoctor/lib/asciidoctor/converter/html5.rb (method is private)
374
+ def append_link_constraint_attrs node, attrs = []
375
+ rel = 'nofollow' if node.option? 'nofollow'
376
+ if (window = node.attributes['window'])
377
+ attrs << %( target="#{window}")
378
+ attrs << (rel ? %( rel="#{rel} noopener") : ' rel="noopener"') if window == '_blank' || (node.option? 'noopener')
379
+ elsif rel
380
+ attrs << %( rel="#{rel}")
381
+ end
382
+ attrs
383
+ end
384
+
385
+ # Copied from asciidoctor/lib/asciidoctor/converter/html5.rb (method is private)
386
+ def encode_attribute_value val
387
+ (val.include? '"') ? (val.gsub '"', '&quot;') : val
388
+ end
389
+
286
390
  # Copied from asciidoctor/lib/asciidoctor/converter/semantic-html5.rb which is not yet shipped
287
391
  # @todo remove this code when the new converter becomes available in the main gem
288
392
  def generate_authors node
@@ -397,56 +501,81 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
397
501
  end
398
502
 
399
503
  def convert(node, transform = nil, opts = {})
400
- transform ||= node.node_name
504
+ meth_name = "convert_#{transform || node.node_name}"
401
505
  opts ||= {}
402
- converter = respond_to?(transform) ? self : @delegate_converter
506
+ converter = respond_to?(meth_name) ? self : @delegate_converter
403
507
 
404
508
  if opts.empty?
405
- converter.send(transform, node)
509
+ converter.send(meth_name, node)
406
510
  else
407
- converter.send(transform, node, opts)
511
+ converter.send(meth_name, node, opts)
408
512
  end
409
513
  end
410
514
 
411
- def handles?(transform)
412
- respond_to?("convert_#{transform}") || respond_to?(transform)
413
- end
414
-
415
515
  #----------------- Begin of generated transformation methods -----------------#
416
516
 
417
517
 
418
- def inline_quoted(node, opts = {})
518
+ def convert_example(node, opts = {})
419
519
  node.extend(Helpers)
420
520
  node.instance_eval do
421
521
  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("&#8220;#{@text}&#8221;")).to_s);
429
- ; when :single;
430
- ; _buf << ((inline_text_container("&#8216;#{@text}&#8217;")).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
522
+ _buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['exampleblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
523
+ ; if title?;
524
+ ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
525
+ ; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<div class=\"content\">".freeze); _slim_controls2 << ((content).to_s);
526
+ ; _slim_controls2 << ("</div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
437
527
  end
438
528
  end
439
529
 
440
- def pass(node, opts = {})
530
+ def convert_inline_button(node, opts = {})
441
531
  node.extend(Helpers)
442
532
  node.instance_eval do
443
533
  converter.set_local_variables(binding, opts) unless opts.empty?
444
- _buf = ''; _buf << ((content).to_s);
534
+ _buf = ''; _slim_controls1 = html_tag('b', { :class => ['button'] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
535
+ ; _slim_controls2 << ((@text).to_s);
536
+ ; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
537
+ end
538
+ end
539
+
540
+ def convert_colist(node, opts = {})
541
+ node.extend(Helpers)
542
+ node.instance_eval do
543
+ converter.set_local_variables(binding, opts) unless opts.empty?
544
+ _buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['colist', @style, role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
545
+ ; if title?;
546
+ ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
547
+ ; _slim_controls2 << ("</div>".freeze); end; if @document.attr? :icons;
548
+ ; font_icons = @document.attr? :icons, 'font';
549
+ ; _slim_controls2 << ("<table>".freeze);
550
+ ; items.each_with_index do |item, i|;
551
+ ; num = i + 1;
552
+ ; _slim_controls2 << ("<tr><td>".freeze);
553
+ ;
554
+ ; if font_icons;
555
+ ; _slim_controls2 << ("<i class=\"conum\"".freeze); _slim_codeattributes1 = num; if _slim_codeattributes1; if _slim_codeattributes1 == true; _slim_controls2 << (" data-value".freeze); else; _slim_controls2 << (" data-value=\"".freeze); _slim_controls2 << ((_slim_codeattributes1).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << ("></i><b>".freeze);
556
+ ; _slim_controls2 << ((num).to_s);
557
+ ; _slim_controls2 << ("</b>".freeze); else;
558
+ ; _slim_controls2 << ("<img".freeze); _slim_codeattributes2 = icon_uri("callouts/#{num}"); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls2 << (" src".freeze); else; _slim_controls2 << (" src=\"".freeze); _slim_controls2 << ((_slim_codeattributes2).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes3 = num; if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls2 << (" alt".freeze); else; _slim_controls2 << (" alt=\"".freeze); _slim_controls2 << ((_slim_codeattributes3).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << (">".freeze);
559
+ ; end; _slim_controls2 << ("</td><td>".freeze); _slim_controls2 << ((item.text).to_s);
560
+ ; _slim_controls2 << ("</td></tr>".freeze); end; _slim_controls2 << ("</table>".freeze); else;
561
+ ; _slim_controls2 << ("<ol>".freeze);
562
+ ; items.each do |item|;
563
+ ; _slim_controls2 << ("<li><p>".freeze); _slim_controls2 << ((item.text).to_s);
564
+ ; _slim_controls2 << ("</p></li>".freeze); end; _slim_controls2 << ("</ol>".freeze); end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
565
+ end
566
+ end
567
+
568
+ def convert_preamble(node, opts = {})
569
+ node.extend(Helpers)
570
+ node.instance_eval do
571
+ converter.set_local_variables(binding, opts) unless opts.empty?
572
+ _buf = '';
573
+ ;
445
574
  ; _buf
446
575
  end
447
576
  end
448
577
 
449
- def sidebar(node, opts = {})
578
+ def convert_sidebar(node, opts = {})
450
579
  node.extend(Helpers)
451
580
  node.instance_eval do
452
581
  converter.set_local_variables(binding, opts) unless opts.empty?
@@ -463,7 +592,7 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
463
592
  end
464
593
  end
465
594
 
466
- def thematic_break(node, opts = {})
595
+ def convert_ruler(node, opts = {})
467
596
  node.extend(Helpers)
468
597
  node.instance_eval do
469
598
  converter.set_local_variables(binding, opts) unless opts.empty?
@@ -472,113 +601,240 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
472
601
  end
473
602
  end
474
603
 
475
- def outline(node, opts = {})
604
+ def convert_inline_menu(node, opts = {})
476
605
  node.extend(Helpers)
477
606
  node.instance_eval do
478
607
  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
608
+ _buf = ''; menu = attr 'menu';
609
+ ; menuitem = attr 'menuitem';
610
+ ; if !(submenus = attr 'submenus').empty?;
611
+ ; _slim_controls1 = html_tag('span', { :class => ['menuseq'] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
612
+ ; _slim_controls2 << ("<span class=\"menu\">".freeze); _slim_controls2 << ((menu).to_s);
613
+ ; _slim_controls2 << ("</span>&#160;&#9656;&#32;".freeze);
614
+ ; _slim_controls2 << ((submenus.map {|submenu| %(<span class="submenu">#{submenu}</span>&#160;&#9656;&#32;) }.join).to_s);
615
+ ; _slim_controls2 << ("<span class=\"menuitem\">".freeze); _slim_controls2 << ((menuitem).to_s);
616
+ ; _slim_controls2 << ("</span>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); elsif !menuitem.nil?;
617
+ ; _slim_controls3 = html_tag('span', { :class => ['menuseq'] }.merge(data_attrs(@attributes))) do; _slim_controls4 = '';
618
+ ; _slim_controls4 << ("<span class=\"menu\">".freeze); _slim_controls4 << ((menu).to_s);
619
+ ; _slim_controls4 << ("</span>&#160;&#9656;&#32;<span class=\"menuitem\">".freeze);
620
+ ; _slim_controls4 << ((menuitem).to_s);
621
+ ; _slim_controls4 << ("</span>".freeze); _slim_controls4; end; _buf << ((_slim_controls3).to_s); else;
622
+ ; _slim_controls5 = html_tag('span', { :class => ['menu'] }.merge(data_attrs(@attributes))) do; _slim_controls6 = '';
623
+ ; _slim_controls6 << ((menu).to_s);
624
+ ; _slim_controls6; end; _buf << ((_slim_controls5).to_s); end; _buf
489
625
  end
490
626
  end
491
627
 
492
- def inline_break(node, opts = {})
628
+ def convert_open(node, opts = {})
493
629
  node.extend(Helpers)
494
630
  node.instance_eval do
495
631
  converter.set_local_variables(binding, opts) unless opts.empty?
496
- _buf = ''; _buf << ((@text).to_s);
497
- ; _buf << ("<br>".freeze);
498
- ; _buf
632
+ _buf = ''; if @style == 'abstract';
633
+ ; if @parent == @document && @document.doctype == 'book';
634
+ ; puts 'asciidoctor: WARNING: abstract block cannot be used in a document without a title when doctype is book. Excluding block content.';
635
+ ; else;
636
+ ; _slim_controls1 = html_tag('div', { :id => @id, :class => ['quoteblock', 'abstract', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
637
+ ; if title?;
638
+ ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
639
+ ; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<blockquote>".freeze); _slim_controls2 << ((content).to_s);
640
+ ; _slim_controls2 << ("</blockquote>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); end; elsif @style == 'partintro' && (@level != 0 || @parent.context != :section || @document.doctype != 'book');
641
+ ; 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.';
642
+ ; else;
643
+ ; if (has_role? 'aside') or (has_role? 'speaker') or (has_role? 'notes');
644
+ ; _buf << ("<aside class=\"notes\">".freeze); _buf << ((resolve_content).to_s);
645
+ ; _buf << ("</aside>".freeze);
646
+ ; else;
647
+ ; _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 = '';
648
+ ; if title?;
649
+ ; _slim_controls4 << ("<div class=\"title\">".freeze); _slim_controls4 << ((title).to_s);
650
+ ; _slim_controls4 << ("</div>".freeze); end; _slim_controls4 << ("<div class=\"content\">".freeze); _slim_controls4 << ((content).to_s);
651
+ ; _slim_controls4 << ("</div>".freeze); _slim_controls4; end; _buf << ((_slim_controls3).to_s); end; end; _buf
499
652
  end
500
653
  end
501
654
 
502
- def video(node, opts = {})
655
+ def convert_paragraph(node, opts = {})
503
656
  node.extend(Helpers)
504
657
  node.instance_eval do
505
658
  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 = '';
659
+ _buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['paragraph', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
513
660
  ; 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 || '&amp;'}loop=1) : '';
522
- ; muted_param = (option? 'muted') ? %(#{delimiter.pop || '&amp;'}muted=1) : '';
523
- ; src = %(#{asset_uri_scheme}//player.vimeo.com/video/#{attr :target}#{loop_param}#{muted_param}#{start_anchor});
524
- ;
525
- ;
661
+ ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
662
+ ; _slim_controls2 << ("</div>".freeze); end; if has_role? 'small';
663
+ ; _slim_controls2 << ("<small>".freeze); _slim_controls2 << ((content).to_s);
664
+ ; _slim_controls2 << ("</small>".freeze); else;
665
+ ; _slim_controls2 << ("<p>".freeze); _slim_controls2 << ((content).to_s);
666
+ ; _slim_controls2 << ("</p>".freeze); end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
667
+ end
668
+ end
669
+
670
+ def convert_toc(node, opts = {})
671
+ node.extend(Helpers)
672
+ node.instance_eval do
673
+ converter.set_local_variables(binding, opts) unless opts.empty?
674
+ _buf = '';
526
675
  ;
527
676
  ;
528
677
  ;
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 * '&amp;'});
540
678
  ;
541
679
  ;
542
680
  ;
543
681
  ;
544
682
  ;
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
683
  ;
548
684
  ;
549
685
  ;
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
686
  ;
552
- ; end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
687
+ ; _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);
688
+ ; _buf << (((document.attr 'toc-title')).to_s);
689
+ ; _buf << ("</div>".freeze);
690
+ ; _buf << ((converter.convert document, 'outline').to_s);
691
+ ; _buf << ("</div>".freeze); _buf
553
692
  end
554
693
  end
555
694
 
556
- def inline_footnote(node, opts = {})
695
+ def convert_dlist(node, opts = {})
557
696
  node.extend(Helpers)
558
697
  node.instance_eval do
559
698
  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
699
+ _buf = ''; case @style;
700
+ ; when 'qanda';
701
+ ; _slim_controls1 = html_tag('div', { :id => @id, :class => ['qlist', @style, role] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
702
+ ; if title?;
703
+ ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
704
+ ; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<ol>".freeze);
705
+ ; items.each do |questions, answer|;
706
+ ; _slim_controls2 << ("<li>".freeze);
707
+ ; [*questions].each do |question|;
708
+ ; _slim_controls2 << ("<p><em>".freeze); _slim_controls2 << ((question.text).to_s);
709
+ ; _slim_controls2 << ("</em></p>".freeze); end; unless answer.nil?;
710
+ ; if answer.text?;
711
+ ; _slim_controls2 << ("<p>".freeze); _slim_controls2 << ((answer.text).to_s);
712
+ ; _slim_controls2 << ("</p>".freeze); end; if answer.blocks?;
713
+ ; _slim_controls2 << ((answer.content).to_s);
714
+ ; end; end; _slim_controls2 << ("</li>".freeze); end; _slim_controls2 << ("</ol>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); when 'horizontal';
715
+ ; _slim_controls3 = html_tag('div', { :id => @id, :class => ['hdlist', role] }.merge(data_attrs(@attributes))) do; _slim_controls4 = '';
716
+ ; if title?;
717
+ ; _slim_controls4 << ("<div class=\"title\">".freeze); _slim_controls4 << ((title).to_s);
718
+ ; _slim_controls4 << ("</div>".freeze); end; _slim_controls4 << ("<table>".freeze);
719
+ ; if (attr? :labelwidth) || (attr? :itemwidth);
720
+ ; _slim_controls4 << ("<colgroup><col".freeze);
721
+ ; _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);
722
+ ; _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);
723
+ ; end; items.each do |terms, dd|;
724
+ ; _slim_controls4 << ("<tr><td".freeze);
725
+ ; _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);
726
+ ; terms = [*terms];
727
+ ; last_term = terms.last;
728
+ ; terms.each do |dt|;
729
+ ; _slim_controls4 << ((dt.text).to_s);
730
+ ; if dt != last_term;
731
+ ; _slim_controls4 << ("<br>".freeze);
732
+ ; end; end; _slim_controls4 << ("</td><td class=\"hdlist2\">".freeze);
733
+ ; unless dd.nil?;
734
+ ; if dd.text?;
735
+ ; _slim_controls4 << ("<p>".freeze); _slim_controls4 << ((dd.text).to_s);
736
+ ; _slim_controls4 << ("</p>".freeze); end; if dd.blocks?;
737
+ ; _slim_controls4 << ((dd.content).to_s);
738
+ ; end; end; _slim_controls4 << ("</td></tr>".freeze); end; _slim_controls4 << ("</table>".freeze); _slim_controls4; end; _buf << ((_slim_controls3).to_s); else;
739
+ ; _slim_controls5 = html_tag('div', { :id => @id, :class => ['dlist', @style, role] }.merge(data_attrs(@attributes))) do; _slim_controls6 = '';
740
+ ; if title?;
741
+ ; _slim_controls6 << ("<div class=\"title\">".freeze); _slim_controls6 << ((title).to_s);
742
+ ; _slim_controls6 << ("</div>".freeze); end; _slim_controls6 << ("<dl>".freeze);
743
+ ; items.each do |terms, dd|;
744
+ ; [*terms].each do |dt|;
745
+ ; _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);
746
+ ; _slim_controls6 << ("</dt>".freeze); end; unless dd.nil?;
747
+ ; _slim_controls6 << ("<dd>".freeze);
748
+ ; if dd.text?;
749
+ ; _slim_controls6 << ("<p>".freeze); _slim_controls6 << ((dd.text).to_s);
750
+ ; _slim_controls6 << ("</p>".freeze); end; if dd.blocks?;
751
+ ; _slim_controls6 << ((dd.content).to_s);
752
+ ; end; _slim_controls6 << ("</dd>".freeze); end; end; _slim_controls6 << ("</dl>".freeze); _slim_controls6; end; _buf << ((_slim_controls5).to_s); end; _buf
574
753
  end
575
754
  end
576
755
 
577
- def stretch_nested_elements(node, opts = {})
756
+ def convert_inline_quoted(node, opts = {})
578
757
  node.extend(Helpers)
579
758
  node.instance_eval do
580
759
  converter.set_local_variables(binding, opts) unless opts.empty?
581
- _buf = ''; _buf << ("<script>var dom = {};\ndom.slides = document.querySelector('.reveal .slides');\n\nfunction getRemainingHeight(element, slideElement, height) {\n height = height || 0;\n if (element) {\n var newHeight, oldHeight = element.style.height;\n // Change the .stretch element height to 0 in order find the height of all\n // the other elements\n element.style.height = '0px';\n // In Overview mode, the parent (.slide) height is set of 700px.\n // Restore it temporarily to its natural height.\n slideElement.style.height = 'auto';\n newHeight = height - slideElement.offsetHeight;\n // Restore the old height, just in case\n element.style.height = oldHeight + 'px';\n // Clear the parent (.slide) height. .removeProperty works in IE9+\n slideElement.style.removeProperty('height');\n return newHeight;\n }\n return height;\n}\n\nfunction layoutSlideContents(width, height) {\n // Handle sizing of elements with the 'stretch' class\n toArray(dom.slides.querySelectorAll('section .stretch')).forEach(function (element) {\n // Determine how much vertical space we can use\n var limit = 5; // hard limit\n var parent = element.parentNode;\n while (parent.nodeName !== 'SECTION' && limit > 0) {\n parent = parent.parentNode;\n limit--;\n }\n if (limit === 0) {\n // unable to find parent, aborting!\n return;\n }\n var remainingHeight = getRemainingHeight(element, parent, height);\n // Consider the aspect ratio of media elements\n if (/(img|video)/gi.test(element.nodeName)) {\n var nw = element.naturalWidth || element.videoWidth, nh = element.naturalHeight || element.videoHeight;\n var es = Math.min(width / nw, remainingHeight / nh);\n element.style.width = (nw * es) + 'px';\n element.style.height = (nh * es) + 'px';\n } else {\n element.style.width = width + 'px';\n element.style.height = remainingHeight + 'px';\n }\n });\n}\n\nfunction toArray(o) {\n return Array.prototype.slice.call(o);\n}\n\nReveal.addEventListener('slidechanged', function () {\n layoutSlideContents(".freeze);
760
+ _buf = ''; quote_tags = { emphasis: 'em', strong: 'strong', monospaced: 'code', superscript: 'sup', subscript: 'sub' };
761
+ ; if (quote_tag = quote_tags[@type]);
762
+ ; _buf << ((html_tag(quote_tag, { :id => @id, :class => [role, ('fragment' if (option? :step) || (attr? 'step'))].compact }.merge(data_attrs(@attributes)), @text)).to_s);
763
+ ; else;
764
+ ; case @type;
765
+ ; when :double;
766
+ ; _buf << ((inline_text_container("&#8220;#{@text}&#8221;")).to_s);
767
+ ; when :single;
768
+ ; _buf << ((inline_text_container("&#8216;#{@text}&#8217;")).to_s);
769
+ ; when :asciimath, :latexmath;
770
+ ; open, close = Asciidoctor::INLINE_MATH_DELIMITERS[@type];
771
+ ; _buf << ((inline_text_container("#{open}#{@text}#{close}")).to_s);
772
+ ; else;
773
+ ; _buf << ((inline_text_container(@text)).to_s);
774
+ ; end; end; _buf
775
+ end
776
+ end
777
+
778
+ def convert_thematic_break(node, opts = {})
779
+ node.extend(Helpers)
780
+ node.instance_eval do
781
+ converter.set_local_variables(binding, opts) unless opts.empty?
782
+ _buf = ''; _buf << ("<hr>".freeze);
783
+ ; _buf
784
+ end
785
+ end
786
+
787
+ def convert_stem(node, opts = {})
788
+ node.extend(Helpers)
789
+ node.instance_eval do
790
+ converter.set_local_variables(binding, opts) unless opts.empty?
791
+ _buf = ''; open, close = Asciidoctor::BLOCK_MATH_DELIMITERS[@style.to_sym];
792
+ ; equation = content.strip;
793
+ ; if (@subs.nil? || @subs.empty?) && !(attr? 'subs');
794
+ ; equation = sub_specialcharacters equation;
795
+ ; end; unless (equation.start_with? open) && (equation.end_with? close);
796
+ ; equation = %(#{open}#{equation}#{close});
797
+ ; end; _slim_controls1 = html_tag('div', { :id => @id, :class => ['stemblock', role, ('fragment' if (option? :step) || (has_role? 'step') || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
798
+ ; if title?;
799
+ ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
800
+ ; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<div class=\"content\">".freeze); _slim_controls2 << ((equation).to_s);
801
+ ; _slim_controls2 << ("</div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
802
+ end
803
+ end
804
+
805
+ def convert_inline_anchor(node, opts = {})
806
+ node.extend(Helpers)
807
+ node.instance_eval do
808
+ converter.set_local_variables(binding, opts) unless opts.empty?
809
+ _buf = ''; case @type;
810
+ ; when :xref;
811
+ ; refid = (attr :refid) || @target;
812
+ ; _slim_controls1 = html_tag('a', { :href => @target, :class => [role, ('fragment' if (option? :step) || (attr? 'step'))].compact }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
813
+ ; _slim_controls2 << (((@text || @document.references[:ids].fetch(refid, "[#{refid}]")).tr_s("\n", ' ')).to_s);
814
+ ; _slim_controls2; end; _buf << ((_slim_controls1).to_s); when :ref;
815
+ ; _buf << ((html_tag('a', { :id => @target }.merge(data_attrs(@attributes)))).to_s);
816
+ ; when :bibref;
817
+ ; _buf << ((html_tag('a', { :id => @target }.merge(data_attrs(@attributes)))).to_s);
818
+ ; _buf << ("[".freeze); _buf << ((@target).to_s); _buf << ("]".freeze);
819
+ ; else;
820
+ ; _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 = '';
821
+ ; _slim_controls4 << ((@text).to_s);
822
+ ; _slim_controls4; end; _buf << ((_slim_controls3).to_s); end; _buf
823
+ end
824
+ end
825
+
826
+ def convert_document(node, opts = {})
827
+ node.extend(Helpers)
828
+ node.instance_eval do
829
+ converter.set_local_variables(binding, opts) unless opts.empty?
830
+ _buf = ''; slides_content = self.content;
831
+ ; content_for :slides do;
832
+ ; unless noheader;
833
+ ; unless (header_docinfo = docinfo :header, '-revealjs.html').empty?;
834
+ ; _buf << ((header_docinfo).to_s);
835
+ ; end; if header?;
836
+ ; bg_image = (attr? 'title-slide-background-image') ? (image_uri(attr 'title-slide-background-image')) : nil;
837
+ ; bg_video = (attr? 'title-slide-background-video') ? (media_uri(attr 'title-slide-background-video')) : nil;
582
838
  ;
583
839
  ;
584
840
  ;
@@ -594,22 +850,83 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
594
850
  ;
595
851
  ;
596
852
  ;
853
+ ; _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);
854
+ ; if (_title_obj = doctitle partition: true, use_fallback: true).subtitle?;
855
+ ; _buf << ("<h1>".freeze); _buf << ((slice_text _title_obj.title, (_slice = header.option? :slice)).to_s);
856
+ ; _buf << ("</h1><h2>".freeze); _buf << ((slice_text _title_obj.subtitle, _slice).to_s);
857
+ ; _buf << ("</h2>".freeze); else;
858
+ ; _buf << ("<h1>".freeze); _buf << ((@header.title).to_s);
859
+ ; _buf << ("</h1>".freeze); end; preamble = @document.find_by context: :preamble;
860
+ ; unless preamble.nil? or preamble.length == 0;
861
+ ; _buf << ("<div class=\"preamble\">".freeze); _buf << ((preamble.pop.content).to_s);
862
+ ; _buf << ("</div>".freeze); end; _buf << ((generate_authors(@document)).to_s);
863
+ ; _buf << ("</section>".freeze);
864
+ ; end; end; _buf << ((slides_content).to_s);
865
+ ; unless (footer_docinfo = docinfo :footer, '-revealjs.html').empty?;
866
+ ; _buf << ((footer_docinfo).to_s);
597
867
  ;
868
+ ; end; end; _buf << ("<!DOCTYPE html><html".freeze);
869
+ ; _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);
598
870
  ;
599
871
  ;
600
872
  ;
601
873
  ;
874
+ ; _buf << (((doctitle sanitize: true, use_fallback: true)).to_s);
602
875
  ;
876
+ ; _buf << ("</title>".freeze); if RUBY_ENGINE == 'opal' && JAVASCRIPT_PLATFORM == 'node';
877
+ ; revealjsdir = (attr :revealjsdir, 'node_modules/reveal.js');
878
+ ; else;
879
+ ; revealjsdir = (attr :revealjsdir, 'reveal.js');
880
+ ; end; unless (asset_uri_scheme = (attr 'asset-uri-scheme', 'https')).empty?;
881
+ ; asset_uri_scheme = %(#{asset_uri_scheme}:);
882
+ ; end; cdn_base = %(#{asset_uri_scheme}//cdnjs.cloudflare.com/ajax/libs);
883
+ ; [:description, :keywords, :author, :copyright].each do |key|;
884
+ ; if attr? key;
885
+ ; _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);
886
+ ; end; end; if attr? 'favicon';
887
+ ; if (icon_href = attr 'favicon').empty?;
888
+ ; icon_href = 'favicon.ico';
889
+ ; icon_type = 'image/x-icon';
890
+ ; elsif (icon_ext = File.extname icon_href);
891
+ ; icon_type = icon_ext == '.ico' ? 'image/x-icon' : %(image/#{icon_ext.slice 1, icon_ext.length});
892
+ ; else;
893
+ ; icon_type = 'image/x-icon';
894
+ ; end; _buf << ("<link rel=\"icon\" type=\"".freeze); _buf << ((icon_type).to_s); _buf << ("\" href=\"".freeze); _buf << ((icon_href).to_s); _buf << ("\">".freeze);
895
+ ; end; linkcss = (attr? 'linkcss');
896
+ ; _buf << ("<link rel=\"stylesheet\" href=\"".freeze); _buf << ((revealjsdir).to_s); _buf << ("/dist/reset.css\"><link rel=\"stylesheet\" href=\"".freeze);
897
+ ; _buf << ((revealjsdir).to_s); _buf << ("/dist/reveal.css\"><link rel=\"stylesheet\"".freeze);
603
898
  ;
604
899
  ;
900
+ ; _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);
605
901
  ;
606
902
  ;
607
903
  ;
904
+ ; if attr? :icons, 'font';
608
905
  ;
906
+ ; if attr? 'iconfont-remote';
907
+ ; if (iconfont_cdn = (attr 'iconfont-cdn'));
908
+ ; _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);
909
+ ; else;
609
910
  ;
911
+ ; font_awesome_version = (attr 'font-awesome-version', '5.15.1');
912
+ ; _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);
913
+ ; _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);
914
+ ; end; else;
915
+ ; _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);
916
+ ; end; end; _buf << ((generate_stem(cdn_base)).to_s);
917
+ ; syntax_hl = self.syntax_highlighter;
918
+ ; if syntax_hl && (syntax_hl.docinfo? :head);
919
+ ; _buf << ((syntax_hl.docinfo :head, self, cdn_base_url: cdn_base, linkcss: linkcss, self_closing_tag_slash: '/').to_s);
920
+ ; end; if attr? :customcss;
921
+ ; _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);
922
+ ; end; unless (_docinfo = docinfo :head, '-revealjs.html').empty?;
923
+ ; _buf << ((_docinfo).to_s);
924
+ ; end; _buf << ("</head><body><div class=\"reveal\"><div class=\"slides\">".freeze);
610
925
  ;
611
926
  ;
612
927
  ;
928
+ ; yield_content :slides;
929
+ ; _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);
613
930
  ;
614
931
  ;
615
932
  ;
@@ -628,691 +945,165 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
628
945
  ;
629
946
  ;
630
947
  ;
948
+ ; _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);
631
949
  ;
632
950
  ;
951
+ ; _buf << ((to_boolean(attr 'revealjs_controlstutorial', true)).to_s); _buf << (",\n // Determines where controls appear, \"edges\" or \"bottom-right\"\n controlsLayout: '".freeze);
633
952
  ;
953
+ ; _buf << ((attr 'revealjs_controlslayout', 'bottom-right').to_s); _buf << ("',\n // Visibility rule for backwards navigation arrows; \"faded\", \"hidden\"\n // or \"visible\"\n controlsBackArrows: '".freeze);
634
954
  ;
635
955
  ;
956
+ ; _buf << ((attr 'revealjs_controlsbackarrows', 'faded').to_s); _buf << ("',\n // Display a presentation progress bar\n progress: ".freeze);
636
957
  ;
958
+ ; _buf << ((to_boolean(attr 'revealjs_progress', true)).to_s); _buf << (",\n // Display the page number of the current slide\n slideNumber: ".freeze);
637
959
  ;
638
- ; _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);
960
+ ; _buf << ((to_valid_slidenumber(attr 'revealjs_slidenumber', false)).to_s); _buf << (",\n // Control which views the slide number displays on\n showSlideNumber: '".freeze);
639
961
  ;
962
+ ; _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);
640
963
  ;
641
- ; _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);
642
964
  ;
965
+ ; _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);
643
966
  ;
644
- ; _buf << ((attr 'revealjs_width', 960).to_s); _buf << (", ".freeze); _buf << ((attr 'revealjs_height', 700).to_s); _buf << (")\n});</script>".freeze);
967
+ ; _buf << ((to_boolean(attr 'revealjs_history', false)).to_s); _buf << (",\n // Enable keyboard shortcuts for navigation\n keyboard: ".freeze);
645
968
  ;
646
- ; _buf
647
- end
648
- end
649
-
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;
969
+ ; _buf << ((to_boolean(attr 'revealjs_keyboard', true)).to_s); _buf << (",\n // Enable the slide overview mode\n overview: ".freeze);
656
970
  ;
971
+ ; _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);
657
972
  ;
973
+ ; _buf << ((to_boolean(attr 'revealjs_disablelayout', false)).to_s); _buf << (",\n // Vertical centering of slides\n center: ".freeze);
658
974
  ;
975
+ ; _buf << ((to_boolean(attr 'revealjs_center', true)).to_s); _buf << (",\n // Enables touch navigation on devices with touch input\n touch: ".freeze);
659
976
  ;
977
+ ; _buf << ((to_boolean(attr 'revealjs_touch', true)).to_s); _buf << (",\n // Loop the presentation\n loop: ".freeze);
660
978
  ;
979
+ ; _buf << ((to_boolean(attr 'revealjs_loop', false)).to_s); _buf << (",\n // Change the presentation direction to be RTL\n rtl: ".freeze);
661
980
  ;
662
- ; if (has_role? 'stretch') && !((attr? :width) || (attr? :height));
663
- ; height = "100%";
981
+ ; _buf << ((to_boolean(attr 'revealjs_rtl', false)).to_s); _buf << (",\n // See https://github.com/hakimel/reveal.js/#navigation-mode\n navigationMode: '".freeze);
664
982
  ;
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 = {})
680
- node.extend(Helpers)
681
- node.instance_eval do
682
- converter.set_local_variables(binding, opts) unless opts.empty?
683
- _buf = ''; if (has_role? 'aside') or (has_role? 'speaker') or (has_role? 'notes');
684
- ; _buf << ("<aside class=\"notes\">".freeze); _buf << ((resolve_content).to_s);
685
- ; _buf << ("</aside>".freeze);
686
- ; else;
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);
983
+ ; _buf << ((attr 'revealjs_navigationmode', 'default').to_s); _buf << ("',\n // Randomizes the order of slides each time the presentation loads\n shuffle: ".freeze);
689
984
  ;
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);
698
- ; if title?;
699
- ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
700
- ; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ((content).to_s);
701
- ; _slim_controls2 << ("</td></tr></table>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); end; _buf
702
- end
703
- end
704
-
705
- def ruler(node, opts = {})
706
- node.extend(Helpers)
707
- node.instance_eval do
708
- converter.set_local_variables(binding, opts) unless opts.empty?
709
- _buf = ''; _buf << ("<hr>".freeze);
710
- ; _buf
711
- end
712
- end
713
-
714
- def page_break(node, opts = {})
715
- node.extend(Helpers)
716
- node.instance_eval do
717
- converter.set_local_variables(binding, opts) unless opts.empty?
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];
728
- ; equation = content.strip;
729
- ; if (@subs.nil? || @subs.empty?) && !(attr? 'subs');
730
- ; equation = sub_specialcharacters equation;
731
- ; end; unless (equation.start_with? open) && (equation.end_with? close);
732
- ; equation = %(#{open}#{equation}#{close});
733
- ; end; _slim_controls1 = html_tag('div', { :id => @id, :class => ['stemblock', role, ('fragment' if (option? :step) || (has_role? 'step') || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
734
- ; if title?;
735
- ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
736
- ; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<div class=\"content\">".freeze); _slim_controls2 << ((equation).to_s);
737
- ; _slim_controls2 << ("</div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
738
- end
739
- end
740
-
741
- def toc(node, opts = {})
742
- node.extend(Helpers)
743
- node.instance_eval do
744
- converter.set_local_variables(binding, opts) unless opts.empty?
745
- _buf = '';
985
+ ; _buf << ((to_boolean(attr 'revealjs_shuffle', false)).to_s); _buf << (",\n // Turns fragments on and off globally\n fragments: ".freeze);
746
986
  ;
987
+ ; _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);
747
988
  ;
748
989
  ;
990
+ ; _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);
749
991
  ;
750
992
  ;
993
+ ; _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);
751
994
  ;
752
995
  ;
996
+ ; _buf << ((to_boolean(attr 'revealjs_help', true)).to_s); _buf << (",\n // Flags if speaker notes should be visible to all viewers\n showNotes: ".freeze);
753
997
  ;
998
+ ; _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);
754
999
  ;
755
1000
  ;
756
1001
  ;
757
1002
  ;
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 = '';
783
- ; if title?;
784
- ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
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);
786
- ; items.each do |item|;
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;
792
- ; _slim_controls2 << ((item.text).to_s);
793
- ; end; _slim_controls2 << ("</p>".freeze); if item.blocks?;
794
- ; _slim_controls2 << ((item.content).to_s);
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>&#160;&#9656;&#32;".freeze);
819
- ; _slim_controls2 << ((submenus.map {|submenu| %(<span class="submenu">#{submenu}</span>&#160;&#9656;&#32;) }.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>&#160;&#9656;&#32;<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
830
- end
831
- end
832
-
833
- def colist(node, opts = {})
834
- node.extend(Helpers)
835
- node.instance_eval do
836
- converter.set_local_variables(binding, opts) unless opts.empty?
837
- _buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['colist', @style, role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
838
- ; if title?;
839
- ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
840
- ; _slim_controls2 << ("</div>".freeze); end; if @document.attr? :icons;
841
- ; font_icons = @document.attr? :icons, 'font';
842
- ; _slim_controls2 << ("<table>".freeze);
843
- ; items.each_with_index do |item, i|;
844
- ; num = i + 1;
845
- ; _slim_controls2 << ("<tr><td>".freeze);
846
- ;
847
- ; if font_icons;
848
- ; _slim_controls2 << ("<i class=\"conum\"".freeze); _slim_codeattributes1 = num; if _slim_codeattributes1; if _slim_codeattributes1 == true; _slim_controls2 << (" data-value".freeze); else; _slim_controls2 << (" data-value=\"".freeze); _slim_controls2 << ((_slim_codeattributes1).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << ("></i><b>".freeze);
849
- ; _slim_controls2 << ((num).to_s);
850
- ; _slim_controls2 << ("</b>".freeze); else;
851
- ; _slim_controls2 << ("<img".freeze); _slim_codeattributes2 = icon_uri("callouts/#{num}"); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls2 << (" src".freeze); else; _slim_controls2 << (" src=\"".freeze); _slim_controls2 << ((_slim_codeattributes2).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes3 = num; if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls2 << (" alt".freeze); else; _slim_controls2 << (" alt=\"".freeze); _slim_controls2 << ((_slim_codeattributes3).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << (">".freeze);
852
- ; end; _slim_controls2 << ("</td><td>".freeze); _slim_controls2 << ((item.text).to_s);
853
- ; _slim_controls2 << ("</td></tr>".freeze); end; _slim_controls2 << ("</table>".freeze); else;
854
- ; _slim_controls2 << ("<ol>".freeze);
855
- ; items.each do |item|;
856
- ; _slim_controls2 << ("<li><p>".freeze); _slim_controls2 << ((item.text).to_s);
857
- ; _slim_controls2 << ("</p></li>".freeze); end; _slim_controls2 << ("</ol>".freeze); end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
858
- end
859
- end
860
-
861
- def inline_anchor(node, opts = {})
862
- node.extend(Helpers)
863
- node.instance_eval do
864
- converter.set_local_variables(binding, opts) unless opts.empty?
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);
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 << ("&#8212; ".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 = '';
1040
- ;
1041
- ; titleless = (title = self.title) == '!';
1042
- ; hide_title = (titleless || (option? :notitle) || (option? :conceal));
1043
- ;
1044
- ; vertical_slides = find_by(context: :section) {|section| section.level == 2 };
1045
- ;
1046
- ;
1003
+ ; _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);
1047
1004
  ;
1048
- ; data_background_image, data_background_size, data_background_repeat,
1049
- data_background_position, data_background_transition = nil;
1050
1005
  ;
1051
1006
  ;
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');
1061
1007
  ;
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';
1066
1008
  ;
1009
+ ; _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);
1067
1010
  ;
1068
- ; end; if attr? 'background-image';
1069
- ; data_background_image = image_uri(attr 'background-image');
1070
1011
  ;
1071
- ; end; if attr? 'background-video';
1072
- ; data_background_video = media_uri(attr 'background-video');
1073
1012
  ;
1074
- ; end; if attr? 'background-color';
1075
- ; data_background_color = attr 'background-color';
1013
+ ; _buf << ((attr 'revealjs_autoslide', 0).to_s); _buf << (",\n // Stop auto-sliding after user input\n autoSlideStoppable: ".freeze);
1076
1014
  ;
1077
- ; end; parent_section_with_vertical_slides = @level == 1 && !vertical_slides.empty?;
1015
+ ; _buf << ((to_boolean(attr 'revealjs_autoslidestoppable', true)).to_s); _buf << (",\n // Use this method for navigation when auto-sliding\n autoSlideMethod: ".freeze);
1078
1016
  ;
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);
1017
+ ; _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);
1086
1018
  ;
1087
- ; _buf << ("</div>".freeze); end; _buf << ("</div>".freeze); end; end; content_for :section do;
1088
1019
  ;
1089
1020
  ;
1021
+ ; _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);
1090
1022
  ;
1091
1023
  ;
1092
1024
  ;
1093
1025
  ;
1026
+ ; _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);
1094
1027
  ;
1095
1028
  ;
1096
1029
  ;
1097
1030
  ;
1098
1031
  ;
1032
+ ; _buf << ((attr 'revealjs_minimumtimeperslide', 0).to_s); _buf << (",\n // Enable slide navigation via mouse wheel\n mouseWheel: ".freeze);
1099
1033
  ;
1034
+ ; _buf << ((to_boolean(attr 'revealjs_mousewheel', false)).to_s); _buf << (",\n // Hide cursor if inactive\n hideInactiveCursor: ".freeze);
1100
1035
  ;
1036
+ ; _buf << ((to_boolean(attr 'revealjs_hideinactivecursor', true)).to_s); _buf << (",\n // Time before the cursor is hidden (in ms)\n hideCursorTime: ".freeze);
1101
1037
  ;
1038
+ ; _buf << ((attr 'revealjs_hidecursortime', 5000).to_s); _buf << (",\n // Hides the address bar on mobile devices\n hideAddressBar: ".freeze);
1102
1039
  ;
1040
+ ; _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);
1103
1041
  ;
1104
1042
  ;
1105
1043
  ;
1044
+ ; _buf << ((to_boolean(attr 'revealjs_previewlinks', false)).to_s); _buf << (",\n // Transition style (e.g., none, fade, slide, convex, concave, zoom)\n transition: '".freeze);
1106
1045
  ;
1046
+ ; _buf << ((attr 'revealjs_transition', 'slide').to_s); _buf << ("',\n // Transition speed (e.g., default, fast, slow)\n transitionSpeed: '".freeze);
1107
1047
  ;
1048
+ ; _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);
1108
1049
  ;
1050
+ ; _buf << ((attr 'revealjs_backgroundtransition', 'fade').to_s); _buf << ("',\n // Number of slides away from the current that are visible\n viewDistance: ".freeze);
1109
1051
  ;
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;
1052
+ ; _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);
1119
1053
  ;
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;
1125
1054
  ;
1126
- ; end; clear_slide_footnotes;
1127
1055
  ;
1128
- ; _buf << ("</section>".freeze);
1056
+ ; _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);
1129
1057
  ;
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);
1058
+ ; _buf << ((attr 'revealjs_parallaxbackgroundimage', '').to_s); _buf << ("',\n // Parallax background size in CSS syntax (e.g., \"2100px 900px\")\n parallaxBackgroundSize: '".freeze);
1135
1059
  ;
1136
- ; end; _buf << ("</section>".freeze);
1137
- ; else;
1138
- ; if @level >= 3;
1060
+ ; _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);
1139
1061
  ;
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|;
1176
1062
  ;
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|;
1181
1063
  ;
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;
1064
+ ; _buf << ((attr 'revealjs_parallaxbackgroundhorizontal', 'null').to_s); _buf << (",\n parallaxBackgroundVertical: ".freeze);
1065
+ ; _buf << ((attr 'revealjs_parallaxbackgroundvertical', 'null').to_s); _buf << (",\n // The display mode that will be used to show slides\n display: '".freeze);
1224
1066
  ;
1067
+ ; _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);
1225
1068
  ;
1226
1069
  ;
1227
1070
  ;
1228
1071
  ;
1072
+ ; _buf << ((attr 'revealjs_width', 960).to_s); _buf << (",\n height: ".freeze);
1073
+ ; _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);
1229
1074
  ;
1230
1075
  ;
1076
+ ; _buf << ((attr 'revealjs_margin', 0.1).to_s); _buf << (",\n\n // Bounds for smallest/largest possible scale to apply to content\n minScale: ".freeze);
1231
1077
  ;
1232
1078
  ;
1079
+ ; _buf << ((attr 'revealjs_minscale', 0.2).to_s); _buf << (",\n maxScale: ".freeze);
1080
+ ; _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);
1233
1081
  ;
1234
1082
  ;
1235
1083
  ;
1084
+ ; _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);
1236
1085
  ;
1086
+ ; _buf << ((attr 'revealjs_pdfmaxpagesperslide', 1).to_s); _buf << (",\n\n // Optional libraries used to extend on reveal.js\n dependencies: [\n ".freeze);
1237
1087
  ;
1238
1088
  ;
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);
1253
1089
  ;
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);
1090
+ ; _buf << ((revealjs_dependencies(document, self, revealjsdir)).to_s);
1091
+ ; _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);
1256
1092
  ;
1257
1093
  ;
1258
1094
  ;
1259
1095
  ;
1260
- ; _buf << (((doctitle sanitize: true, use_fallback: true)).to_s);
1261
1096
  ;
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);
1284
1097
  ;
1285
1098
  ;
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);
1287
1099
  ;
1288
1100
  ;
1289
1101
  ;
1290
- ; if attr? :icons, 'font';
1291
1102
  ;
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;
1296
1103
  ;
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);
1311
1104
  ;
1312
1105
  ;
1313
1106
  ;
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);
1316
1107
  ;
1317
1108
  ;
1318
1109
  ;
@@ -1331,156 +1122,577 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
1331
1122
  ;
1332
1123
  ;
1333
1124
  ;
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);
1335
1125
  ;
1336
1126
  ;
1337
- ; _buf << ((to_boolean(attr 'revealjs_controlstutorial', true)).to_s); _buf << (",\n // Determines where controls appear, \"edges\" or \"bottom-right\"\n controlsLayout: '".freeze);
1338
1127
  ;
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);
1340
1128
  ;
1341
1129
  ;
1342
- ; _buf << ((attr 'revealjs_controlsbackarrows', 'faded').to_s); _buf << ("',\n // Display a presentation progress bar\n progress: ".freeze);
1343
1130
  ;
1344
- ; _buf << ((to_boolean(attr 'revealjs_progress', true)).to_s); _buf << (",\n // Display the page number of the current slide\n slideNumber: ".freeze);
1345
1131
  ;
1346
- ; _buf << ((to_valid_slidenumber(attr 'revealjs_slidenumber', false)).to_s); _buf << (",\n // Control which views the slide number displays on\n showSlideNumber: '".freeze);
1347
1132
  ;
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);
1349
1133
  ;
1350
1134
  ;
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);
1352
1135
  ;
1353
- ; _buf << ((to_boolean(attr 'revealjs_history', false)).to_s); _buf << (",\n // Enable keyboard shortcuts for navigation\n keyboard: ".freeze);
1354
1136
  ;
1355
- ; _buf << ((to_boolean(attr 'revealjs_keyboard', true)).to_s); _buf << (",\n // Enable the slide overview mode\n overview: ".freeze);
1356
1137
  ;
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);
1358
1138
  ;
1359
- ; _buf << ((to_boolean(attr 'revealjs_disablelayout', false)).to_s); _buf << (",\n // Vertical centering of slides\n center: ".freeze);
1360
1139
  ;
1361
- ; _buf << ((to_boolean(attr 'revealjs_center', true)).to_s); _buf << (",\n // Enables touch navigation on devices with touch input\n touch: ".freeze);
1362
1140
  ;
1363
- ; _buf << ((to_boolean(attr 'revealjs_touch', true)).to_s); _buf << (",\n // Loop the presentation\n loop: ".freeze);
1364
1141
  ;
1365
- ; _buf << ((to_boolean(attr 'revealjs_loop', false)).to_s); _buf << (",\n // Change the presentation direction to be RTL\n rtl: ".freeze);
1366
1142
  ;
1367
- ; _buf << ((to_boolean(attr 'revealjs_rtl', false)).to_s); _buf << (",\n // See https://github.com/hakimel/reveal.js/#navigation-mode\n navigationMode: '".freeze);
1368
1143
  ;
1369
- ; _buf << ((attr 'revealjs_navigationmode', 'default').to_s); _buf << ("',\n // Randomizes the order of slides each time the presentation loads\n shuffle: ".freeze);
1370
1144
  ;
1371
- ; _buf << ((to_boolean(attr 'revealjs_shuffle', false)).to_s); _buf << (",\n // Turns fragments on and off globally\n fragments: ".freeze);
1372
1145
  ;
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);
1374
1146
  ;
1375
1147
  ;
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);
1377
1148
  ;
1378
1149
  ;
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);
1380
1150
  ;
1381
1151
  ;
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);
1383
1152
  ;
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);
1385
1153
  ;
1154
+ ; _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);
1155
+ ;
1156
+ ;
1157
+ ; _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);
1158
+ ;
1159
+ ;
1160
+ ; _buf << ((attr 'revealjs_width', 960).to_s); _buf << (", ".freeze); _buf << ((attr 'revealjs_height', 700).to_s); _buf << (")\n});</script>".freeze);
1161
+ ;
1162
+ ;
1163
+ ; if syntax_hl && (syntax_hl.docinfo? :footer);
1164
+ ; _buf << ((syntax_hl.docinfo :footer, self, cdn_base_url: cdn_base, linkcss: linkcss, self_closing_tag_slash: '/').to_s);
1165
+ ;
1166
+ ; end; unless (docinfo_content = (docinfo :footer, '.html')).empty?;
1167
+ ; _buf << ((docinfo_content).to_s);
1168
+ ; end; _buf << ("</body></html>".freeze); _buf
1169
+ end
1170
+ end
1171
+
1172
+ def convert_floating_title(node, opts = {})
1173
+ node.extend(Helpers)
1174
+ node.instance_eval do
1175
+ converter.set_local_variables(binding, opts) unless opts.empty?
1176
+ _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);
1177
+ ; _buf << ((title).to_s);
1178
+ ; _buf << ("</h".freeze); _buf << ((_slim_htag_filter1).to_s); _buf << (">".freeze); _buf
1179
+ end
1180
+ end
1181
+
1182
+ def convert_page_break(node, opts = {})
1183
+ node.extend(Helpers)
1184
+ node.instance_eval do
1185
+ converter.set_local_variables(binding, opts) unless opts.empty?
1186
+ _buf = ''; _buf << ("<div style=\"page-break-after: always;\"></div>".freeze);
1187
+ ; _buf
1188
+ end
1189
+ end
1190
+
1191
+ def convert_inline_callout(node, opts = {})
1192
+ node.extend(Helpers)
1193
+ node.instance_eval do
1194
+ converter.set_local_variables(binding, opts) unless opts.empty?
1195
+ _buf = ''; if @document.attr? :icons, 'font';
1196
+ ; _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);
1197
+ ; _buf << (("(#{@text})").to_s);
1198
+ ; _buf << ("</b>".freeze); elsif @document.attr? :icons;
1199
+ ; _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);
1200
+ ; else;
1201
+ ; _buf << ("<b>".freeze); _buf << (("(#{@text})").to_s);
1202
+ ; _buf << ("</b>".freeze); end; _buf
1203
+ end
1204
+ end
1205
+
1206
+ def convert_pass(node, opts = {})
1207
+ node.extend(Helpers)
1208
+ node.instance_eval do
1209
+ converter.set_local_variables(binding, opts) unless opts.empty?
1210
+ _buf = ''; _buf << ((content).to_s);
1211
+ ; _buf
1212
+ end
1213
+ end
1214
+
1215
+ def convert_embedded(node, opts = {})
1216
+ node.extend(Helpers)
1217
+ node.instance_eval do
1218
+ converter.set_local_variables(binding, opts) unless opts.empty?
1219
+ _buf = ''; unless notitle || !has_header?;
1220
+ ; _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);
1221
+ ; _buf << ("</h1>".freeze); end; _buf << ((content).to_s);
1222
+ ; unless !footnotes? || attr?(:nofootnotes);
1223
+ ; _buf << ("<div id=\"footnotes\"><hr>".freeze);
1224
+ ;
1225
+ ; footnotes.each do |fn|;
1226
+ ; _buf << ("<div class=\"footnote\" id=\"_footnote_".freeze); _buf << ((fn.index).to_s); _buf << ("\"><a href=\"#_footnoteref_".freeze);
1227
+ ; _buf << ((fn.index).to_s); _buf << ("\">".freeze); _buf << ((fn.index).to_s); _buf << ("</a>. ".freeze); _buf << ((fn.text).to_s);
1228
+ ; _buf << ("</div>".freeze); end; _buf << ("</div>".freeze); end; _buf
1229
+ end
1230
+ end
1231
+
1232
+ def convert_listing(node, opts = {})
1233
+ node.extend(Helpers)
1234
+ node.instance_eval do
1235
+ converter.set_local_variables(binding, opts) unless opts.empty?
1236
+ _buf = ''; nowrap = (option? 'nowrap') || !(document.attr? 'prewrap');
1237
+ ; if @style == 'source';
1238
+ ; syntax_hl = document.syntax_highlighter;
1239
+ ; lang = attr :language;
1240
+ ; if syntax_hl;
1241
+ ; doc_attrs = document.attributes;
1242
+ ; css_mode = (doc_attrs[%(#{syntax_hl.name}-css)] || :class).to_sym;
1243
+ ; style = doc_attrs[%(#{syntax_hl.name}-style)];
1244
+ ; opts = syntax_hl.highlight? ? { css_mode: css_mode, style: style } : {};
1245
+ ; opts[:nowrap] = nowrap;
1246
+ ; end;
1247
+ ; 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 = '';
1248
+ ; if title?;
1249
+ ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
1250
+ ; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<div class=\"content\">".freeze);
1251
+ ; if syntax_hl;
1252
+ ; _slim_controls2 << (((syntax_hl.format self, lang, opts)).to_s);
1253
+ ; else;
1254
+ ; if @style == 'source';
1255
+ ; _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);
1256
+ ; _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);
1257
+ ; _slim_controls2 << ((content || '').to_s);
1258
+ ; _slim_controls2 << ("</code></pre>".freeze); else;
1259
+ ; _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);
1260
+ ; _slim_controls2 << ((content || '').to_s);
1261
+ ; _slim_controls2 << ("</pre>".freeze); end; end; _slim_controls2 << ("</div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
1262
+ end
1263
+ end
1264
+
1265
+ def convert_inline_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 << ((@text).to_s);
1270
+ ; _buf << ("<br>".freeze);
1271
+ ; _buf
1272
+ end
1273
+ end
1274
+
1275
+ def convert_ulist(node, opts = {})
1276
+ node.extend(Helpers)
1277
+ node.instance_eval do
1278
+ converter.set_local_variables(binding, opts) unless opts.empty?
1279
+ _buf = ''; if (checklist = (option? :checklist) ? 'checklist' : nil);
1280
+ ; if option? :interactive;
1281
+ ; marker_checked = '<input type="checkbox" data-item-complete="1" checked>';
1282
+ ; marker_unchecked = '<input type="checkbox" data-item-complete="0">';
1283
+ ; else;
1284
+ ; if @document.attr? :icons, 'font';
1285
+ ; marker_checked = '<i class="icon-check"></i>';
1286
+ ; marker_unchecked = '<i class="icon-check-empty"></i>';
1287
+ ; else;
1288
+ ;
1289
+ ; marker_checked = '<input type="checkbox" data-item-complete="1" checked disabled>';
1290
+ ; marker_unchecked = '<input type="checkbox" data-item-complete="0" disabled>';
1291
+ ; end; end; end; _slim_controls1 = html_tag('div', { :id => @id, :class => ['ulist', checklist, @style, role] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
1292
+ ; if title?;
1293
+ ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
1294
+ ; _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);
1295
+ ; items.each do |item|;
1296
+ ; _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);
1297
+ ;
1298
+ ; if checklist && (item.attr? :checkbox);
1299
+ ; _slim_controls2 << ((%(#{(item.attr? :checked) ? marker_checked : marker_unchecked}#{item.text})).to_s);
1300
+ ; else;
1301
+ ; _slim_controls2 << ((item.text).to_s);
1302
+ ; end; _slim_controls2 << ("</p>".freeze); if item.blocks?;
1303
+ ; _slim_controls2 << ((item.content).to_s);
1304
+ ; end; _slim_controls2 << ("</li>".freeze); end; _slim_controls2 << ("</ul>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
1305
+ end
1306
+ end
1307
+
1308
+ def convert_quote(node, opts = {})
1309
+ node.extend(Helpers)
1310
+ node.instance_eval do
1311
+ converter.set_local_variables(binding, opts) unless opts.empty?
1312
+ _buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['quoteblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
1313
+ ; if title?;
1314
+ ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
1315
+ ; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<blockquote>".freeze); _slim_controls2 << ((content).to_s);
1316
+ ; _slim_controls2 << ("</blockquote>".freeze); attribution = (attr? :attribution) ? (attr :attribution) : nil;
1317
+ ; citetitle = (attr? :citetitle) ? (attr :citetitle) : nil;
1318
+ ; if attribution || citetitle;
1319
+ ; _slim_controls2 << ("<div class=\"attribution\">".freeze);
1320
+ ; if citetitle;
1321
+ ; _slim_controls2 << ("<cite>".freeze); _slim_controls2 << ((citetitle).to_s);
1322
+ ; _slim_controls2 << ("</cite>".freeze); end; if attribution;
1323
+ ; if citetitle;
1324
+ ; _slim_controls2 << ("<br>".freeze);
1325
+ ; end; _slim_controls2 << ("&#8212; ".freeze); _slim_controls2 << ((attribution).to_s);
1326
+ ; end; _slim_controls2 << ("</div>".freeze); end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
1327
+ end
1328
+ end
1329
+
1330
+ def convert_verse(node, opts = {})
1331
+ node.extend(Helpers)
1332
+ node.instance_eval do
1333
+ converter.set_local_variables(binding, opts) unless opts.empty?
1334
+ _buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['verseblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
1335
+ ; if title?;
1336
+ ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
1337
+ ; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<pre class=\"content\">".freeze); _slim_controls2 << ((content).to_s);
1338
+ ; _slim_controls2 << ("</pre>".freeze); attribution = (attr? :attribution) ? (attr :attribution) : nil;
1339
+ ; citetitle = (attr? :citetitle) ? (attr :citetitle) : nil;
1340
+ ; if attribution || citetitle;
1341
+ ; _slim_controls2 << ("<div class=\"attribution\">".freeze);
1342
+ ; if citetitle;
1343
+ ; _slim_controls2 << ("<cite>".freeze); _slim_controls2 << ((citetitle).to_s);
1344
+ ; _slim_controls2 << ("</cite>".freeze); end; if attribution;
1345
+ ; if citetitle;
1346
+ ; _slim_controls2 << ("<br>".freeze);
1347
+ ; end; _slim_controls2 << ("&#8212; ".freeze); _slim_controls2 << ((attribution).to_s);
1348
+ ; end; _slim_controls2 << ("</div>".freeze); end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
1349
+ end
1350
+ end
1351
+
1352
+ def convert_video(node, opts = {})
1353
+ node.extend(Helpers)
1354
+ node.instance_eval do
1355
+ converter.set_local_variables(binding, opts) unless opts.empty?
1356
+ _buf = '';
1357
+ ;
1358
+ ; no_stretch = ((attr? :width) || (attr? :height));
1359
+ ; width = (attr? :width) ? (attr :width) : "100%";
1360
+ ; height = (attr? :height) ? (attr :height) : "100%";
1361
+ ;
1362
+ ; _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 = '';
1363
+ ; if title?;
1364
+ ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
1365
+ ; _slim_controls2 << ("</div>".freeze); end; case attr :poster;
1366
+ ; when 'vimeo';
1367
+ ; unless (asset_uri_scheme = (attr :asset_uri_scheme, 'https')).empty?;
1368
+ ; asset_uri_scheme = %(#{asset_uri_scheme}:);
1369
+ ; end; start_anchor = (attr? :start) ? "#at=#{attr :start}" : nil;
1370
+ ; delimiter = ['?'];
1371
+ ; loop_param = (option? 'loop') ? %(#{delimiter.pop || '&amp;'}loop=1) : '';
1372
+ ; muted_param = (option? 'muted') ? %(#{delimiter.pop || '&amp;'}muted=1) : '';
1373
+ ; src = %(#{asset_uri_scheme}//player.vimeo.com/video/#{attr :target}#{loop_param}#{muted_param}#{start_anchor});
1374
+ ;
1375
+ ;
1376
+ ;
1377
+ ;
1378
+ ;
1379
+ ; _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);
1380
+ ; when 'youtube';
1381
+ ; unless (asset_uri_scheme = (attr :asset_uri_scheme, 'https')).empty?;
1382
+ ; asset_uri_scheme = %(#{asset_uri_scheme}:);
1383
+ ; end; params = ['rel=0'];
1384
+ ; params << "start=#{attr :start}" if attr? :start;
1385
+ ; params << "end=#{attr :end}" if attr? :end;
1386
+ ; params << "loop=1" if option? 'loop';
1387
+ ; params << "mute=1" if option? 'muted';
1388
+ ; params << "controls=0" if option? 'nocontrols';
1389
+ ; src = %(#{asset_uri_scheme}//www.youtube.com/embed/#{attr :target}?#{params * '&amp;'});
1390
+ ;
1391
+ ;
1392
+ ;
1393
+ ;
1394
+ ;
1395
+ ; _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);
1396
+ ; else;
1386
1397
  ;
1387
1398
  ;
1388
1399
  ;
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);
1400
+ ; _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);
1390
1401
  ;
1402
+ ; end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
1403
+ end
1404
+ end
1405
+
1406
+ def convert_outline(node, opts = {})
1407
+ node.extend(Helpers)
1408
+ node.instance_eval do
1409
+ converter.set_local_variables(binding, opts) unless opts.empty?
1410
+ _buf = ''; unless sections.empty?;
1411
+ ; toclevels ||= (document.attr 'toclevels', DEFAULT_TOCLEVELS).to_i;
1412
+ ; slevel = section_level sections.first;
1413
+ ; _buf << ("<ol class=\"sectlevel".freeze); _buf << ((slevel).to_s); _buf << ("\">".freeze);
1414
+ ; sections.each do |sec|;
1415
+ ; _buf << ("<li><a href=\"#".freeze);
1416
+ ; _buf << ((sec.id).to_s); _buf << ("\">".freeze); _buf << ((section_title sec).to_s);
1417
+ ; _buf << ("</a>".freeze); if (sec.level < toclevels) && (child_toc = converter.convert sec, 'outline');
1418
+ ; _buf << ((child_toc).to_s);
1419
+ ; end; _buf << ("</li>".freeze); end; _buf << ("</ol>".freeze); end; _buf
1420
+ end
1421
+ end
1422
+
1423
+ def convert_inline_indexterm(node, opts = {})
1424
+ node.extend(Helpers)
1425
+ node.instance_eval do
1426
+ converter.set_local_variables(binding, opts) unless opts.empty?
1427
+ _buf = ''; if @type == :visible;
1428
+ ; _buf << ((@text).to_s);
1429
+ ; end; _buf
1430
+ end
1431
+ end
1432
+
1433
+ def convert_title_slide(node, opts = {})
1434
+ node.extend(Helpers)
1435
+ node.instance_eval do
1436
+ converter.set_local_variables(binding, opts) unless opts.empty?
1437
+ _buf = ''; bg_image = (attr? 'title-slide-background-image') ? (image_uri(attr 'title-slide-background-image')) : nil;
1438
+ ; bg_video = (attr? 'title-slide-background-video') ? (media_uri(attr 'title-slide-background-video')) : nil;
1391
1439
  ;
1392
1440
  ;
1393
1441
  ;
1394
1442
  ;
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);
1396
1443
  ;
1397
1444
  ;
1398
1445
  ;
1399
- ; _buf << ((attr 'revealjs_autoslide', 0).to_s); _buf << (",\n // Stop auto-sliding after user input\n autoSlideStoppable: ".freeze);
1400
1446
  ;
1401
- ; _buf << ((to_boolean(attr 'revealjs_autoslidestoppable', true)).to_s); _buf << (",\n // Use this method for navigation when auto-sliding\n autoSlideMethod: ".freeze);
1402
1447
  ;
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);
1404
1448
  ;
1405
1449
  ;
1406
1450
  ;
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);
1408
1451
  ;
1409
1452
  ;
1410
1453
  ;
1454
+ ; _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);
1455
+ ; if (_title_obj = doctitle partition: true, use_fallback: true).subtitle?;
1456
+ ; _buf << ("<h1>".freeze); _buf << ((slice_text _title_obj.title, (_slice = header.option? :slice)).to_s);
1457
+ ; _buf << ("</h1><h2>".freeze); _buf << ((slice_text _title_obj.subtitle, _slice).to_s);
1458
+ ; _buf << ("</h2>".freeze); else;
1459
+ ; _buf << ("<h1>".freeze); _buf << ((@header.title).to_s);
1460
+ ; _buf << ("</h1>".freeze); end; preamble = @document.find_by context: :preamble;
1461
+ ; unless preamble.nil? or preamble.length == 0;
1462
+ ; _buf << ("<div class=\"preamble\">".freeze); _buf << ((preamble.pop.content).to_s);
1463
+ ; _buf << ("</div>".freeze); end; _buf << ((generate_authors(@document)).to_s);
1464
+ ; _buf << ("</section>".freeze); _buf
1465
+ end
1466
+ end
1467
+
1468
+ def convert_admonition(node, opts = {})
1469
+ node.extend(Helpers)
1470
+ node.instance_eval do
1471
+ converter.set_local_variables(binding, opts) unless opts.empty?
1472
+ _buf = ''; if (has_role? 'aside') or (has_role? 'speaker') or (has_role? 'notes');
1473
+ ; _buf << ("<aside class=\"notes\">".freeze); _buf << ((resolve_content).to_s);
1474
+ ; _buf << ("</aside>".freeze);
1475
+ ; else;
1476
+ ; _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 = '';
1477
+ ; _slim_controls2 << ("<table><tr><td class=\"icon\">".freeze);
1411
1478
  ;
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);
1479
+ ; if @document.attr? :icons, 'font';
1480
+ ; icon_mapping = Hash['caution', 'fire', 'important', 'exclamation-circle', 'note', 'info-circle', 'tip', 'lightbulb-o', 'warning', 'warning'];
1481
+ ; _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);
1482
+ ; elsif @document.attr? :icons;
1483
+ ; _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);
1484
+ ; else;
1485
+ ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << (((attr :textlabel) || @caption).to_s);
1486
+ ; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("</td><td class=\"content\">".freeze);
1487
+ ; if title?;
1488
+ ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
1489
+ ; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ((content).to_s);
1490
+ ; _slim_controls2 << ("</td></tr></table>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); end; _buf
1491
+ end
1492
+ end
1493
+
1494
+ def convert_inline_kbd(node, opts = {})
1495
+ node.extend(Helpers)
1496
+ node.instance_eval do
1497
+ converter.set_local_variables(binding, opts) unless opts.empty?
1498
+ _buf = ''; if (keys = attr 'keys').size == 1;
1499
+ ; _slim_controls1 = html_tag('kbd', data_attrs(@attributes)) do; _slim_controls2 = '';
1500
+ ; _slim_controls2 << ((keys.first).to_s);
1501
+ ; _slim_controls2; end; _buf << ((_slim_controls1).to_s); else;
1502
+ ; _slim_controls3 = html_tag('span', { :class => ['keyseq'] }.merge(data_attrs(@attributes))) do; _slim_controls4 = '';
1503
+ ; keys.each_with_index do |key, idx|;
1504
+ ; unless idx.zero?;
1505
+ ; _slim_controls4 << ("+".freeze);
1506
+ ; end; _slim_controls4 << ("<kbd>".freeze); _slim_controls4 << ((key).to_s);
1507
+ ; _slim_controls4 << ("</kbd>".freeze); end; _slim_controls4; end; _buf << ((_slim_controls3).to_s); end; _buf
1508
+ end
1509
+ end
1510
+
1511
+ def convert_literal(node, opts = {})
1512
+ node.extend(Helpers)
1513
+ node.instance_eval do
1514
+ converter.set_local_variables(binding, opts) unless opts.empty?
1515
+ _buf = ''; _slim_controls1 = html_tag('div', { :id => id, :class => ['literalblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
1516
+ ; if title?;
1517
+ ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
1518
+ ; _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);
1519
+ ; _slim_controls2 << ("</pre></div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
1520
+ end
1521
+ end
1522
+
1523
+ def convert_section(node, opts = {})
1524
+ node.extend(Helpers)
1525
+ node.instance_eval do
1526
+ converter.set_local_variables(binding, opts) unless opts.empty?
1527
+ _buf = '';
1413
1528
  ;
1529
+ ; titleless = (title = self.title) == '!';
1530
+ ; hide_title = (titleless || (option? :notitle) || (option? :conceal));
1414
1531
  ;
1532
+ ; vertical_slides = find_by(context: :section) {|section| section.level == 2 };
1415
1533
  ;
1416
1534
  ;
1417
1535
  ;
1418
- ; _buf << ((attr 'revealjs_minimumtimeperslide', 0).to_s); _buf << (",\n // Enable slide navigation via mouse wheel\n mouseWheel: ".freeze);
1536
+ ; data_background_image, data_background_size, data_background_repeat,
1537
+ data_background_position, data_background_transition = nil;
1419
1538
  ;
1420
- ; _buf << ((to_boolean(attr 'revealjs_mousewheel', false)).to_s); _buf << (",\n // Hide cursor if inactive\n hideInactiveCursor: ".freeze);
1421
1539
  ;
1422
- ; _buf << ((to_boolean(attr 'revealjs_hideinactivecursor', true)).to_s); _buf << (",\n // Time before the cursor is hidden (in ms)\n hideCursorTime: ".freeze);
1540
+ ; section_images = blocks.map do |block|;
1541
+ ; if (ctx = block.context) == :image;
1542
+ ; ['background', 'canvas'].include?(block.attributes[1]) ? block : [];
1543
+ ; elsif ctx == :section;
1544
+ ; [];
1545
+ ; else;
1546
+ ; block.find_by(context: :image) {|image| ['background', 'canvas'].include?(image.attributes[1]) } || [];
1547
+ ; end; end; if (bg_image = section_images.flatten.first);
1548
+ ; data_background_image = image_uri(bg_image.attr 'target');
1423
1549
  ;
1424
- ; _buf << ((attr 'revealjs_hidecursortime', 5000).to_s); _buf << (",\n // Hides the address bar on mobile devices\n hideAddressBar: ".freeze);
1550
+ ; data_background_size = bg_image.attr 'size';
1551
+ ; data_background_repeat = bg_image.attr 'repeat';
1552
+ ; data_background_transition = bg_image.attr 'transition';
1553
+ ; data_background_position = bg_image.attr 'position';
1425
1554
  ;
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
1555
  ;
1556
+ ; end; if attr? 'background-image';
1557
+ ; data_background_image = image_uri(attr 'background-image');
1428
1558
  ;
1559
+ ; end; if attr? 'background-video';
1560
+ ; data_background_video = media_uri(attr 'background-video');
1429
1561
  ;
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);
1562
+ ; end; if attr? 'background-color';
1563
+ ; data_background_color = attr 'background-color';
1431
1564
  ;
1432
- ; _buf << ((attr 'revealjs_transition', 'slide').to_s); _buf << ("',\n // Transition speed (e.g., default, fast, slow)\n transitionSpeed: '".freeze);
1565
+ ; end; parent_section_with_vertical_slides = @level == 1 && !vertical_slides.empty?;
1433
1566
  ;
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);
1567
+ ; content_for :footnotes do;
1568
+ ; slide_footnotes = slide_footnotes(self);
1569
+ ; if document.footnotes? && !(parent.attr? 'nofootnotes') && !slide_footnotes.empty?;
1570
+ ; _buf << ("<div class=\"footnotes\">".freeze);
1571
+ ; slide_footnotes.each do |footnote|;
1572
+ ; _buf << ("<div class=\"footnote\">".freeze);
1573
+ ; _buf << (("#{footnote.index}. #{footnote.text}").to_s);
1435
1574
  ;
1436
- ; _buf << ((attr 'revealjs_backgroundtransition', 'fade').to_s); _buf << ("',\n // Number of slides away from the current that are visible\n viewDistance: ".freeze);
1575
+ ; _buf << ("</div>".freeze); end; _buf << ("</div>".freeze); end; end; content_for :section do;
1437
1576
  ;
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
1577
  ;
1440
1578
  ;
1441
1579
  ;
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
1580
  ;
1444
- ; _buf << ((attr 'revealjs_parallaxbackgroundimage', '').to_s); _buf << ("',\n // Parallax background size in CSS syntax (e.g., \"2100px 900px\")\n parallaxBackgroundSize: '".freeze);
1445
1581
  ;
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
1582
  ;
1448
1583
  ;
1449
1584
  ;
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
1585
  ;
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
1586
  ;
1455
1587
  ;
1456
1588
  ;
1457
1589
  ;
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
1590
  ;
1461
1591
  ;
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
1592
  ;
1464
1593
  ;
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
1594
  ;
1468
1595
  ;
1469
1596
  ;
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
1597
  ;
1472
- ; _buf << ((attr 'revealjs_pdfmaxpagesperslide', 1).to_s); _buf << (",\n\n // Optional libraries used to extend on reveal.js\n dependencies: [\n ".freeze);
1473
1598
  ;
1599
+ ; _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 "background-gradient"); if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" data-background-gradient".freeze); else; _buf << (" data-background-gradient=\"".freeze); _buf << ((_slim_codeattributes3).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes4 = (attr 'transition'); if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" data-transition".freeze); else; _buf << (" data-transition=\"".freeze); _buf << ((_slim_codeattributes4).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes5 = (attr 'transition-speed'); if _slim_codeattributes5; if _slim_codeattributes5 == true; _buf << (" data-transition-speed".freeze); else; _buf << (" data-transition-speed=\"".freeze); _buf << ((_slim_codeattributes5).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes6 = data_background_color; if _slim_codeattributes6; if _slim_codeattributes6 == true; _buf << (" data-background-color".freeze); else; _buf << (" data-background-color=\"".freeze); _buf << ((_slim_codeattributes6).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes7 = data_background_image; if _slim_codeattributes7; if _slim_codeattributes7 == true; _buf << (" data-background-image".freeze); else; _buf << (" data-background-image=\"".freeze); _buf << ((_slim_codeattributes7).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes8 = (data_background_size || attr('background-size')); if _slim_codeattributes8; if _slim_codeattributes8 == true; _buf << (" data-background-size".freeze); else; _buf << (" data-background-size=\"".freeze); _buf << ((_slim_codeattributes8).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes9 = (data_background_repeat || attr('background-repeat')); if _slim_codeattributes9; if _slim_codeattributes9 == true; _buf << (" data-background-repeat".freeze); else; _buf << (" data-background-repeat=\"".freeze); _buf << ((_slim_codeattributes9).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes10 = (data_background_transition || attr('background-transition')); if _slim_codeattributes10; if _slim_codeattributes10 == true; _buf << (" data-background-transition".freeze); else; _buf << (" data-background-transition=\"".freeze); _buf << ((_slim_codeattributes10).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes11 = (data_background_position || attr('background-position')); if _slim_codeattributes11; if _slim_codeattributes11 == true; _buf << (" data-background-position".freeze); else; _buf << (" data-background-position=\"".freeze); _buf << ((_slim_codeattributes11).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes12 = (attr "background-iframe"); if _slim_codeattributes12; if _slim_codeattributes12 == true; _buf << (" data-background-iframe".freeze); else; _buf << (" data-background-iframe=\"".freeze); _buf << ((_slim_codeattributes12).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes13 = data_background_video; if _slim_codeattributes13; if _slim_codeattributes13 == true; _buf << (" data-background-video".freeze); else; _buf << (" data-background-video=\"".freeze); _buf << ((_slim_codeattributes13).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes14 = ((attr? 'background-video-loop') || (option? 'loop')); if _slim_codeattributes14; if _slim_codeattributes14 == true; _buf << (" data-background-video-loop".freeze); else; _buf << (" data-background-video-loop=\"".freeze); _buf << ((_slim_codeattributes14).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes15 = ((attr? 'background-video-muted') || (option? 'muted')); if _slim_codeattributes15; if _slim_codeattributes15 == true; _buf << (" data-background-video-muted".freeze); else; _buf << (" data-background-video-muted=\"".freeze); _buf << ((_slim_codeattributes15).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes16 = (attr "background-opacity"); if _slim_codeattributes16; if _slim_codeattributes16 == true; _buf << (" data-background-opacity".freeze); else; _buf << (" data-background-opacity=\"".freeze); _buf << ((_slim_codeattributes16).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes17 = (attr "autoslide"); if _slim_codeattributes17; if _slim_codeattributes17 == true; _buf << (" data-autoslide".freeze); else; _buf << (" data-autoslide=\"".freeze); _buf << ((_slim_codeattributes17).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes18 = (attr 'state'); if _slim_codeattributes18; if _slim_codeattributes18 == true; _buf << (" data-state".freeze); else; _buf << (" data-state=\"".freeze); _buf << ((_slim_codeattributes18).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes19 = ((attr? 'auto-animate') || (option? 'auto-animate')); if _slim_codeattributes19; if _slim_codeattributes19 == true; _buf << (" data-auto-animate".freeze); else; _buf << (" data-auto-animate=\"".freeze); _buf << ((_slim_codeattributes19).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes20 = ((attr 'auto-animate-easing') || (option? 'auto-animate-easing')); if _slim_codeattributes20; if _slim_codeattributes20 == true; _buf << (" data-auto-animate-easing".freeze); else; _buf << (" data-auto-animate-easing=\"".freeze); _buf << ((_slim_codeattributes20).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes21 = ((attr 'auto-animate-unmatched') || (option? 'auto-animate-unmatched')); if _slim_codeattributes21; if _slim_codeattributes21 == true; _buf << (" data-auto-animate-unmatched".freeze); else; _buf << (" data-auto-animate-unmatched=\"".freeze); _buf << ((_slim_codeattributes21).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes22 = ((attr 'auto-animate-duration') || (option? 'auto-animate-duration')); if _slim_codeattributes22; if _slim_codeattributes22 == true; _buf << (" data-auto-animate-duration".freeze); else; _buf << (" data-auto-animate-duration=\"".freeze); _buf << ((_slim_codeattributes22).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes23 = (attr 'auto-animate-id'); if _slim_codeattributes23; if _slim_codeattributes23 == true; _buf << (" data-auto-animate-id".freeze); else; _buf << (" data-auto-animate-id=\"".freeze); _buf << ((_slim_codeattributes23).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes24 = ((attr? 'auto-animate-restart') || (option? 'auto-animate-restart')); if _slim_codeattributes24; if _slim_codeattributes24 == true; _buf << (" data-auto-animate-restart".freeze); else; _buf << (" data-auto-animate-restart=\"".freeze); _buf << ((_slim_codeattributes24).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
1600
+ ; unless hide_title;
1601
+ ; _buf << ("<h2>".freeze); _buf << ((section_title).to_s);
1602
+ ; _buf << ("</h2>".freeze); end; if parent_section_with_vertical_slides;
1603
+ ; unless (_blocks = blocks - vertical_slides).empty?;
1604
+ ; _buf << ("<div class=\"slide-content\">".freeze);
1605
+ ; _blocks.each do |block|;
1606
+ ; _buf << ((block.convert).to_s);
1607
+ ; end; _buf << ("</div>".freeze); end; yield_content :footnotes;
1474
1608
  ;
1609
+ ; else;
1610
+ ; unless (_content = content.chomp).empty?;
1611
+ ; _buf << ("<div class=\"slide-content\">".freeze);
1612
+ ; _buf << ((_content).to_s);
1613
+ ; _buf << ("</div>".freeze); end; yield_content :footnotes;
1475
1614
  ;
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);
1615
+ ; end; clear_slide_footnotes;
1478
1616
  ;
1617
+ ; _buf << ("</section>".freeze);
1479
1618
  ;
1619
+ ; end; if parent_section_with_vertical_slides;
1620
+ ; _buf << ("<section>".freeze);
1621
+ ; yield_content :section;
1622
+ ; vertical_slides.each do |subsection|;
1623
+ ; _buf << ((subsection.convert).to_s);
1480
1624
  ;
1625
+ ; end; _buf << ("</section>".freeze);
1626
+ ; else;
1627
+ ; if @level >= 3;
1481
1628
  ;
1629
+ ; _slim_htag_filter1 = ((@level)).to_s; _buf << ("<h".freeze); _buf << ((_slim_htag_filter1).to_s); _buf << (">".freeze); _buf << ((title).to_s);
1630
+ ; _buf << ("</h".freeze); _buf << ((_slim_htag_filter1).to_s); _buf << (">".freeze); _buf << ((content.chomp).to_s);
1631
+ ; else;
1632
+ ; yield_content :section;
1633
+ ; end; end; _buf
1634
+ end
1635
+ end
1636
+
1637
+ def convert_table(node, opts = {})
1638
+ node.extend(Helpers)
1639
+ node.instance_eval do
1640
+ converter.set_local_variables(binding, opts) unless opts.empty?
1641
+ _buf = ''; classes = ['tableblock', "frame-#{attr :frame, 'all'}", "grid-#{attr :grid, 'all'}", role, ('fragment' if (option? :step) || (attr? 'step'))];
1642
+ ; styles = [("width:#{attr :tablepcwidth}%" unless option? 'autowidth'), ("float:#{attr :float}" if attr? :float)].compact.join('; ');
1643
+ ; _slim_controls1 = html_tag('table', { :id => @id, :class => classes, :style => styles }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
1644
+ ; if title?;
1645
+ ; _slim_controls2 << ("<caption class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
1646
+ ; _slim_controls2 << ("</caption>".freeze); end; unless (attr :rowcount).zero?;
1647
+ ; _slim_controls2 << ("<colgroup>".freeze);
1648
+ ; if option? 'autowidth';
1649
+ ; @columns.each do;
1650
+ ; _slim_controls2 << ("<col>".freeze);
1651
+ ; end; else;
1652
+ ; @columns.each do |col|;
1653
+ ; _slim_controls2 << ("<col style=\"width:".freeze); _slim_controls2 << ((col.attr :colpcwidth).to_s); _slim_controls2 << ("%\">".freeze);
1654
+ ; end; end; _slim_controls2 << ("</colgroup>".freeze); [:head, :foot, :body].select {|tblsec| !@rows[tblsec].empty? }.each do |tblsec|;
1482
1655
  ;
1656
+ ; _slim_controls2 << ("<t".freeze); _slim_controls2 << ((tblsec).to_s); _slim_controls2 << (">".freeze);
1657
+ ; @rows[tblsec].each do |row|;
1658
+ ; _slim_controls2 << ("<tr>".freeze);
1659
+ ; row.each do |cell|;
1483
1660
  ;
1661
+ ; if tblsec == :head;
1662
+ ; cell_content = cell.text;
1663
+ ; else;
1664
+ ; case cell.style;
1665
+ ; when :literal;
1666
+ ; cell_content = cell.text;
1667
+ ; else;
1668
+ ; cell_content = cell.content;
1669
+ ; end; end; _slim_controls3 = html_tag(tblsec == :head || cell.style == :header ? 'th' : 'td',
1670
+ :class=>['tableblock', "halign-#{cell.attr :halign}", "valign-#{cell.attr :valign}"],
1671
+ :colspan=>cell.colspan, :rowspan=>cell.rowspan,
1672
+ :style=>((@document.attr? :cellbgcolor) ? %(background-color:#{@document.attr :cellbgcolor};) : nil)) do; _slim_controls4 = '';
1673
+ ; if tblsec == :head;
1674
+ ; _slim_controls4 << ((cell_content).to_s);
1675
+ ; else;
1676
+ ; case cell.style;
1677
+ ; when :asciidoc;
1678
+ ; _slim_controls4 << ("<div>".freeze); _slim_controls4 << ((cell_content).to_s);
1679
+ ; _slim_controls4 << ("</div>".freeze); when :literal;
1680
+ ; _slim_controls4 << ("<div class=\"literal\"><pre>".freeze); _slim_controls4 << ((cell_content).to_s);
1681
+ ; _slim_controls4 << ("</pre></div>".freeze); when :header;
1682
+ ; cell_content.each do |text|;
1683
+ ; _slim_controls4 << ("<p class=\"tableblock header\">".freeze); _slim_controls4 << ((text).to_s);
1684
+ ; _slim_controls4 << ("</p>".freeze); end; else;
1685
+ ; cell_content.each do |text|;
1686
+ ; _slim_controls4 << ("<p class=\"tableblock\">".freeze); _slim_controls4 << ((text).to_s);
1687
+ ; _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
1688
+ end
1689
+ end
1690
+
1691
+ def convert_stretch_nested_elements(node, opts = {})
1692
+ node.extend(Helpers)
1693
+ node.instance_eval do
1694
+ converter.set_local_variables(binding, opts) unless opts.empty?
1695
+ _buf = ''; _buf << ("<script>var dom = {};\ndom.slides = document.querySelector('.reveal .slides');\n\nfunction getRemainingHeight(element, slideElement, height) {\n height = height || 0;\n if (element) {\n var newHeight, oldHeight = element.style.height;\n // Change the .stretch element height to 0 in order find the height of all\n // the other elements\n element.style.height = '0px';\n // In Overview mode, the parent (.slide) height is set of 700px.\n // Restore it temporarily to its natural height.\n slideElement.style.height = 'auto';\n newHeight = height - slideElement.offsetHeight;\n // Restore the old height, just in case\n element.style.height = oldHeight + 'px';\n // Clear the parent (.slide) height. .removeProperty works in IE9+\n slideElement.style.removeProperty('height');\n return newHeight;\n }\n return height;\n}\n\nfunction layoutSlideContents(width, height) {\n // Handle sizing of elements with the 'stretch' class\n toArray(dom.slides.querySelectorAll('section .stretch')).forEach(function (element) {\n // Determine how much vertical space we can use\n var limit = 5; // hard limit\n var parent = element.parentNode;\n while (parent.nodeName !== 'SECTION' && limit > 0) {\n parent = parent.parentNode;\n limit--;\n }\n if (limit === 0) {\n // unable to find parent, aborting!\n return;\n }\n var remainingHeight = getRemainingHeight(element, parent, height);\n // Consider the aspect ratio of media elements\n if (/(img|video)/gi.test(element.nodeName)) {\n var nw = element.naturalWidth || element.videoWidth, nh = element.naturalHeight || element.videoHeight;\n var es = Math.min(width / nw, remainingHeight / nh);\n element.style.width = (nw * es) + 'px';\n element.style.height = (nh * es) + 'px';\n } else {\n element.style.width = width + 'px';\n element.style.height = remainingHeight + 'px';\n }\n });\n}\n\nfunction toArray(o) {\n return Array.prototype.slice.call(o);\n}\n\nReveal.addEventListener('slidechanged', function () {\n layoutSlideContents(".freeze);
1484
1696
  ;
1485
1697
  ;
1486
1698
  ;
@@ -1545,51 +1757,28 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
1545
1757
  ;
1546
1758
  ; _buf << ((attr 'revealjs_width', 960).to_s); _buf << (", ".freeze); _buf << ((attr 'revealjs_height', 700).to_s); _buf << (")\n});</script>".freeze);
1547
1759
  ;
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
1555
- end
1556
- end
1557
-
1558
- def literal(node, opts = {})
1559
- node.extend(Helpers)
1560
- node.instance_eval do
1561
- converter.set_local_variables(binding, opts) unless opts.empty?
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 = '';
1563
- ; if title?;
1564
- ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
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
1760
+ ; _buf
1567
1761
  end
1568
1762
  end
1569
1763
 
1570
- def verse(node, opts = {})
1764
+ def convert_olist(node, opts = {})
1571
1765
  node.extend(Helpers)
1572
1766
  node.instance_eval do
1573
1767
  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 = '';
1768
+ _buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['olist', @style, role] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
1575
1769
  ; if title?;
1576
1770
  ; _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 << ("&#8212; ".freeze); _slim_controls2 << ((attribution).to_s);
1588
- ; end; _slim_controls2 << ("</div>".freeze); end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
1771
+ ; _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);
1772
+ ; items.each do |item|;
1773
+ ; _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);
1774
+ ; _slim_controls2 << ((item.text).to_s);
1775
+ ; _slim_controls2 << ("</p>".freeze); if item.blocks?;
1776
+ ; _slim_controls2 << ((item.content).to_s);
1777
+ ; end; _slim_controls2 << ("</li>".freeze); end; _slim_controls2 << ("</ol>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
1589
1778
  end
1590
1779
  end
1591
1780
 
1592
- def audio(node, opts = {})
1781
+ def convert_audio(node, opts = {})
1593
1782
  node.extend(Helpers)
1594
1783
  node.instance_eval do
1595
1784
  converter.set_local_variables(binding, opts) unless opts.empty?
@@ -1603,179 +1792,57 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
1603
1792
  end
1604
1793
  end
1605
1794
 
1606
- def inline_image(node, opts = {})
1607
- node.extend(Helpers)
1608
- node.instance_eval do
1609
- converter.set_local_variables(binding, opts) unless opts.empty?
1610
- _buf = ''; _slim_controls1 = html_tag('span', { :class => [@type, role, ('fragment' if (option? :step) || (attr? 'step'))], :style => ("float: #{attr :float}" if attr? :float) }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
1611
- ; if @type == 'icon' && (@document.attr? :icons, 'font');
1612
- ; style_class = [(attr :set, 'fa'), "fa-#{@target}", ("fa-#{attr :size}" if attr? :size), ("fa-rotate-#{attr :rotate}" if attr? :rotate), ("fa-flip-#{attr :flip}" if attr? :flip)];
1613
- ; if attr? :link;
1614
- ; _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 << ("><i".freeze);
1615
- ; _temple_html_attributeremover1 = ''; _slim_codeattributes4 = style_class; if Array === _slim_codeattributes4; _slim_codeattributes4 = _slim_codeattributes4.flatten; _slim_codeattributes4.map!(&:to_s); _slim_codeattributes4.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes4.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes4).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_codeattributes5 = (attr :title); if _slim_codeattributes5; if _slim_codeattributes5 == true; _slim_controls2 << (" title".freeze); else; _slim_controls2 << (" title=\"".freeze); _slim_controls2 << ((_slim_codeattributes5).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << ("></i></a>".freeze);
1616
- ; else;
1617
- ; _slim_controls2 << ("<i".freeze); _temple_html_attributeremover2 = ''; _slim_codeattributes6 = style_class; if Array === _slim_codeattributes6; _slim_codeattributes6 = _slim_codeattributes6.flatten; _slim_codeattributes6.map!(&:to_s); _slim_codeattributes6.reject!(&:empty?); _temple_html_attributeremover2 << ((_slim_codeattributes6.join(" ")).to_s); else; _temple_html_attributeremover2 << ((_slim_codeattributes6).to_s); end; _temple_html_attributeremover2; if !_temple_html_attributeremover2.empty?; _slim_controls2 << (" class=\"".freeze); _slim_controls2 << ((_temple_html_attributeremover2).to_s); _slim_controls2 << ("\"".freeze); end; _slim_codeattributes7 = (attr :title); if _slim_codeattributes7; if _slim_codeattributes7 == true; _slim_controls2 << (" title".freeze); else; _slim_controls2 << (" title=\"".freeze); _slim_controls2 << ((_slim_codeattributes7).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << ("></i>".freeze);
1618
- ; end; elsif @type == 'icon' && !(@document.attr? :icons);
1619
- ; if attr? :link;
1620
- ; _slim_controls2 << ("<a class=\"image\"".freeze); _slim_codeattributes8 = (attr :link); if _slim_codeattributes8; if _slim_codeattributes8 == true; _slim_controls2 << (" href".freeze); else; _slim_controls2 << (" href=\"".freeze); _slim_controls2 << ((_slim_codeattributes8).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes9 = (attr :window); if _slim_codeattributes9; if _slim_codeattributes9 == true; _slim_controls2 << (" target".freeze); else; _slim_controls2 << (" target=\"".freeze); _slim_controls2 << ((_slim_codeattributes9).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes10 = (bool_data_attr :link_preview); if _slim_codeattributes10; if _slim_codeattributes10 == true; _slim_controls2 << (" data-preview-link".freeze); else; _slim_controls2 << (" data-preview-link=\"".freeze); _slim_controls2 << ((_slim_codeattributes10).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << (">[".freeze);
1621
- ; _slim_controls2 << ((attr :alt).to_s); _slim_controls2 << ("]</a>".freeze);
1622
- ; else;
1623
- ; _slim_controls2 << ("[".freeze); _slim_controls2 << ((attr :alt).to_s); _slim_controls2 << ("]".freeze);
1624
- ; end; else;
1625
- ; src = (@type == 'icon' ? (icon_uri @target) : (image_uri @target));
1626
- ; if attr? :link;
1627
- ; _slim_controls2 << ("<a class=\"image\"".freeze); _slim_codeattributes11 = (attr :link); if _slim_codeattributes11; if _slim_codeattributes11 == true; _slim_controls2 << (" href".freeze); else; _slim_controls2 << (" href=\"".freeze); _slim_controls2 << ((_slim_codeattributes11).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes12 = (attr :window); if _slim_codeattributes12; if _slim_codeattributes12 == true; _slim_controls2 << (" target".freeze); else; _slim_controls2 << (" target=\"".freeze); _slim_controls2 << ((_slim_codeattributes12).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes13 = (bool_data_attr :link_preview); if _slim_codeattributes13; if _slim_codeattributes13 == true; _slim_controls2 << (" data-preview-link".freeze); else; _slim_controls2 << (" data-preview-link=\"".freeze); _slim_controls2 << ((_slim_codeattributes13).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << ("><img".freeze);
1628
- ; _slim_codeattributes14 = src; 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 = (attr :alt); if _slim_codeattributes15; if _slim_codeattributes15 == true; _slim_controls2 << (" alt".freeze); else; _slim_controls2 << (" alt=\"".freeze); _slim_controls2 << ((_slim_codeattributes15).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes16 = (attr :width); if _slim_codeattributes16; if _slim_codeattributes16 == true; _slim_controls2 << (" width".freeze); else; _slim_controls2 << (" width=\"".freeze); _slim_controls2 << ((_slim_codeattributes16).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes17 = (attr :height); if _slim_codeattributes17; if _slim_codeattributes17 == true; _slim_controls2 << (" height".freeze); else; _slim_controls2 << (" height=\"".freeze); _slim_controls2 << ((_slim_codeattributes17).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes18 = (attr :title); if _slim_codeattributes18; if _slim_codeattributes18 == true; _slim_controls2 << (" title".freeze); else; _slim_controls2 << (" title=\"".freeze); _slim_controls2 << ((_slim_codeattributes18).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << ("></a>".freeze);
1629
- ; else;
1630
- ; _slim_controls2 << ("<img".freeze); _slim_codeattributes19 = src; if _slim_codeattributes19; if _slim_codeattributes19 == true; _slim_controls2 << (" src".freeze); else; _slim_controls2 << (" src=\"".freeze); _slim_controls2 << ((_slim_codeattributes19).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes20 = (attr :alt); if _slim_codeattributes20; if _slim_codeattributes20 == true; _slim_controls2 << (" alt".freeze); else; _slim_controls2 << (" alt=\"".freeze); _slim_controls2 << ((_slim_codeattributes20).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes21 = (attr :width); if _slim_codeattributes21; if _slim_codeattributes21 == true; _slim_controls2 << (" width".freeze); else; _slim_controls2 << (" width=\"".freeze); _slim_controls2 << ((_slim_codeattributes21).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes22 = (attr :height); if _slim_codeattributes22; if _slim_codeattributes22 == true; _slim_controls2 << (" height".freeze); else; _slim_controls2 << (" height=\"".freeze); _slim_controls2 << ((_slim_codeattributes22).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes23 = (attr :title); if _slim_codeattributes23; if _slim_codeattributes23 == true; _slim_controls2 << (" title".freeze); else; _slim_controls2 << (" title=\"".freeze); _slim_controls2 << ((_slim_codeattributes23).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << (">".freeze);
1631
- ; end; end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
1632
- end
1633
- end
1634
-
1635
- def notes(node, opts = {})
1636
- node.extend(Helpers)
1637
- node.instance_eval do
1638
- converter.set_local_variables(binding, opts) unless opts.empty?
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 = '';
1653
- ; if title?;
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 = {})
1795
+ def convert_image(node, opts = {})
1672
1796
  node.extend(Helpers)
1673
1797
  node.instance_eval do
1674
1798
  converter.set_local_variables(binding, opts) unless opts.empty?
1675
- _buf = '';
1676
- ;
1677
- ; _buf
1799
+ _buf = ''; unless attributes[1] == 'background' || attributes[1] == 'canvas';
1800
+ ; inline_style = [("text-align: #{attr :align}" if attr? :align),("float: #{attr :float}" if attr? :float)].compact.join('; ');
1801
+ ; _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 = '';
1802
+ ; _slim_controls2 << ((convert_image).to_s);
1803
+ ; _slim_controls2; end; _buf << ((_slim_controls1).to_s); if title?;
1804
+ ; _buf << ("<div class=\"title\">".freeze); _buf << ((captioned_title).to_s);
1805
+ ; _buf << ("</div>".freeze); end; end; _buf
1678
1806
  end
1679
1807
  end
1680
1808
 
1681
- def inline_kbd(node, opts = {})
1809
+ def convert_inline_footnote(node, opts = {})
1682
1810
  node.extend(Helpers)
1683
1811
  node.instance_eval do
1684
1812
  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);
1813
+ _buf = ''; footnote = slide_footnote(self);
1814
+ ; index = footnote.attr(:index);
1815
+ ; id = footnote.id;
1816
+ ; if @type == :xref;
1817
+ ; _slim_controls1 = html_tag('sup', { :class => ['footnoteref'] }.merge(data_attrs(footnote.attributes))) do; _slim_controls2 = '';
1818
+ ; _slim_controls2 << ("[<span class=\"footnote\" title=\"View footnote.\">".freeze);
1819
+ ; _slim_controls2 << ((index).to_s);
1820
+ ; _slim_controls2 << ("</span>]".freeze);
1688
1821
  ; _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
1822
+ ; _slim_controls3 = html_tag('sup', { :id => ("_footnote_#{id}" if id), :class => ['footnote'] }.merge(data_attrs(footnote.attributes))) do; _slim_controls4 = '';
1823
+ ; _slim_controls4 << ("[<span class=\"footnote\" title=\"View footnote.\">".freeze);
1824
+ ; _slim_controls4 << ((index).to_s);
1825
+ ; _slim_controls4 << ("</span>]".freeze);
1826
+ ; _slim_controls4; end; _buf << ((_slim_controls3).to_s); end; _buf
1747
1827
  end
1748
1828
  end
1749
1829
 
1750
- def paragraph(node, opts = {})
1830
+ def convert_notes(node, opts = {})
1751
1831
  node.extend(Helpers)
1752
1832
  node.instance_eval do
1753
1833
  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
1834
+ _buf = ''; _buf << ("<aside class=\"notes\">".freeze); _buf << ((resolve_content).to_s);
1835
+ ; _buf << ("</aside>".freeze); _buf
1762
1836
  end
1763
1837
  end
1764
1838
 
1765
- def olist(node, opts = {})
1839
+ def convert_inline_image(node, opts = {})
1766
1840
  node.extend(Helpers)
1767
1841
  node.instance_eval do
1768
1842
  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
1843
+ _buf = ''; _slim_controls1 = html_tag('span', { :class => [@type, role, ('fragment' if (option? :step) || (attr? 'step'))], :style => ("float: #{attr :float}" if attr? :float) }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
1844
+ ; _slim_controls2 << ((convert_inline_image).to_s);
1845
+ ; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
1779
1846
  end
1780
1847
  end
1781
1848
  #------------------ End of generated transformation methods ------------------#