asciidoctor-revealjs 5.0.0.rc1 → 5.0.1

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
@@ -415,25 +519,12 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
415
519
  #----------------- Begin of generated transformation methods -----------------#
416
520
 
417
521
 
418
- def inline_quoted(node, opts = {})
522
+ def ruler(node, opts = {})
419
523
  node.extend(Helpers)
420
524
  node.instance_eval do
421
525
  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
526
+ _buf = ''; _buf << ("<hr>".freeze);
527
+ ; _buf
437
528
  end
438
529
  end
439
530
 
@@ -446,20 +537,12 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
446
537
  end
447
538
  end
448
539
 
449
- def sidebar(node, opts = {})
540
+ def notes(node, opts = {})
450
541
  node.extend(Helpers)
451
542
  node.instance_eval do
452
543
  converter.set_local_variables(binding, opts) unless opts.empty?
453
- _buf = ''; if (has_role? 'aside') or (has_role? 'speaker') or (has_role? 'notes');
454
- ; _buf << ("<aside class=\"notes\">".freeze); _buf << ((resolve_content).to_s);
455
- ; _buf << ("</aside>".freeze);
456
- ; else;
457
- ; _slim_controls1 = html_tag('div', { :id => @id, :class => ['sidebarblock', role, ('fragment' if (option? :step) || (has_role? 'step') || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
458
- ; _slim_controls2 << ("<div class=\"content\">".freeze);
459
- ; if title?;
460
- ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
461
- ; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ((content).to_s);
462
- ; _slim_controls2 << ("</div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); end; _buf
544
+ _buf = ''; _buf << ("<aside class=\"notes\">".freeze); _buf << ((resolve_content).to_s);
545
+ ; _buf << ("</aside>".freeze); _buf
463
546
  end
464
547
  end
465
548
 
@@ -472,6 +555,95 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
472
555
  end
473
556
  end
474
557
 
558
+ def olist(node, opts = {})
559
+ node.extend(Helpers)
560
+ node.instance_eval do
561
+ converter.set_local_variables(binding, opts) unless opts.empty?
562
+ _buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['olist', @style, role] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
563
+ ; if title?;
564
+ ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
565
+ ; _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);
566
+ ; items.each do |item|;
567
+ ; _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);
568
+ ; _slim_controls2 << ((item.text).to_s);
569
+ ; _slim_controls2 << ("</p>".freeze); if item.blocks?;
570
+ ; _slim_controls2 << ((item.content).to_s);
571
+ ; end; _slim_controls2 << ("</li>".freeze); end; _slim_controls2 << ("</ol>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
572
+ end
573
+ end
574
+
575
+ def inline_button(node, opts = {})
576
+ node.extend(Helpers)
577
+ node.instance_eval do
578
+ converter.set_local_variables(binding, opts) unless opts.empty?
579
+ _buf = ''; _slim_controls1 = html_tag('b', { :class => ['button'] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
580
+ ; _slim_controls2 << ((@text).to_s);
581
+ ; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
582
+ end
583
+ end
584
+
585
+ def audio(node, opts = {})
586
+ node.extend(Helpers)
587
+ node.instance_eval do
588
+ converter.set_local_variables(binding, opts) unless opts.empty?
589
+ _buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['audioblock', @style, role] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
590
+ ; if title?;
591
+ ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
592
+ ; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<div class=\"content\"><audio".freeze);
593
+ ; _slim_codeattributes1 = media_uri(attr :target); if _slim_codeattributes1; if _slim_codeattributes1 == true; _slim_controls2 << (" src".freeze); else; _slim_controls2 << (" src=\"".freeze); _slim_controls2 << ((_slim_codeattributes1).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes2 = (option? 'autoplay'); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls2 << (" autoplay".freeze); else; _slim_controls2 << (" autoplay=\"".freeze); _slim_controls2 << ((_slim_codeattributes2).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes3 = !(option? 'nocontrols'); if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls2 << (" controls".freeze); else; _slim_controls2 << (" controls=\"".freeze); _slim_controls2 << ((_slim_codeattributes3).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes4 = (option? 'loop'); if _slim_codeattributes4; if _slim_codeattributes4 == true; _slim_controls2 << (" loop".freeze); else; _slim_controls2 << (" loop=\"".freeze); _slim_controls2 << ((_slim_codeattributes4).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << (">Your browser does not support the audio tag.</audio></div>".freeze);
594
+ ;
595
+ ; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
596
+ end
597
+ end
598
+
599
+ def quote(node, opts = {})
600
+ node.extend(Helpers)
601
+ node.instance_eval do
602
+ converter.set_local_variables(binding, opts) unless opts.empty?
603
+ _buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['quoteblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
604
+ ; if title?;
605
+ ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
606
+ ; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<blockquote>".freeze); _slim_controls2 << ((content).to_s);
607
+ ; _slim_controls2 << ("</blockquote>".freeze); attribution = (attr? :attribution) ? (attr :attribution) : nil;
608
+ ; citetitle = (attr? :citetitle) ? (attr :citetitle) : nil;
609
+ ; if attribution || citetitle;
610
+ ; _slim_controls2 << ("<div class=\"attribution\">".freeze);
611
+ ; if citetitle;
612
+ ; _slim_controls2 << ("<cite>".freeze); _slim_controls2 << ((citetitle).to_s);
613
+ ; _slim_controls2 << ("</cite>".freeze); end; if attribution;
614
+ ; if citetitle;
615
+ ; _slim_controls2 << ("<br>".freeze);
616
+ ; end; _slim_controls2 << ("&#8212; ".freeze); _slim_controls2 << ((attribution).to_s);
617
+ ; end; _slim_controls2 << ("</div>".freeze); end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
618
+ end
619
+ end
620
+
621
+ def admonition(node, opts = {})
622
+ node.extend(Helpers)
623
+ node.instance_eval do
624
+ converter.set_local_variables(binding, opts) unless opts.empty?
625
+ _buf = ''; if (has_role? 'aside') or (has_role? 'speaker') or (has_role? 'notes');
626
+ ; _buf << ("<aside class=\"notes\">".freeze); _buf << ((resolve_content).to_s);
627
+ ; _buf << ("</aside>".freeze);
628
+ ; else;
629
+ ; _slim_controls1 = html_tag('div', { :id => @id, :class => ['admonitionblock', (attr :name), role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
630
+ ; _slim_controls2 << ("<table><tr><td class=\"icon\">".freeze);
631
+ ;
632
+ ; if @document.attr? :icons, 'font';
633
+ ; icon_mapping = Hash['caution', 'fire', 'important', 'exclamation-circle', 'note', 'info-circle', 'tip', 'lightbulb-o', 'warning', 'warning'];
634
+ ; _slim_controls2 << ("<i".freeze); _temple_html_attributeremover1 = ''; _slim_codeattributes1 = %(fa fa-#{icon_mapping[attr :name]}); if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes1.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes1).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _slim_controls2 << (" class=\"".freeze); _slim_controls2 << ((_temple_html_attributeremover1).to_s); _slim_controls2 << ("\"".freeze); end; _slim_codeattributes2 = (attr :textlabel || @caption); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls2 << (" title".freeze); else; _slim_controls2 << (" title=\"".freeze); _slim_controls2 << ((_slim_codeattributes2).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << ("></i>".freeze);
635
+ ; elsif @document.attr? :icons;
636
+ ; _slim_controls2 << ("<img".freeze); _slim_codeattributes3 = icon_uri(attr :name); if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls2 << (" src".freeze); else; _slim_controls2 << (" src=\"".freeze); _slim_controls2 << ((_slim_codeattributes3).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes4 = @caption; if _slim_codeattributes4; if _slim_codeattributes4 == true; _slim_controls2 << (" alt".freeze); else; _slim_controls2 << (" alt=\"".freeze); _slim_controls2 << ((_slim_codeattributes4).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << (">".freeze);
637
+ ; else;
638
+ ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << (((attr :textlabel) || @caption).to_s);
639
+ ; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("</td><td class=\"content\">".freeze);
640
+ ; if title?;
641
+ ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
642
+ ; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ((content).to_s);
643
+ ; _slim_controls2 << ("</td></tr></table>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); end; _buf
644
+ end
645
+ end
646
+
475
647
  def outline(node, opts = {})
476
648
  node.extend(Helpers)
477
649
  node.instance_eval do
@@ -489,16 +661,6 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
489
661
  end
490
662
  end
491
663
 
492
- def inline_break(node, opts = {})
493
- node.extend(Helpers)
494
- node.instance_eval do
495
- converter.set_local_variables(binding, opts) unless opts.empty?
496
- _buf = ''; _buf << ((@text).to_s);
497
- ; _buf << ("<br>".freeze);
498
- ; _buf
499
- end
500
- end
501
-
502
664
  def video(node, opts = {})
503
665
  node.extend(Helpers)
504
666
  node.instance_eval do
@@ -553,36 +715,57 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
553
715
  end
554
716
  end
555
717
 
556
- def inline_footnote(node, opts = {})
718
+ def verse(node, opts = {})
557
719
  node.extend(Helpers)
558
720
  node.instance_eval do
559
721
  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
722
+ _buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['verseblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
723
+ ; if title?;
724
+ ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
725
+ ; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<pre class=\"content\">".freeze); _slim_controls2 << ((content).to_s);
726
+ ; _slim_controls2 << ("</pre>".freeze); attribution = (attr? :attribution) ? (attr :attribution) : nil;
727
+ ; citetitle = (attr? :citetitle) ? (attr :citetitle) : nil;
728
+ ; if attribution || citetitle;
729
+ ; _slim_controls2 << ("<div class=\"attribution\">".freeze);
730
+ ; if citetitle;
731
+ ; _slim_controls2 << ("<cite>".freeze); _slim_controls2 << ((citetitle).to_s);
732
+ ; _slim_controls2 << ("</cite>".freeze); end; if attribution;
733
+ ; if citetitle;
734
+ ; _slim_controls2 << ("<br>".freeze);
735
+ ; end; _slim_controls2 << ("&#8212; ".freeze); _slim_controls2 << ((attribution).to_s);
736
+ ; end; _slim_controls2 << ("</div>".freeze); end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
574
737
  end
575
738
  end
576
739
 
577
- def stretch_nested_elements(node, opts = {})
740
+ def inline_menu(node, opts = {})
578
741
  node.extend(Helpers)
579
742
  node.instance_eval do
580
743
  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);
582
- ;
583
- ;
584
- ;
585
- ;
744
+ _buf = ''; menu = attr 'menu';
745
+ ; menuitem = attr 'menuitem';
746
+ ; if !(submenus = attr 'submenus').empty?;
747
+ ; _slim_controls1 = html_tag('span', { :class => ['menuseq'] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
748
+ ; _slim_controls2 << ("<span class=\"menu\">".freeze); _slim_controls2 << ((menu).to_s);
749
+ ; _slim_controls2 << ("</span>&#160;&#9656;&#32;".freeze);
750
+ ; _slim_controls2 << ((submenus.map {|submenu| %(<span class="submenu">#{submenu}</span>&#160;&#9656;&#32;) }.join).to_s);
751
+ ; _slim_controls2 << ("<span class=\"menuitem\">".freeze); _slim_controls2 << ((menuitem).to_s);
752
+ ; _slim_controls2 << ("</span>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); elsif !menuitem.nil?;
753
+ ; _slim_controls3 = html_tag('span', { :class => ['menuseq'] }.merge(data_attrs(@attributes))) do; _slim_controls4 = '';
754
+ ; _slim_controls4 << ("<span class=\"menu\">".freeze); _slim_controls4 << ((menu).to_s);
755
+ ; _slim_controls4 << ("</span>&#160;&#9656;&#32;<span class=\"menuitem\">".freeze);
756
+ ; _slim_controls4 << ((menuitem).to_s);
757
+ ; _slim_controls4 << ("</span>".freeze); _slim_controls4; end; _buf << ((_slim_controls3).to_s); else;
758
+ ; _slim_controls5 = html_tag('span', { :class => ['menu'] }.merge(data_attrs(@attributes))) do; _slim_controls6 = '';
759
+ ; _slim_controls6 << ((menu).to_s);
760
+ ; _slim_controls6; end; _buf << ((_slim_controls5).to_s); end; _buf
761
+ end
762
+ end
763
+
764
+ def toc(node, opts = {})
765
+ node.extend(Helpers)
766
+ node.instance_eval do
767
+ converter.set_local_variables(binding, opts) unless opts.empty?
768
+ _buf = '';
586
769
  ;
587
770
  ;
588
771
  ;
@@ -595,7 +778,64 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
595
778
  ;
596
779
  ;
597
780
  ;
781
+ ; _buf << ("<div id=\"toc\"".freeze); _temple_html_attributeremover1 = ''; _slim_codeattributes1 = (document.attr 'toc-class', 'toc'); if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes1.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes1).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover1).to_s); _buf << ("\"".freeze); end; _buf << ("><div id=\"toctitle\">".freeze);
782
+ ; _buf << (((document.attr 'toc-title')).to_s);
783
+ ; _buf << ("</div>".freeze);
784
+ ; _buf << ((converter.convert document, 'outline').to_s);
785
+ ; _buf << ("</div>".freeze); _buf
786
+ end
787
+ end
788
+
789
+ def inline_kbd(node, opts = {})
790
+ node.extend(Helpers)
791
+ node.instance_eval do
792
+ converter.set_local_variables(binding, opts) unless opts.empty?
793
+ _buf = ''; if (keys = attr 'keys').size == 1;
794
+ ; _slim_controls1 = html_tag('kbd', data_attrs(@attributes)) do; _slim_controls2 = '';
795
+ ; _slim_controls2 << ((keys.first).to_s);
796
+ ; _slim_controls2; end; _buf << ((_slim_controls1).to_s); else;
797
+ ; _slim_controls3 = html_tag('span', { :class => ['keyseq'] }.merge(data_attrs(@attributes))) do; _slim_controls4 = '';
798
+ ; keys.each_with_index do |key, idx|;
799
+ ; unless idx.zero?;
800
+ ; _slim_controls4 << ("+".freeze);
801
+ ; end; _slim_controls4 << ("<kbd>".freeze); _slim_controls4 << ((key).to_s);
802
+ ; _slim_controls4 << ("</kbd>".freeze); end; _slim_controls4; end; _buf << ((_slim_controls3).to_s); end; _buf
803
+ end
804
+ end
805
+
806
+ def colist(node, opts = {})
807
+ node.extend(Helpers)
808
+ node.instance_eval do
809
+ converter.set_local_variables(binding, opts) unless opts.empty?
810
+ _buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['colist', @style, role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
811
+ ; if title?;
812
+ ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
813
+ ; _slim_controls2 << ("</div>".freeze); end; if @document.attr? :icons;
814
+ ; font_icons = @document.attr? :icons, 'font';
815
+ ; _slim_controls2 << ("<table>".freeze);
816
+ ; items.each_with_index do |item, i|;
817
+ ; num = i + 1;
818
+ ; _slim_controls2 << ("<tr><td>".freeze);
598
819
  ;
820
+ ; if font_icons;
821
+ ; _slim_controls2 << ("<i class=\"conum\"".freeze); _slim_codeattributes1 = num; if _slim_codeattributes1; if _slim_codeattributes1 == true; _slim_controls2 << (" data-value".freeze); else; _slim_controls2 << (" data-value=\"".freeze); _slim_controls2 << ((_slim_codeattributes1).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << ("></i><b>".freeze);
822
+ ; _slim_controls2 << ((num).to_s);
823
+ ; _slim_controls2 << ("</b>".freeze); else;
824
+ ; _slim_controls2 << ("<img".freeze); _slim_codeattributes2 = icon_uri("callouts/#{num}"); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls2 << (" src".freeze); else; _slim_controls2 << (" src=\"".freeze); _slim_controls2 << ((_slim_codeattributes2).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes3 = num; if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls2 << (" alt".freeze); else; _slim_controls2 << (" alt=\"".freeze); _slim_controls2 << ((_slim_codeattributes3).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << (">".freeze);
825
+ ; end; _slim_controls2 << ("</td><td>".freeze); _slim_controls2 << ((item.text).to_s);
826
+ ; _slim_controls2 << ("</td></tr>".freeze); end; _slim_controls2 << ("</table>".freeze); else;
827
+ ; _slim_controls2 << ("<ol>".freeze);
828
+ ; items.each do |item|;
829
+ ; _slim_controls2 << ("<li><p>".freeze); _slim_controls2 << ((item.text).to_s);
830
+ ; _slim_controls2 << ("</p></li>".freeze); end; _slim_controls2 << ("</ol>".freeze); end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
831
+ end
832
+ end
833
+
834
+ def stretch_nested_elements(node, opts = {})
835
+ node.extend(Helpers)
836
+ node.instance_eval do
837
+ converter.set_local_variables(binding, opts) unless opts.empty?
838
+ _buf = ''; _buf << ("<script>var dom = {};\ndom.slides = document.querySelector('.reveal .slides');\n\nfunction getRemainingHeight(element, slideElement, height) {\n height = height || 0;\n if (element) {\n var newHeight, oldHeight = element.style.height;\n // Change the .stretch element height to 0 in order find the height of all\n // the other elements\n element.style.height = '0px';\n // In Overview mode, the parent (.slide) height is set of 700px.\n // Restore it temporarily to its natural height.\n slideElement.style.height = 'auto';\n newHeight = height - slideElement.offsetHeight;\n // Restore the old height, just in case\n element.style.height = oldHeight + 'px';\n // Clear the parent (.slide) height. .removeProperty works in IE9+\n slideElement.style.removeProperty('height');\n return newHeight;\n }\n return height;\n}\n\nfunction layoutSlideContents(width, height) {\n // Handle sizing of elements with the 'stretch' class\n toArray(dom.slides.querySelectorAll('section .stretch')).forEach(function (element) {\n // Determine how much vertical space we can use\n var limit = 5; // hard limit\n var parent = element.parentNode;\n while (parent.nodeName !== 'SECTION' && limit > 0) {\n parent = parent.parentNode;\n limit--;\n }\n if (limit === 0) {\n // unable to find parent, aborting!\n return;\n }\n var remainingHeight = getRemainingHeight(element, parent, height);\n // Consider the aspect ratio of media elements\n if (/(img|video)/gi.test(element.nodeName)) {\n var nw = element.naturalWidth || element.videoWidth, nh = element.naturalHeight || element.videoHeight;\n var es = Math.min(width / nw, remainingHeight / nh);\n element.style.width = (nw * es) + 'px';\n element.style.height = (nh * es) + 'px';\n } else {\n element.style.width = width + 'px';\n element.style.height = remainingHeight + 'px';\n }\n });\n}\n\nfunction toArray(o) {\n return Array.prototype.slice.call(o);\n}\n\nReveal.addEventListener('slidechanged', function () {\n layoutSlideContents(".freeze);
599
839
  ;
600
840
  ;
601
841
  ;
@@ -635,87 +875,31 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
635
875
  ;
636
876
  ;
637
877
  ;
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);
639
878
  ;
640
879
  ;
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
880
  ;
643
881
  ;
644
- ; _buf << ((attr 'revealjs_width', 960).to_s); _buf << (", ".freeze); _buf << ((attr 'revealjs_height', 700).to_s); _buf << (")\n});</script>".freeze);
645
882
  ;
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;
656
883
  ;
657
884
  ;
658
885
  ;
659
886
  ;
660
887
  ;
661
888
  ;
662
- ; if (has_role? 'stretch') && !((attr? :width) || (attr? :height));
663
- ; height = "100%";
664
889
  ;
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);
689
890
  ;
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);
891
+ ;
892
+ ;
893
+ ;
894
+ ;
895
+ ; _buf << ((attr 'revealjs_width', 960).to_s); _buf << (", ".freeze); _buf << ((attr 'revealjs_height', 700).to_s); _buf << (")\n});\nReveal.addEventListener('ready', function () {\n layoutSlideContents(".freeze);
896
+ ;
897
+ ;
898
+ ; _buf << ((attr 'revealjs_width', 960).to_s); _buf << (", ".freeze); _buf << ((attr 'revealjs_height', 700).to_s); _buf << (")\n});\nReveal.addEventListener('resize', function () {\n layoutSlideContents(".freeze);
899
+ ;
900
+ ;
901
+ ; _buf << ((attr 'revealjs_width', 960).to_s); _buf << (", ".freeze); _buf << ((attr 'revealjs_height', 700).to_s); _buf << (")\n});</script>".freeze);
902
+ ;
719
903
  ; _buf
720
904
  end
721
905
  end
@@ -738,11 +922,47 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
738
922
  end
739
923
  end
740
924
 
741
- def toc(node, opts = {})
925
+ def literal(node, opts = {})
742
926
  node.extend(Helpers)
743
927
  node.instance_eval do
744
928
  converter.set_local_variables(binding, opts) unless opts.empty?
745
- _buf = '';
929
+ _buf = ''; _slim_controls1 = html_tag('div', { :id => id, :class => ['literalblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
930
+ ; if title?;
931
+ ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
932
+ ; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<div class=\"content\"><pre".freeze); _temple_html_attributeremover1 = ''; _slim_codeattributes1 = (!(@document.attr? :prewrap) || (option? 'nowrap') ? 'nowrap' : nil); if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes1.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes1).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _slim_controls2 << (" class=\"".freeze); _slim_controls2 << ((_temple_html_attributeremover1).to_s); _slim_controls2 << ("\"".freeze); end; _slim_controls2 << (">".freeze); _slim_controls2 << ((content).to_s);
933
+ ; _slim_controls2 << ("</pre></div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
934
+ end
935
+ end
936
+
937
+ def embedded(node, opts = {})
938
+ node.extend(Helpers)
939
+ node.instance_eval do
940
+ converter.set_local_variables(binding, opts) unless opts.empty?
941
+ _buf = ''; unless notitle || !has_header?;
942
+ ; _buf << ("<h1".freeze); _slim_codeattributes1 = @id; if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" id".freeze); else; _buf << (" id=\"".freeze); _buf << ((_slim_codeattributes1).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze); _buf << ((@header.title).to_s);
943
+ ; _buf << ("</h1>".freeze); end; _buf << ((content).to_s);
944
+ ; unless !footnotes? || attr?(:nofootnotes);
945
+ ; _buf << ("<div id=\"footnotes\"><hr>".freeze);
946
+ ;
947
+ ; footnotes.each do |fn|;
948
+ ; _buf << ("<div class=\"footnote\" id=\"_footnote_".freeze); _buf << ((fn.index).to_s); _buf << ("\"><a href=\"#_footnoteref_".freeze);
949
+ ; _buf << ((fn.index).to_s); _buf << ("\">".freeze); _buf << ((fn.index).to_s); _buf << ("</a>. ".freeze); _buf << ((fn.text).to_s);
950
+ ; _buf << ("</div>".freeze); end; _buf << ("</div>".freeze); end; _buf
951
+ end
952
+ end
953
+
954
+ def document(node, opts = {})
955
+ node.extend(Helpers)
956
+ node.instance_eval do
957
+ converter.set_local_variables(binding, opts) unless opts.empty?
958
+ _buf = ''; slides_content = self.content;
959
+ ; content_for :slides do;
960
+ ; unless noheader;
961
+ ; unless (header_docinfo = docinfo :header, '-revealjs.html').empty?;
962
+ ; _buf << ((header_docinfo).to_s);
963
+ ; end; if header?;
964
+ ; bg_image = (attr? 'title-slide-background-image') ? (image_uri(attr 'title-slide-background-image')) : nil;
965
+ ; bg_video = (attr? 'title-slide-background-video') ? (media_uri(attr 'title-slide-background-video')) : nil;
746
966
  ;
747
967
  ;
748
968
  ;
@@ -755,588 +975,110 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
755
975
  ;
756
976
  ;
757
977
  ;
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">';
978
+ ;
979
+ ;
980
+ ;
981
+ ; _buf << ("<section".freeze); _temple_html_attributeremover1 = ''; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "title"; _temple_html_attributemerger1[1] = ''; _slim_codeattributes1 = role; if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributemerger1[1] << ((_slim_codeattributes1.join(" ")).to_s); else; _temple_html_attributemerger1[1] << ((_slim_codeattributes1).to_s); end; _temple_html_attributemerger1[1]; _temple_html_attributeremover1 << ((_temple_html_attributemerger1.reject(&:empty?).join(" ")).to_s); _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover1).to_s); _buf << ("\"".freeze); end; _buf << (" data-state=\"title\"".freeze); _slim_codeattributes2 = (attr 'title-slide-transition'); if _slim_codeattributes2; if _slim_codeattributes2 == true; _buf << (" data-transition".freeze); else; _buf << (" data-transition=\"".freeze); _buf << ((_slim_codeattributes2).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes3 = (attr 'title-slide-transition-speed'); if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" data-transition-speed".freeze); else; _buf << (" data-transition-speed=\"".freeze); _buf << ((_slim_codeattributes3).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes4 = (attr 'title-slide-background'); if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" data-background".freeze); else; _buf << (" data-background=\"".freeze); _buf << ((_slim_codeattributes4).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes5 = (attr 'title-slide-background-size'); if _slim_codeattributes5; if _slim_codeattributes5 == true; _buf << (" data-background-size".freeze); else; _buf << (" data-background-size=\"".freeze); _buf << ((_slim_codeattributes5).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes6 = bg_image; if _slim_codeattributes6; if _slim_codeattributes6 == true; _buf << (" data-background-image".freeze); else; _buf << (" data-background-image=\"".freeze); _buf << ((_slim_codeattributes6).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes7 = bg_video; if _slim_codeattributes7; if _slim_codeattributes7 == true; _buf << (" data-background-video".freeze); else; _buf << (" data-background-video=\"".freeze); _buf << ((_slim_codeattributes7).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes8 = (attr 'title-slide-background-video-loop'); if _slim_codeattributes8; if _slim_codeattributes8 == true; _buf << (" data-background-video-loop".freeze); else; _buf << (" data-background-video-loop=\"".freeze); _buf << ((_slim_codeattributes8).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes9 = (attr 'title-slide-background-video-muted'); if _slim_codeattributes9; if _slim_codeattributes9 == true; _buf << (" data-background-video-muted".freeze); else; _buf << (" data-background-video-muted=\"".freeze); _buf << ((_slim_codeattributes9).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes10 = (attr 'title-slide-background-opacity'); if _slim_codeattributes10; if _slim_codeattributes10 == true; _buf << (" data-background-opacity".freeze); else; _buf << (" data-background-opacity=\"".freeze); _buf << ((_slim_codeattributes10).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes11 = (attr 'title-slide-background-iframe'); if _slim_codeattributes11; if _slim_codeattributes11 == true; _buf << (" data-background-iframe".freeze); else; _buf << (" data-background-iframe=\"".freeze); _buf << ((_slim_codeattributes11).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes12 = (attr 'title-slide-background-color'); if _slim_codeattributes12; if _slim_codeattributes12 == true; _buf << (" data-background-color".freeze); else; _buf << (" data-background-color=\"".freeze); _buf << ((_slim_codeattributes12).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes13 = (attr 'title-slide-background-repeat'); if _slim_codeattributes13; if _slim_codeattributes13 == true; _buf << (" data-background-repeat".freeze); else; _buf << (" data-background-repeat=\"".freeze); _buf << ((_slim_codeattributes13).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes14 = (attr 'title-slide-background-position'); if _slim_codeattributes14; if _slim_codeattributes14 == true; _buf << (" data-background-position".freeze); else; _buf << (" data-background-position=\"".freeze); _buf << ((_slim_codeattributes14).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes15 = (attr 'title-slide-background-transition'); if _slim_codeattributes15; if _slim_codeattributes15 == true; _buf << (" data-background-transition".freeze); else; _buf << (" data-background-transition=\"".freeze); _buf << ((_slim_codeattributes15).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
982
+ ; if (_title_obj = doctitle partition: true, use_fallback: true).subtitle?;
983
+ ; _buf << ("<h1>".freeze); _buf << ((slice_text _title_obj.title, (_slice = header.option? :slice)).to_s);
984
+ ; _buf << ("</h1><h2>".freeze); _buf << ((slice_text _title_obj.subtitle, _slice).to_s);
985
+ ; _buf << ("</h2>".freeze); else;
986
+ ; _buf << ("<h1>".freeze); _buf << ((@header.title).to_s);
987
+ ; _buf << ("</h1>".freeze); end; preamble = @document.find_by context: :preamble;
988
+ ; unless preamble.nil? or preamble.length == 0;
989
+ ; _buf << ("<div class=\"preamble\">".freeze); _buf << ((preamble.pop.content).to_s);
990
+ ; _buf << ("</div>".freeze); end; _buf << ((generate_authors(@document)).to_s);
991
+ ; _buf << ("</section>".freeze);
992
+ ; end; end; _buf << ((slides_content).to_s);
993
+ ; unless (footer_docinfo = docinfo :footer, '-revealjs.html').empty?;
994
+ ; _buf << ((footer_docinfo).to_s);
995
+ ;
996
+ ; end; end; _buf << ("<!DOCTYPE html><html".freeze);
997
+ ; _slim_codeattributes16 = (attr :lang, 'en' unless attr? :nolang); if _slim_codeattributes16; if _slim_codeattributes16 == true; _buf << (" lang".freeze); else; _buf << (" lang=\"".freeze); _buf << ((_slim_codeattributes16).to_s); _buf << ("\"".freeze); end; end; _buf << ("><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui\"><title>".freeze);
998
+ ;
999
+ ;
1000
+ ;
1001
+ ;
1002
+ ; _buf << (((doctitle sanitize: true, use_fallback: true)).to_s);
1003
+ ;
1004
+ ; _buf << ("</title>".freeze); if RUBY_ENGINE == 'opal' && JAVASCRIPT_PLATFORM == 'node';
1005
+ ; revealjsdir = (attr :revealjsdir, 'node_modules/reveal.js');
774
1006
  ; else;
775
- ; if @document.attr? :icons, 'font';
776
- ; marker_checked = '<i class="icon-check"></i>';
777
- ; marker_unchecked = '<i class="icon-check-empty"></i>';
1007
+ ; revealjsdir = (attr :revealjsdir, 'reveal.js');
1008
+ ; end; unless (asset_uri_scheme = (attr 'asset-uri-scheme', 'https')).empty?;
1009
+ ; asset_uri_scheme = %(#{asset_uri_scheme}:);
1010
+ ; end; cdn_base = %(#{asset_uri_scheme}//cdnjs.cloudflare.com/ajax/libs);
1011
+ ; [:description, :keywords, :author, :copyright].each do |key|;
1012
+ ; if attr? key;
1013
+ ; _buf << ("<meta".freeze); _slim_codeattributes17 = key; if _slim_codeattributes17; if _slim_codeattributes17 == true; _buf << (" name".freeze); else; _buf << (" name=\"".freeze); _buf << ((_slim_codeattributes17).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes18 = (attr key); if _slim_codeattributes18; if _slim_codeattributes18 == true; _buf << (" content".freeze); else; _buf << (" content=\"".freeze); _buf << ((_slim_codeattributes18).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
1014
+ ; end; end; if attr? 'favicon';
1015
+ ; if (icon_href = attr 'favicon').empty?;
1016
+ ; icon_href = 'favicon.ico';
1017
+ ; icon_type = 'image/x-icon';
1018
+ ; elsif (icon_ext = File.extname icon_href);
1019
+ ; icon_type = icon_ext == '.ico' ? 'image/x-icon' : %(image/#{icon_ext.slice 1, icon_ext.length});
778
1020
  ; else;
1021
+ ; icon_type = 'image/x-icon';
1022
+ ; end; _buf << ("<link rel=\"icon\" type=\"".freeze); _buf << ((icon_type).to_s); _buf << ("\" href=\"".freeze); _buf << ((icon_href).to_s); _buf << ("\">".freeze);
1023
+ ; end; linkcss = (attr? 'linkcss');
1024
+ ; _buf << ("<link rel=\"stylesheet\" href=\"".freeze); _buf << ((revealjsdir).to_s); _buf << ("/dist/reset.css\"><link rel=\"stylesheet\" href=\"".freeze);
1025
+ ; _buf << ((revealjsdir).to_s); _buf << ("/dist/reveal.css\"><link rel=\"stylesheet\"".freeze);
779
1026
  ;
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
1027
  ;
789
- ; if checklist && (item.attr? :checkbox);
790
- ; _slim_controls2 << ((%(#{(item.attr? :checked) ? marker_checked : marker_unchecked}#{item.text})).to_s);
1028
+ ; _slim_codeattributes19 = (attr :revealjs_customtheme, %(#{revealjsdir}/dist/theme/#{attr 'revealjs_theme', 'black'}.css)); if _slim_codeattributes19; if _slim_codeattributes19 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes19).to_s); _buf << ("\"".freeze); end; end; _buf << (" id=\"theme\"><!--This CSS is generated by the Asciidoctor reveal.js converter to further integrate AsciiDoc's existing semantic with reveal.js--><style type=\"text/css\">.reveal div.right {\n float: right\n}\n\n/* source blocks */\n.reveal .listingblock.stretch > .content {\n height: 100%\n}\n\n.reveal .listingblock.stretch > .content > pre {\n height: 100%\n}\n\n.reveal .listingblock.stretch > .content > pre > code {\n height: 100%;\n max-height: 100%\n}\n\n/* auto-animate feature */\n/* hide the scrollbar when auto-animating source blocks */\n.reveal pre[data-auto-animate-target] {\n overflow: hidden;\n}\n\n.reveal pre[data-auto-animate-target] code {\n overflow: hidden;\n}\n\n/* add a min width to avoid horizontal shift on line numbers */\ncode.hljs .hljs-ln-line.hljs-ln-n {\n min-width: 1.25em;\n}\n\n/* tables */\ntable {\n border-collapse: collapse;\n border-spacing: 0\n}\n\ntable {\n margin-bottom: 1.25em;\n border: solid 1px #dedede\n}\n\ntable thead tr th, table thead tr td, table tfoot tr th, table tfoot tr td {\n padding: .5em .625em .625em;\n font-size: inherit;\n text-align: left\n}\n\ntable tr th, table tr td {\n padding: .5625em .625em;\n font-size: inherit\n}\n\ntable thead tr th, table tfoot tr th, table tbody tr td, table tr td, table tfoot tr td {\n display: table-cell;\n line-height: 1.6\n}\n\ntd.tableblock > .content {\n margin-bottom: 1.25em\n}\n\ntd.tableblock > .content > :last-child {\n margin-bottom: -1.25em\n}\n\ntable.tableblock, th.tableblock, td.tableblock {\n border: 0 solid #dedede\n}\n\ntable.grid-all > thead > tr > .tableblock, table.grid-all > tbody > tr > .tableblock {\n border-width: 0 1px 1px 0\n}\n\ntable.grid-all > tfoot > tr > .tableblock {\n border-width: 1px 1px 0 0\n}\n\ntable.grid-cols > * > tr > .tableblock {\n border-width: 0 1px 0 0\n}\n\ntable.grid-rows > thead > tr > .tableblock, table.grid-rows > tbody > tr > .tableblock {\n border-width: 0 0 1px\n}\n\ntable.grid-rows > tfoot > tr > .tableblock {\n border-width: 1px 0 0\n}\n\ntable.grid-all > * > tr > .tableblock:last-child, table.grid-cols > * > tr > .tableblock:last-child {\n border-right-width: 0\n}\n\ntable.grid-all > tbody > tr:last-child > .tableblock, table.grid-all > thead:last-child > tr > .tableblock, table.grid-rows > tbody > tr:last-child > .tableblock, table.grid-rows > thead:last-child > tr > .tableblock {\n border-bottom-width: 0\n}\n\ntable.frame-all {\n border-width: 1px\n}\n\ntable.frame-sides {\n border-width: 0 1px\n}\n\ntable.frame-topbot, table.frame-ends {\n border-width: 1px 0\n}\n\n.reveal table th.halign-left, .reveal table td.halign-left {\n text-align: left\n}\n\n.reveal table th.halign-right, .reveal table td.halign-right {\n text-align: right\n}\n\n.reveal table th.halign-center, .reveal table td.halign-center {\n text-align: center\n}\n\n.reveal table th.valign-top, .reveal table td.valign-top {\n vertical-align: top\n}\n\n.reveal table th.valign-bottom, .reveal table td.valign-bottom {\n vertical-align: bottom\n}\n\n.reveal table th.valign-middle, .reveal table td.valign-middle {\n vertical-align: middle\n}\n\ntable thead th, table tfoot th {\n font-weight: bold\n}\n\ntbody tr th {\n display: table-cell;\n line-height: 1.6\n}\n\ntbody tr th, tbody tr th p, tfoot tr th, tfoot tr th p {\n font-weight: bold\n}\n\nthead {\n display: table-header-group\n}\n\n.reveal table.grid-none th, .reveal table.grid-none td {\n border-bottom: 0 !important\n}\n\n/* kbd macro */\nkbd {\n font-family: \"Droid Sans Mono\", \"DejaVu Sans Mono\", monospace;\n display: inline-block;\n color: rgba(0, 0, 0, .8);\n font-size: .65em;\n line-height: 1.45;\n background: #f7f7f7;\n border: 1px solid #ccc;\n -webkit-border-radius: 3px;\n border-radius: 3px;\n -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 0 0 .1em white inset;\n box-shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 0 0 .1em #fff inset;\n margin: 0 .15em;\n padding: .2em .5em;\n vertical-align: middle;\n position: relative;\n top: -.1em;\n white-space: nowrap\n}\n\n.keyseq kbd:first-child {\n margin-left: 0\n}\n\n.keyseq kbd:last-child {\n margin-right: 0\n}\n\n/* callouts */\n.conum[data-value] {\n display: inline-block;\n color: #fff !important;\n background: rgba(0, 0, 0, .8);\n -webkit-border-radius: 50%;\n border-radius: 50%;\n text-align: center;\n font-size: .75em;\n width: 1.67em;\n height: 1.67em;\n line-height: 1.67em;\n font-family: \"Open Sans\", \"DejaVu Sans\", sans-serif;\n font-style: normal;\n font-weight: bold\n}\n\n.conum[data-value] * {\n color: #fff !important\n}\n\n.conum[data-value] + b {\n display: none\n}\n\n.conum[data-value]:after {\n content: attr(data-value)\n}\n\npre .conum[data-value] {\n position: relative;\n top: -.125em\n}\n\nb.conum * {\n color: inherit !important\n}\n\n.conum:not([data-value]):empty {\n display: none\n}\n\n/* Callout list */\n.hdlist > table, .colist > table {\n border: 0;\n background: none\n}\n\n.hdlist > table > tbody > tr, .colist > table > tbody > tr {\n background: none\n}\n\ntd.hdlist1, td.hdlist2 {\n vertical-align: top;\n padding: 0 .625em\n}\n\ntd.hdlist1 {\n font-weight: bold;\n padding-bottom: 1.25em\n}\n\n/* Disabled from Asciidoctor CSS because it caused callout list to go under the\n * source listing when .stretch is applied (see #335)\n * .literalblock+.colist,.listingblock+.colist{margin-top:-.5em} */\n.colist td:not([class]):first-child {\n padding: .4em .75em 0;\n line-height: 1;\n vertical-align: top\n}\n\n.colist td:not([class]):first-child img {\n max-width: none\n}\n\n.colist td:not([class]):last-child {\n padding: .25em 0\n}\n\n/* Override Asciidoctor CSS that causes issues with reveal.js features */\n.reveal .hljs table {\n border: 0\n}\n\n/* Callout list rows would have a bottom border with some reveal.js themes (see #335) */\n.reveal .colist > table th, .reveal .colist > table td {\n border-bottom: 0\n}\n\n/* Fixes line height with Highlight.js source listing when linenums enabled (see #331) */\n.reveal .hljs table thead tr th, .reveal .hljs table tfoot tr th, .reveal .hljs table tbody tr td, .reveal .hljs table tr td, .reveal .hljs table tfoot tr td {\n line-height: inherit\n}\n\n/* Columns layout */\n.columns .slide-content {\n display: flex;\n}\n\n.columns.wrap .slide-content {\n flex-wrap: wrap;\n}\n\n.columns.is-vcentered .slide-content {\n align-items: center;\n}\n\n.columns .slide-content > .column {\n display: block;\n flex-basis: 0;\n flex-grow: 1;\n flex-shrink: 1;\n}\n\n.columns .slide-content > .column > * {\n padding: .75rem;\n}\n\n/* See #353 */\n.columns.wrap .slide-content > .column {\n flex-basis: auto;\n}\n\n.columns .slide-content > .column.is-full {\n flex: none;\n width: 100%;\n}\n\n.columns .slide-content > .column.is-four-fifths {\n flex: none;\n width: 80%;\n}\n\n.columns .slide-content > .column.is-three-quarters {\n flex: none;\n width: 75%;\n}\n\n.columns .slide-content > .column.is-two-thirds {\n flex: none;\n width: 66.6666%;\n}\n\n.columns .slide-content > .column.is-three-fifths {\n flex: none;\n width: 60%;\n}\n\n.columns .slide-content > .column.is-half {\n flex: none;\n width: 50%;\n}\n\n.columns .slide-content > .column.is-two-fifths {\n flex: none;\n width: 40%;\n}\n\n.columns .slide-content > .column.is-one-third {\n flex: none;\n width: 33.3333%;\n}\n\n.columns .slide-content > .column.is-one-quarter {\n flex: none;\n width: 25%;\n}\n\n.columns .slide-content > .column.is-one-fifth {\n flex: none;\n width: 20%;\n}\n\n.columns .slide-content > .column.has-text-left {\n text-align: left;\n}\n\n.columns .slide-content > .column.has-text-justified {\n text-align: justify;\n}\n\n.columns .slide-content > .column.has-text-right {\n text-align: right;\n}\n\n.columns .slide-content > .column.has-text-left {\n text-align: left;\n}\n\n.columns .slide-content > .column.has-text-justified {\n text-align: justify;\n}\n\n.columns .slide-content > .column.has-text-right {\n text-align: right;\n}\n\n.text-left {\n text-align: left !important\n}\n\n.text-right {\n text-align: right !important\n}\n\n.text-center {\n text-align: center !important\n}\n\n.text-justify {\n text-align: justify !important\n}\n\n.footnotes {\n border-top: 1px solid rgba(0, 0, 0, 0.2);\n padding: 0.5em 0 0 0;\n font-size: 0.65em;\n margin-top: 4em;\n}\n\n.byline {\n font-size:.8em\n}\nul.byline {\n list-style-type: none;\n}\nul.byline li + li {\n margin-top: 0.25em;\n}\n</style>".freeze);
1029
+ ;
1030
+ ;
1031
+ ;
1032
+ ; if attr? :icons, 'font';
1033
+ ;
1034
+ ; if attr? 'iconfont-remote';
1035
+ ; if (iconfont_cdn = (attr 'iconfont-cdn'));
1036
+ ; _buf << ("<link rel=\"stylesheet\"".freeze); _slim_codeattributes20 = iconfont_cdn; if _slim_codeattributes20; if _slim_codeattributes20 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes20).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
791
1037
  ; 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
1038
  ;
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 = '';
1039
+ ; font_awesome_version = (attr 'font-awesome-version', '5.15.1');
1040
+ ; _buf << ("<link rel=\"stylesheet\"".freeze); _slim_codeattributes21 = %(#{cdn_base}/font-awesome/#{font_awesome_version}/css/all.min.css); if _slim_codeattributes21; if _slim_codeattributes21 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes21).to_s); _buf << ("\"".freeze); end; end; _buf << ("><link rel=\"stylesheet\"".freeze);
1041
+ ; _slim_codeattributes22 = %(#{cdn_base}/font-awesome/#{font_awesome_version}/css/v4-shims.min.css); if _slim_codeattributes22; if _slim_codeattributes22 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes22).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
1042
+ ; end; else;
1043
+ ; _buf << ("<link rel=\"stylesheet\"".freeze); _slim_codeattributes23 = (normalize_web_path %(#{attr 'iconfont-name', 'font-awesome'}.css), (attr 'stylesdir', ''), false); if _slim_codeattributes23; if _slim_codeattributes23 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes23).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
1044
+ ; end; end; _buf << ((generate_stem(cdn_base)).to_s);
1045
+ ; syntax_hl = self.syntax_highlighter;
1046
+ ; if syntax_hl && (syntax_hl.docinfo? :head);
1047
+ ; _buf << ((syntax_hl.docinfo :head, self, cdn_base_url: cdn_base, linkcss: linkcss, self_closing_tag_slash: '/').to_s);
1048
+ ; end; if attr? :customcss;
1049
+ ; _buf << ("<link rel=\"stylesheet\"".freeze); _slim_codeattributes24 = ((customcss = attr :customcss).empty? ? 'asciidoctor-revealjs.css' : customcss); if _slim_codeattributes24; if _slim_codeattributes24 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes24).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
1050
+ ; end; unless (_docinfo = docinfo :head, '-revealjs.html').empty?;
1051
+ ; _buf << ((_docinfo).to_s);
1052
+ ; end; _buf << ("</head><body><div class=\"reveal\"><div class=\"slides\">".freeze);
1040
1053
  ;
1041
- ; titleless = (title = self.title) == '!';
1042
- ; hide_title = (titleless || (option? :notitle) || (option? :conceal));
1043
1054
  ;
1044
- ; vertical_slides = find_by(context: :section) {|section| section.level == 2 };
1045
1055
  ;
1056
+ ; yield_content :slides;
1057
+ ; _buf << ("</div></div><script src=\"".freeze); _buf << ((revealjsdir).to_s); _buf << ("/dist/reveal.js\"></script><script>Array.prototype.slice.call(document.querySelectorAll('.slides section')).forEach(function(slide) {\n if (slide.getAttribute('data-background-color')) return;\n // user needs to explicitly say he wants CSS color to override otherwise we might break custom css or theme (#226)\n if (!(slide.classList.contains('canvas') || slide.classList.contains('background'))) return;\n var bgColor = getComputedStyle(slide).backgroundColor;\n if (bgColor !== 'rgba(0, 0, 0, 0)' && bgColor !== 'transparent') {\n slide.setAttribute('data-background-color', bgColor);\n slide.style.backgroundColor = 'transparent';\n }\n});\n\n// More info about config & dependencies:\n// - https://github.com/hakimel/reveal.js#configuration\n// - https://github.com/hakimel/reveal.js#dependencies\nReveal.initialize({\n // Display presentation control arrows\n controls: ".freeze);
1046
1058
  ;
1047
1059
  ;
1048
- ; data_background_image, data_background_size, data_background_repeat,
1049
- data_background_position, data_background_transition = nil;
1050
1060
  ;
1051
1061
  ;
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
1062
  ;
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
1063
  ;
1067
1064
  ;
1068
- ; end; if attr? 'background-image';
1069
- ; data_background_image = image_uri(attr 'background-image');
1070
1065
  ;
1071
- ; end; if attr? 'background-video';
1072
- ; data_background_video = media_uri(attr 'background-video');
1073
1066
  ;
1074
- ; end; if attr? 'background-color';
1075
- ; data_background_color = attr 'background-color';
1076
1067
  ;
1077
- ; end; parent_section_with_vertical_slides = @level == 1 && !vertical_slides.empty?;
1078
1068
  ;
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);
1086
1069
  ;
1087
- ; _buf << ("</div>".freeze); end; _buf << ("</div>".freeze); end; end; content_for :section do;
1088
1070
  ;
1089
1071
  ;
1090
1072
  ;
1091
1073
  ;
1092
1074
  ;
1093
1075
  ;
1076
+ ; _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);
1094
1077
  ;
1095
1078
  ;
1079
+ ; _buf << ((to_boolean(attr 'revealjs_controlstutorial', true)).to_s); _buf << (",\n // Determines where controls appear, \"edges\" or \"bottom-right\"\n controlsLayout: '".freeze);
1096
1080
  ;
1097
- ;
1098
- ;
1099
- ;
1100
- ;
1101
- ;
1102
- ;
1103
- ;
1104
- ;
1105
- ;
1106
- ;
1107
- ;
1108
- ;
1109
- ;
1110
- ; _buf << ("<section".freeze); _slim_codeattributes1 = (titleless ? nil : id); if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" id".freeze); else; _buf << (" id=\"".freeze); _buf << ((_slim_codeattributes1).to_s); _buf << ("\"".freeze); end; end; _temple_html_attributeremover1 = ''; _slim_codeattributes2 = roles; if Array === _slim_codeattributes2; _slim_codeattributes2 = _slim_codeattributes2.flatten; _slim_codeattributes2.map!(&:to_s); _slim_codeattributes2.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes2.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes2).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover1).to_s); _buf << ("\"".freeze); end; _slim_codeattributes3 = (attr 'transition'); if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" data-transition".freeze); else; _buf << (" data-transition=\"".freeze); _buf << ((_slim_codeattributes3).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes4 = (attr 'transition-speed'); if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" data-transition-speed".freeze); else; _buf << (" data-transition-speed=\"".freeze); _buf << ((_slim_codeattributes4).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes5 = data_background_color; if _slim_codeattributes5; if _slim_codeattributes5 == true; _buf << (" data-background-color".freeze); else; _buf << (" data-background-color=\"".freeze); _buf << ((_slim_codeattributes5).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes6 = data_background_image; if _slim_codeattributes6; if _slim_codeattributes6 == true; _buf << (" data-background-image".freeze); else; _buf << (" data-background-image=\"".freeze); _buf << ((_slim_codeattributes6).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes7 = (data_background_size || attr('background-size')); if _slim_codeattributes7; if _slim_codeattributes7 == true; _buf << (" data-background-size".freeze); else; _buf << (" data-background-size=\"".freeze); _buf << ((_slim_codeattributes7).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes8 = (data_background_repeat || attr('background-repeat')); if _slim_codeattributes8; if _slim_codeattributes8 == true; _buf << (" data-background-repeat".freeze); else; _buf << (" data-background-repeat=\"".freeze); _buf << ((_slim_codeattributes8).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes9 = (data_background_transition || attr('background-transition')); if _slim_codeattributes9; if _slim_codeattributes9 == true; _buf << (" data-background-transition".freeze); else; _buf << (" data-background-transition=\"".freeze); _buf << ((_slim_codeattributes9).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes10 = (data_background_position || attr('background-position')); if _slim_codeattributes10; if _slim_codeattributes10 == true; _buf << (" data-background-position".freeze); else; _buf << (" data-background-position=\"".freeze); _buf << ((_slim_codeattributes10).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes11 = (attr "background-iframe"); if _slim_codeattributes11; if _slim_codeattributes11 == true; _buf << (" data-background-iframe".freeze); else; _buf << (" data-background-iframe=\"".freeze); _buf << ((_slim_codeattributes11).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes12 = data_background_video; if _slim_codeattributes12; if _slim_codeattributes12 == true; _buf << (" data-background-video".freeze); else; _buf << (" data-background-video=\"".freeze); _buf << ((_slim_codeattributes12).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes13 = ((attr? 'background-video-loop') || (option? 'loop')); if _slim_codeattributes13; if _slim_codeattributes13 == true; _buf << (" data-background-video-loop".freeze); else; _buf << (" data-background-video-loop=\"".freeze); _buf << ((_slim_codeattributes13).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes14 = ((attr? 'background-video-muted') || (option? 'muted')); if _slim_codeattributes14; if _slim_codeattributes14 == true; _buf << (" data-background-video-muted".freeze); else; _buf << (" data-background-video-muted=\"".freeze); _buf << ((_slim_codeattributes14).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes15 = (attr "background-opacity"); if _slim_codeattributes15; if _slim_codeattributes15 == true; _buf << (" data-background-opacity".freeze); else; _buf << (" data-background-opacity=\"".freeze); _buf << ((_slim_codeattributes15).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes16 = (attr "autoslide"); if _slim_codeattributes16; if _slim_codeattributes16 == true; _buf << (" data-autoslide".freeze); else; _buf << (" data-autoslide=\"".freeze); _buf << ((_slim_codeattributes16).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes17 = (attr 'state'); if _slim_codeattributes17; if _slim_codeattributes17 == true; _buf << (" data-state".freeze); else; _buf << (" data-state=\"".freeze); _buf << ((_slim_codeattributes17).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes18 = ((attr? 'auto-animate') || (option? 'auto-animate')); if _slim_codeattributes18; if _slim_codeattributes18 == true; _buf << (" data-auto-animate".freeze); else; _buf << (" data-auto-animate=\"".freeze); _buf << ((_slim_codeattributes18).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes19 = ((attr 'auto-animate-easing') || (option? 'auto-animate-easing')); if _slim_codeattributes19; if _slim_codeattributes19 == true; _buf << (" data-auto-animate-easing".freeze); else; _buf << (" data-auto-animate-easing=\"".freeze); _buf << ((_slim_codeattributes19).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes20 = ((attr 'auto-animate-unmatched') || (option? 'auto-animate-unmatched')); if _slim_codeattributes20; if _slim_codeattributes20 == true; _buf << (" data-auto-animate-unmatched".freeze); else; _buf << (" data-auto-animate-unmatched=\"".freeze); _buf << ((_slim_codeattributes20).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes21 = ((attr 'auto-animate-duration') || (option? 'auto-animate-duration')); if _slim_codeattributes21; if _slim_codeattributes21 == true; _buf << (" data-auto-animate-duration".freeze); else; _buf << (" data-auto-animate-duration=\"".freeze); _buf << ((_slim_codeattributes21).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes22 = (attr 'auto-animate-id'); if _slim_codeattributes22; if _slim_codeattributes22 == true; _buf << (" data-auto-animate-id".freeze); else; _buf << (" data-auto-animate-id=\"".freeze); _buf << ((_slim_codeattributes22).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes23 = ((attr? 'auto-animate-restart') || (option? 'auto-animate-restart')); if _slim_codeattributes23; if _slim_codeattributes23 == true; _buf << (" data-auto-animate-restart".freeze); else; _buf << (" data-auto-animate-restart=\"".freeze); _buf << ((_slim_codeattributes23).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
1111
- ; unless hide_title;
1112
- ; _buf << ("<h2>".freeze); _buf << ((section_title).to_s);
1113
- ; _buf << ("</h2>".freeze); end; if parent_section_with_vertical_slides;
1114
- ; unless (_blocks = blocks - vertical_slides).empty?;
1115
- ; _buf << ("<div class=\"slide-content\">".freeze);
1116
- ; _blocks.each do |block|;
1117
- ; _buf << ((block.convert).to_s);
1118
- ; end; _buf << ("</div>".freeze); end; yield_content :footnotes;
1119
- ;
1120
- ; else;
1121
- ; unless (_content = content.chomp).empty?;
1122
- ; _buf << ("<div class=\"slide-content\">".freeze);
1123
- ; _buf << ((_content).to_s);
1124
- ; _buf << ("</div>".freeze); end; yield_content :footnotes;
1125
- ;
1126
- ; end; clear_slide_footnotes;
1127
- ;
1128
- ; _buf << ("</section>".freeze);
1129
- ;
1130
- ; end; if parent_section_with_vertical_slides;
1131
- ; _buf << ("<section>".freeze);
1132
- ; yield_content :section;
1133
- ; vertical_slides.each do |subsection|;
1134
- ; _buf << ((subsection.convert).to_s);
1135
- ;
1136
- ; end; _buf << ("</section>".freeze);
1137
- ; else;
1138
- ; if @level >= 3;
1139
- ;
1140
- ; _slim_htag_filter1 = ((@level)).to_s; _buf << ("<h".freeze); _buf << ((_slim_htag_filter1).to_s); _buf << (">".freeze); _buf << ((title).to_s);
1141
- ; _buf << ("</h".freeze); _buf << ((_slim_htag_filter1).to_s); _buf << (">".freeze); _buf << ((content.chomp).to_s);
1142
- ; else;
1143
- ; yield_content :section;
1144
- ; end; end; _buf
1145
- end
1146
- end
1147
-
1148
- def inline_button(node, opts = {})
1149
- node.extend(Helpers)
1150
- node.instance_eval do
1151
- converter.set_local_variables(binding, opts) unless opts.empty?
1152
- _buf = ''; _slim_controls1 = html_tag('b', { :class => ['button'] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
1153
- ; _slim_controls2 << ((@text).to_s);
1154
- ; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
1155
- end
1156
- end
1157
-
1158
- def table(node, opts = {})
1159
- node.extend(Helpers)
1160
- node.instance_eval do
1161
- converter.set_local_variables(binding, opts) unless opts.empty?
1162
- _buf = ''; classes = ['tableblock', "frame-#{attr :frame, 'all'}", "grid-#{attr :grid, 'all'}", role, ('fragment' if (option? :step) || (attr? 'step'))];
1163
- ; styles = [("width:#{attr :tablepcwidth}%" unless option? 'autowidth'), ("float:#{attr :float}" if attr? :float)].compact.join('; ');
1164
- ; _slim_controls1 = html_tag('table', { :id => @id, :class => classes, :style => styles }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
1165
- ; if title?;
1166
- ; _slim_controls2 << ("<caption class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
1167
- ; _slim_controls2 << ("</caption>".freeze); end; unless (attr :rowcount).zero?;
1168
- ; _slim_controls2 << ("<colgroup>".freeze);
1169
- ; if option? 'autowidth';
1170
- ; @columns.each do;
1171
- ; _slim_controls2 << ("<col>".freeze);
1172
- ; end; else;
1173
- ; @columns.each do |col|;
1174
- ; _slim_controls2 << ("<col style=\"width:".freeze); _slim_controls2 << ((col.attr :colpcwidth).to_s); _slim_controls2 << ("%\">".freeze);
1175
- ; end; end; _slim_controls2 << ("</colgroup>".freeze); [:head, :foot, :body].select {|tblsec| !@rows[tblsec].empty? }.each do |tblsec|;
1176
- ;
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
- ;
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;
1224
- ;
1225
- ;
1226
- ;
1227
- ;
1228
- ;
1229
- ;
1230
- ;
1231
- ;
1232
- ;
1233
- ;
1234
- ;
1235
- ;
1236
- ;
1237
- ;
1238
- ;
1239
- ; _buf << ("<section".freeze); _temple_html_attributeremover1 = ''; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "title"; _temple_html_attributemerger1[1] = ''; _slim_codeattributes1 = role; if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributemerger1[1] << ((_slim_codeattributes1.join(" ")).to_s); else; _temple_html_attributemerger1[1] << ((_slim_codeattributes1).to_s); end; _temple_html_attributemerger1[1]; _temple_html_attributeremover1 << ((_temple_html_attributemerger1.reject(&:empty?).join(" ")).to_s); _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover1).to_s); _buf << ("\"".freeze); end; _buf << (" data-state=\"title\"".freeze); _slim_codeattributes2 = (attr 'title-slide-transition'); if _slim_codeattributes2; if _slim_codeattributes2 == true; _buf << (" data-transition".freeze); else; _buf << (" data-transition=\"".freeze); _buf << ((_slim_codeattributes2).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes3 = (attr 'title-slide-transition-speed'); if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" data-transition-speed".freeze); else; _buf << (" data-transition-speed=\"".freeze); _buf << ((_slim_codeattributes3).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes4 = (attr 'title-slide-background'); if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" data-background".freeze); else; _buf << (" data-background=\"".freeze); _buf << ((_slim_codeattributes4).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes5 = (attr 'title-slide-background-size'); if _slim_codeattributes5; if _slim_codeattributes5 == true; _buf << (" data-background-size".freeze); else; _buf << (" data-background-size=\"".freeze); _buf << ((_slim_codeattributes5).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes6 = bg_image; if _slim_codeattributes6; if _slim_codeattributes6 == true; _buf << (" data-background-image".freeze); else; _buf << (" data-background-image=\"".freeze); _buf << ((_slim_codeattributes6).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes7 = bg_video; if _slim_codeattributes7; if _slim_codeattributes7 == true; _buf << (" data-background-video".freeze); else; _buf << (" data-background-video=\"".freeze); _buf << ((_slim_codeattributes7).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes8 = (attr 'title-slide-background-video-loop'); if _slim_codeattributes8; if _slim_codeattributes8 == true; _buf << (" data-background-video-loop".freeze); else; _buf << (" data-background-video-loop=\"".freeze); _buf << ((_slim_codeattributes8).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes9 = (attr 'title-slide-background-video-muted'); if _slim_codeattributes9; if _slim_codeattributes9 == true; _buf << (" data-background-video-muted".freeze); else; _buf << (" data-background-video-muted=\"".freeze); _buf << ((_slim_codeattributes9).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes10 = (attr 'title-slide-background-opacity'); if _slim_codeattributes10; if _slim_codeattributes10 == true; _buf << (" data-background-opacity".freeze); else; _buf << (" data-background-opacity=\"".freeze); _buf << ((_slim_codeattributes10).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes11 = (attr 'title-slide-background-iframe'); if _slim_codeattributes11; if _slim_codeattributes11 == true; _buf << (" data-background-iframe".freeze); else; _buf << (" data-background-iframe=\"".freeze); _buf << ((_slim_codeattributes11).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes12 = (attr 'title-slide-background-color'); if _slim_codeattributes12; if _slim_codeattributes12 == true; _buf << (" data-background-color".freeze); else; _buf << (" data-background-color=\"".freeze); _buf << ((_slim_codeattributes12).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes13 = (attr 'title-slide-background-repeat'); if _slim_codeattributes13; if _slim_codeattributes13 == true; _buf << (" data-background-repeat".freeze); else; _buf << (" data-background-repeat=\"".freeze); _buf << ((_slim_codeattributes13).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes14 = (attr 'title-slide-background-position'); if _slim_codeattributes14; if _slim_codeattributes14 == true; _buf << (" data-background-position".freeze); else; _buf << (" data-background-position=\"".freeze); _buf << ((_slim_codeattributes14).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes15 = (attr 'title-slide-background-transition'); if _slim_codeattributes15; if _slim_codeattributes15 == true; _buf << (" data-background-transition".freeze); else; _buf << (" data-background-transition=\"".freeze); _buf << ((_slim_codeattributes15).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
1240
- ; if (_title_obj = doctitle partition: true, use_fallback: true).subtitle?;
1241
- ; _buf << ("<h1>".freeze); _buf << ((slice_text _title_obj.title, (_slice = header.option? :slice)).to_s);
1242
- ; _buf << ("</h1><h2>".freeze); _buf << ((slice_text _title_obj.subtitle, _slice).to_s);
1243
- ; _buf << ("</h2>".freeze); else;
1244
- ; _buf << ("<h1>".freeze); _buf << ((@header.title).to_s);
1245
- ; _buf << ("</h1>".freeze); end; preamble = @document.find_by context: :preamble;
1246
- ; unless preamble.nil? or preamble.length == 0;
1247
- ; _buf << ("<div class=\"preamble\">".freeze); _buf << ((preamble.pop.content).to_s);
1248
- ; _buf << ("</div>".freeze); end; _buf << ((generate_authors(@document)).to_s);
1249
- ; _buf << ("</section>".freeze);
1250
- ; end; end; _buf << ((slides_content).to_s);
1251
- ; unless (footer_docinfo = docinfo :footer, '-revealjs.html').empty?;
1252
- ; _buf << ((footer_docinfo).to_s);
1253
- ;
1254
- ; end; end; _buf << ("<!DOCTYPE html><html".freeze);
1255
- ; _slim_codeattributes16 = (attr :lang, 'en' unless attr? :nolang); if _slim_codeattributes16; if _slim_codeattributes16 == true; _buf << (" lang".freeze); else; _buf << (" lang=\"".freeze); _buf << ((_slim_codeattributes16).to_s); _buf << ("\"".freeze); end; end; _buf << ("><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui\"><title>".freeze);
1256
- ;
1257
- ;
1258
- ;
1259
- ;
1260
- ; _buf << (((doctitle sanitize: true, use_fallback: true)).to_s);
1261
- ;
1262
- ; _buf << ("</title>".freeze); if RUBY_ENGINE == 'opal' && JAVASCRIPT_PLATFORM == 'node';
1263
- ; revealjsdir = (attr :revealjsdir, 'node_modules/reveal.js');
1264
- ; else;
1265
- ; revealjsdir = (attr :revealjsdir, 'reveal.js');
1266
- ; end; unless (asset_uri_scheme = (attr 'asset-uri-scheme', 'https')).empty?;
1267
- ; asset_uri_scheme = %(#{asset_uri_scheme}:);
1268
- ; end; cdn_base = %(#{asset_uri_scheme}//cdnjs.cloudflare.com/ajax/libs);
1269
- ; [:description, :keywords, :author, :copyright].each do |key|;
1270
- ; if attr? key;
1271
- ; _buf << ("<meta".freeze); _slim_codeattributes17 = key; if _slim_codeattributes17; if _slim_codeattributes17 == true; _buf << (" name".freeze); else; _buf << (" name=\"".freeze); _buf << ((_slim_codeattributes17).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes18 = (attr key); if _slim_codeattributes18; if _slim_codeattributes18 == true; _buf << (" content".freeze); else; _buf << (" content=\"".freeze); _buf << ((_slim_codeattributes18).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
1272
- ; end; end; if attr? 'favicon';
1273
- ; if (icon_href = attr 'favicon').empty?;
1274
- ; icon_href = 'favicon.ico';
1275
- ; icon_type = 'image/x-icon';
1276
- ; elsif (icon_ext = File.extname icon_href);
1277
- ; icon_type = icon_ext == '.ico' ? 'image/x-icon' : %(image/#{icon_ext.slice 1, icon_ext.length});
1278
- ; else;
1279
- ; icon_type = 'image/x-icon';
1280
- ; end; _buf << ("<link rel=\"icon\" type=\"".freeze); _buf << ((icon_type).to_s); _buf << ("\" href=\"".freeze); _buf << ((icon_href).to_s); _buf << ("\">".freeze);
1281
- ; end; linkcss = (attr? 'linkcss');
1282
- ; _buf << ("<link rel=\"stylesheet\" href=\"".freeze); _buf << ((revealjsdir).to_s); _buf << ("/dist/reset.css\"><link rel=\"stylesheet\" href=\"".freeze);
1283
- ; _buf << ((revealjsdir).to_s); _buf << ("/dist/reveal.css\"><link rel=\"stylesheet\"".freeze);
1284
- ;
1285
- ;
1286
- ; _slim_codeattributes19 = (attr :revealjs_customtheme, %(#{revealjsdir}/dist/theme/#{attr 'revealjs_theme', 'black'}.css)); if _slim_codeattributes19; if _slim_codeattributes19 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes19).to_s); _buf << ("\"".freeze); end; end; _buf << (" id=\"theme\"><!--This CSS is generated by the Asciidoctor reveal.js converter to further integrate AsciiDoc's existing semantic with reveal.js--><style type=\"text/css\">.reveal div.right {\n float: right\n}\n\n/* source blocks */\n.reveal .listingblock.stretch > .content {\n height: 100%\n}\n\n.reveal .listingblock.stretch > .content > pre {\n height: 100%\n}\n\n.reveal .listingblock.stretch > .content > pre > code {\n height: 100%;\n max-height: 100%\n}\n\n/* auto-animate feature */\n/* hide the scrollbar when auto-animating source blocks */\n.reveal pre[data-auto-animate-target] {\n overflow: hidden;\n}\n\n.reveal pre[data-auto-animate-target] code {\n overflow: hidden;\n}\n\n/* add a min width to avoid horizontal shift on line numbers */\ncode.hljs .hljs-ln-line.hljs-ln-n {\n min-width: 1.25em;\n}\n\n/* tables */\ntable {\n border-collapse: collapse;\n border-spacing: 0\n}\n\ntable {\n margin-bottom: 1.25em;\n border: solid 1px #dedede\n}\n\ntable thead tr th, table thead tr td, table tfoot tr th, table tfoot tr td {\n padding: .5em .625em .625em;\n font-size: inherit;\n text-align: left\n}\n\ntable tr th, table tr td {\n padding: .5625em .625em;\n font-size: inherit\n}\n\ntable thead tr th, table tfoot tr th, table tbody tr td, table tr td, table tfoot tr td {\n display: table-cell;\n line-height: 1.6\n}\n\ntd.tableblock > .content {\n margin-bottom: 1.25em\n}\n\ntd.tableblock > .content > :last-child {\n margin-bottom: -1.25em\n}\n\ntable.tableblock, th.tableblock, td.tableblock {\n border: 0 solid #dedede\n}\n\ntable.grid-all > thead > tr > .tableblock, table.grid-all > tbody > tr > .tableblock {\n border-width: 0 1px 1px 0\n}\n\ntable.grid-all > tfoot > tr > .tableblock {\n border-width: 1px 1px 0 0\n}\n\ntable.grid-cols > * > tr > .tableblock {\n border-width: 0 1px 0 0\n}\n\ntable.grid-rows > thead > tr > .tableblock, table.grid-rows > tbody > tr > .tableblock {\n border-width: 0 0 1px\n}\n\ntable.grid-rows > tfoot > tr > .tableblock {\n border-width: 1px 0 0\n}\n\ntable.grid-all > * > tr > .tableblock:last-child, table.grid-cols > * > tr > .tableblock:last-child {\n border-right-width: 0\n}\n\ntable.grid-all > tbody > tr:last-child > .tableblock, table.grid-all > thead:last-child > tr > .tableblock, table.grid-rows > tbody > tr:last-child > .tableblock, table.grid-rows > thead:last-child > tr > .tableblock {\n border-bottom-width: 0\n}\n\ntable.frame-all {\n border-width: 1px\n}\n\ntable.frame-sides {\n border-width: 0 1px\n}\n\ntable.frame-topbot, table.frame-ends {\n border-width: 1px 0\n}\n\n.reveal table th.halign-left, .reveal table td.halign-left {\n text-align: left\n}\n\n.reveal table th.halign-right, .reveal table td.halign-right {\n text-align: right\n}\n\n.reveal table th.halign-center, .reveal table td.halign-center {\n text-align: center\n}\n\n.reveal table th.valign-top, .reveal table td.valign-top {\n vertical-align: top\n}\n\n.reveal table th.valign-bottom, .reveal table td.valign-bottom {\n vertical-align: bottom\n}\n\n.reveal table th.valign-middle, .reveal table td.valign-middle {\n vertical-align: middle\n}\n\ntable thead th, table tfoot th {\n font-weight: bold\n}\n\ntbody tr th {\n display: table-cell;\n line-height: 1.6\n}\n\ntbody tr th, tbody tr th p, tfoot tr th, tfoot tr th p {\n font-weight: bold\n}\n\nthead {\n display: table-header-group\n}\n\n.reveal table.grid-none th, .reveal table.grid-none td {\n border-bottom: 0 !important\n}\n\n/* kbd macro */\nkbd {\n font-family: \"Droid Sans Mono\", \"DejaVu Sans Mono\", monospace;\n display: inline-block;\n color: rgba(0, 0, 0, .8);\n font-size: .65em;\n line-height: 1.45;\n background: #f7f7f7;\n border: 1px solid #ccc;\n -webkit-border-radius: 3px;\n border-radius: 3px;\n -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 0 0 .1em white inset;\n box-shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 0 0 .1em #fff inset;\n margin: 0 .15em;\n padding: .2em .5em;\n vertical-align: middle;\n position: relative;\n top: -.1em;\n white-space: nowrap\n}\n\n.keyseq kbd:first-child {\n margin-left: 0\n}\n\n.keyseq kbd:last-child {\n margin-right: 0\n}\n\n/* callouts */\n.conum[data-value] {\n display: inline-block;\n color: #fff !important;\n background: rgba(0, 0, 0, .8);\n -webkit-border-radius: 50%;\n border-radius: 50%;\n text-align: center;\n font-size: .75em;\n width: 1.67em;\n height: 1.67em;\n line-height: 1.67em;\n font-family: \"Open Sans\", \"DejaVu Sans\", sans-serif;\n font-style: normal;\n font-weight: bold\n}\n\n.conum[data-value] * {\n color: #fff !important\n}\n\n.conum[data-value] + b {\n display: none\n}\n\n.conum[data-value]:after {\n content: attr(data-value)\n}\n\npre .conum[data-value] {\n position: relative;\n top: -.125em\n}\n\nb.conum * {\n color: inherit !important\n}\n\n.conum:not([data-value]):empty {\n display: none\n}\n\n/* Callout list */\n.hdlist > table, .colist > table {\n border: 0;\n background: none\n}\n\n.hdlist > table > tbody > tr, .colist > table > tbody > tr {\n background: none\n}\n\ntd.hdlist1, td.hdlist2 {\n vertical-align: top;\n padding: 0 .625em\n}\n\ntd.hdlist1 {\n font-weight: bold;\n padding-bottom: 1.25em\n}\n\n/* Disabled from Asciidoctor CSS because it caused callout list to go under the\n * source listing when .stretch is applied (see #335)\n * .literalblock+.colist,.listingblock+.colist{margin-top:-.5em} */\n.colist td:not([class]):first-child {\n padding: .4em .75em 0;\n line-height: 1;\n vertical-align: top\n}\n\n.colist td:not([class]):first-child img {\n max-width: none\n}\n\n.colist td:not([class]):last-child {\n padding: .25em 0\n}\n\n/* Override Asciidoctor CSS that causes issues with reveal.js features */\n.reveal .hljs table {\n border: 0\n}\n\n/* Callout list rows would have a bottom border with some reveal.js themes (see #335) */\n.reveal .colist > table th, .reveal .colist > table td {\n border-bottom: 0\n}\n\n/* Fixes line height with Highlight.js source listing when linenums enabled (see #331) */\n.reveal .hljs table thead tr th, .reveal .hljs table tfoot tr th, .reveal .hljs table tbody tr td, .reveal .hljs table tr td, .reveal .hljs table tfoot tr td {\n line-height: inherit\n}\n\n/* Columns layout */\n.columns .slide-content {\n display: flex;\n}\n\n.columns.wrap .slide-content {\n flex-wrap: wrap;\n}\n\n.columns.is-vcentered .slide-content {\n align-items: center;\n}\n\n.columns .slide-content > .column {\n display: block;\n flex-basis: 0;\n flex-grow: 1;\n flex-shrink: 1;\n}\n\n.columns .slide-content > .column > * {\n padding: .75rem;\n}\n\n/* See #353 */\n.columns.wrap .slide-content > .column {\n flex-basis: auto;\n}\n\n.columns .slide-content > .column.is-full {\n flex: none;\n width: 100%;\n}\n\n.columns .slide-content > .column.is-four-fifths {\n flex: none;\n width: 80%;\n}\n\n.columns .slide-content > .column.is-three-quarters {\n flex: none;\n width: 75%;\n}\n\n.columns .slide-content > .column.is-two-thirds {\n flex: none;\n width: 66.6666%;\n}\n\n.columns .slide-content > .column.is-three-fifths {\n flex: none;\n width: 60%;\n}\n\n.columns .slide-content > .column.is-half {\n flex: none;\n width: 50%;\n}\n\n.columns .slide-content > .column.is-two-fifths {\n flex: none;\n width: 40%;\n}\n\n.columns .slide-content > .column.is-one-third {\n flex: none;\n width: 33.3333%;\n}\n\n.columns .slide-content > .column.is-one-quarter {\n flex: none;\n width: 25%;\n}\n\n.columns .slide-content > .column.is-one-fifth {\n flex: none;\n width: 20%;\n}\n\n.columns .slide-content > .column.has-text-left {\n text-align: left;\n}\n\n.columns .slide-content > .column.has-text-justified {\n text-align: justify;\n}\n\n.columns .slide-content > .column.has-text-right {\n text-align: right;\n}\n\n.columns .slide-content > .column.has-text-left {\n text-align: left;\n}\n\n.columns .slide-content > .column.has-text-justified {\n text-align: justify;\n}\n\n.columns .slide-content > .column.has-text-right {\n text-align: right;\n}\n\n.text-left {\n text-align: left !important\n}\n\n.text-right {\n text-align: right !important\n}\n\n.text-center {\n text-align: center !important\n}\n\n.text-justify {\n text-align: justify !important\n}\n\n.footnotes {\n border-top: 1px solid rgba(0, 0, 0, 0.2);\n padding: 0.5em 0 0 0;\n font-size: 0.65em;\n margin-top: 4em;\n}\n\n.byline {\n font-size:.8em\n}\nul.byline {\n list-style-type: none;\n}\nul.byline li + li {\n margin-top: 0.25em;\n}\n</style>".freeze);
1287
- ;
1288
- ;
1289
- ;
1290
- ; if attr? :icons, 'font';
1291
- ;
1292
- ; if attr? 'iconfont-remote';
1293
- ; if (iconfont_cdn = (attr 'iconfont-cdn'));
1294
- ; _buf << ("<link rel=\"stylesheet\"".freeze); _slim_codeattributes20 = iconfont_cdn; if _slim_codeattributes20; if _slim_codeattributes20 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes20).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
1295
- ; else;
1296
- ;
1297
- ; font_awesome_version = (attr 'font-awesome-version', '5.15.1');
1298
- ; _buf << ("<link rel=\"stylesheet\"".freeze); _slim_codeattributes21 = %(#{cdn_base}/font-awesome/#{font_awesome_version}/css/all.min.css); if _slim_codeattributes21; if _slim_codeattributes21 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes21).to_s); _buf << ("\"".freeze); end; end; _buf << ("><link rel=\"stylesheet\"".freeze);
1299
- ; _slim_codeattributes22 = %(#{cdn_base}/font-awesome/#{font_awesome_version}/css/v4-shims.min.css); if _slim_codeattributes22; if _slim_codeattributes22 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes22).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
1300
- ; end; else;
1301
- ; _buf << ("<link rel=\"stylesheet\"".freeze); _slim_codeattributes23 = (normalize_web_path %(#{attr 'iconfont-name', 'font-awesome'}.css), (attr 'stylesdir', ''), false); if _slim_codeattributes23; if _slim_codeattributes23 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes23).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
1302
- ; end; end; _buf << ((generate_stem(cdn_base)).to_s);
1303
- ; syntax_hl = self.syntax_highlighter;
1304
- ; if syntax_hl && (syntax_hl.docinfo? :head);
1305
- ; _buf << ((syntax_hl.docinfo :head, self, cdn_base_url: cdn_base, linkcss: linkcss, self_closing_tag_slash: '/').to_s);
1306
- ; end; if attr? :customcss;
1307
- ; _buf << ("<link rel=\"stylesheet\"".freeze); _slim_codeattributes24 = ((customcss = attr :customcss).empty? ? 'asciidoctor-revealjs.css' : customcss); if _slim_codeattributes24; if _slim_codeattributes24 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes24).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
1308
- ; end; unless (_docinfo = docinfo :head, '-revealjs.html').empty?;
1309
- ; _buf << ((_docinfo).to_s);
1310
- ; end; _buf << ("</head><body><div class=\"reveal\"><div class=\"slides\">".freeze);
1311
- ;
1312
- ;
1313
- ;
1314
- ; yield_content :slides;
1315
- ; _buf << ("</div></div><script src=\"".freeze); _buf << ((revealjsdir).to_s); _buf << ("/dist/reveal.js\"></script><script>Array.prototype.slice.call(document.querySelectorAll('.slides section')).forEach(function(slide) {\n if (slide.getAttribute('data-background-color')) return;\n // user needs to explicitly say he wants CSS color to override otherwise we might break custom css or theme (#226)\n if (!(slide.classList.contains('canvas') || slide.classList.contains('background'))) return;\n var bgColor = getComputedStyle(slide).backgroundColor;\n if (bgColor !== 'rgba(0, 0, 0, 0)' && bgColor !== 'transparent') {\n slide.setAttribute('data-background-color', bgColor);\n slide.style.backgroundColor = 'transparent';\n }\n});\n\n// More info about config & dependencies:\n// - https://github.com/hakimel/reveal.js#configuration\n// - https://github.com/hakimel/reveal.js#dependencies\nReveal.initialize({\n // Display presentation control arrows\n controls: ".freeze);
1316
- ;
1317
- ;
1318
- ;
1319
- ;
1320
- ;
1321
- ;
1322
- ;
1323
- ;
1324
- ;
1325
- ;
1326
- ;
1327
- ;
1328
- ;
1329
- ;
1330
- ;
1331
- ;
1332
- ;
1333
- ;
1334
- ; _buf << ((to_boolean(attr 'revealjs_controls', true)).to_s); _buf << (",\n // Help the user learn the controls by providing hints, for example by\n // bouncing the down arrow when they first encounter a vertical slide\n controlsTutorial: ".freeze);
1335
- ;
1336
- ;
1337
- ; _buf << ((to_boolean(attr 'revealjs_controlstutorial', true)).to_s); _buf << (",\n // Determines where controls appear, \"edges\" or \"bottom-right\"\n controlsLayout: '".freeze);
1338
- ;
1339
- ; _buf << ((attr 'revealjs_controlslayout', 'bottom-right').to_s); _buf << ("',\n // Visibility rule for backwards navigation arrows; \"faded\", \"hidden\"\n // or \"visible\"\n controlsBackArrows: '".freeze);
1081
+ ; _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
1082
  ;
1341
1083
  ;
1342
1084
  ; _buf << ((attr 'revealjs_controlsbackarrows', 'faded').to_s); _buf << ("',\n // Display a presentation progress bar\n progress: ".freeze);
@@ -1537,107 +1279,392 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
1537
1279
  ;
1538
1280
  ;
1539
1281
  ;
1540
- ; _buf << ((attr 'revealjs_width', 960).to_s); _buf << (", ".freeze); _buf << ((attr 'revealjs_height', 700).to_s); _buf << (")\n});\nReveal.addEventListener('ready', function () {\n layoutSlideContents(".freeze);
1282
+ ; _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);
1283
+ ;
1284
+ ;
1285
+ ; _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);
1286
+ ;
1287
+ ;
1288
+ ; _buf << ((attr 'revealjs_width', 960).to_s); _buf << (", ".freeze); _buf << ((attr 'revealjs_height', 700).to_s); _buf << (")\n});</script>".freeze);
1289
+ ;
1290
+ ;
1291
+ ; if syntax_hl && (syntax_hl.docinfo? :footer);
1292
+ ; _buf << ((syntax_hl.docinfo :footer, self, cdn_base_url: cdn_base, linkcss: linkcss, self_closing_tag_slash: '/').to_s);
1293
+ ;
1294
+ ; end; unless (docinfo_content = (docinfo :footer, '.html')).empty?;
1295
+ ; _buf << ((docinfo_content).to_s);
1296
+ ; end; _buf << ("</body></html>".freeze); _buf
1297
+ end
1298
+ end
1299
+
1300
+ def sidebar(node, opts = {})
1301
+ node.extend(Helpers)
1302
+ node.instance_eval do
1303
+ converter.set_local_variables(binding, opts) unless opts.empty?
1304
+ _buf = ''; if (has_role? 'aside') or (has_role? 'speaker') or (has_role? 'notes');
1305
+ ; _buf << ("<aside class=\"notes\">".freeze); _buf << ((resolve_content).to_s);
1306
+ ; _buf << ("</aside>".freeze);
1307
+ ; else;
1308
+ ; _slim_controls1 = html_tag('div', { :id => @id, :class => ['sidebarblock', role, ('fragment' if (option? :step) || (has_role? 'step') || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
1309
+ ; _slim_controls2 << ("<div class=\"content\">".freeze);
1310
+ ; if title?;
1311
+ ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
1312
+ ; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ((content).to_s);
1313
+ ; _slim_controls2 << ("</div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); end; _buf
1314
+ end
1315
+ end
1316
+
1317
+ def inline_break(node, opts = {})
1318
+ node.extend(Helpers)
1319
+ node.instance_eval do
1320
+ converter.set_local_variables(binding, opts) unless opts.empty?
1321
+ _buf = ''; _buf << ((@text).to_s);
1322
+ ; _buf << ("<br>".freeze);
1323
+ ; _buf
1324
+ end
1325
+ end
1326
+
1327
+ def inline_indexterm(node, opts = {})
1328
+ node.extend(Helpers)
1329
+ node.instance_eval do
1330
+ converter.set_local_variables(binding, opts) unless opts.empty?
1331
+ _buf = ''; if @type == :visible;
1332
+ ; _buf << ((@text).to_s);
1333
+ ; end; _buf
1334
+ end
1335
+ end
1336
+
1337
+ def dlist(node, opts = {})
1338
+ node.extend(Helpers)
1339
+ node.instance_eval do
1340
+ converter.set_local_variables(binding, opts) unless opts.empty?
1341
+ _buf = ''; case @style;
1342
+ ; when 'qanda';
1343
+ ; _slim_controls1 = html_tag('div', { :id => @id, :class => ['qlist', @style, role] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
1344
+ ; if title?;
1345
+ ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
1346
+ ; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<ol>".freeze);
1347
+ ; items.each do |questions, answer|;
1348
+ ; _slim_controls2 << ("<li>".freeze);
1349
+ ; [*questions].each do |question|;
1350
+ ; _slim_controls2 << ("<p><em>".freeze); _slim_controls2 << ((question.text).to_s);
1351
+ ; _slim_controls2 << ("</em></p>".freeze); end; unless answer.nil?;
1352
+ ; if answer.text?;
1353
+ ; _slim_controls2 << ("<p>".freeze); _slim_controls2 << ((answer.text).to_s);
1354
+ ; _slim_controls2 << ("</p>".freeze); end; if answer.blocks?;
1355
+ ; _slim_controls2 << ((answer.content).to_s);
1356
+ ; end; end; _slim_controls2 << ("</li>".freeze); end; _slim_controls2 << ("</ol>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); when 'horizontal';
1357
+ ; _slim_controls3 = html_tag('div', { :id => @id, :class => ['hdlist', role] }.merge(data_attrs(@attributes))) do; _slim_controls4 = '';
1358
+ ; if title?;
1359
+ ; _slim_controls4 << ("<div class=\"title\">".freeze); _slim_controls4 << ((title).to_s);
1360
+ ; _slim_controls4 << ("</div>".freeze); end; _slim_controls4 << ("<table>".freeze);
1361
+ ; if (attr? :labelwidth) || (attr? :itemwidth);
1362
+ ; _slim_controls4 << ("<colgroup><col".freeze);
1363
+ ; _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);
1364
+ ; _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);
1365
+ ; end; items.each do |terms, dd|;
1366
+ ; _slim_controls4 << ("<tr><td".freeze);
1367
+ ; _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);
1368
+ ; terms = [*terms];
1369
+ ; last_term = terms.last;
1370
+ ; terms.each do |dt|;
1371
+ ; _slim_controls4 << ((dt.text).to_s);
1372
+ ; if dt != last_term;
1373
+ ; _slim_controls4 << ("<br>".freeze);
1374
+ ; end; end; _slim_controls4 << ("</td><td class=\"hdlist2\">".freeze);
1375
+ ; unless dd.nil?;
1376
+ ; if dd.text?;
1377
+ ; _slim_controls4 << ("<p>".freeze); _slim_controls4 << ((dd.text).to_s);
1378
+ ; _slim_controls4 << ("</p>".freeze); end; if dd.blocks?;
1379
+ ; _slim_controls4 << ((dd.content).to_s);
1380
+ ; end; end; _slim_controls4 << ("</td></tr>".freeze); end; _slim_controls4 << ("</table>".freeze); _slim_controls4; end; _buf << ((_slim_controls3).to_s); else;
1381
+ ; _slim_controls5 = html_tag('div', { :id => @id, :class => ['dlist', @style, role] }.merge(data_attrs(@attributes))) do; _slim_controls6 = '';
1382
+ ; if title?;
1383
+ ; _slim_controls6 << ("<div class=\"title\">".freeze); _slim_controls6 << ((title).to_s);
1384
+ ; _slim_controls6 << ("</div>".freeze); end; _slim_controls6 << ("<dl>".freeze);
1385
+ ; items.each do |terms, dd|;
1386
+ ; [*terms].each do |dt|;
1387
+ ; _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);
1388
+ ; _slim_controls6 << ("</dt>".freeze); end; unless dd.nil?;
1389
+ ; _slim_controls6 << ("<dd>".freeze);
1390
+ ; if dd.text?;
1391
+ ; _slim_controls6 << ("<p>".freeze); _slim_controls6 << ((dd.text).to_s);
1392
+ ; _slim_controls6 << ("</p>".freeze); end; if dd.blocks?;
1393
+ ; _slim_controls6 << ((dd.content).to_s);
1394
+ ; end; _slim_controls6 << ("</dd>".freeze); end; end; _slim_controls6 << ("</dl>".freeze); _slim_controls6; end; _buf << ((_slim_controls5).to_s); end; _buf
1395
+ end
1396
+ end
1397
+
1398
+ def ulist(node, opts = {})
1399
+ node.extend(Helpers)
1400
+ node.instance_eval do
1401
+ converter.set_local_variables(binding, opts) unless opts.empty?
1402
+ _buf = ''; if (checklist = (option? :checklist) ? 'checklist' : nil);
1403
+ ; if option? :interactive;
1404
+ ; marker_checked = '<input type="checkbox" data-item-complete="1" checked>';
1405
+ ; marker_unchecked = '<input type="checkbox" data-item-complete="0">';
1406
+ ; else;
1407
+ ; if @document.attr? :icons, 'font';
1408
+ ; marker_checked = '<i class="icon-check"></i>';
1409
+ ; marker_unchecked = '<i class="icon-check-empty"></i>';
1410
+ ; else;
1411
+ ;
1412
+ ; marker_checked = '<input type="checkbox" data-item-complete="1" checked disabled>';
1413
+ ; marker_unchecked = '<input type="checkbox" data-item-complete="0" disabled>';
1414
+ ; end; end; end; _slim_controls1 = html_tag('div', { :id => @id, :class => ['ulist', checklist, @style, role] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
1415
+ ; if title?;
1416
+ ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
1417
+ ; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<ul".freeze); _temple_html_attributeremover1 = ''; _slim_codeattributes1 = (checklist || @style); if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes1.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes1).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _slim_controls2 << (" class=\"".freeze); _slim_controls2 << ((_temple_html_attributeremover1).to_s); _slim_controls2 << ("\"".freeze); end; _slim_controls2 << (">".freeze);
1418
+ ; items.each do |item|;
1419
+ ; _slim_controls2 << ("<li".freeze); _temple_html_attributeremover2 = ''; _slim_codeattributes2 = ('fragment' if (option? :step) || (has_role? 'step') || (attr? 'step')); if Array === _slim_codeattributes2; _slim_codeattributes2 = _slim_codeattributes2.flatten; _slim_codeattributes2.map!(&:to_s); _slim_codeattributes2.reject!(&:empty?); _temple_html_attributeremover2 << ((_slim_codeattributes2.join(" ")).to_s); else; _temple_html_attributeremover2 << ((_slim_codeattributes2).to_s); end; _temple_html_attributeremover2; if !_temple_html_attributeremover2.empty?; _slim_controls2 << (" class=\"".freeze); _slim_controls2 << ((_temple_html_attributeremover2).to_s); _slim_controls2 << ("\"".freeze); end; _slim_controls2 << ("><p>".freeze);
1420
+ ;
1421
+ ; if checklist && (item.attr? :checkbox);
1422
+ ; _slim_controls2 << ((%(#{(item.attr? :checked) ? marker_checked : marker_unchecked}#{item.text})).to_s);
1423
+ ; else;
1424
+ ; _slim_controls2 << ((item.text).to_s);
1425
+ ; end; _slim_controls2 << ("</p>".freeze); if item.blocks?;
1426
+ ; _slim_controls2 << ((item.content).to_s);
1427
+ ; end; _slim_controls2 << ("</li>".freeze); end; _slim_controls2 << ("</ul>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
1428
+ end
1429
+ end
1430
+
1431
+ def page_break(node, opts = {})
1432
+ node.extend(Helpers)
1433
+ node.instance_eval do
1434
+ converter.set_local_variables(binding, opts) unless opts.empty?
1435
+ _buf = ''; _buf << ("<div style=\"page-break-after: always;\"></div>".freeze);
1436
+ ; _buf
1437
+ end
1438
+ end
1439
+
1440
+ def table(node, opts = {})
1441
+ node.extend(Helpers)
1442
+ node.instance_eval do
1443
+ converter.set_local_variables(binding, opts) unless opts.empty?
1444
+ _buf = ''; classes = ['tableblock', "frame-#{attr :frame, 'all'}", "grid-#{attr :grid, 'all'}", role, ('fragment' if (option? :step) || (attr? 'step'))];
1445
+ ; styles = [("width:#{attr :tablepcwidth}%" unless option? 'autowidth'), ("float:#{attr :float}" if attr? :float)].compact.join('; ');
1446
+ ; _slim_controls1 = html_tag('table', { :id => @id, :class => classes, :style => styles }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
1447
+ ; if title?;
1448
+ ; _slim_controls2 << ("<caption class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
1449
+ ; _slim_controls2 << ("</caption>".freeze); end; unless (attr :rowcount).zero?;
1450
+ ; _slim_controls2 << ("<colgroup>".freeze);
1451
+ ; if option? 'autowidth';
1452
+ ; @columns.each do;
1453
+ ; _slim_controls2 << ("<col>".freeze);
1454
+ ; end; else;
1455
+ ; @columns.each do |col|;
1456
+ ; _slim_controls2 << ("<col style=\"width:".freeze); _slim_controls2 << ((col.attr :colpcwidth).to_s); _slim_controls2 << ("%\">".freeze);
1457
+ ; end; end; _slim_controls2 << ("</colgroup>".freeze); [:head, :foot, :body].select {|tblsec| !@rows[tblsec].empty? }.each do |tblsec|;
1458
+ ;
1459
+ ; _slim_controls2 << ("<t".freeze); _slim_controls2 << ((tblsec).to_s); _slim_controls2 << (">".freeze);
1460
+ ; @rows[tblsec].each do |row|;
1461
+ ; _slim_controls2 << ("<tr>".freeze);
1462
+ ; row.each do |cell|;
1463
+ ;
1464
+ ; if tblsec == :head;
1465
+ ; cell_content = cell.text;
1466
+ ; else;
1467
+ ; case cell.style;
1468
+ ; when :literal;
1469
+ ; cell_content = cell.text;
1470
+ ; else;
1471
+ ; cell_content = cell.content;
1472
+ ; end; end; _slim_controls3 = html_tag(tblsec == :head || cell.style == :header ? 'th' : 'td',
1473
+ :class=>['tableblock', "halign-#{cell.attr :halign}", "valign-#{cell.attr :valign}"],
1474
+ :colspan=>cell.colspan, :rowspan=>cell.rowspan,
1475
+ :style=>((@document.attr? :cellbgcolor) ? %(background-color:#{@document.attr :cellbgcolor};) : nil)) do; _slim_controls4 = '';
1476
+ ; if tblsec == :head;
1477
+ ; _slim_controls4 << ((cell_content).to_s);
1478
+ ; else;
1479
+ ; case cell.style;
1480
+ ; when :asciidoc;
1481
+ ; _slim_controls4 << ("<div>".freeze); _slim_controls4 << ((cell_content).to_s);
1482
+ ; _slim_controls4 << ("</div>".freeze); when :literal;
1483
+ ; _slim_controls4 << ("<div class=\"literal\"><pre>".freeze); _slim_controls4 << ((cell_content).to_s);
1484
+ ; _slim_controls4 << ("</pre></div>".freeze); when :header;
1485
+ ; cell_content.each do |text|;
1486
+ ; _slim_controls4 << ("<p class=\"tableblock header\">".freeze); _slim_controls4 << ((text).to_s);
1487
+ ; _slim_controls4 << ("</p>".freeze); end; else;
1488
+ ; cell_content.each do |text|;
1489
+ ; _slim_controls4 << ("<p class=\"tableblock\">".freeze); _slim_controls4 << ((text).to_s);
1490
+ ; _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
1491
+ end
1492
+ end
1493
+
1494
+ def preamble(node, opts = {})
1495
+ node.extend(Helpers)
1496
+ node.instance_eval do
1497
+ converter.set_local_variables(binding, opts) unless opts.empty?
1498
+ _buf = '';
1499
+ ;
1500
+ ; _buf
1501
+ end
1502
+ end
1503
+
1504
+ def listing(node, opts = {})
1505
+ node.extend(Helpers)
1506
+ node.instance_eval do
1507
+ converter.set_local_variables(binding, opts) unless opts.empty?
1508
+ _buf = ''; nowrap = (option? 'nowrap') || !(document.attr? 'prewrap');
1509
+ ; if @style == 'source';
1510
+ ; syntax_hl = document.syntax_highlighter;
1511
+ ; lang = attr :language;
1512
+ ; if syntax_hl;
1513
+ ; doc_attrs = document.attributes;
1514
+ ; css_mode = (doc_attrs[%(#{syntax_hl.name}-css)] || :class).to_sym;
1515
+ ; style = doc_attrs[%(#{syntax_hl.name}-style)];
1516
+ ; opts = syntax_hl.highlight? ? { css_mode: css_mode, style: style } : {};
1517
+ ; opts[:nowrap] = nowrap;
1518
+ ; end;
1519
+ ; end; _slim_controls1 = html_tag('div', { :id => id, :class => ['listingblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes.reject {|key, _| key == 'data-id' }))) do; _slim_controls2 = '';
1520
+ ; if title?;
1521
+ ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
1522
+ ; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<div class=\"content\">".freeze);
1523
+ ; if syntax_hl;
1524
+ ; _slim_controls2 << (((syntax_hl.format self, lang, opts)).to_s);
1525
+ ; else;
1526
+ ; if @style == 'source';
1527
+ ; _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);
1528
+ ; _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);
1529
+ ; _slim_controls2 << ((content || '').to_s);
1530
+ ; _slim_controls2 << ("</code></pre>".freeze); else;
1531
+ ; _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);
1532
+ ; _slim_controls2 << ((content || '').to_s);
1533
+ ; _slim_controls2 << ("</pre>".freeze); end; end; _slim_controls2 << ("</div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
1534
+ end
1535
+ end
1536
+
1537
+ def inline_anchor(node, opts = {})
1538
+ node.extend(Helpers)
1539
+ node.instance_eval do
1540
+ converter.set_local_variables(binding, opts) unless opts.empty?
1541
+ _buf = ''; case @type;
1542
+ ; when :xref;
1543
+ ; refid = (attr :refid) || @target;
1544
+ ; _slim_controls1 = html_tag('a', { :href => @target, :class => [role, ('fragment' if (option? :step) || (attr? 'step'))].compact }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
1545
+ ; _slim_controls2 << (((@text || @document.references[:ids].fetch(refid, "[#{refid}]")).tr_s("\n", ' ')).to_s);
1546
+ ; _slim_controls2; end; _buf << ((_slim_controls1).to_s); when :ref;
1547
+ ; _buf << ((html_tag('a', { :id => @target }.merge(data_attrs(@attributes)))).to_s);
1548
+ ; when :bibref;
1549
+ ; _buf << ((html_tag('a', { :id => @target }.merge(data_attrs(@attributes)))).to_s);
1550
+ ; _buf << ("[".freeze); _buf << ((@target).to_s); _buf << ("]".freeze);
1551
+ ; else;
1552
+ ; _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 = '';
1553
+ ; _slim_controls4 << ((@text).to_s);
1554
+ ; _slim_controls4; end; _buf << ((_slim_controls3).to_s); end; _buf
1555
+ end
1556
+ end
1557
+
1558
+ def section(node, opts = {})
1559
+ node.extend(Helpers)
1560
+ node.instance_eval do
1561
+ converter.set_local_variables(binding, opts) unless opts.empty?
1562
+ _buf = '';
1563
+ ;
1564
+ ; titleless = (title = self.title) == '!';
1565
+ ; hide_title = (titleless || (option? :notitle) || (option? :conceal));
1566
+ ;
1567
+ ; vertical_slides = find_by(context: :section) {|section| section.level == 2 };
1568
+ ;
1569
+ ;
1570
+ ;
1571
+ ; data_background_image, data_background_size, data_background_repeat,
1572
+ data_background_position, data_background_transition = nil;
1573
+ ;
1574
+ ;
1575
+ ; section_images = blocks.map do |block|;
1576
+ ; if (ctx = block.context) == :image;
1577
+ ; ['background', 'canvas'].include?(block.attributes[1]) ? block : [];
1578
+ ; elsif ctx == :section;
1579
+ ; [];
1580
+ ; else;
1581
+ ; block.find_by(context: :image) {|image| ['background', 'canvas'].include?(image.attributes[1]) } || [];
1582
+ ; end; end; if (bg_image = section_images.flatten.first);
1583
+ ; data_background_image = image_uri(bg_image.attr 'target');
1584
+ ;
1585
+ ; data_background_size = bg_image.attr 'size';
1586
+ ; data_background_repeat = bg_image.attr 'repeat';
1587
+ ; data_background_transition = bg_image.attr 'transition';
1588
+ ; data_background_position = bg_image.attr 'position';
1589
+ ;
1590
+ ;
1591
+ ; end; if attr? 'background-image';
1592
+ ; data_background_image = image_uri(attr 'background-image');
1593
+ ;
1594
+ ; end; if attr? 'background-video';
1595
+ ; data_background_video = media_uri(attr 'background-video');
1596
+ ;
1597
+ ; end; if attr? 'background-color';
1598
+ ; data_background_color = attr 'background-color';
1599
+ ;
1600
+ ; end; parent_section_with_vertical_slides = @level == 1 && !vertical_slides.empty?;
1601
+ ;
1602
+ ; content_for :footnotes do;
1603
+ ; slide_footnotes = slide_footnotes(self);
1604
+ ; if document.footnotes? && !(parent.attr? 'nofootnotes') && !slide_footnotes.empty?;
1605
+ ; _buf << ("<div class=\"footnotes\">".freeze);
1606
+ ; slide_footnotes.each do |footnote|;
1607
+ ; _buf << ("<div class=\"footnote\">".freeze);
1608
+ ; _buf << (("#{footnote.index}. #{footnote.text}").to_s);
1609
+ ;
1610
+ ; _buf << ("</div>".freeze); end; _buf << ("</div>".freeze); end; end; content_for :section do;
1611
+ ;
1612
+ ;
1613
+ ;
1614
+ ;
1615
+ ;
1616
+ ;
1617
+ ;
1618
+ ;
1619
+ ;
1620
+ ;
1621
+ ;
1622
+ ;
1623
+ ;
1624
+ ;
1625
+ ;
1626
+ ;
1627
+ ;
1628
+ ;
1629
+ ;
1541
1630
  ;
1542
1631
  ;
1543
- ; _buf << ((attr 'revealjs_width', 960).to_s); _buf << (", ".freeze); _buf << ((attr 'revealjs_height', 700).to_s); _buf << (")\n});\nReveal.addEventListener('resize', function () {\n layoutSlideContents(".freeze);
1544
1632
  ;
1633
+ ; _buf << ("<section".freeze); _slim_codeattributes1 = (titleless ? nil : id); if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" id".freeze); else; _buf << (" id=\"".freeze); _buf << ((_slim_codeattributes1).to_s); _buf << ("\"".freeze); end; end; _temple_html_attributeremover1 = ''; _slim_codeattributes2 = roles; if Array === _slim_codeattributes2; _slim_codeattributes2 = _slim_codeattributes2.flatten; _slim_codeattributes2.map!(&:to_s); _slim_codeattributes2.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes2.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes2).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover1).to_s); _buf << ("\"".freeze); end; _slim_codeattributes3 = (attr 'transition'); if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" data-transition".freeze); else; _buf << (" data-transition=\"".freeze); _buf << ((_slim_codeattributes3).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes4 = (attr 'transition-speed'); if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" data-transition-speed".freeze); else; _buf << (" data-transition-speed=\"".freeze); _buf << ((_slim_codeattributes4).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes5 = data_background_color; if _slim_codeattributes5; if _slim_codeattributes5 == true; _buf << (" data-background-color".freeze); else; _buf << (" data-background-color=\"".freeze); _buf << ((_slim_codeattributes5).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes6 = data_background_image; if _slim_codeattributes6; if _slim_codeattributes6 == true; _buf << (" data-background-image".freeze); else; _buf << (" data-background-image=\"".freeze); _buf << ((_slim_codeattributes6).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes7 = (data_background_size || attr('background-size')); if _slim_codeattributes7; if _slim_codeattributes7 == true; _buf << (" data-background-size".freeze); else; _buf << (" data-background-size=\"".freeze); _buf << ((_slim_codeattributes7).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes8 = (data_background_repeat || attr('background-repeat')); if _slim_codeattributes8; if _slim_codeattributes8 == true; _buf << (" data-background-repeat".freeze); else; _buf << (" data-background-repeat=\"".freeze); _buf << ((_slim_codeattributes8).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes9 = (data_background_transition || attr('background-transition')); if _slim_codeattributes9; if _slim_codeattributes9 == true; _buf << (" data-background-transition".freeze); else; _buf << (" data-background-transition=\"".freeze); _buf << ((_slim_codeattributes9).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes10 = (data_background_position || attr('background-position')); if _slim_codeattributes10; if _slim_codeattributes10 == true; _buf << (" data-background-position".freeze); else; _buf << (" data-background-position=\"".freeze); _buf << ((_slim_codeattributes10).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes11 = (attr "background-iframe"); if _slim_codeattributes11; if _slim_codeattributes11 == true; _buf << (" data-background-iframe".freeze); else; _buf << (" data-background-iframe=\"".freeze); _buf << ((_slim_codeattributes11).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes12 = data_background_video; if _slim_codeattributes12; if _slim_codeattributes12 == true; _buf << (" data-background-video".freeze); else; _buf << (" data-background-video=\"".freeze); _buf << ((_slim_codeattributes12).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes13 = ((attr? 'background-video-loop') || (option? 'loop')); if _slim_codeattributes13; if _slim_codeattributes13 == true; _buf << (" data-background-video-loop".freeze); else; _buf << (" data-background-video-loop=\"".freeze); _buf << ((_slim_codeattributes13).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes14 = ((attr? 'background-video-muted') || (option? 'muted')); if _slim_codeattributes14; if _slim_codeattributes14 == true; _buf << (" data-background-video-muted".freeze); else; _buf << (" data-background-video-muted=\"".freeze); _buf << ((_slim_codeattributes14).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes15 = (attr "background-opacity"); if _slim_codeattributes15; if _slim_codeattributes15 == true; _buf << (" data-background-opacity".freeze); else; _buf << (" data-background-opacity=\"".freeze); _buf << ((_slim_codeattributes15).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes16 = (attr "autoslide"); if _slim_codeattributes16; if _slim_codeattributes16 == true; _buf << (" data-autoslide".freeze); else; _buf << (" data-autoslide=\"".freeze); _buf << ((_slim_codeattributes16).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes17 = (attr 'state'); if _slim_codeattributes17; if _slim_codeattributes17 == true; _buf << (" data-state".freeze); else; _buf << (" data-state=\"".freeze); _buf << ((_slim_codeattributes17).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes18 = ((attr? 'auto-animate') || (option? 'auto-animate')); if _slim_codeattributes18; if _slim_codeattributes18 == true; _buf << (" data-auto-animate".freeze); else; _buf << (" data-auto-animate=\"".freeze); _buf << ((_slim_codeattributes18).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes19 = ((attr 'auto-animate-easing') || (option? 'auto-animate-easing')); if _slim_codeattributes19; if _slim_codeattributes19 == true; _buf << (" data-auto-animate-easing".freeze); else; _buf << (" data-auto-animate-easing=\"".freeze); _buf << ((_slim_codeattributes19).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes20 = ((attr 'auto-animate-unmatched') || (option? 'auto-animate-unmatched')); if _slim_codeattributes20; if _slim_codeattributes20 == true; _buf << (" data-auto-animate-unmatched".freeze); else; _buf << (" data-auto-animate-unmatched=\"".freeze); _buf << ((_slim_codeattributes20).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes21 = ((attr 'auto-animate-duration') || (option? 'auto-animate-duration')); if _slim_codeattributes21; if _slim_codeattributes21 == true; _buf << (" data-auto-animate-duration".freeze); else; _buf << (" data-auto-animate-duration=\"".freeze); _buf << ((_slim_codeattributes21).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes22 = (attr 'auto-animate-id'); if _slim_codeattributes22; if _slim_codeattributes22 == true; _buf << (" data-auto-animate-id".freeze); else; _buf << (" data-auto-animate-id=\"".freeze); _buf << ((_slim_codeattributes22).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes23 = ((attr? 'auto-animate-restart') || (option? 'auto-animate-restart')); if _slim_codeattributes23; if _slim_codeattributes23 == true; _buf << (" data-auto-animate-restart".freeze); else; _buf << (" data-auto-animate-restart=\"".freeze); _buf << ((_slim_codeattributes23).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
1634
+ ; unless hide_title;
1635
+ ; _buf << ("<h2>".freeze); _buf << ((section_title).to_s);
1636
+ ; _buf << ("</h2>".freeze); end; if parent_section_with_vertical_slides;
1637
+ ; unless (_blocks = blocks - vertical_slides).empty?;
1638
+ ; _buf << ("<div class=\"slide-content\">".freeze);
1639
+ ; _blocks.each do |block|;
1640
+ ; _buf << ((block.convert).to_s);
1641
+ ; end; _buf << ("</div>".freeze); end; yield_content :footnotes;
1545
1642
  ;
1546
- ; _buf << ((attr 'revealjs_width', 960).to_s); _buf << (", ".freeze); _buf << ((attr 'revealjs_height', 700).to_s); _buf << (")\n});</script>".freeze);
1643
+ ; else;
1644
+ ; unless (_content = content.chomp).empty?;
1645
+ ; _buf << ("<div class=\"slide-content\">".freeze);
1646
+ ; _buf << ((_content).to_s);
1647
+ ; _buf << ("</div>".freeze); end; yield_content :footnotes;
1547
1648
  ;
1649
+ ; end; clear_slide_footnotes;
1548
1650
  ;
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);
1651
+ ; _buf << ("</section>".freeze);
1551
1652
  ;
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
1567
- end
1568
- end
1569
-
1570
- def verse(node, opts = {})
1571
- node.extend(Helpers)
1572
- node.instance_eval do
1573
- converter.set_local_variables(binding, opts) unless opts.empty?
1574
- _buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['verseblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
1575
- ; if title?;
1576
- ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
1577
- ; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<pre class=\"content\">".freeze); _slim_controls2 << ((content).to_s);
1578
- ; _slim_controls2 << ("</pre>".freeze); attribution = (attr? :attribution) ? (attr :attribution) : nil;
1579
- ; citetitle = (attr? :citetitle) ? (attr :citetitle) : nil;
1580
- ; if attribution || citetitle;
1581
- ; _slim_controls2 << ("<div class=\"attribution\">".freeze);
1582
- ; if citetitle;
1583
- ; _slim_controls2 << ("<cite>".freeze); _slim_controls2 << ((citetitle).to_s);
1584
- ; _slim_controls2 << ("</cite>".freeze); end; if attribution;
1585
- ; if citetitle;
1586
- ; _slim_controls2 << ("<br>".freeze);
1587
- ; end; _slim_controls2 << ("&#8212; ".freeze); _slim_controls2 << ((attribution).to_s);
1588
- ; end; _slim_controls2 << ("</div>".freeze); end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
1589
- end
1590
- end
1591
-
1592
- def audio(node, opts = {})
1593
- node.extend(Helpers)
1594
- node.instance_eval do
1595
- converter.set_local_variables(binding, opts) unless opts.empty?
1596
- _buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['audioblock', @style, role] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
1597
- ; if title?;
1598
- ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
1599
- ; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<div class=\"content\"><audio".freeze);
1600
- ; _slim_codeattributes1 = media_uri(attr :target); if _slim_codeattributes1; if _slim_codeattributes1 == true; _slim_controls2 << (" src".freeze); else; _slim_controls2 << (" src=\"".freeze); _slim_controls2 << ((_slim_codeattributes1).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes2 = (option? 'autoplay'); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls2 << (" autoplay".freeze); else; _slim_controls2 << (" autoplay=\"".freeze); _slim_controls2 << ((_slim_codeattributes2).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes3 = !(option? 'nocontrols'); if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls2 << (" controls".freeze); else; _slim_controls2 << (" controls=\"".freeze); _slim_controls2 << ((_slim_codeattributes3).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes4 = (option? 'loop'); if _slim_codeattributes4; if _slim_codeattributes4 == true; _slim_controls2 << (" loop".freeze); else; _slim_controls2 << (" loop=\"".freeze); _slim_controls2 << ((_slim_codeattributes4).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << (">Your browser does not support the audio tag.</audio></div>".freeze);
1653
+ ; end; if parent_section_with_vertical_slides;
1654
+ ; _buf << ("<section>".freeze);
1655
+ ; yield_content :section;
1656
+ ; vertical_slides.each do |subsection|;
1657
+ ; _buf << ((subsection.convert).to_s);
1601
1658
  ;
1602
- ; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
1603
- end
1604
- end
1605
-
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);
1659
+ ; end; _buf << ("</section>".freeze);
1622
1660
  ; 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);
1661
+ ; if @level >= 3;
1662
+ ;
1663
+ ; _slim_htag_filter1 = ((@level)).to_s; _buf << ("<h".freeze); _buf << ((_slim_htag_filter1).to_s); _buf << (">".freeze); _buf << ((title).to_s);
1664
+ ; _buf << ("</h".freeze); _buf << ((_slim_htag_filter1).to_s); _buf << (">".freeze); _buf << ((content.chomp).to_s);
1629
1665
  ; 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
1666
+ ; yield_content :section;
1667
+ ; end; end; _buf
1641
1668
  end
1642
1669
  end
1643
1670
 
@@ -1668,30 +1695,38 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
1668
1695
  end
1669
1696
  end
1670
1697
 
1671
- def preamble(node, opts = {})
1698
+ def inline_footnote(node, opts = {})
1672
1699
  node.extend(Helpers)
1673
1700
  node.instance_eval do
1674
1701
  converter.set_local_variables(binding, opts) unless opts.empty?
1675
- _buf = '';
1676
- ;
1677
- ; _buf
1702
+ _buf = ''; footnote = slide_footnote(self);
1703
+ ; index = footnote.attr(:index);
1704
+ ; id = footnote.id;
1705
+ ; if @type == :xref;
1706
+ ; _slim_controls1 = html_tag('sup', { :class => ['footnoteref'] }.merge(data_attrs(footnote.attributes))) do; _slim_controls2 = '';
1707
+ ; _slim_controls2 << ("[<span class=\"footnote\" title=\"View footnote.\">".freeze);
1708
+ ; _slim_controls2 << ((index).to_s);
1709
+ ; _slim_controls2 << ("</span>]".freeze);
1710
+ ; _slim_controls2; end; _buf << ((_slim_controls1).to_s); else;
1711
+ ; _slim_controls3 = html_tag('sup', { :id => ("_footnote_#{id}" if id), :class => ['footnote'] }.merge(data_attrs(footnote.attributes))) do; _slim_controls4 = '';
1712
+ ; _slim_controls4 << ("[<span class=\"footnote\" title=\"View footnote.\">".freeze);
1713
+ ; _slim_controls4 << ((index).to_s);
1714
+ ; _slim_controls4 << ("</span>]".freeze);
1715
+ ; _slim_controls4; end; _buf << ((_slim_controls3).to_s); end; _buf
1678
1716
  end
1679
1717
  end
1680
1718
 
1681
- def inline_kbd(node, opts = {})
1719
+ def image(node, opts = {})
1682
1720
  node.extend(Helpers)
1683
1721
  node.instance_eval do
1684
1722
  converter.set_local_variables(binding, opts) unless opts.empty?
1685
- _buf = ''; if (keys = attr 'keys').size == 1;
1686
- ; _slim_controls1 = html_tag('kbd', data_attrs(@attributes)) do; _slim_controls2 = '';
1687
- ; _slim_controls2 << ((keys.first).to_s);
1688
- ; _slim_controls2; end; _buf << ((_slim_controls1).to_s); else;
1689
- ; _slim_controls3 = html_tag('span', { :class => ['keyseq'] }.merge(data_attrs(@attributes))) do; _slim_controls4 = '';
1690
- ; keys.each_with_index do |key, idx|;
1691
- ; unless idx.zero?;
1692
- ; _slim_controls4 << ("+".freeze);
1693
- ; end; _slim_controls4 << ("<kbd>".freeze); _slim_controls4 << ((key).to_s);
1694
- ; _slim_controls4 << ("</kbd>".freeze); end; _slim_controls4; end; _buf << ((_slim_controls3).to_s); end; _buf
1723
+ _buf = ''; unless attributes[1] == 'background' || attributes[1] == 'canvas';
1724
+ ; inline_style = [("text-align: #{attr :align}" if attr? :align),("float: #{attr :float}" if attr? :float)].compact.join('; ');
1725
+ ; _slim_controls1 = html_tag('div', { :id => @id, :class => ['imageblock', role, ('fragment' if (option? :step) || (attr? 'step'))], :style => inline_style }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
1726
+ ; _slim_controls2 << ((convert_image).to_s);
1727
+ ; _slim_controls2; end; _buf << ((_slim_controls1).to_s); if title?;
1728
+ ; _buf << ("<div class=\"title\">".freeze); _buf << ((captioned_title).to_s);
1729
+ ; _buf << ("</div>".freeze); end; end; _buf
1695
1730
  end
1696
1731
  end
1697
1732
 
@@ -1730,23 +1765,6 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
1730
1765
  end
1731
1766
  end
1732
1767
 
1733
- def embedded(node, opts = {})
1734
- node.extend(Helpers)
1735
- node.instance_eval do
1736
- converter.set_local_variables(binding, opts) unless opts.empty?
1737
- _buf = ''; unless notitle || !has_header?;
1738
- ; _buf << ("<h1".freeze); _slim_codeattributes1 = @id; if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" id".freeze); else; _buf << (" id=\"".freeze); _buf << ((_slim_codeattributes1).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze); _buf << ((@header.title).to_s);
1739
- ; _buf << ("</h1>".freeze); end; _buf << ((content).to_s);
1740
- ; unless !footnotes? || attr?(:nofootnotes);
1741
- ; _buf << ("<div id=\"footnotes\"><hr>".freeze);
1742
- ;
1743
- ; footnotes.each do |fn|;
1744
- ; _buf << ("<div class=\"footnote\" id=\"_footnote_".freeze); _buf << ((fn.index).to_s); _buf << ("\"><a href=\"#_footnoteref_".freeze);
1745
- ; _buf << ((fn.index).to_s); _buf << ("\">".freeze); _buf << ((fn.index).to_s); _buf << ("</a>. ".freeze); _buf << ((fn.text).to_s);
1746
- ; _buf << ("</div>".freeze); end; _buf << ("</div>".freeze); end; _buf
1747
- end
1748
- end
1749
-
1750
1768
  def paragraph(node, opts = {})
1751
1769
  node.extend(Helpers)
1752
1770
  node.instance_eval do
@@ -1762,20 +1780,72 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
1762
1780
  end
1763
1781
  end
1764
1782
 
1765
- def olist(node, opts = {})
1783
+ def floating_title(node, opts = {})
1766
1784
  node.extend(Helpers)
1767
1785
  node.instance_eval do
1768
1786
  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 = '';
1787
+ _buf = ''; _slim_htag_filter1 = ((level + 1)).to_s; _buf << ("<h".freeze); _buf << ((_slim_htag_filter1).to_s); _slim_codeattributes1 = id; if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" id".freeze); else; _buf << (" id=\"".freeze); _buf << ((_slim_codeattributes1).to_s); _buf << ("\"".freeze); end; end; _temple_html_attributeremover1 = ''; _slim_codeattributes2 = [style, role]; if Array === _slim_codeattributes2; _slim_codeattributes2 = _slim_codeattributes2.flatten; _slim_codeattributes2.map!(&:to_s); _slim_codeattributes2.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes2.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes2).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover1).to_s); _buf << ("\"".freeze); end; _buf << (">".freeze);
1788
+ ; _buf << ((title).to_s);
1789
+ ; _buf << ("</h".freeze); _buf << ((_slim_htag_filter1).to_s); _buf << (">".freeze); _buf
1790
+ end
1791
+ end
1792
+
1793
+ def inline_callout(node, opts = {})
1794
+ node.extend(Helpers)
1795
+ node.instance_eval do
1796
+ converter.set_local_variables(binding, opts) unless opts.empty?
1797
+ _buf = ''; if @document.attr? :icons, 'font';
1798
+ ; _buf << ("<i class=\"conum\"".freeze); _slim_codeattributes1 = @text; if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" data-value".freeze); else; _buf << (" data-value=\"".freeze); _buf << ((_slim_codeattributes1).to_s); _buf << ("\"".freeze); end; end; _buf << ("></i><b>".freeze);
1799
+ ; _buf << (("(#{@text})").to_s);
1800
+ ; _buf << ("</b>".freeze); elsif @document.attr? :icons;
1801
+ ; _buf << ("<img".freeze); _slim_codeattributes2 = icon_uri("callouts/#{@text}"); if _slim_codeattributes2; if _slim_codeattributes2 == true; _buf << (" src".freeze); else; _buf << (" src=\"".freeze); _buf << ((_slim_codeattributes2).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes3 = @text; if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" alt".freeze); else; _buf << (" alt=\"".freeze); _buf << ((_slim_codeattributes3).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
1802
+ ; else;
1803
+ ; _buf << ("<b>".freeze); _buf << (("(#{@text})").to_s);
1804
+ ; _buf << ("</b>".freeze); end; _buf
1805
+ end
1806
+ end
1807
+
1808
+ def inline_image(node, opts = {})
1809
+ node.extend(Helpers)
1810
+ node.instance_eval do
1811
+ converter.set_local_variables(binding, opts) unless opts.empty?
1812
+ _buf = ''; _slim_controls1 = html_tag('span', { :class => [@type, role, ('fragment' if (option? :step) || (attr? 'step'))], :style => ("float: #{attr :float}" if attr? :float) }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
1813
+ ; _slim_controls2 << ((convert_inline_image).to_s);
1814
+ ; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
1815
+ end
1816
+ end
1817
+
1818
+ def inline_quoted(node, opts = {})
1819
+ node.extend(Helpers)
1820
+ node.instance_eval do
1821
+ converter.set_local_variables(binding, opts) unless opts.empty?
1822
+ _buf = ''; quote_tags = { emphasis: 'em', strong: 'strong', monospaced: 'code', superscript: 'sup', subscript: 'sub' };
1823
+ ; if (quote_tag = quote_tags[@type]);
1824
+ ; _buf << ((html_tag(quote_tag, { :id => @id, :class => [role, ('fragment' if (option? :step) || (attr? 'step'))].compact }.merge(data_attrs(@attributes)), @text)).to_s);
1825
+ ; else;
1826
+ ; case @type;
1827
+ ; when :double;
1828
+ ; _buf << ((inline_text_container("&#8220;#{@text}&#8221;")).to_s);
1829
+ ; when :single;
1830
+ ; _buf << ((inline_text_container("&#8216;#{@text}&#8217;")).to_s);
1831
+ ; when :asciimath, :latexmath;
1832
+ ; open, close = Asciidoctor::INLINE_MATH_DELIMITERS[@type];
1833
+ ; _buf << ((inline_text_container("#{open}#{@text}#{close}")).to_s);
1834
+ ; else;
1835
+ ; _buf << ((inline_text_container(@text)).to_s);
1836
+ ; end; end; _buf
1837
+ end
1838
+ end
1839
+
1840
+ def example(node, opts = {})
1841
+ node.extend(Helpers)
1842
+ node.instance_eval do
1843
+ converter.set_local_variables(binding, opts) unless opts.empty?
1844
+ _buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['exampleblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
1770
1845
  ; 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
1846
+ ; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
1847
+ ; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<div class=\"content\">".freeze); _slim_controls2 << ((content).to_s);
1848
+ ; _slim_controls2 << ("</div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
1779
1849
  end
1780
1850
  end
1781
1851
  #------------------ End of generated transformation methods ------------------#