asciidoctor-revealjs 4.0.1 → 4.1.0.rc2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.adoc +75 -35
- data/Rakefile +18 -3
- data/asciidoctor-revealjs.gemspec +1 -1
- data/examples/a11y-dark.css +99 -0
- data/examples/autoslide.adoc +22 -0
- data/examples/custom-layout.adoc +10 -0
- data/examples/data-attributes.adoc +245 -0
- data/examples/font-awesome-specific-version.adoc +11 -0
- data/examples/font-awesome.adoc +16 -2
- data/examples/footnotes.adoc +46 -0
- data/examples/fragments.adoc +12 -0
- data/examples/grid-layout-3x2.adoc +50 -0
- data/examples/grid-layout-docinfo-revealjs.html +1 -1
- data/examples/grid-layout.adoc +21 -1
- data/examples/images/cute-cat-1.jpg +0 -0
- data/examples/images/cute-cat-2.jpg +0 -0
- data/examples/images/cute-cat-3.jpg +0 -0
- data/examples/images/flock-of-seagulls_daniel-simion.mp3 +0 -0
- data/examples/issue-grid-layout-images.adoc +25 -0
- data/examples/mathjax-cdn.adoc +21 -0
- data/examples/mathjax.adoc +20 -0
- data/examples/release-4.0.adoc +2 -5
- data/examples/release-4.1.adoc +133 -0
- data/examples/release-4.1.css +50 -0
- data/examples/revealjs-custom-theme.adoc +10 -0
- data/examples/steps.adoc +87 -0
- data/examples/text-alignments.adoc +44 -0
- data/examples/video.adoc +19 -6
- data/lib/asciidoctor-revealjs/converter.rb +754 -647
- data/lib/asciidoctor-revealjs/version.rb +1 -1
- data/templates/admonition.html.slim +1 -1
- data/templates/asciidoctor-compatibility.css +303 -54
- data/templates/audio.html.slim +1 -1
- data/templates/colist.html.slim +1 -1
- data/templates/dlist.html.slim +3 -3
- data/templates/document.html.slim +12 -7
- data/templates/example.html.slim +1 -1
- data/templates/helpers.rb +80 -7
- data/templates/image.html.slim +2 -2
- data/templates/inline_anchor.html.slim +5 -4
- data/templates/inline_button.html.slim +2 -1
- data/templates/inline_footnote.html.slim +11 -4
- data/templates/inline_image.html.slim +2 -5
- data/templates/inline_kbd.html.slim +3 -2
- data/templates/inline_menu.html.slim +4 -3
- data/templates/inline_quoted.html.slim +13 -21
- data/templates/listing.html.slim +14 -9
- data/templates/literal.html.slim +1 -1
- data/templates/olist.html.slim +2 -2
- data/templates/open.html.slim +3 -3
- data/templates/paragraph.html.slim +1 -1
- data/templates/quote.html.slim +1 -1
- data/templates/section.html.slim +18 -1
- data/templates/sidebar.html.slim +1 -1
- data/templates/stem.html.slim +1 -1
- data/templates/table.html.slim +3 -2
- data/templates/ulist.html.slim +3 -3
- data/templates/verse.html.slim +1 -1
- data/templates/video.html.slim +14 -8
- metadata +26 -10
- data/CHANGELOG.adoc +0 -546
- data/HACKING.adoc +0 -412
@@ -40,11 +40,11 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
40
40
|
# then link::example.com[Link text, preview=false]
|
41
41
|
# Here the template must have data-preview-link="false" not just no data-preview-link attribute
|
42
42
|
def bool_data_attr val
|
43
|
-
return false
|
43
|
+
return false unless attr?(val)
|
44
44
|
if attr(val).downcase == 'false' || attr(val) == '0'
|
45
|
-
|
45
|
+
'false'
|
46
46
|
else
|
47
|
-
|
47
|
+
true
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
@@ -79,25 +79,52 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
79
79
|
# @yield The block of Slim/HTML code within the tag (optional).
|
80
80
|
# @return [String] a rendered HTML element.
|
81
81
|
#
|
82
|
-
|
83
82
|
def html_tag(name, attributes = {}, content = nil)
|
84
83
|
attrs = attributes.inject([]) do |attrs, (k, v)|
|
85
|
-
next attrs
|
84
|
+
next attrs unless v && (v == true || !v.nil_or_empty?)
|
86
85
|
v = v.compact.join(' ') if v.is_a? Array
|
87
86
|
attrs << (v == true ? k : %(#{k}="#{v}"))
|
88
87
|
end
|
89
88
|
attrs_str = attrs.empty? ? '' : ' ' + attrs.join(' ')
|
90
89
|
|
91
|
-
|
92
90
|
if VOID_ELEMENTS.include? name.to_s
|
93
91
|
%(<#{name}#{attrs_str}>)
|
94
92
|
else
|
95
|
-
content ||= yield if block_given?
|
93
|
+
content ||= (yield if block_given?)
|
96
94
|
%(<#{name}#{attrs_str}>#{content}</#{name}>)
|
97
95
|
end
|
98
96
|
end
|
99
97
|
|
100
98
|
|
99
|
+
#
|
100
|
+
# Extracts data- attributes from the attributes.
|
101
|
+
# @param attributes [Hash] (default: {})
|
102
|
+
# @return [Hash] a Hash that contains only data- attributes
|
103
|
+
#
|
104
|
+
def data_attrs(attributes)
|
105
|
+
# key can be an Integer (for positional attributes)
|
106
|
+
attributes.map { |key, value| (key == 'step') ? ['data-fragment-index', value] : [key, value] }
|
107
|
+
.to_h
|
108
|
+
.select { |key, _| key.to_s.start_with?('data-') }
|
109
|
+
end
|
110
|
+
|
111
|
+
|
112
|
+
#
|
113
|
+
# Wrap an inline text in a <span> element if the node contains a role, an id or data- attributes.
|
114
|
+
# @param content [#to_s] the content; +nil+ to call the block. (default: nil).
|
115
|
+
# @return [String] the content or the content wrapped in a <span> element as string
|
116
|
+
#
|
117
|
+
def inline_text_container(content = nil)
|
118
|
+
data_attrs = data_attrs(@attributes)
|
119
|
+
classes = [role, ('fragment' if (option? :step) || (attr? 'step') || (roles.include? 'step'))].compact
|
120
|
+
if !roles.empty? || !data_attrs.empty? || !@id.nil?
|
121
|
+
html_tag('span', { :id => @id, :class => classes }.merge(data_attrs), (content || (yield if block_given?)))
|
122
|
+
else
|
123
|
+
content || (yield if block_given?)
|
124
|
+
end
|
125
|
+
end
|
126
|
+
|
127
|
+
|
101
128
|
##
|
102
129
|
# Returns corrected section level.
|
103
130
|
#
|
@@ -108,6 +135,52 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
108
135
|
@_section_level ||= (sec.level == 0 && sec.special) ? 1 : sec.level
|
109
136
|
end
|
110
137
|
|
138
|
+
##
|
139
|
+
# Display footnotes per slide
|
140
|
+
#
|
141
|
+
@@slide_footnotes = {}
|
142
|
+
@@section_footnotes = {}
|
143
|
+
|
144
|
+
def slide_footnote(footnote)
|
145
|
+
footnote_parent = footnote.parent
|
146
|
+
# footnotes declared on the section title are processed during the parsing/substitution.
|
147
|
+
# as a result, we need to store them to display them on the right slide/section
|
148
|
+
if footnote_parent.instance_of?(::Asciidoctor::Section)
|
149
|
+
footnote_parent_object_id = footnote_parent.object_id
|
150
|
+
section_footnotes = (@@section_footnotes[footnote_parent_object_id] || [])
|
151
|
+
footnote_index = section_footnotes.length + 1
|
152
|
+
attributes = footnote.attributes.merge({ 'index' => footnote_index })
|
153
|
+
inline_footnote = Asciidoctor::Inline.new(footnote_parent, footnote.context, footnote.text, :attributes => attributes)
|
154
|
+
section_footnotes << Asciidoctor::Document::Footnote.new(inline_footnote.attr(:index), inline_footnote.id, inline_footnote.text)
|
155
|
+
@@section_footnotes[footnote_parent_object_id] = section_footnotes
|
156
|
+
inline_footnote
|
157
|
+
else
|
158
|
+
parent = footnote.parent
|
159
|
+
until parent == nil || parent.instance_of?(::Asciidoctor::Section)
|
160
|
+
parent = parent.parent
|
161
|
+
end
|
162
|
+
# check if there is any footnote attached on the section title
|
163
|
+
section_footnotes = parent != nil ? @@section_footnotes[parent.object_id] || [] : []
|
164
|
+
initial_index = footnote.attr(:index)
|
165
|
+
# reset the footnote numbering to 1 on each slide
|
166
|
+
# make sure that if a footnote is used more than once it will use the same index/number
|
167
|
+
slide_index = (existing_footnote = @@slide_footnotes[initial_index]) ? existing_footnote.index : @@slide_footnotes.length + section_footnotes.length + 1
|
168
|
+
attributes = footnote.attributes.merge({ 'index' => slide_index })
|
169
|
+
inline_footnote = Asciidoctor::Inline.new(footnote_parent, footnote.context, footnote.text, :attributes => attributes)
|
170
|
+
@@slide_footnotes[initial_index] = Asciidoctor::Document::Footnote.new(inline_footnote.attr(:index), inline_footnote.id, inline_footnote.text)
|
171
|
+
inline_footnote
|
172
|
+
end
|
173
|
+
end
|
174
|
+
|
175
|
+
def clear_slide_footnotes
|
176
|
+
@@slide_footnotes = {}
|
177
|
+
end
|
178
|
+
|
179
|
+
def slide_footnotes(section)
|
180
|
+
section_object_id = section.object_id
|
181
|
+
section_footnotes = @@section_footnotes[section_object_id] || []
|
182
|
+
section_footnotes + @@slide_footnotes.values
|
183
|
+
end
|
111
184
|
|
112
185
|
##
|
113
186
|
# Returns the captioned section's title, optionally numbered.
|
@@ -268,179 +341,6 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
268
341
|
#----------------- Begin of generated transformation methods -----------------#
|
269
342
|
|
270
343
|
|
271
|
-
def toc(node, opts = {})
|
272
|
-
node.extend(Helpers)
|
273
|
-
node.instance_eval do
|
274
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
275
|
-
_buf = '';
|
276
|
-
;
|
277
|
-
;
|
278
|
-
;
|
279
|
-
;
|
280
|
-
;
|
281
|
-
;
|
282
|
-
;
|
283
|
-
;
|
284
|
-
;
|
285
|
-
;
|
286
|
-
;
|
287
|
-
;
|
288
|
-
; _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);
|
289
|
-
; _buf << (((document.attr 'toc-title')).to_s);
|
290
|
-
; _buf << ("</div>".freeze);
|
291
|
-
; _buf << ((converter.convert document, 'outline').to_s);
|
292
|
-
; _buf << ("</div>".freeze); _buf
|
293
|
-
end
|
294
|
-
end
|
295
|
-
|
296
|
-
def page_break(node, opts = {})
|
297
|
-
node.extend(Helpers)
|
298
|
-
node.instance_eval do
|
299
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
300
|
-
_buf = ''; _buf << ("<div style=\"page-break-after: always;\"></div>".freeze);
|
301
|
-
; _buf
|
302
|
-
end
|
303
|
-
end
|
304
|
-
|
305
|
-
def open(node, opts = {})
|
306
|
-
node.extend(Helpers)
|
307
|
-
node.instance_eval do
|
308
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
309
|
-
_buf = ''; if @style == 'abstract';
|
310
|
-
; if @parent == @document && @document.doctype == 'book';
|
311
|
-
; puts 'asciidoctor: WARNING: abstract block cannot be used in a document without a title when doctype is book. Excluding block content.';
|
312
|
-
; else;
|
313
|
-
; _buf << ("<div".freeze); _temple_html_attributeremover1 = ''; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "quoteblock"; _temple_html_attributemerger1[1] = "abstract"; _temple_html_attributemerger1[2] = ''; _slim_codeattributes1 = role; if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributemerger1[2] << ((_slim_codeattributes1.join(" ")).to_s); else; _temple_html_attributemerger1[2] << ((_slim_codeattributes1).to_s); end; _temple_html_attributemerger1[2]; _temple_html_attributeremover1 << ((_temple_html_attributemerger1.reject(&:empty?).join(" ")).to_s); _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover1).to_s); _buf << ("\"".freeze); end; _slim_codeattributes2 = @id; if _slim_codeattributes2; if _slim_codeattributes2 == true; _buf << (" id".freeze); else; _buf << (" id=\"".freeze); _buf << ((_slim_codeattributes2).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
314
|
-
; if title?;
|
315
|
-
; _buf << ("<div class=\"title\">".freeze); _buf << ((title).to_s);
|
316
|
-
; _buf << ("</div>".freeze); end; _buf << ("<blockquote>".freeze); _buf << ((content).to_s);
|
317
|
-
; _buf << ("</blockquote></div>".freeze); end; elsif @style == 'partintro' && (@level != 0 || @parent.context != :section || @document.doctype != 'book');
|
318
|
-
; puts 'asciidoctor: ERROR: partintro block can only be used when doctype is book and it\'s a child of a book part. Excluding block content.';
|
319
|
-
; else;
|
320
|
-
; if (has_role? 'aside') or (has_role? 'speaker') or (has_role? 'notes');
|
321
|
-
; _buf << ("<aside class=\"notes\">".freeze); _buf << ((resolve_content).to_s);
|
322
|
-
; _buf << ("</aside>".freeze);
|
323
|
-
; else;
|
324
|
-
; _buf << ("<div".freeze); _temple_html_attributeremover2 = ''; _temple_html_attributemerger2 = []; _temple_html_attributemerger2[0] = "openblock"; _temple_html_attributemerger2[1] = ''; _slim_codeattributes3 = [(@style != 'open' ? @style : nil),role]; if Array === _slim_codeattributes3; _slim_codeattributes3 = _slim_codeattributes3.flatten; _slim_codeattributes3.map!(&:to_s); _slim_codeattributes3.reject!(&:empty?); _temple_html_attributemerger2[1] << ((_slim_codeattributes3.join(" ")).to_s); else; _temple_html_attributemerger2[1] << ((_slim_codeattributes3).to_s); end; _temple_html_attributemerger2[1]; _temple_html_attributeremover2 << ((_temple_html_attributemerger2.reject(&:empty?).join(" ")).to_s); _temple_html_attributeremover2; if !_temple_html_attributeremover2.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover2).to_s); _buf << ("\"".freeze); end; _slim_codeattributes4 = @id; if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" id".freeze); else; _buf << (" id=\"".freeze); _buf << ((_slim_codeattributes4).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
325
|
-
; if title?;
|
326
|
-
; _buf << ("<div class=\"title\">".freeze); _buf << ((title).to_s);
|
327
|
-
; _buf << ("</div>".freeze); end; _buf << ("<div class=\"content\">".freeze); _buf << ((content).to_s);
|
328
|
-
; _buf << ("</div></div>".freeze); end; end; _buf
|
329
|
-
end
|
330
|
-
end
|
331
|
-
|
332
|
-
def paragraph(node, opts = {})
|
333
|
-
node.extend(Helpers)
|
334
|
-
node.instance_eval do
|
335
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
336
|
-
_buf = ''; _buf << ("<div".freeze); _temple_html_attributeremover1 = ''; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "paragraph"; _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; _slim_codeattributes2 = @id; if _slim_codeattributes2; if _slim_codeattributes2 == true; _buf << (" id".freeze); else; _buf << (" id=\"".freeze); _buf << ((_slim_codeattributes2).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
337
|
-
; if title?;
|
338
|
-
; _buf << ("<div class=\"title\">".freeze); _buf << ((title).to_s);
|
339
|
-
; _buf << ("</div>".freeze); end; if has_role? 'small';
|
340
|
-
; _buf << ("<small>".freeze); _buf << ((content).to_s);
|
341
|
-
; _buf << ("</small>".freeze); else;
|
342
|
-
; _buf << ("<p>".freeze); _buf << ((content).to_s);
|
343
|
-
; _buf << ("</p>".freeze); end; _buf << ("</div>".freeze); _buf
|
344
|
-
end
|
345
|
-
end
|
346
|
-
|
347
|
-
def verse(node, opts = {})
|
348
|
-
node.extend(Helpers)
|
349
|
-
node.instance_eval do
|
350
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
351
|
-
_buf = ''; _buf << ("<div".freeze); _temple_html_attributeremover1 = ''; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "verseblock"; _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; _slim_codeattributes2 = @id; if _slim_codeattributes2; if _slim_codeattributes2 == true; _buf << (" id".freeze); else; _buf << (" id=\"".freeze); _buf << ((_slim_codeattributes2).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
352
|
-
; if title?;
|
353
|
-
; _buf << ("<div class=\"title\">".freeze); _buf << ((title).to_s);
|
354
|
-
; _buf << ("</div>".freeze); end; _buf << ("<pre class=\"content\">".freeze); _buf << ((content).to_s);
|
355
|
-
; _buf << ("</pre>".freeze); attribution = (attr? :attribution) ? (attr :attribution) : nil;
|
356
|
-
; citetitle = (attr? :citetitle) ? (attr :citetitle) : nil;
|
357
|
-
; if attribution || citetitle;
|
358
|
-
; _buf << ("<div class=\"attribution\">".freeze);
|
359
|
-
; if citetitle;
|
360
|
-
; _buf << ("<cite>".freeze); _buf << ((citetitle).to_s);
|
361
|
-
; _buf << ("</cite>".freeze); end; if attribution;
|
362
|
-
; if citetitle;
|
363
|
-
; _buf << ("<br>".freeze);
|
364
|
-
; end; _buf << ("— ".freeze); _buf << ((attribution).to_s);
|
365
|
-
; end; _buf << ("</div>".freeze); end; _buf << ("</div>".freeze); _buf
|
366
|
-
end
|
367
|
-
end
|
368
|
-
|
369
|
-
def dlist(node, opts = {})
|
370
|
-
node.extend(Helpers)
|
371
|
-
node.instance_eval do
|
372
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
373
|
-
_buf = ''; case @style;
|
374
|
-
; when 'qanda';
|
375
|
-
; _buf << ("<div".freeze); _temple_html_attributeremover1 = ''; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "qlist"; _temple_html_attributemerger1[1] = ''; _slim_codeattributes1 = ['qanda',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; _slim_codeattributes2 = @id; if _slim_codeattributes2; if _slim_codeattributes2 == true; _buf << (" id".freeze); else; _buf << (" id=\"".freeze); _buf << ((_slim_codeattributes2).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
376
|
-
; if title?;
|
377
|
-
; _buf << ("<div class=\"title\">".freeze); _buf << ((title).to_s);
|
378
|
-
; _buf << ("</div>".freeze); end; _buf << ("<ol>".freeze);
|
379
|
-
; items.each do |questions, answer|;
|
380
|
-
; _buf << ("<li>".freeze);
|
381
|
-
; [*questions].each do |question|;
|
382
|
-
; _buf << ("<p><em>".freeze); _buf << ((question.text).to_s);
|
383
|
-
; _buf << ("</em></p>".freeze); end; unless answer.nil?;
|
384
|
-
; if answer.text?;
|
385
|
-
; _buf << ("<p>".freeze); _buf << ((answer.text).to_s);
|
386
|
-
; _buf << ("</p>".freeze); end; if answer.blocks?;
|
387
|
-
; _buf << ((answer.content).to_s);
|
388
|
-
; end; end; _buf << ("</li>".freeze); end; _buf << ("</ol></div>".freeze); when 'horizontal';
|
389
|
-
; _buf << ("<div".freeze); _temple_html_attributeremover2 = ''; _temple_html_attributemerger2 = []; _temple_html_attributemerger2[0] = "hdlist"; _temple_html_attributemerger2[1] = ''; _slim_codeattributes3 = role; if Array === _slim_codeattributes3; _slim_codeattributes3 = _slim_codeattributes3.flatten; _slim_codeattributes3.map!(&:to_s); _slim_codeattributes3.reject!(&:empty?); _temple_html_attributemerger2[1] << ((_slim_codeattributes3.join(" ")).to_s); else; _temple_html_attributemerger2[1] << ((_slim_codeattributes3).to_s); end; _temple_html_attributemerger2[1]; _temple_html_attributeremover2 << ((_temple_html_attributemerger2.reject(&:empty?).join(" ")).to_s); _temple_html_attributeremover2; if !_temple_html_attributeremover2.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover2).to_s); _buf << ("\"".freeze); end; _slim_codeattributes4 = @id; if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" id".freeze); else; _buf << (" id=\"".freeze); _buf << ((_slim_codeattributes4).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
390
|
-
; if title?;
|
391
|
-
; _buf << ("<div class=\"title\">".freeze); _buf << ((title).to_s);
|
392
|
-
; _buf << ("</div>".freeze); end; _buf << ("<table>".freeze);
|
393
|
-
; if (attr? :labelwidth) || (attr? :itemwidth);
|
394
|
-
; _buf << ("<colgroup><col".freeze);
|
395
|
-
; _slim_codeattributes5 = ((attr? :labelwidth) ? %(width:#{(attr :labelwidth).chomp '%'}%;) : nil); if _slim_codeattributes5; if _slim_codeattributes5 == true; _buf << (" style".freeze); else; _buf << (" style=\"".freeze); _buf << ((_slim_codeattributes5).to_s); _buf << ("\"".freeze); end; end; _buf << ("><col".freeze);
|
396
|
-
; _slim_codeattributes6 = ((attr? :itemwidth) ? %(width:#{(attr :itemwidth).chomp '%'}%;) : nil); if _slim_codeattributes6; if _slim_codeattributes6 == true; _buf << (" style".freeze); else; _buf << (" style=\"".freeze); _buf << ((_slim_codeattributes6).to_s); _buf << ("\"".freeze); end; end; _buf << ("></colgroup>".freeze);
|
397
|
-
; end; items.each do |terms, dd|;
|
398
|
-
; _buf << ("<tr><td".freeze);
|
399
|
-
; _temple_html_attributeremover3 = ''; _slim_codeattributes7 = ['hdlist1',('strong' if option? 'strong')]; if Array === _slim_codeattributes7; _slim_codeattributes7 = _slim_codeattributes7.flatten; _slim_codeattributes7.map!(&:to_s); _slim_codeattributes7.reject!(&:empty?); _temple_html_attributeremover3 << ((_slim_codeattributes7.join(" ")).to_s); else; _temple_html_attributeremover3 << ((_slim_codeattributes7).to_s); end; _temple_html_attributeremover3; if !_temple_html_attributeremover3.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover3).to_s); _buf << ("\"".freeze); end; _buf << (">".freeze);
|
400
|
-
; terms = [*terms];
|
401
|
-
; last_term = terms.last;
|
402
|
-
; terms.each do |dt|;
|
403
|
-
; _buf << ((dt.text).to_s);
|
404
|
-
; if dt != last_term;
|
405
|
-
; _buf << ("<br>".freeze);
|
406
|
-
; end; end; _buf << ("</td><td class=\"hdlist2\">".freeze);
|
407
|
-
; unless dd.nil?;
|
408
|
-
; if dd.text?;
|
409
|
-
; _buf << ("<p>".freeze); _buf << ((dd.text).to_s);
|
410
|
-
; _buf << ("</p>".freeze); end; if dd.blocks?;
|
411
|
-
; _buf << ((dd.content).to_s);
|
412
|
-
; end; end; _buf << ("</td></tr>".freeze); end; _buf << ("</table></div>".freeze); else;
|
413
|
-
; _buf << ("<div".freeze); _temple_html_attributeremover4 = ''; _temple_html_attributemerger3 = []; _temple_html_attributemerger3[0] = "dlist"; _temple_html_attributemerger3[1] = ''; _slim_codeattributes8 = [@style,role]; if Array === _slim_codeattributes8; _slim_codeattributes8 = _slim_codeattributes8.flatten; _slim_codeattributes8.map!(&:to_s); _slim_codeattributes8.reject!(&:empty?); _temple_html_attributemerger3[1] << ((_slim_codeattributes8.join(" ")).to_s); else; _temple_html_attributemerger3[1] << ((_slim_codeattributes8).to_s); end; _temple_html_attributemerger3[1]; _temple_html_attributeremover4 << ((_temple_html_attributemerger3.reject(&:empty?).join(" ")).to_s); _temple_html_attributeremover4; if !_temple_html_attributeremover4.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover4).to_s); _buf << ("\"".freeze); end; _slim_codeattributes9 = @id; if _slim_codeattributes9; if _slim_codeattributes9 == true; _buf << (" id".freeze); else; _buf << (" id=\"".freeze); _buf << ((_slim_codeattributes9).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
414
|
-
; if title?;
|
415
|
-
; _buf << ("<div class=\"title\">".freeze); _buf << ((title).to_s);
|
416
|
-
; _buf << ("</div>".freeze); end; _buf << ("<dl>".freeze);
|
417
|
-
; items.each do |terms, dd|;
|
418
|
-
; [*terms].each do |dt|;
|
419
|
-
; _buf << ("<dt".freeze); _temple_html_attributeremover5 = ''; _slim_codeattributes10 = ('hdlist1' unless @style); if Array === _slim_codeattributes10; _slim_codeattributes10 = _slim_codeattributes10.flatten; _slim_codeattributes10.map!(&:to_s); _slim_codeattributes10.reject!(&:empty?); _temple_html_attributeremover5 << ((_slim_codeattributes10.join(" ")).to_s); else; _temple_html_attributeremover5 << ((_slim_codeattributes10).to_s); end; _temple_html_attributeremover5; if !_temple_html_attributeremover5.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover5).to_s); _buf << ("\"".freeze); end; _buf << (">".freeze); _buf << ((dt.text).to_s);
|
420
|
-
; _buf << ("</dt>".freeze); end; unless dd.nil?;
|
421
|
-
; _buf << ("<dd>".freeze);
|
422
|
-
; if dd.text?;
|
423
|
-
; _buf << ("<p>".freeze); _buf << ((dd.text).to_s);
|
424
|
-
; _buf << ("</p>".freeze); end; if dd.blocks?;
|
425
|
-
; _buf << ((dd.content).to_s);
|
426
|
-
; end; _buf << ("</dd>".freeze); end; end; _buf << ("</dl></div>".freeze); end; _buf
|
427
|
-
end
|
428
|
-
end
|
429
|
-
|
430
|
-
def inline_footnote(node, opts = {})
|
431
|
-
node.extend(Helpers)
|
432
|
-
node.instance_eval do
|
433
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
434
|
-
_buf = ''; if @type == :xref;
|
435
|
-
; _buf << ("<span class=\"footnoteref\">[<a class=\"footnote\" href=\"#_footnote_".freeze);
|
436
|
-
; _buf << ((attr :index).to_s); _buf << ("\" title=\"View footnote.\">".freeze); _buf << ((attr :index).to_s); _buf << ("</a>]</span>".freeze);
|
437
|
-
; else;
|
438
|
-
; _buf << ("<span class=\"footnote\"".freeze); _slim_codeattributes1 = ("_footnote_#{@id}" if @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 << (">[<a id=\"_footnoteref_".freeze);
|
439
|
-
; _buf << ((attr :index).to_s); _buf << ("\" class=\"footnote\" href=\"#_footnote_".freeze); _buf << ((attr :index).to_s); _buf << ("\" title=\"View footnote.\">".freeze); _buf << ((attr :index).to_s); _buf << ("</a>]</span>".freeze);
|
440
|
-
; end; _buf
|
441
|
-
end
|
442
|
-
end
|
443
|
-
|
444
344
|
def stretch_nested_elements(node, opts = {})
|
445
345
|
node.extend(Helpers)
|
446
346
|
node.instance_eval do
|
@@ -514,155 +414,116 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
514
414
|
end
|
515
415
|
end
|
516
416
|
|
517
|
-
def
|
417
|
+
def sidebar(node, opts = {})
|
518
418
|
node.extend(Helpers)
|
519
419
|
node.instance_eval do
|
520
420
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
521
|
-
_buf = '';
|
522
|
-
;
|
523
|
-
;
|
524
|
-
;
|
525
|
-
;
|
526
|
-
;
|
527
|
-
;
|
528
|
-
;
|
529
|
-
; if (has_role? 'stretch') && !((attr? :width) || (attr? :height));
|
530
|
-
; height = "100%";
|
531
|
-
;
|
532
|
-
; end; unless attributes[1] == 'background' || attributes[1] == 'canvas';
|
533
|
-
;
|
534
|
-
; _buf << ("<div".freeze); _temple_html_attributeremover1 = ''; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "imageblock"; _temple_html_attributemerger1[1] = ''; _slim_codeattributes1 = roles; if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributemerger1[1] << ((_slim_codeattributes1.join(" ")).to_s); else; _temple_html_attributemerger1[1] << ((_slim_codeattributes1).to_s); end; _temple_html_attributemerger1[1]; _temple_html_attributeremover1 << ((_temple_html_attributemerger1.reject(&:empty?).join(" ")).to_s); _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover1).to_s); _buf << ("\"".freeze); end; _slim_codeattributes2 = @id; if _slim_codeattributes2; if _slim_codeattributes2 == true; _buf << (" id".freeze); else; _buf << (" id=\"".freeze); _buf << ((_slim_codeattributes2).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes3 = [("text-align: #{attr :align}" if attr? :align),("float: #{attr :float}" if attr? :float)].compact.join('; '); if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" style".freeze); else; _buf << (" style=\"".freeze); _buf << ((_slim_codeattributes3).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
535
|
-
; if attr? :link;
|
536
|
-
; _buf << ("<a class=\"image\"".freeze); _slim_codeattributes4 = (attr :link); if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes4).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes5 = (attr :window); if _slim_codeattributes5; if _slim_codeattributes5 == true; _buf << (" target".freeze); else; _buf << (" target=\"".freeze); _buf << ((_slim_codeattributes5).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes6 = (bool_data_attr :link_preview); if _slim_codeattributes6; if _slim_codeattributes6 == true; _buf << (" data-preview-link".freeze); else; _buf << (" data-preview-link=\"".freeze); _buf << ((_slim_codeattributes6).to_s); _buf << ("\"".freeze); end; end; _buf << ("><img".freeze);
|
537
|
-
; _slim_codeattributes7 = image_uri(attr :target); if _slim_codeattributes7; if _slim_codeattributes7 == true; _buf << (" src".freeze); else; _buf << (" src=\"".freeze); _buf << ((_slim_codeattributes7).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes8 = (attr :alt); if _slim_codeattributes8; if _slim_codeattributes8 == true; _buf << (" alt".freeze); else; _buf << (" alt=\"".freeze); _buf << ((_slim_codeattributes8).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes9 = (width); if _slim_codeattributes9; if _slim_codeattributes9 == true; _buf << (" width".freeze); else; _buf << (" width=\"".freeze); _buf << ((_slim_codeattributes9).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes10 = (height); if _slim_codeattributes10; if _slim_codeattributes10 == true; _buf << (" height".freeze); else; _buf << (" height=\"".freeze); _buf << ((_slim_codeattributes10).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes11 = ((attr? :background) ? "background: #{attr :background}" : nil); if _slim_codeattributes11; if _slim_codeattributes11 == true; _buf << (" style".freeze); else; _buf << (" style=\"".freeze); _buf << ((_slim_codeattributes11).to_s); _buf << ("\"".freeze); end; end; _buf << ("></a>".freeze);
|
421
|
+
_buf = ''; if (has_role? 'aside') or (has_role? 'speaker') or (has_role? 'notes');
|
422
|
+
; _buf << ("<aside class=\"notes\">".freeze); _buf << ((resolve_content).to_s);
|
423
|
+
; _buf << ("</aside>".freeze);
|
538
424
|
; else;
|
539
|
-
;
|
540
|
-
;
|
541
|
-
;
|
542
|
-
;
|
543
|
-
|
544
|
-
|
545
|
-
|
546
|
-
def inline_break(node, opts = {})
|
547
|
-
node.extend(Helpers)
|
548
|
-
node.instance_eval do
|
549
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
550
|
-
_buf = ''; _buf << ((@text).to_s);
|
551
|
-
; _buf << ("<br>".freeze);
|
552
|
-
; _buf
|
425
|
+
; _slim_controls1 = html_tag('div', { :id => @id, :class => ['sidebarblock', role, ('fragment' if (option? :step) || (has_role? 'step') || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
426
|
+
; _slim_controls2 << ("<div class=\"content\">".freeze);
|
427
|
+
; if title?;
|
428
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
429
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ((content).to_s);
|
430
|
+
; _slim_controls2 << ("</div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); end; _buf
|
553
431
|
end
|
554
432
|
end
|
555
433
|
|
556
|
-
def
|
434
|
+
def ulist(node, opts = {})
|
557
435
|
node.extend(Helpers)
|
558
436
|
node.instance_eval do
|
559
437
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
560
|
-
_buf = '';
|
438
|
+
_buf = ''; if (checklist = (option? :checklist) ? 'checklist' : nil);
|
439
|
+
; if option? :interactive;
|
440
|
+
; marker_checked = '<input type="checkbox" data-item-complete="1" checked>';
|
441
|
+
; marker_unchecked = '<input type="checkbox" data-item-complete="0">';
|
442
|
+
; else;
|
443
|
+
; if @document.attr? :icons, 'font';
|
444
|
+
; marker_checked = '<i class="icon-check"></i>';
|
445
|
+
; marker_unchecked = '<i class="icon-check-empty"></i>';
|
446
|
+
; else;
|
561
447
|
;
|
562
|
-
;
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
def thematic_break(node, opts = {})
|
567
|
-
node.extend(Helpers)
|
568
|
-
node.instance_eval do
|
569
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
570
|
-
_buf = ''; _buf << ("<hr>".freeze);
|
571
|
-
; _buf
|
572
|
-
end
|
573
|
-
end
|
574
|
-
|
575
|
-
def quote(node, opts = {})
|
576
|
-
node.extend(Helpers)
|
577
|
-
node.instance_eval do
|
578
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
579
|
-
_buf = ''; _buf << ("<div".freeze); _temple_html_attributeremover1 = ''; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "quoteblock"; _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; _slim_codeattributes2 = @id; if _slim_codeattributes2; if _slim_codeattributes2 == true; _buf << (" id".freeze); else; _buf << (" id=\"".freeze); _buf << ((_slim_codeattributes2).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
448
|
+
; marker_checked = '<input type="checkbox" data-item-complete="1" checked disabled>';
|
449
|
+
; marker_unchecked = '<input type="checkbox" data-item-complete="0" disabled>';
|
450
|
+
; end; end; end; _slim_controls1 = html_tag('div', { :id => @id, :class => ['ulist', checklist, @style, role] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
580
451
|
; if title?;
|
581
|
-
;
|
582
|
-
;
|
583
|
-
;
|
584
|
-
;
|
585
|
-
;
|
586
|
-
;
|
587
|
-
;
|
588
|
-
;
|
589
|
-
;
|
590
|
-
;
|
591
|
-
;
|
592
|
-
; end;
|
593
|
-
; end; _buf << ("</div>".freeze); end; _buf << ("</div>".freeze); _buf
|
452
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
453
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<ul".freeze); _temple_html_attributeremover1 = ''; _slim_codeattributes1 = (checklist || @style); if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes1.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes1).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _slim_controls2 << (" class=\"".freeze); _slim_controls2 << ((_temple_html_attributeremover1).to_s); _slim_controls2 << ("\"".freeze); end; _slim_controls2 << (">".freeze);
|
454
|
+
; items.each do |item|;
|
455
|
+
; _slim_controls2 << ("<li".freeze); _temple_html_attributeremover2 = ''; _slim_codeattributes2 = ('fragment' if (option? :step) || (has_role? 'step') || (attr? 'step')); if Array === _slim_codeattributes2; _slim_codeattributes2 = _slim_codeattributes2.flatten; _slim_codeattributes2.map!(&:to_s); _slim_codeattributes2.reject!(&:empty?); _temple_html_attributeremover2 << ((_slim_codeattributes2.join(" ")).to_s); else; _temple_html_attributeremover2 << ((_slim_codeattributes2).to_s); end; _temple_html_attributeremover2; if !_temple_html_attributeremover2.empty?; _slim_controls2 << (" class=\"".freeze); _slim_controls2 << ((_temple_html_attributeremover2).to_s); _slim_controls2 << ("\"".freeze); end; _slim_controls2 << ("><p>".freeze);
|
456
|
+
;
|
457
|
+
; if checklist && (item.attr? :checkbox);
|
458
|
+
; _slim_controls2 << ((%(#{(item.attr? :checked) ? marker_checked : marker_unchecked}#{item.text})).to_s);
|
459
|
+
; else;
|
460
|
+
; _slim_controls2 << ((item.text).to_s);
|
461
|
+
; end; _slim_controls2 << ("</p>".freeze); if item.blocks?;
|
462
|
+
; _slim_controls2 << ((item.content).to_s);
|
463
|
+
; end; _slim_controls2 << ("</li>".freeze); end; _slim_controls2 << ("</ul>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
594
464
|
end
|
595
465
|
end
|
596
466
|
|
597
|
-
def
|
467
|
+
def stem(node, opts = {})
|
598
468
|
node.extend(Helpers)
|
599
469
|
node.instance_eval do
|
600
470
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
601
|
-
_buf = '';
|
602
|
-
;
|
603
|
-
;
|
471
|
+
_buf = ''; open, close = Asciidoctor::BLOCK_MATH_DELIMITERS[@style.to_sym];
|
472
|
+
; equation = content.strip;
|
473
|
+
; if (@subs.nil? || @subs.empty?) && !(attr? 'subs');
|
474
|
+
; equation = sub_specialcharacters equation;
|
475
|
+
; end; unless (equation.start_with? open) && (equation.end_with? close);
|
476
|
+
; equation = %(#{open}#{equation}#{close});
|
477
|
+
; end; _slim_controls1 = html_tag('div', { :id => @id, :class => ['stemblock', role, ('fragment' if (option? :step) || (has_role? 'step') || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
478
|
+
; if title?;
|
479
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
480
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<div class=\"content\">".freeze); _slim_controls2 << ((equation).to_s);
|
481
|
+
; _slim_controls2 << ("</div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
604
482
|
end
|
605
483
|
end
|
606
484
|
|
607
|
-
def
|
485
|
+
def olist(node, opts = {})
|
608
486
|
node.extend(Helpers)
|
609
487
|
node.instance_eval do
|
610
488
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
611
|
-
_buf = '';
|
612
|
-
;
|
489
|
+
_buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['olist', @style, role] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
490
|
+
; if title?;
|
491
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
492
|
+
; _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);
|
493
|
+
; items.each do |item|;
|
494
|
+
; _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);
|
495
|
+
; _slim_controls2 << ((item.text).to_s);
|
496
|
+
; _slim_controls2 << ("</p>".freeze); if item.blocks?;
|
497
|
+
; _slim_controls2 << ((item.content).to_s);
|
498
|
+
; end; _slim_controls2 << ("</li>".freeze); end; _slim_controls2 << ("</ol>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
613
499
|
end
|
614
500
|
end
|
615
501
|
|
616
|
-
def
|
502
|
+
def colist(node, opts = {})
|
617
503
|
node.extend(Helpers)
|
618
504
|
node.instance_eval do
|
619
505
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
620
|
-
_buf = '';
|
621
|
-
; _buf << ("<table".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; _temple_html_attributeremover1 = ''; _slim_codeattributes2 = ['tableblock',"frame-#{attr :frame, 'all'}","grid-#{attr :grid, 'all'}",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; _slim_codeattributes3 = [("width:#{attr :tablepcwidth}%" unless option? 'autowidth'),("float:#{attr :float}" if attr? :float)].compact.join('; '); if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" style".freeze); else; _buf << (" style=\"".freeze); _buf << ((_slim_codeattributes3).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
506
|
+
_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 = '';
|
622
507
|
; if title?;
|
623
|
-
;
|
624
|
-
;
|
625
|
-
;
|
626
|
-
;
|
627
|
-
;
|
628
|
-
;
|
629
|
-
;
|
630
|
-
; @columns.each do |col|;
|
631
|
-
; _buf << ("<col style=\"width:".freeze); _buf << ((col.attr :colpcwidth).to_s); _buf << ("%\">".freeze);
|
632
|
-
; end; end; _buf << ("</colgroup>".freeze); [:head, :foot, :body].select {|tblsec| !@rows[tblsec].empty? }.each do |tblsec|;
|
633
|
-
;
|
634
|
-
; _buf << ("<t".freeze); _buf << ((tblsec).to_s); _buf << (">".freeze);
|
635
|
-
; @rows[tblsec].each do |row|;
|
636
|
-
; _buf << ("<tr>".freeze);
|
637
|
-
; row.each do |cell|;
|
508
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
509
|
+
; _slim_controls2 << ("</div>".freeze); end; if @document.attr? :icons;
|
510
|
+
; font_icons = @document.attr? :icons, 'font';
|
511
|
+
; _slim_controls2 << ("<table>".freeze);
|
512
|
+
; items.each_with_index do |item, i|;
|
513
|
+
; num = i + 1;
|
514
|
+
; _slim_controls2 << ("<tr><td>".freeze);
|
638
515
|
;
|
639
|
-
; if
|
640
|
-
;
|
641
|
-
;
|
642
|
-
;
|
643
|
-
;
|
644
|
-
;
|
645
|
-
; else;
|
646
|
-
;
|
647
|
-
;
|
648
|
-
|
649
|
-
|
650
|
-
:style=>((@document.attr? :cellbgcolor) ? %(background-color:#{@document.attr :cellbgcolor};) : nil)) do; _slim_controls2 = '';
|
651
|
-
; if tblsec == :head;
|
652
|
-
; _slim_controls2 << ((cell_content).to_s);
|
653
|
-
; else;
|
654
|
-
; case cell.style;
|
655
|
-
; when :asciidoc;
|
656
|
-
; _slim_controls2 << ("<div>".freeze); _slim_controls2 << ((cell_content).to_s);
|
657
|
-
; _slim_controls2 << ("</div>".freeze); when :literal;
|
658
|
-
; _slim_controls2 << ("<div class=\"literal\"><pre>".freeze); _slim_controls2 << ((cell_content).to_s);
|
659
|
-
; _slim_controls2 << ("</pre></div>".freeze); when :header;
|
660
|
-
; cell_content.each do |text|;
|
661
|
-
; _slim_controls2 << ("<p class=\"tableblock header\">".freeze); _slim_controls2 << ((text).to_s);
|
662
|
-
; _slim_controls2 << ("</p>".freeze); end; else;
|
663
|
-
; cell_content.each do |text|;
|
664
|
-
; _slim_controls2 << ("<p class=\"tableblock\">".freeze); _slim_controls2 << ((text).to_s);
|
665
|
-
; _slim_controls2 << ("</p>".freeze); end; end; end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); end; _buf << ("</tr>".freeze); end; end; end; _buf << ("</table>".freeze); _buf
|
516
|
+
; if font_icons;
|
517
|
+
; _slim_controls2 << ("<i class=\"conum\"".freeze); _slim_codeattributes1 = num; if _slim_codeattributes1; if _slim_codeattributes1 == true; _slim_controls2 << (" data-value".freeze); else; _slim_controls2 << (" data-value=\"".freeze); _slim_controls2 << ((_slim_codeattributes1).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << ("></i><b>".freeze);
|
518
|
+
; _slim_controls2 << ((num).to_s);
|
519
|
+
; _slim_controls2 << ("</b>".freeze); else;
|
520
|
+
; _slim_controls2 << ("<img".freeze); _slim_codeattributes2 = icon_uri("callouts/#{num}"); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls2 << (" src".freeze); else; _slim_controls2 << (" src=\"".freeze); _slim_controls2 << ((_slim_codeattributes2).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes3 = num; if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls2 << (" alt".freeze); else; _slim_controls2 << (" alt=\"".freeze); _slim_controls2 << ((_slim_codeattributes3).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << (">".freeze);
|
521
|
+
; end; _slim_controls2 << ("</td><td>".freeze); _slim_controls2 << ((item.text).to_s);
|
522
|
+
; _slim_controls2 << ("</td></tr>".freeze); end; _slim_controls2 << ("</table>".freeze); else;
|
523
|
+
; _slim_controls2 << ("<ol>".freeze);
|
524
|
+
; items.each do |item|;
|
525
|
+
; _slim_controls2 << ("<li><p>".freeze); _slim_controls2 << ((item.text).to_s);
|
526
|
+
; _slim_controls2 << ("</p></li>".freeze); end; _slim_controls2 << ("</ol>".freeze); end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
666
527
|
end
|
667
528
|
end
|
668
529
|
|
@@ -690,27 +551,30 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
690
551
|
; _buf << ("<meta".freeze); _slim_codeattributes2 = key; if _slim_codeattributes2; if _slim_codeattributes2 == true; _buf << (" name".freeze); else; _buf << (" name=\"".freeze); _buf << ((_slim_codeattributes2).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes3 = (attr key); if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" content".freeze); else; _buf << (" content=\"".freeze); _buf << ((_slim_codeattributes3).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
691
552
|
; end; end; linkcss = (attr? 'linkcss');
|
692
553
|
; _buf << ("<link rel=\"stylesheet\" href=\"".freeze); _buf << ((revealjsdir).to_s); _buf << ("/css/reset.css\"><link rel=\"stylesheet\" href=\"".freeze);
|
693
|
-
; _buf << ((revealjsdir).to_s); _buf << ("/css/reveal.css\"
|
554
|
+
; _buf << ((revealjsdir).to_s); _buf << ("/css/reveal.css\"><link rel=\"stylesheet\"".freeze);
|
694
555
|
;
|
695
556
|
;
|
696
|
-
;
|
697
|
-
;
|
698
|
-
; else;
|
699
|
-
; _buf << ("<link rel=\"stylesheet\" href=\"".freeze); _buf << ((revealjsdir).to_s); _buf << ("/css/theme/".freeze); _buf << ((attr 'revealjs_theme', 'black').to_s); _buf << (".css\" id=\"theme\">".freeze);
|
700
|
-
; end; _buf << ("<!--This CSS is generated by the Asciidoctor reveal.js converter to further integrate AsciiDoc's existing semantic with reveal.js--><style type=\"text/css\">.reveal div.right{float:right}\n\n/* listing block */\n.reveal .listingblock.stretch>.content{height: 100%}\n.reveal .listingblock.stretch>.content>pre{height: 100%}\n.reveal .listingblock.stretch>.content>pre>code{height:100%;max-height:100%}\n\n/* tables */\ntable{border-collapse:collapse;border-spacing:0}\ntable{margin-bottom:1.25em;border:solid 1px #dedede}\ntable thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;text-align:left}\ntable tr th,table tr td{padding:.5625em .625em;font-size:inherit}\ntable thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.6}\ntd.tableblock>.content{margin-bottom:1.25em}\ntd.tableblock>.content>:last-child{margin-bottom:-1.25em}\ntable.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}\ntable.grid-all>thead>tr>.tableblock,table.grid-all>tbody>tr>.tableblock{border-width:0 1px 1px 0}\ntable.grid-all>tfoot>tr>.tableblock{border-width:1px 1px 0 0}\ntable.grid-cols>*>tr>.tableblock{border-width:0 1px 0 0}\ntable.grid-rows>thead>tr>.tableblock,table.grid-rows>tbody>tr>.tableblock{border-width:0 0 1px}\ntable.grid-rows>tfoot>tr>.tableblock{border-width:1px 0 0}\ntable.grid-all>*>tr>.tableblock:last-child,table.grid-cols>*>tr>.tableblock:last-child{border-right-width:0}\ntable.grid-all>tbody>tr:last-child>.tableblock,table.grid-all>thead:last-child>tr>.tableblock,table.grid-rows>tbody>tr:last-child>.tableblock,table.grid-rows>thead:last-child>tr>.tableblock{border-bottom-width:0}\ntable.frame-all{border-width:1px}\ntable.frame-sides{border-width:0 1px}\ntable.frame-topbot,table.frame-ends{border-width:1px 0}\n.reveal table th.halign-left,.reveal table td.halign-left{text-align:left}\n.reveal table th.halign-right,.reveal table td.halign-right{text-align:right}\n.reveal table th.halign-center,.reveal table td.halign-center{text-align:center}\n.reveal table th.valign-top,.reveal table td.valign-top{vertical-align:top}\n.reveal table th.valign-bottom,.reveal table td.valign-bottom{vertical-align:bottom}\n.reveal table th.valign-middle,.reveal table td.valign-middle{vertical-align:middle}\ntable thead th,table tfoot th{font-weight:bold}\ntbody tr th{display:table-cell;line-height:1.6}\ntbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{font-weight:bold}\nthead{display:table-header-group}\n\n.reveal table.grid-none th,.reveal table.grid-none td{border-bottom:0!important}\n\n/* kbd macro */\nkbd{font-family:\"Droid Sans Mono\",\"DejaVu Sans Mono\",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap}\n.keyseq kbd:first-child{margin-left:0}\n.keyseq kbd:last-child{margin-right:0}\n\n/* callouts */\n.conum[data-value] {display:inline-block;color:#fff!important;background:rgba(0,0,0,.8);-webkit-border-radius:50%;border-radius:50%;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:\"Open Sans\",\"DejaVu Sans\",sans-serif;font-style:normal;font-weight:bold}\n.conum[data-value] *{color:#fff!important}\n.conum[data-value]+b{display:none}\n.conum[data-value]:after{content:attr(data-value)}\npre .conum[data-value]{position:relative;top:-.125em}\nb.conum *{color:inherit!important}\n.conum:not([data-value]):empty{display:none}\n/* Callout list */\n.hdlist>table,.colist>table{border:0;background:none}\n.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}\ntd.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}\ntd.hdlist1{font-weight:bold;padding-bottom:1.25em}\n/* Disabled from Asciidoctor CSS because it caused callout list to go under the\n * source listing when .stretch is applied (see #335)\n * .literalblock+.colist,.listingblock+.colist{margin-top:-.5em} */\n.colist td:not([class]):first-child{padding:.4em .75em 0;line-height:1;vertical-align:top}\n.colist td:not([class]):first-child img{max-width:none}\n.colist td:not([class]):last-child{padding:.25em 0}\n\n/* Override Asciidoctor CSS that causes issues with reveal.js features */\n.reveal .hljs table{border: 0}\n/* Callout list rows would have a bottom border with some reveal.js themes (see #335) */\n.reveal .colist>table th, .reveal .colist>table td {border-bottom:0}\n/* Fixes line height with Highlight.js source listing when linenums enabled (see #331) */\n.reveal .hljs table thead tr th, .reveal .hljs table tfoot tr th, .reveal .hljs table tbody tr td, .reveal .hljs table tr td, .reveal .hljs table tfoot tr td{line-height:inherit}\n\n/* Columns layout */\n.columns .slide-content {\n display: flex;\n}\n\n.columns.wrap .slide-content {\n flex-wrap: wrap;\n}\n\n.columns.is-vcentered .slide-content {\n align-items: center;\n}\n\n.columns .slide-content > .column {\n display: block;\n flex-basis: 0;\n flex-grow: 1;\n flex-shrink: 1;\n padding: .75rem;\n}\n\n.columns .slide-content > .column.is-full {\n flex: none;\n width: 100%;\n}\n\n.columns .slide-content > .column.is-four-fifths {\n flex: none;\n width: 80%;\n}\n\n.columns .slide-content > .column.is-three-quarters {\n flex: none;\n width: 75%;\n}\n\n.columns .slide-content > .column.is-two-thirds {\n flex: none;\n width: 66.6666%;\n}\n\n.columns .slide-content > .column.is-three-fifths {\n flex: none;\n width: 60%;\n}\n\n.columns .slide-content > .column.is-half {\n flex: none;\n width: 50%;\n}\n\n.columns .slide-content > .column.is-two-fifths {\n flex: none;\n width: 40%;\n}\n\n.columns .slide-content > .column.is-one-third {\n flex: none;\n width: 33.3333%;\n}\n\n.columns .slide-content > .column.is-one-quarter {\n flex: none;\n width: 25%;\n}\n\n.columns .slide-content > .column.is-one-fifth {\n flex: none;\n width: 20%;\n}\n</style>".freeze);
|
557
|
+
; _slim_codeattributes4 = (attr :revealjs_customtheme, %(#{revealjsdir}/css/theme/#{attr 'revealjs_theme', 'black'}.css)); if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes4).to_s); _buf << ("\"".freeze); end; end; _buf << (" id=\"theme\"><!--This CSS is generated by the Asciidoctor reveal.js converter to further integrate AsciiDoc's existing semantic with reveal.js--><style type=\"text/css\">.reveal div.right {\n float: right\n}\n\n/* listing block */\n.reveal .listingblock.stretch > .content {\n height: 100%\n}\n\n.reveal .listingblock.stretch > .content > pre {\n height: 100%\n}\n\n.reveal .listingblock.stretch > .content > pre > code {\n height: 100%;\n max-height: 100%\n}\n\n/* tables */\ntable {\n border-collapse: collapse;\n border-spacing: 0\n}\n\ntable {\n margin-bottom: 1.25em;\n border: solid 1px #dedede\n}\n\ntable thead tr th, table thead tr td, table tfoot tr th, table tfoot tr td {\n padding: .5em .625em .625em;\n font-size: inherit;\n text-align: left\n}\n\ntable tr th, table tr td {\n padding: .5625em .625em;\n font-size: inherit\n}\n\ntable thead tr th, table tfoot tr th, table tbody tr td, table tr td, table tfoot tr td {\n display: table-cell;\n line-height: 1.6\n}\n\ntd.tableblock > .content {\n margin-bottom: 1.25em\n}\n\ntd.tableblock > .content > :last-child {\n margin-bottom: -1.25em\n}\n\ntable.tableblock, th.tableblock, td.tableblock {\n border: 0 solid #dedede\n}\n\ntable.grid-all > thead > tr > .tableblock, table.grid-all > tbody > tr > .tableblock {\n border-width: 0 1px 1px 0\n}\n\ntable.grid-all > tfoot > tr > .tableblock {\n border-width: 1px 1px 0 0\n}\n\ntable.grid-cols > * > tr > .tableblock {\n border-width: 0 1px 0 0\n}\n\ntable.grid-rows > thead > tr > .tableblock, table.grid-rows > tbody > tr > .tableblock {\n border-width: 0 0 1px\n}\n\ntable.grid-rows > tfoot > tr > .tableblock {\n border-width: 1px 0 0\n}\n\ntable.grid-all > * > tr > .tableblock:last-child, table.grid-cols > * > tr > .tableblock:last-child {\n border-right-width: 0\n}\n\ntable.grid-all > tbody > tr:last-child > .tableblock, table.grid-all > thead:last-child > tr > .tableblock, table.grid-rows > tbody > tr:last-child > .tableblock, table.grid-rows > thead:last-child > tr > .tableblock {\n border-bottom-width: 0\n}\n\ntable.frame-all {\n border-width: 1px\n}\n\ntable.frame-sides {\n border-width: 0 1px\n}\n\ntable.frame-topbot, table.frame-ends {\n border-width: 1px 0\n}\n\n.reveal table th.halign-left, .reveal table td.halign-left {\n text-align: left\n}\n\n.reveal table th.halign-right, .reveal table td.halign-right {\n text-align: right\n}\n\n.reveal table th.halign-center, .reveal table td.halign-center {\n text-align: center\n}\n\n.reveal table th.valign-top, .reveal table td.valign-top {\n vertical-align: top\n}\n\n.reveal table th.valign-bottom, .reveal table td.valign-bottom {\n vertical-align: bottom\n}\n\n.reveal table th.valign-middle, .reveal table td.valign-middle {\n vertical-align: middle\n}\n\ntable thead th, table tfoot th {\n font-weight: bold\n}\n\ntbody tr th {\n display: table-cell;\n line-height: 1.6\n}\n\ntbody tr th, tbody tr th p, tfoot tr th, tfoot tr th p {\n font-weight: bold\n}\n\nthead {\n display: table-header-group\n}\n\n.reveal table.grid-none th, .reveal table.grid-none td {\n border-bottom: 0 !important\n}\n\n/* kbd macro */\nkbd {\n font-family: \"Droid Sans Mono\", \"DejaVu Sans Mono\", monospace;\n display: inline-block;\n color: rgba(0, 0, 0, .8);\n font-size: .65em;\n line-height: 1.45;\n background: #f7f7f7;\n border: 1px solid #ccc;\n -webkit-border-radius: 3px;\n border-radius: 3px;\n -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 0 0 .1em white inset;\n box-shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 0 0 .1em #fff inset;\n margin: 0 .15em;\n padding: .2em .5em;\n vertical-align: middle;\n position: relative;\n top: -.1em;\n white-space: nowrap\n}\n\n.keyseq kbd:first-child {\n margin-left: 0\n}\n\n.keyseq kbd:last-child {\n margin-right: 0\n}\n\n/* callouts */\n.conum[data-value] {\n display: inline-block;\n color: #fff !important;\n background: rgba(0, 0, 0, .8);\n -webkit-border-radius: 50%;\n border-radius: 50%;\n text-align: center;\n font-size: .75em;\n width: 1.67em;\n height: 1.67em;\n line-height: 1.67em;\n font-family: \"Open Sans\", \"DejaVu Sans\", sans-serif;\n font-style: normal;\n font-weight: bold\n}\n\n.conum[data-value] * {\n color: #fff !important\n}\n\n.conum[data-value] + b {\n display: none\n}\n\n.conum[data-value]:after {\n content: attr(data-value)\n}\n\npre .conum[data-value] {\n position: relative;\n top: -.125em\n}\n\nb.conum * {\n color: inherit !important\n}\n\n.conum:not([data-value]):empty {\n display: none\n}\n\n/* Callout list */\n.hdlist > table, .colist > table {\n border: 0;\n background: none\n}\n\n.hdlist > table > tbody > tr, .colist > table > tbody > tr {\n background: none\n}\n\ntd.hdlist1, td.hdlist2 {\n vertical-align: top;\n padding: 0 .625em\n}\n\ntd.hdlist1 {\n font-weight: bold;\n padding-bottom: 1.25em\n}\n\n/* Disabled from Asciidoctor CSS because it caused callout list to go under the\n * source listing when .stretch is applied (see #335)\n * .literalblock+.colist,.listingblock+.colist{margin-top:-.5em} */\n.colist td:not([class]):first-child {\n padding: .4em .75em 0;\n line-height: 1;\n vertical-align: top\n}\n\n.colist td:not([class]):first-child img {\n max-width: none\n}\n\n.colist td:not([class]):last-child {\n padding: .25em 0\n}\n\n/* Override Asciidoctor CSS that causes issues with reveal.js features */\n.reveal .hljs table {\n border: 0\n}\n\n/* Callout list rows would have a bottom border with some reveal.js themes (see #335) */\n.reveal .colist > table th, .reveal .colist > table td {\n border-bottom: 0\n}\n\n/* Fixes line height with Highlight.js source listing when linenums enabled (see #331) */\n.reveal .hljs table thead tr th, .reveal .hljs table tfoot tr th, .reveal .hljs table tbody tr td, .reveal .hljs table tr td, .reveal .hljs table tfoot tr td {\n line-height: inherit\n}\n\n/* Columns layout */\n.columns .slide-content {\n display: flex;\n}\n\n.columns.wrap .slide-content {\n flex-wrap: wrap;\n}\n\n.columns.is-vcentered .slide-content {\n align-items: center;\n}\n\n.columns .slide-content > .column {\n display: block;\n flex-basis: 0;\n flex-grow: 1;\n flex-shrink: 1;\n}\n\n.columns .slide-content > .column > * {\n padding: .75rem;\n}\n\n/* See #353 */\n.columns.wrap .slide-content > .column {\n flex-basis: auto;\n}\n\n.columns .slide-content > .column.is-full {\n flex: none;\n width: 100%;\n}\n\n.columns .slide-content > .column.is-four-fifths {\n flex: none;\n width: 80%;\n}\n\n.columns .slide-content > .column.is-three-quarters {\n flex: none;\n width: 75%;\n}\n\n.columns .slide-content > .column.is-two-thirds {\n flex: none;\n width: 66.6666%;\n}\n\n.columns .slide-content > .column.is-three-fifths {\n flex: none;\n width: 60%;\n}\n\n.columns .slide-content > .column.is-half {\n flex: none;\n width: 50%;\n}\n\n.columns .slide-content > .column.is-two-fifths {\n flex: none;\n width: 40%;\n}\n\n.columns .slide-content > .column.is-one-third {\n flex: none;\n width: 33.3333%;\n}\n\n.columns .slide-content > .column.is-one-quarter {\n flex: none;\n width: 25%;\n}\n\n.columns .slide-content > .column.is-one-fifth {\n flex: none;\n width: 20%;\n}\n\n.columns .slide-content > .column.has-text-left {\n text-align: left;\n}\n\n.columns .slide-content > .column.has-text-justified {\n text-align: justify;\n}\n\n.columns .slide-content > .column.has-text-right {\n text-align: right;\n}\n\n.columns .slide-content > .column.has-text-left {\n text-align: left;\n}\n\n.columns .slide-content > .column.has-text-justified {\n text-align: justify;\n}\n\n.columns .slide-content > .column.has-text-right {\n text-align: right;\n}\n\n.text-left {\n text-align: left !important\n}\n\n.text-right {\n text-align: right !important\n}\n\n.text-center {\n text-align: center !important\n}\n\n.text-justify {\n text-align: justify !important\n}\n\n.footnotes {\n border-top: 1px solid rgba(0, 0, 0, 0.2);\n padding: 0.5em 0 0 0;\n font-size: 0.65em;\n margin-top: 4em;\n}\n</style>".freeze);
|
558
|
+
;
|
701
559
|
;
|
702
560
|
;
|
703
561
|
; if attr? :icons, 'font';
|
704
562
|
;
|
705
563
|
; if attr? 'iconfont-remote';
|
706
|
-
;
|
707
|
-
;
|
564
|
+
; if (iconfont_cdn = (attr 'iconfont-cdn'));
|
565
|
+
; _buf << ("<link rel=\"stylesheet\"".freeze); _slim_codeattributes5 = iconfont_cdn; if _slim_codeattributes5; if _slim_codeattributes5 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes5).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
708
566
|
; else;
|
709
|
-
;
|
567
|
+
;
|
568
|
+
; font_awesome_version = (attr 'font-awesome-version', '5.15.1');
|
569
|
+
; _buf << ("<link rel=\"stylesheet\"".freeze); _slim_codeattributes6 = %(#{cdn_base}/font-awesome/#{font_awesome_version}/css/all.min.css); if _slim_codeattributes6; if _slim_codeattributes6 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes6).to_s); _buf << ("\"".freeze); end; end; _buf << ("><link rel=\"stylesheet\"".freeze);
|
570
|
+
; _slim_codeattributes7 = %(#{cdn_base}/font-awesome/#{font_awesome_version}/css/v4-shims.min.css); if _slim_codeattributes7; if _slim_codeattributes7 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes7).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
571
|
+
; end; else;
|
572
|
+
; _buf << ("<link rel=\"stylesheet\"".freeze); _slim_codeattributes8 = (normalize_web_path %(#{attr 'iconfont-name', 'font-awesome'}.css), (attr 'stylesdir', ''), false); if _slim_codeattributes8; if _slim_codeattributes8 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes8).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
710
573
|
; end; end; if attr? :stem;
|
711
574
|
; eqnums_val = (attr 'eqnums', 'none');
|
712
575
|
; eqnums_val = 'AMS' if eqnums_val == '';
|
713
576
|
; eqnums_opt = %( equationNumbers: { autoNumber: "#{eqnums_val}" } );
|
577
|
+
; mathjaxdir = (attr 'mathjaxdir', "#{cdn_base}/mathjax/2.7.6");
|
714
578
|
; _buf << ("<script type=\"text/x-mathjax-config\">MathJax.Hub.Config({\ntex2jax: {\n inlineMath: [".freeze);
|
715
579
|
;
|
716
580
|
;
|
@@ -724,7 +588,7 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
724
588
|
;
|
725
589
|
; _buf << ((eqnums_opt).to_s); _buf << ("}\n});</script><script src=\"".freeze);
|
726
590
|
;
|
727
|
-
; _buf << ((
|
591
|
+
; _buf << ((mathjaxdir).to_s); _buf << ("/MathJax.js?config=TeX-MML-AM_HTMLorMML\"></script>".freeze);
|
728
592
|
;
|
729
593
|
; end; syntax_hl = self.syntax_highlighter;
|
730
594
|
; if syntax_hl && (syntax_hl.docinfo? :head);
|
@@ -739,7 +603,7 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
739
603
|
;
|
740
604
|
;
|
741
605
|
; if attr? :customcss;
|
742
|
-
; _buf << ("<link rel=\"stylesheet\"".freeze);
|
606
|
+
; _buf << ("<link rel=\"stylesheet\"".freeze); _slim_codeattributes9 = ((customcss = attr :customcss).empty? ? 'asciidoctor-revealjs.css' : customcss); if _slim_codeattributes9; if _slim_codeattributes9 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes9).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
743
607
|
; end; unless (_docinfo = docinfo :head, '-revealjs.html').empty?;
|
744
608
|
; _buf << ((_docinfo).to_s);
|
745
609
|
; end; _buf << ("</head><body><div class=\"reveal\"><div class=\"slides\">".freeze);
|
@@ -767,7 +631,7 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
767
631
|
;
|
768
632
|
;
|
769
633
|
;
|
770
|
-
; _buf << ("<section".freeze); _temple_html_attributeremover1 = ''; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "title"; _temple_html_attributemerger1[1] = '';
|
634
|
+
; _buf << ("<section".freeze); _temple_html_attributeremover1 = ''; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "title"; _temple_html_attributemerger1[1] = ''; _slim_codeattributes10 = role; if Array === _slim_codeattributes10; _slim_codeattributes10 = _slim_codeattributes10.flatten; _slim_codeattributes10.map!(&:to_s); _slim_codeattributes10.reject!(&:empty?); _temple_html_attributemerger1[1] << ((_slim_codeattributes10.join(" ")).to_s); else; _temple_html_attributemerger1[1] << ((_slim_codeattributes10).to_s); end; _temple_html_attributemerger1[1]; _temple_html_attributeremover1 << ((_temple_html_attributemerger1.reject(&:empty?).join(" ")).to_s); _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover1).to_s); _buf << ("\"".freeze); end; _buf << (" data-state=\"title\"".freeze); _slim_codeattributes11 = (attr 'title-slide-transition'); if _slim_codeattributes11; if _slim_codeattributes11 == true; _buf << (" data-transition".freeze); else; _buf << (" data-transition=\"".freeze); _buf << ((_slim_codeattributes11).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes12 = (attr 'title-slide-transition-speed'); if _slim_codeattributes12; if _slim_codeattributes12 == true; _buf << (" data-transition-speed".freeze); else; _buf << (" data-transition-speed=\"".freeze); _buf << ((_slim_codeattributes12).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes13 = (attr 'title-slide-background'); if _slim_codeattributes13; if _slim_codeattributes13 == true; _buf << (" data-background".freeze); else; _buf << (" data-background=\"".freeze); _buf << ((_slim_codeattributes13).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes14 = (attr 'title-slide-background-size'); if _slim_codeattributes14; if _slim_codeattributes14 == true; _buf << (" data-background-size".freeze); else; _buf << (" data-background-size=\"".freeze); _buf << ((_slim_codeattributes14).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes15 = bg_image; if _slim_codeattributes15; if _slim_codeattributes15 == true; _buf << (" data-background-image".freeze); else; _buf << (" data-background-image=\"".freeze); _buf << ((_slim_codeattributes15).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes16 = bg_video; if _slim_codeattributes16; if _slim_codeattributes16 == true; _buf << (" data-background-video".freeze); else; _buf << (" data-background-video=\"".freeze); _buf << ((_slim_codeattributes16).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes17 = (attr 'title-slide-background-video-loop'); if _slim_codeattributes17; if _slim_codeattributes17 == true; _buf << (" data-background-video-loop".freeze); else; _buf << (" data-background-video-loop=\"".freeze); _buf << ((_slim_codeattributes17).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes18 = (attr 'title-slide-background-video-muted'); if _slim_codeattributes18; if _slim_codeattributes18 == true; _buf << (" data-background-video-muted".freeze); else; _buf << (" data-background-video-muted=\"".freeze); _buf << ((_slim_codeattributes18).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes19 = (attr 'title-slide-background-opacity'); if _slim_codeattributes19; if _slim_codeattributes19 == true; _buf << (" data-background-opacity".freeze); else; _buf << (" data-background-opacity=\"".freeze); _buf << ((_slim_codeattributes19).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes20 = (attr 'title-slide-background-iframe'); if _slim_codeattributes20; if _slim_codeattributes20 == true; _buf << (" data-background-iframe".freeze); else; _buf << (" data-background-iframe=\"".freeze); _buf << ((_slim_codeattributes20).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes21 = (attr 'title-slide-background-color'); if _slim_codeattributes21; if _slim_codeattributes21 == true; _buf << (" data-background-color".freeze); else; _buf << (" data-background-color=\"".freeze); _buf << ((_slim_codeattributes21).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes22 = (attr 'title-slide-background-repeat'); if _slim_codeattributes22; if _slim_codeattributes22 == true; _buf << (" data-background-repeat".freeze); else; _buf << (" data-background-repeat=\"".freeze); _buf << ((_slim_codeattributes22).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes23 = (attr 'title-slide-background-position'); if _slim_codeattributes23; if _slim_codeattributes23 == true; _buf << (" data-background-position".freeze); else; _buf << (" data-background-position=\"".freeze); _buf << ((_slim_codeattributes23).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes24 = (attr 'title-slide-background-transition'); if _slim_codeattributes24; if _slim_codeattributes24 == true; _buf << (" data-background-transition".freeze); else; _buf << (" data-background-transition=\"".freeze); _buf << ((_slim_codeattributes24).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
771
635
|
; if (_title_obj = doctitle partition: true, use_fallback: true).subtitle?;
|
772
636
|
; _buf << ("<h1>".freeze); _buf << ((slice_text _title_obj.title, (_slice = header.option? :slice)).to_s);
|
773
637
|
; _buf << ("</h1><h2>".freeze); _buf << ((slice_text _title_obj.subtitle, _slice).to_s);
|
@@ -824,7 +688,9 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
824
688
|
;
|
825
689
|
; _buf << ((to_boolean(attr 'revealjs_keyboard', true)).to_s); _buf << (",\n // Enable the slide overview mode\n overview: ".freeze);
|
826
690
|
;
|
827
|
-
; _buf << ((to_boolean(attr 'revealjs_overview', true)).to_s); _buf << (",\n //
|
691
|
+
; _buf << ((to_boolean(attr 'revealjs_overview', true)).to_s); _buf << (",\n // Disables the default reveal.js slide layout so that you can use custom CSS layout\n disableLayout: ".freeze);
|
692
|
+
;
|
693
|
+
; _buf << ((to_boolean(attr 'revealjs_disablelayout', false)).to_s); _buf << (",\n // Vertical centering of slides\n center: ".freeze);
|
828
694
|
;
|
829
695
|
; _buf << ((to_boolean(attr 'revealjs_center', true)).to_s); _buf << (",\n // Enables touch navigation on devices with touch input\n touch: ".freeze);
|
830
696
|
;
|
@@ -1024,59 +890,72 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
1024
890
|
end
|
1025
891
|
end
|
1026
892
|
|
1027
|
-
def
|
893
|
+
def thematic_break(node, opts = {})
|
1028
894
|
node.extend(Helpers)
|
1029
895
|
node.instance_eval do
|
1030
896
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
1031
|
-
_buf = '';
|
1032
|
-
; _buf
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
897
|
+
_buf = ''; _buf << ("<hr>".freeze);
|
898
|
+
; _buf
|
899
|
+
end
|
900
|
+
end
|
901
|
+
|
902
|
+
def inline_quoted(node, opts = {})
|
903
|
+
node.extend(Helpers)
|
904
|
+
node.instance_eval do
|
905
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
906
|
+
_buf = ''; quote_tags = { emphasis: 'em', strong: 'strong', monospaced: 'code', superscript: 'sup', subscript: 'sup' };
|
907
|
+
; if (quote_tag = quote_tags[@type]);
|
908
|
+
; _buf << ((html_tag(quote_tag, { :id => @id, :class => [role, ('fragment' if (option? :step) || (attr? 'step'))].compact }.merge(data_attrs(@attributes)), @text)).to_s);
|
1036
909
|
; else;
|
1037
|
-
;
|
1038
|
-
;
|
910
|
+
; case @type;
|
911
|
+
; when :double;
|
912
|
+
; inline_text_container("“#{@text}”");
|
913
|
+
; when :single;
|
914
|
+
; _buf << ((inline_text_container("‘#{@text}’")).to_s);
|
915
|
+
; when :asciimath, :latexmath;
|
916
|
+
; open, close = Asciidoctor::INLINE_MATH_DELIMITERS[@type];
|
917
|
+
; _buf << ((inline_text_container("#{open}#{@text}#{close}")).to_s);
|
918
|
+
; else;
|
919
|
+
; _buf << ((inline_text_container(@text)).to_s);
|
920
|
+
; end; end; _buf
|
1039
921
|
end
|
1040
922
|
end
|
1041
923
|
|
1042
|
-
def
|
924
|
+
def outline(node, opts = {})
|
1043
925
|
node.extend(Helpers)
|
1044
926
|
node.instance_eval do
|
1045
927
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
1046
|
-
_buf = '';
|
1047
|
-
;
|
928
|
+
_buf = ''; unless sections.empty?;
|
929
|
+
; toclevels ||= (document.attr 'toclevels', DEFAULT_TOCLEVELS).to_i;
|
930
|
+
; slevel = section_level sections.first;
|
931
|
+
; _buf << ("<ol class=\"sectlevel".freeze); _buf << ((slevel).to_s); _buf << ("\">".freeze);
|
932
|
+
; sections.each do |sec|;
|
933
|
+
; _buf << ("<li><a href=\"#".freeze);
|
934
|
+
; _buf << ((sec.id).to_s); _buf << ("\">".freeze); _buf << ((section_title sec).to_s);
|
935
|
+
; _buf << ("</a>".freeze); if (sec.level < toclevels) && (child_toc = converter.convert sec, 'outline');
|
936
|
+
; _buf << ((child_toc).to_s);
|
937
|
+
; end; _buf << ("</li>".freeze); end; _buf << ("</ol>".freeze); end; _buf
|
1048
938
|
end
|
1049
939
|
end
|
1050
940
|
|
1051
|
-
def
|
941
|
+
def inline_footnote(node, opts = {})
|
1052
942
|
node.extend(Helpers)
|
1053
943
|
node.instance_eval do
|
1054
944
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
1055
|
-
_buf = '';
|
1056
|
-
;
|
1057
|
-
;
|
1058
|
-
;
|
1059
|
-
;
|
1060
|
-
;
|
1061
|
-
;
|
1062
|
-
;
|
1063
|
-
;
|
1064
|
-
;
|
1065
|
-
;
|
1066
|
-
;
|
1067
|
-
;
|
1068
|
-
;
|
1069
|
-
; _buf << ((attr :alt).to_s); _buf << ("]</a>".freeze);
|
1070
|
-
; else;
|
1071
|
-
; _buf << ("[".freeze); _buf << ((attr :alt).to_s); _buf << ("]".freeze);
|
1072
|
-
; end; else;
|
1073
|
-
; src = (@type == 'icon' ? (icon_uri @target) : (image_uri @target));
|
1074
|
-
; if attr? :link;
|
1075
|
-
; _buf << ("<a class=\"image\"".freeze); _slim_codeattributes13 = (attr :link); if _slim_codeattributes13; if _slim_codeattributes13 == true; _buf << (" href".freeze); else; _buf << (" href=\"".freeze); _buf << ((_slim_codeattributes13).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes14 = (attr :window); if _slim_codeattributes14; if _slim_codeattributes14 == true; _buf << (" target".freeze); else; _buf << (" target=\"".freeze); _buf << ((_slim_codeattributes14).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes15 = (bool_data_attr :link_preview); if _slim_codeattributes15; if _slim_codeattributes15 == true; _buf << (" data-preview-link".freeze); else; _buf << (" data-preview-link=\"".freeze); _buf << ((_slim_codeattributes15).to_s); _buf << ("\"".freeze); end; end; _buf << ("><img".freeze);
|
1076
|
-
; _slim_codeattributes16 = src; if _slim_codeattributes16; if _slim_codeattributes16 == true; _buf << (" src".freeze); else; _buf << (" src=\"".freeze); _buf << ((_slim_codeattributes16).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes17 = (attr :alt); if _slim_codeattributes17; if _slim_codeattributes17 == true; _buf << (" alt".freeze); else; _buf << (" alt=\"".freeze); _buf << ((_slim_codeattributes17).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes18 = (attr :width); if _slim_codeattributes18; if _slim_codeattributes18 == true; _buf << (" width".freeze); else; _buf << (" width=\"".freeze); _buf << ((_slim_codeattributes18).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes19 = (attr :height); if _slim_codeattributes19; if _slim_codeattributes19 == true; _buf << (" height".freeze); else; _buf << (" height=\"".freeze); _buf << ((_slim_codeattributes19).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes20 = (attr :title); if _slim_codeattributes20; if _slim_codeattributes20 == true; _buf << (" title".freeze); else; _buf << (" title=\"".freeze); _buf << ((_slim_codeattributes20).to_s); _buf << ("\"".freeze); end; end; _buf << ("></a>".freeze);
|
1077
|
-
; else;
|
1078
|
-
; _buf << ("<img".freeze); _slim_codeattributes21 = src; if _slim_codeattributes21; if _slim_codeattributes21 == true; _buf << (" src".freeze); else; _buf << (" src=\"".freeze); _buf << ((_slim_codeattributes21).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes22 = (attr :alt); if _slim_codeattributes22; if _slim_codeattributes22 == true; _buf << (" alt".freeze); else; _buf << (" alt=\"".freeze); _buf << ((_slim_codeattributes22).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes23 = (attr :width); if _slim_codeattributes23; if _slim_codeattributes23 == true; _buf << (" width".freeze); else; _buf << (" width=\"".freeze); _buf << ((_slim_codeattributes23).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes24 = (attr :height); if _slim_codeattributes24; if _slim_codeattributes24 == true; _buf << (" height".freeze); else; _buf << (" height=\"".freeze); _buf << ((_slim_codeattributes24).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes25 = (attr :title); if _slim_codeattributes25; if _slim_codeattributes25 == true; _buf << (" title".freeze); else; _buf << (" title=\"".freeze); _buf << ((_slim_codeattributes25).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
1079
|
-
; end; end; _buf << ("</span>".freeze); _buf
|
945
|
+
_buf = ''; footnote = slide_footnote(self);
|
946
|
+
; index = footnote.attr(:index);
|
947
|
+
; id = footnote.id;
|
948
|
+
; if @type == :xref;
|
949
|
+
; _slim_controls1 = html_tag('sup', { :class => ['footnoteref'] }.merge(data_attrs(footnote.attributes))) do; _slim_controls2 = '';
|
950
|
+
; _slim_controls2 << ("[<span class=\"footnote\" title=\"View footnote.\">".freeze);
|
951
|
+
; _slim_controls2 << ((index).to_s);
|
952
|
+
; _slim_controls2 << ("</span>]".freeze);
|
953
|
+
; _slim_controls2; end; _buf << ((_slim_controls1).to_s); else;
|
954
|
+
; _slim_controls3 = html_tag('sup', { :id => ("_footnote_#{id}" if id), :class => ['footnote'] }.merge(data_attrs(footnote.attributes))) do; _slim_controls4 = '';
|
955
|
+
; _slim_controls4 << ("[<span class=\"footnote\" title=\"View footnote.\">".freeze);
|
956
|
+
; _slim_controls4 << ((index).to_s);
|
957
|
+
; _slim_controls4 << ("</span>]".freeze);
|
958
|
+
; _slim_controls4; end; _buf << ((_slim_controls3).to_s); end; _buf
|
1080
959
|
end
|
1081
960
|
end
|
1082
961
|
|
@@ -1090,22 +969,24 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
1090
969
|
; width = (attr? :width) ? (attr :width) : "100%";
|
1091
970
|
; height = (attr? :height) ? (attr :height) : "100%";
|
1092
971
|
;
|
1093
|
-
;
|
972
|
+
; _slim_controls1 = html_tag('div', { :id => @id, :class => ['videoblock', @style, role, (no_stretch ? nil : 'stretch'), ('fragment' if (option? :step) || (has_role? 'step') || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1094
973
|
; if title?;
|
1095
|
-
;
|
1096
|
-
;
|
974
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
|
975
|
+
; _slim_controls2 << ("</div>".freeze); end; case attr :poster;
|
1097
976
|
; when 'vimeo';
|
1098
977
|
; unless (asset_uri_scheme = (attr :asset_uri_scheme, 'https')).empty?;
|
1099
978
|
; asset_uri_scheme = %(#{asset_uri_scheme}:);
|
1100
979
|
; end; start_anchor = (attr? :start) ? "#at=#{attr :start}" : nil;
|
1101
|
-
; delimiter = '?';
|
1102
|
-
; loop_param = (option? 'loop') ?
|
1103
|
-
;
|
980
|
+
; delimiter = ['?'];
|
981
|
+
; loop_param = (option? 'loop') ? %(#{delimiter.pop || '&'}loop=1) : '';
|
982
|
+
; muted_param = (option? 'muted') ? %(#{delimiter.pop || '&'}muted=1) : '';
|
983
|
+
; src = %(#{asset_uri_scheme}//player.vimeo.com/video/#{attr :target}#{loop_param}#{muted_param}#{start_anchor});
|
984
|
+
;
|
1104
985
|
;
|
1105
986
|
;
|
1106
|
-
; _buf << ("<iframe".freeze); _slim_codeattributes3 = (width); if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" width".freeze); else; _buf << (" width=\"".freeze); _buf << ((_slim_codeattributes3).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes4 = (height); if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" height".freeze); else; _buf << (" height=\"".freeze); _buf << ((_slim_codeattributes4).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes5 = src; if _slim_codeattributes5; if _slim_codeattributes5 == true; _buf << (" src".freeze); else; _buf << (" src=\"".freeze); _buf << ((_slim_codeattributes5).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes6 = 0; if _slim_codeattributes6; if _slim_codeattributes6 == true; _buf << (" frameborder".freeze); else; _buf << (" frameborder=\"".freeze); _buf << ((_slim_codeattributes6).to_s); _buf << ("\"".freeze); end; end; _buf << (" webkitAllowFullScreen mozallowfullscreen allowFullScreen".freeze); _slim_codeattributes7 = (option? 'autoplay'); if _slim_codeattributes7; if _slim_codeattributes7 == true; _buf << (" data-autoplay".freeze); else; _buf << (" data-autoplay=\"".freeze); _buf << ((_slim_codeattributes7).to_s); _buf << ("\"".freeze); end; end; _buf << ("></iframe>".freeze);
|
1107
987
|
;
|
1108
988
|
;
|
989
|
+
; _slim_controls2 << ("<iframe".freeze); _slim_codeattributes1 = (width); if _slim_codeattributes1; if _slim_codeattributes1 == true; _slim_controls2 << (" width".freeze); else; _slim_controls2 << (" width=\"".freeze); _slim_controls2 << ((_slim_codeattributes1).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes2 = (height); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls2 << (" height".freeze); else; _slim_controls2 << (" height=\"".freeze); _slim_controls2 << ((_slim_codeattributes2).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes3 = src; if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls2 << (" src".freeze); else; _slim_controls2 << (" src=\"".freeze); _slim_controls2 << ((_slim_codeattributes3).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes4 = 0; if _slim_codeattributes4; if _slim_codeattributes4 == true; _slim_controls2 << (" frameborder".freeze); else; _slim_controls2 << (" frameborder=\"".freeze); _slim_controls2 << ((_slim_codeattributes4).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << (" webkitAllowFullScreen mozallowfullscreen allowFullScreen".freeze); _slim_codeattributes5 = (option? 'autoplay'); if _slim_codeattributes5; if _slim_codeattributes5 == true; _slim_controls2 << (" data-autoplay".freeze); else; _slim_controls2 << (" data-autoplay=\"".freeze); _slim_controls2 << ((_slim_codeattributes5).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes6 = ((option? 'autoplay') ? "autoplay" : nil); if _slim_codeattributes6; if _slim_codeattributes6 == true; _slim_controls2 << (" allow".freeze); else; _slim_controls2 << (" allow=\"".freeze); _slim_controls2 << ((_slim_codeattributes6).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << ("></iframe>".freeze);
|
1109
990
|
; when 'youtube';
|
1110
991
|
; unless (asset_uri_scheme = (attr :asset_uri_scheme, 'https')).empty?;
|
1111
992
|
; asset_uri_scheme = %(#{asset_uri_scheme}:);
|
@@ -1113,57 +994,92 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
1113
994
|
; params << "start=#{attr :start}" if attr? :start;
|
1114
995
|
; params << "end=#{attr :end}" if attr? :end;
|
1115
996
|
; params << "loop=1" if option? 'loop';
|
997
|
+
; params << "mute=1" if option? 'muted';
|
1116
998
|
; params << "controls=0" if option? 'nocontrols';
|
1117
999
|
; src = %(#{asset_uri_scheme}//www.youtube.com/embed/#{attr :target}?#{params * '&'});
|
1118
1000
|
;
|
1119
1001
|
;
|
1120
|
-
;
|
1002
|
+
;
|
1003
|
+
;
|
1004
|
+
;
|
1005
|
+
; _slim_controls2 << ("<iframe".freeze); _slim_codeattributes7 = (width); if _slim_codeattributes7; if _slim_codeattributes7 == true; _slim_controls2 << (" width".freeze); else; _slim_controls2 << (" width=\"".freeze); _slim_controls2 << ((_slim_codeattributes7).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes8 = (height); if _slim_codeattributes8; if _slim_codeattributes8 == true; _slim_controls2 << (" height".freeze); else; _slim_controls2 << (" height=\"".freeze); _slim_controls2 << ((_slim_codeattributes8).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes9 = src; if _slim_codeattributes9; if _slim_codeattributes9 == true; _slim_controls2 << (" src".freeze); else; _slim_controls2 << (" src=\"".freeze); _slim_controls2 << ((_slim_codeattributes9).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes10 = 0; if _slim_codeattributes10; if _slim_codeattributes10 == true; _slim_controls2 << (" frameborder".freeze); else; _slim_controls2 << (" frameborder=\"".freeze); _slim_controls2 << ((_slim_codeattributes10).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes11 = !(option? 'nofullscreen'); if _slim_codeattributes11; if _slim_codeattributes11 == true; _slim_controls2 << (" allowfullscreen".freeze); else; _slim_controls2 << (" allowfullscreen=\"".freeze); _slim_controls2 << ((_slim_codeattributes11).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes12 = (option? 'autoplay'); if _slim_codeattributes12; if _slim_codeattributes12 == true; _slim_controls2 << (" data-autoplay".freeze); else; _slim_controls2 << (" data-autoplay=\"".freeze); _slim_controls2 << ((_slim_codeattributes12).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes13 = ((option? 'autoplay') ? "autoplay" : nil); if _slim_codeattributes13; if _slim_codeattributes13 == true; _slim_controls2 << (" allow".freeze); else; _slim_controls2 << (" allow=\"".freeze); _slim_controls2 << ((_slim_codeattributes13).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << ("></iframe>".freeze);
|
1121
1006
|
; else;
|
1122
1007
|
;
|
1123
1008
|
;
|
1124
1009
|
;
|
1125
|
-
;
|
1010
|
+
; _slim_controls2 << ("<video".freeze); _slim_codeattributes14 = media_uri(attr :target); if _slim_codeattributes14; if _slim_codeattributes14 == true; _slim_controls2 << (" src".freeze); else; _slim_controls2 << (" src=\"".freeze); _slim_controls2 << ((_slim_codeattributes14).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes15 = (width); if _slim_codeattributes15; if _slim_codeattributes15 == true; _slim_controls2 << (" width".freeze); else; _slim_controls2 << (" width=\"".freeze); _slim_controls2 << ((_slim_codeattributes15).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes16 = (height); if _slim_codeattributes16; if _slim_codeattributes16 == true; _slim_controls2 << (" height".freeze); else; _slim_controls2 << (" height=\"".freeze); _slim_controls2 << ((_slim_codeattributes16).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes17 = ((attr :poster) ? media_uri(attr :poster) : nil); if _slim_codeattributes17; if _slim_codeattributes17 == true; _slim_controls2 << (" poster".freeze); else; _slim_controls2 << (" poster=\"".freeze); _slim_controls2 << ((_slim_codeattributes17).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes18 = (option? 'autoplay'); if _slim_codeattributes18; if _slim_codeattributes18 == true; _slim_controls2 << (" data-autoplay".freeze); else; _slim_controls2 << (" data-autoplay=\"".freeze); _slim_controls2 << ((_slim_codeattributes18).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes19 = !(option? 'nocontrols'); if _slim_codeattributes19; if _slim_codeattributes19 == true; _slim_controls2 << (" controls".freeze); else; _slim_controls2 << (" controls=\"".freeze); _slim_controls2 << ((_slim_codeattributes19).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes20 = (option? 'loop'); if _slim_codeattributes20; if _slim_codeattributes20 == true; _slim_controls2 << (" loop".freeze); else; _slim_controls2 << (" loop=\"".freeze); _slim_controls2 << ((_slim_codeattributes20).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << (">Your browser does not support the video tag.</video>".freeze);
|
1126
1011
|
;
|
1127
|
-
; end; _buf << (
|
1012
|
+
; end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1128
1013
|
end
|
1129
1014
|
end
|
1130
1015
|
|
1131
|
-
def
|
1016
|
+
def dlist(node, opts = {})
|
1132
1017
|
node.extend(Helpers)
|
1133
1018
|
node.instance_eval do
|
1134
1019
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
1135
|
-
_buf = '';
|
1020
|
+
_buf = ''; case @style;
|
1021
|
+
; when 'qanda';
|
1022
|
+
; _slim_controls1 = html_tag('div', { :id => @id, :class => ['qlist', @style, role] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1136
1023
|
; if title?;
|
1137
|
-
;
|
1138
|
-
;
|
1139
|
-
;
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
|
1146
|
-
|
1147
|
-
|
1148
|
-
; _buf << ((
|
1149
|
-
;
|
1024
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
1025
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<ol>".freeze);
|
1026
|
+
; items.each do |questions, answer|;
|
1027
|
+
; _slim_controls2 << ("<li>".freeze);
|
1028
|
+
; [*questions].each do |question|;
|
1029
|
+
; _slim_controls2 << ("<p><em>".freeze); _slim_controls2 << ((question.text).to_s);
|
1030
|
+
; _slim_controls2 << ("</em></p>".freeze); end; unless answer.nil?;
|
1031
|
+
; if answer.text?;
|
1032
|
+
; _slim_controls2 << ("<p>".freeze); _slim_controls2 << ((answer.text).to_s);
|
1033
|
+
; _slim_controls2 << ("</p>".freeze); end; if answer.blocks?;
|
1034
|
+
; _slim_controls2 << ((answer.content).to_s);
|
1035
|
+
; end; end; _slim_controls2 << ("</li>".freeze); end; _slim_controls2 << ("</ol>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); when 'horizontal';
|
1036
|
+
; _slim_controls3 = html_tag('div', { :id => @id, :class => ['hdlist', role] }.merge(data_attrs(@attributes))) do; _slim_controls4 = '';
|
1037
|
+
; if title?;
|
1038
|
+
; _slim_controls4 << ("<div class=\"title\">".freeze); _slim_controls4 << ((title).to_s);
|
1039
|
+
; _slim_controls4 << ("</div>".freeze); end; _slim_controls4 << ("<table>".freeze);
|
1040
|
+
; if (attr? :labelwidth) || (attr? :itemwidth);
|
1041
|
+
; _slim_controls4 << ("<colgroup><col".freeze);
|
1042
|
+
; _slim_codeattributes1 = ((attr? :labelwidth) ? %(width:#{(attr :labelwidth).chomp '%'}%;) : nil); if _slim_codeattributes1; if _slim_codeattributes1 == true; _slim_controls4 << (" style".freeze); else; _slim_controls4 << (" style=\"".freeze); _slim_controls4 << ((_slim_codeattributes1).to_s); _slim_controls4 << ("\"".freeze); end; end; _slim_controls4 << ("><col".freeze);
|
1043
|
+
; _slim_codeattributes2 = ((attr? :itemwidth) ? %(width:#{(attr :itemwidth).chomp '%'}%;) : nil); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls4 << (" style".freeze); else; _slim_controls4 << (" style=\"".freeze); _slim_controls4 << ((_slim_codeattributes2).to_s); _slim_controls4 << ("\"".freeze); end; end; _slim_controls4 << ("></colgroup>".freeze);
|
1044
|
+
; end; items.each do |terms, dd|;
|
1045
|
+
; _slim_controls4 << ("<tr><td".freeze);
|
1046
|
+
; _temple_html_attributeremover1 = ''; _slim_codeattributes3 = ['hdlist1',('strong' if option? 'strong')]; if Array === _slim_codeattributes3; _slim_codeattributes3 = _slim_codeattributes3.flatten; _slim_codeattributes3.map!(&:to_s); _slim_codeattributes3.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes3.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes3).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _slim_controls4 << (" class=\"".freeze); _slim_controls4 << ((_temple_html_attributeremover1).to_s); _slim_controls4 << ("\"".freeze); end; _slim_controls4 << (">".freeze);
|
1047
|
+
; terms = [*terms];
|
1048
|
+
; last_term = terms.last;
|
1049
|
+
; terms.each do |dt|;
|
1050
|
+
; _slim_controls4 << ((dt.text).to_s);
|
1051
|
+
; if dt != last_term;
|
1052
|
+
; _slim_controls4 << ("<br>".freeze);
|
1053
|
+
; end; end; _slim_controls4 << ("</td><td class=\"hdlist2\">".freeze);
|
1054
|
+
; unless dd.nil?;
|
1055
|
+
; if dd.text?;
|
1056
|
+
; _slim_controls4 << ("<p>".freeze); _slim_controls4 << ((dd.text).to_s);
|
1057
|
+
; _slim_controls4 << ("</p>".freeze); end; if dd.blocks?;
|
1058
|
+
; _slim_controls4 << ((dd.content).to_s);
|
1059
|
+
; end; end; _slim_controls4 << ("</td></tr>".freeze); end; _slim_controls4 << ("</table>".freeze); _slim_controls4; end; _buf << ((_slim_controls3).to_s); else;
|
1060
|
+
; _slim_controls5 = html_tag('div', { :id => @id, :class => ['dlist', @style, role] }.merge(data_attrs(@attributes))) do; _slim_controls6 = '';
|
1061
|
+
; if title?;
|
1062
|
+
; _slim_controls6 << ("<div class=\"title\">".freeze); _slim_controls6 << ((title).to_s);
|
1063
|
+
; _slim_controls6 << ("</div>".freeze); end; _slim_controls6 << ("<dl>".freeze);
|
1064
|
+
; items.each do |terms, dd|;
|
1065
|
+
; [*terms].each do |dt|;
|
1066
|
+
; _slim_controls6 << ("<dt".freeze); _temple_html_attributeremover2 = ''; _slim_codeattributes4 = ('hdlist1' unless @style); if Array === _slim_codeattributes4; _slim_codeattributes4 = _slim_codeattributes4.flatten; _slim_codeattributes4.map!(&:to_s); _slim_codeattributes4.reject!(&:empty?); _temple_html_attributeremover2 << ((_slim_codeattributes4.join(" ")).to_s); else; _temple_html_attributeremover2 << ((_slim_codeattributes4).to_s); end; _temple_html_attributeremover2; if !_temple_html_attributeremover2.empty?; _slim_controls6 << (" class=\"".freeze); _slim_controls6 << ((_temple_html_attributeremover2).to_s); _slim_controls6 << ("\"".freeze); end; _slim_controls6 << (">".freeze); _slim_controls6 << ((dt.text).to_s);
|
1067
|
+
; _slim_controls6 << ("</dt>".freeze); end; unless dd.nil?;
|
1068
|
+
; _slim_controls6 << ("<dd>".freeze);
|
1069
|
+
; if dd.text?;
|
1070
|
+
; _slim_controls6 << ("<p>".freeze); _slim_controls6 << ((dd.text).to_s);
|
1071
|
+
; _slim_controls6 << ("</p>".freeze); end; if dd.blocks?;
|
1072
|
+
; _slim_controls6 << ((dd.content).to_s);
|
1073
|
+
; end; _slim_controls6 << ("</dd>".freeze); end; end; _slim_controls6 << ("</dl>".freeze); _slim_controls6; end; _buf << ((_slim_controls5).to_s); end; _buf
|
1150
1074
|
end
|
1151
1075
|
end
|
1152
1076
|
|
1153
|
-
def
|
1077
|
+
def pass(node, opts = {})
|
1154
1078
|
node.extend(Helpers)
|
1155
1079
|
node.instance_eval do
|
1156
1080
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
1157
|
-
_buf = '';
|
1158
|
-
; _buf
|
1159
|
-
; _buf << ("</h1>".freeze); end; _buf << ((content).to_s);
|
1160
|
-
; unless !footnotes? || attr?(:nofootnotes);
|
1161
|
-
; _buf << ("<div id=\"footnotes\"><hr>".freeze);
|
1162
|
-
;
|
1163
|
-
; footnotes.each do |fn|;
|
1164
|
-
; _buf << ("<div class=\"footnote\" id=\"_footnote_".freeze); _buf << ((fn.index).to_s); _buf << ("\"><a href=\"#_footnoteref_".freeze);
|
1165
|
-
; _buf << ((fn.index).to_s); _buf << ("\">".freeze); _buf << ((fn.index).to_s); _buf << ("</a>. ".freeze); _buf << ((fn.text).to_s);
|
1166
|
-
; _buf << ("</div>".freeze); end; _buf << ("</div>".freeze); end; _buf
|
1081
|
+
_buf = ''; _buf << ((content).to_s);
|
1082
|
+
; _buf
|
1167
1083
|
end
|
1168
1084
|
end
|
1169
1085
|
|
@@ -1203,131 +1119,63 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
1203
1119
|
end
|
1204
1120
|
end
|
1205
1121
|
|
1206
|
-
def
|
1207
|
-
node.extend(Helpers)
|
1208
|
-
node.instance_eval do
|
1209
|
-
converter.set_local_variables(binding, opts) unless opts.empty?
|
1210
|
-
_buf = ''; if (has_role? 'aside') or (has_role? 'speaker') or (has_role? 'notes');
|
1211
|
-
; _buf << ("<aside class=\"notes\">".freeze); _buf << ((resolve_content).to_s);
|
1212
|
-
; _buf << ("</aside>".freeze);
|
1213
|
-
; else;
|
1214
|
-
; _buf << ("<div".freeze); _temple_html_attributeremover1 = ''; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "sidebarblock"; _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; _slim_codeattributes2 = @id; if _slim_codeattributes2; if _slim_codeattributes2 == true; _buf << (" id".freeze); else; _buf << (" id=\"".freeze); _buf << ((_slim_codeattributes2).to_s); _buf << ("\"".freeze); end; end; _buf << ("><div class=\"content\">".freeze);
|
1215
|
-
;
|
1216
|
-
; if title?;
|
1217
|
-
; _buf << ("<div class=\"title\">".freeze); _buf << ((title).to_s);
|
1218
|
-
; _buf << ("</div>".freeze); end; _buf << ((content).to_s);
|
1219
|
-
; _buf << ("</div></div>".freeze); end; _buf
|
1220
|
-
end
|
1221
|
-
end
|
1222
|
-
|
1223
|
-
def outline(node, opts = {})
|
1122
|
+
def inline_kbd(node, opts = {})
|
1224
1123
|
node.extend(Helpers)
|
1225
1124
|
node.instance_eval do
|
1226
1125
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
1227
|
-
_buf = '';
|
1228
|
-
;
|
1229
|
-
;
|
1230
|
-
;
|
1231
|
-
;
|
1232
|
-
;
|
1233
|
-
;
|
1234
|
-
;
|
1235
|
-
;
|
1236
|
-
;
|
1126
|
+
_buf = ''; if (keys = attr 'keys').size == 1;
|
1127
|
+
; _slim_controls1 = html_tag('kbd', data_attrs(@attributes)) do; _slim_controls2 = '';
|
1128
|
+
; _slim_controls2 << ((keys.first).to_s);
|
1129
|
+
; _slim_controls2; end; _buf << ((_slim_controls1).to_s); else;
|
1130
|
+
; _slim_controls3 = html_tag('span', { :class => ['keyseq'] }.merge(data_attrs(@attributes))) do; _slim_controls4 = '';
|
1131
|
+
; keys.each_with_index do |key, idx|;
|
1132
|
+
; unless idx.zero?;
|
1133
|
+
; _slim_controls4 << ("+".freeze);
|
1134
|
+
; end; _slim_controls4 << ("<kbd>".freeze); _slim_controls4 << ((key).to_s);
|
1135
|
+
; _slim_controls4 << ("</kbd>".freeze); end; _slim_controls4; end; _buf << ((_slim_controls3).to_s); end; _buf
|
1237
1136
|
end
|
1238
1137
|
end
|
1239
1138
|
|
1240
|
-
def
|
1139
|
+
def verse(node, opts = {})
|
1241
1140
|
node.extend(Helpers)
|
1242
1141
|
node.instance_eval do
|
1243
1142
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
1244
|
-
_buf = '';
|
1245
|
-
; if
|
1246
|
-
;
|
1247
|
-
;
|
1248
|
-
;
|
1249
|
-
;
|
1250
|
-
;
|
1251
|
-
;
|
1252
|
-
;
|
1253
|
-
;
|
1254
|
-
;
|
1255
|
-
;
|
1256
|
-
;
|
1257
|
-
; end;
|
1258
|
-
;
|
1259
|
-
; pre_close = '</pre>';
|
1260
|
-
; end; id_attribute = id ? %( id="#{id}") : '';
|
1261
|
-
; title_element = title? ? %(<div class="title">#{captioned_title}</div>\n) : '';
|
1262
|
-
; _buf << ((%(<div#{id_attribute} class="listingblock#{(role = self.role) ? " #{role}" : ''}">#{title_element}<div class="content">#{syntax_hl ? (syntax_hl.format self, lang, opts) : pre_open + (content || '') + pre_close}</div></div>)).to_s);
|
1263
|
-
; _buf
|
1143
|
+
_buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['verseblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1144
|
+
; if title?;
|
1145
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
1146
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<pre class=\"content\">".freeze); _slim_controls2 << ((content).to_s);
|
1147
|
+
; _slim_controls2 << ("</pre>".freeze); attribution = (attr? :attribution) ? (attr :attribution) : nil;
|
1148
|
+
; citetitle = (attr? :citetitle) ? (attr :citetitle) : nil;
|
1149
|
+
; if attribution || citetitle;
|
1150
|
+
; _slim_controls2 << ("<div class=\"attribution\">".freeze);
|
1151
|
+
; if citetitle;
|
1152
|
+
; _slim_controls2 << ("<cite>".freeze); _slim_controls2 << ((citetitle).to_s);
|
1153
|
+
; _slim_controls2 << ("</cite>".freeze); end; if attribution;
|
1154
|
+
; if citetitle;
|
1155
|
+
; _slim_controls2 << ("<br>".freeze);
|
1156
|
+
; end; _slim_controls2 << ("— ".freeze); _slim_controls2 << ((attribution).to_s);
|
1157
|
+
; end; _slim_controls2 << ("</div>".freeze); end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1264
1158
|
end
|
1265
1159
|
end
|
1266
1160
|
|
1267
|
-
def
|
1161
|
+
def literal(node, opts = {})
|
1268
1162
|
node.extend(Helpers)
|
1269
1163
|
node.instance_eval do
|
1270
1164
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
1271
|
-
_buf = ''; if (
|
1272
|
-
;
|
1273
|
-
;
|
1274
|
-
;
|
1275
|
-
;
|
1276
|
-
; unless idx.zero?;
|
1277
|
-
; _buf << ("+".freeze);
|
1278
|
-
; end; _buf << ("<kbd>".freeze); _buf << ((key).to_s);
|
1279
|
-
; _buf << ("</kbd>".freeze); end; _buf << ("</span>".freeze); end; _buf
|
1165
|
+
_buf = ''; _slim_controls1 = html_tag('div', { :id => id, :class => ['literalblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1166
|
+
; if title?;
|
1167
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
1168
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<div class=\"content\"><pre".freeze); _temple_html_attributeremover1 = ''; _slim_codeattributes1 = (!(@document.attr? :prewrap) || (option? 'nowrap') ? 'nowrap' : nil); if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes1.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes1).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _slim_controls2 << (" class=\"".freeze); _slim_controls2 << ((_temple_html_attributeremover1).to_s); _slim_controls2 << ("\"".freeze); end; _slim_controls2 << (">".freeze); _slim_controls2 << ((content).to_s);
|
1169
|
+
; _slim_controls2 << ("</pre></div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1280
1170
|
end
|
1281
1171
|
end
|
1282
1172
|
|
1283
|
-
def
|
1173
|
+
def toc(node, opts = {})
|
1284
1174
|
node.extend(Helpers)
|
1285
1175
|
node.instance_eval do
|
1286
1176
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
1287
1177
|
_buf = '';
|
1288
1178
|
;
|
1289
|
-
; titleless = (title = self.title) == '!';
|
1290
|
-
; hide_title = (titleless || (option? :notitle) || (option? :conceal));
|
1291
|
-
;
|
1292
|
-
; vertical_slides = find_by(context: :section) {|section| section.level == 2 };
|
1293
|
-
;
|
1294
|
-
;
|
1295
|
-
;
|
1296
|
-
; data_background_image, data_background_size, data_background_repeat,
|
1297
|
-
data_background_position, data_background_transition = nil;
|
1298
|
-
;
|
1299
|
-
;
|
1300
|
-
; section_images = blocks.map do |block|;
|
1301
|
-
; if (ctx = block.context) == :image;
|
1302
|
-
; ['background', 'canvas'].include?(block.attributes[1]) ? block : [];
|
1303
|
-
; elsif ctx == :section;
|
1304
|
-
; [];
|
1305
|
-
; else;
|
1306
|
-
; block.find_by(context: :image) {|image| ['background', 'canvas'].include?(image.attributes[1]) } || [];
|
1307
|
-
; end; end; if (bg_image = section_images.flatten.first);
|
1308
|
-
; data_background_image = image_uri(bg_image.attr 'target');
|
1309
|
-
;
|
1310
|
-
; data_background_size = bg_image.attr 'size';
|
1311
|
-
; data_background_repeat = bg_image.attr 'repeat';
|
1312
|
-
; data_background_transition = bg_image.attr 'transition';
|
1313
|
-
; data_background_position = bg_image.attr 'position';
|
1314
|
-
;
|
1315
|
-
;
|
1316
|
-
; end; if attr? 'background-image';
|
1317
|
-
; data_background_image = image_uri(attr 'background-image');
|
1318
|
-
;
|
1319
|
-
; end; if attr? 'background-color';
|
1320
|
-
; data_background_color = attr 'background-color';
|
1321
|
-
;
|
1322
|
-
; end; parent_section_with_vertical_slides = @level == 1 && !vertical_slides.empty?;
|
1323
|
-
;
|
1324
|
-
; content_for :section do;
|
1325
|
-
;
|
1326
|
-
;
|
1327
|
-
;
|
1328
|
-
;
|
1329
|
-
;
|
1330
|
-
;
|
1331
1179
|
;
|
1332
1180
|
;
|
1333
1181
|
;
|
@@ -1337,57 +1185,56 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
1337
1185
|
;
|
1338
1186
|
;
|
1339
1187
|
;
|
1340
|
-
; _buf << ("<section".freeze); _slim_codeattributes1 = (titleless ? nil : id); if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" id".freeze); else; _buf << (" id=\"".freeze); _buf << ((_slim_codeattributes1).to_s); _buf << ("\"".freeze); end; end; _temple_html_attributeremover1 = ''; _slim_codeattributes2 = roles; if Array === _slim_codeattributes2; _slim_codeattributes2 = _slim_codeattributes2.flatten; _slim_codeattributes2.map!(&:to_s); _slim_codeattributes2.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes2.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes2).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover1).to_s); _buf << ("\"".freeze); end; _slim_codeattributes3 = (attr 'transition'); if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" data-transition".freeze); else; _buf << (" data-transition=\"".freeze); _buf << ((_slim_codeattributes3).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes4 = (attr 'transition-speed'); if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" data-transition-speed".freeze); else; _buf << (" data-transition-speed=\"".freeze); _buf << ((_slim_codeattributes4).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes5 = data_background_color; if _slim_codeattributes5; if _slim_codeattributes5 == true; _buf << (" data-background-color".freeze); else; _buf << (" data-background-color=\"".freeze); _buf << ((_slim_codeattributes5).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes6 = data_background_image; if _slim_codeattributes6; if _slim_codeattributes6 == true; _buf << (" data-background-image".freeze); else; _buf << (" data-background-image=\"".freeze); _buf << ((_slim_codeattributes6).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes7 = (data_background_size || attr('background-size')); if _slim_codeattributes7; if _slim_codeattributes7 == true; _buf << (" data-background-size".freeze); else; _buf << (" data-background-size=\"".freeze); _buf << ((_slim_codeattributes7).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes8 = (data_background_repeat || attr('background-repeat')); if _slim_codeattributes8; if _slim_codeattributes8 == true; _buf << (" data-background-repeat".freeze); else; _buf << (" data-background-repeat=\"".freeze); _buf << ((_slim_codeattributes8).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes9 = (data_background_transition || attr('background-transition')); if _slim_codeattributes9; if _slim_codeattributes9 == true; _buf << (" data-background-transition".freeze); else; _buf << (" data-background-transition=\"".freeze); _buf << ((_slim_codeattributes9).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes10 = (data_background_position || attr('background-position')); if _slim_codeattributes10; if _slim_codeattributes10 == true; _buf << (" data-background-position".freeze); else; _buf << (" data-background-position=\"".freeze); _buf << ((_slim_codeattributes10).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes11 = (attr "background-iframe"); if _slim_codeattributes11; if _slim_codeattributes11 == true; _buf << (" data-background-iframe".freeze); else; _buf << (" data-background-iframe=\"".freeze); _buf << ((_slim_codeattributes11).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes12 = (attr "background-video"); if _slim_codeattributes12; if _slim_codeattributes12 == true; _buf << (" data-background-video".freeze); else; _buf << (" data-background-video=\"".freeze); _buf << ((_slim_codeattributes12).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes13 = ((attr? 'background-video-loop') || (option? 'loop')); if _slim_codeattributes13; if _slim_codeattributes13 == true; _buf << (" data-background-video-loop".freeze); else; _buf << (" data-background-video-loop=\"".freeze); _buf << ((_slim_codeattributes13).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes14 = ((attr? 'background-video-muted') || (option? 'muted')); if _slim_codeattributes14; if _slim_codeattributes14 == true; _buf << (" data-background-video-muted".freeze); else; _buf << (" data-background-video-muted=\"".freeze); _buf << ((_slim_codeattributes14).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes15 = (attr "background-opacity"); if _slim_codeattributes15; if _slim_codeattributes15 == true; _buf << (" data-background-opacity".freeze); else; _buf << (" data-background-opacity=\"".freeze); _buf << ((_slim_codeattributes15).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes16 = (attr 'state'); if _slim_codeattributes16; if _slim_codeattributes16 == true; _buf << (" data-state".freeze); else; _buf << (" data-state=\"".freeze); _buf << ((_slim_codeattributes16).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
1341
|
-
; unless hide_title;
|
1342
|
-
; _buf << ("<h2>".freeze); _buf << ((section_title).to_s);
|
1343
|
-
; _buf << ("</h2>".freeze); end; if parent_section_with_vertical_slides;
|
1344
|
-
; unless (_blocks = blocks - vertical_slides).empty?;
|
1345
|
-
; _buf << ("<div class=\"slide-content\">".freeze);
|
1346
|
-
; _blocks.each do |block|;
|
1347
|
-
; _buf << ((block.convert).to_s);
|
1348
|
-
; end; _buf << ("</div>".freeze); end; else;
|
1349
|
-
; unless (_content = content.chomp).empty?;
|
1350
|
-
; _buf << ("<div class=\"slide-content\">".freeze);
|
1351
|
-
; _buf << ((_content).to_s);
|
1352
|
-
;
|
1353
|
-
; _buf << ("</div>".freeze); end; end; _buf << ("</section>".freeze);
|
1354
|
-
;
|
1355
|
-
; end; if parent_section_with_vertical_slides;
|
1356
|
-
; _buf << ("<section>".freeze);
|
1357
|
-
; yield_content :section;
|
1358
|
-
; vertical_slides.each do |subsection|;
|
1359
|
-
; _buf << ((subsection.convert).to_s);
|
1360
1188
|
;
|
1361
|
-
; end; _buf << ("</section>".freeze);
|
1362
|
-
; else;
|
1363
|
-
; if @level >= 3;
|
1364
1189
|
;
|
1365
|
-
;
|
1366
|
-
; _buf << (
|
1367
|
-
;
|
1368
|
-
;
|
1369
|
-
;
|
1190
|
+
; _buf << ("<div id=\"toc\"".freeze); _temple_html_attributeremover1 = ''; _slim_codeattributes1 = (document.attr 'toc-class', 'toc'); if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes1.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes1).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover1).to_s); _buf << ("\"".freeze); end; _buf << ("><div id=\"toctitle\">".freeze);
|
1191
|
+
; _buf << (((document.attr 'toc-title')).to_s);
|
1192
|
+
; _buf << ("</div>".freeze);
|
1193
|
+
; _buf << ((converter.convert document, 'outline').to_s);
|
1194
|
+
; _buf << ("</div>".freeze); _buf
|
1370
1195
|
end
|
1371
1196
|
end
|
1372
1197
|
|
1373
|
-
def
|
1198
|
+
def notes(node, opts = {})
|
1199
|
+
node.extend(Helpers)
|
1200
|
+
node.instance_eval do
|
1201
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1202
|
+
_buf = ''; _buf << ("<aside class=\"notes\">".freeze); _buf << ((resolve_content).to_s);
|
1203
|
+
; _buf << ("</aside>".freeze); _buf
|
1204
|
+
end
|
1205
|
+
end
|
1206
|
+
|
1207
|
+
def quote(node, opts = {})
|
1374
1208
|
node.extend(Helpers)
|
1375
1209
|
node.instance_eval do
|
1376
1210
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
1377
|
-
_buf = '';
|
1211
|
+
_buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['quoteblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1378
1212
|
; if title?;
|
1379
|
-
;
|
1380
|
-
;
|
1381
|
-
;
|
1213
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
1214
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<blockquote>".freeze); _slim_controls2 << ((content).to_s);
|
1215
|
+
; _slim_controls2 << ("</blockquote>".freeze); attribution = (attr? :attribution) ? (attr :attribution) : nil;
|
1216
|
+
; citetitle = (attr? :citetitle) ? (attr :citetitle) : nil;
|
1217
|
+
; if attribution || citetitle;
|
1218
|
+
; _slim_controls2 << ("<div class=\"attribution\">".freeze);
|
1219
|
+
; if citetitle;
|
1220
|
+
; _slim_controls2 << ("<cite>".freeze); _slim_controls2 << ((citetitle).to_s);
|
1221
|
+
; _slim_controls2 << ("</cite>".freeze); end; if attribution;
|
1222
|
+
; if citetitle;
|
1223
|
+
; _slim_controls2 << ("<br>".freeze);
|
1224
|
+
; end; _slim_controls2 << ("— ".freeze); _slim_controls2 << ((attribution).to_s);
|
1225
|
+
; end; _slim_controls2 << ("</div>".freeze); end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1382
1226
|
end
|
1383
1227
|
end
|
1384
1228
|
|
1385
|
-
def
|
1229
|
+
def example(node, opts = {})
|
1386
1230
|
node.extend(Helpers)
|
1387
1231
|
node.instance_eval do
|
1388
1232
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
1389
|
-
_buf = '';
|
1390
|
-
;
|
1233
|
+
_buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['exampleblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1234
|
+
; if title?;
|
1235
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
|
1236
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<div class=\"content\">".freeze); _slim_controls2 << ((content).to_s);
|
1237
|
+
; _slim_controls2 << ("</div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1391
1238
|
end
|
1392
1239
|
end
|
1393
1240
|
|
@@ -1398,68 +1245,176 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
1398
1245
|
_buf = ''; menu = attr 'menu';
|
1399
1246
|
; menuitem = attr 'menuitem';
|
1400
1247
|
; if !(submenus = attr 'submenus').empty?;
|
1401
|
-
;
|
1402
|
-
;
|
1403
|
-
;
|
1404
|
-
;
|
1405
|
-
;
|
1406
|
-
;
|
1407
|
-
;
|
1408
|
-
;
|
1409
|
-
;
|
1410
|
-
;
|
1411
|
-
;
|
1412
|
-
;
|
1413
|
-
;
|
1248
|
+
; _slim_controls1 = html_tag('span', { :class => ['menuseq'] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1249
|
+
; _slim_controls2 << ("<span class=\"menu\">".freeze); _slim_controls2 << ((menu).to_s);
|
1250
|
+
; _slim_controls2 << ("</span> ▸ ".freeze);
|
1251
|
+
; _slim_controls2 << ((submenus.map {|submenu| %(<span class="submenu">#{submenu}</span> ▸ ) }.join).to_s);
|
1252
|
+
; _slim_controls2 << ("<span class=\"menuitem\">".freeze); _slim_controls2 << ((menuitem).to_s);
|
1253
|
+
; _slim_controls2 << ("</span>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); elsif !menuitem.nil?;
|
1254
|
+
; _slim_controls3 = html_tag('span', { :class => ['menuseq'] }.merge(data_attrs(@attributes))) do; _slim_controls4 = '';
|
1255
|
+
; _slim_controls4 << ("<span class=\"menu\">".freeze); _slim_controls4 << ((menu).to_s);
|
1256
|
+
; _slim_controls4 << ("</span> ▸ <span class=\"menuitem\">".freeze);
|
1257
|
+
; _slim_controls4 << ((menuitem).to_s);
|
1258
|
+
; _slim_controls4 << ("</span>".freeze); _slim_controls4; end; _buf << ((_slim_controls3).to_s); else;
|
1259
|
+
; _slim_controls5 = html_tag('span', { :class => ['menu'] }.merge(data_attrs(@attributes))) do; _slim_controls6 = '';
|
1260
|
+
; _slim_controls6 << ((menu).to_s);
|
1261
|
+
; _slim_controls6; end; _buf << ((_slim_controls5).to_s); end; _buf
|
1414
1262
|
end
|
1415
1263
|
end
|
1416
1264
|
|
1417
|
-
def
|
1265
|
+
def page_break(node, opts = {})
|
1418
1266
|
node.extend(Helpers)
|
1419
1267
|
node.instance_eval do
|
1420
1268
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
1421
|
-
_buf = ''; _buf << ("<div
|
1422
|
-
; if title?;
|
1423
|
-
; _buf << ("<div class=\"title\">".freeze); _buf << ((captioned_title).to_s);
|
1424
|
-
; _buf << ("</div>".freeze); end; _buf << ("<div class=\"content\"><audio".freeze);
|
1425
|
-
; _slim_codeattributes3 = media_uri(attr :target); if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" src".freeze); else; _buf << (" src=\"".freeze); _buf << ((_slim_codeattributes3).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes4 = (option? 'autoplay'); if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" autoplay".freeze); else; _buf << (" autoplay=\"".freeze); _buf << ((_slim_codeattributes4).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes5 = !(option? 'nocontrols'); if _slim_codeattributes5; if _slim_codeattributes5 == true; _buf << (" controls".freeze); else; _buf << (" controls=\"".freeze); _buf << ((_slim_codeattributes5).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes6 = (option? 'loop'); if _slim_codeattributes6; if _slim_codeattributes6 == true; _buf << (" loop".freeze); else; _buf << (" loop=\"".freeze); _buf << ((_slim_codeattributes6).to_s); _buf << ("\"".freeze); end; end; _buf << (">Your browser does not support the audio tag.</audio></div></div>".freeze);
|
1426
|
-
;
|
1269
|
+
_buf = ''; _buf << ("<div style=\"page-break-after: always;\"></div>".freeze);
|
1427
1270
|
; _buf
|
1428
1271
|
end
|
1429
1272
|
end
|
1430
1273
|
|
1431
|
-
def
|
1274
|
+
def ruler(node, opts = {})
|
1432
1275
|
node.extend(Helpers)
|
1433
1276
|
node.instance_eval do
|
1434
1277
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
1435
|
-
_buf = '';
|
1436
|
-
;
|
1437
|
-
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1441
|
-
|
1278
|
+
_buf = ''; _buf << ("<hr>".freeze);
|
1279
|
+
; _buf
|
1280
|
+
end
|
1281
|
+
end
|
1282
|
+
|
1283
|
+
def embedded(node, opts = {})
|
1284
|
+
node.extend(Helpers)
|
1285
|
+
node.instance_eval do
|
1286
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1287
|
+
_buf = ''; unless notitle || !has_header?;
|
1288
|
+
; _buf << ("<h1".freeze); _slim_codeattributes1 = @id; if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" id".freeze); else; _buf << (" id=\"".freeze); _buf << ((_slim_codeattributes1).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze); _buf << ((@header.title).to_s);
|
1289
|
+
; _buf << ("</h1>".freeze); end; _buf << ((content).to_s);
|
1290
|
+
; unless !footnotes? || attr?(:nofootnotes);
|
1291
|
+
; _buf << ("<div id=\"footnotes\"><hr>".freeze);
|
1292
|
+
;
|
1293
|
+
; footnotes.each do |fn|;
|
1294
|
+
; _buf << ("<div class=\"footnote\" id=\"_footnote_".freeze); _buf << ((fn.index).to_s); _buf << ("\"><a href=\"#_footnoteref_".freeze);
|
1295
|
+
; _buf << ((fn.index).to_s); _buf << ("\">".freeze); _buf << ((fn.index).to_s); _buf << ("</a>. ".freeze); _buf << ((fn.text).to_s);
|
1296
|
+
; _buf << ("</div>".freeze); end; _buf << ("</div>".freeze); end; _buf
|
1297
|
+
end
|
1298
|
+
end
|
1299
|
+
|
1300
|
+
def table(node, opts = {})
|
1301
|
+
node.extend(Helpers)
|
1302
|
+
node.instance_eval do
|
1303
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1304
|
+
_buf = ''; classes = ['tableblock', "frame-#{attr :frame, 'all'}", "grid-#{attr :grid, 'all'}", role, ('fragment' if (option? :step) || (attr? 'step'))];
|
1305
|
+
; styles = [("width:#{attr :tablepcwidth}%" unless option? 'autowidth'), ("float:#{attr :float}" if attr? :float)].compact.join('; ');
|
1306
|
+
; _slim_controls1 = html_tag('table', { :id => @id, :class => classes, :style => styles }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1442
1307
|
; if title?;
|
1443
|
-
;
|
1444
|
-
;
|
1445
|
-
;
|
1308
|
+
; _slim_controls2 << ("<caption class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
|
1309
|
+
; _slim_controls2 << ("</caption>".freeze); end; unless (attr :rowcount).zero?;
|
1310
|
+
; _slim_controls2 << ("<colgroup>".freeze);
|
1311
|
+
; if option? 'autowidth';
|
1312
|
+
; @columns.each do;
|
1313
|
+
; _slim_controls2 << ("<col>".freeze);
|
1314
|
+
; end; else;
|
1315
|
+
; @columns.each do |col|;
|
1316
|
+
; _slim_controls2 << ("<col style=\"width:".freeze); _slim_controls2 << ((col.attr :colpcwidth).to_s); _slim_controls2 << ("%\">".freeze);
|
1317
|
+
; end; end; _slim_controls2 << ("</colgroup>".freeze); [:head, :foot, :body].select {|tblsec| !@rows[tblsec].empty? }.each do |tblsec|;
|
1318
|
+
;
|
1319
|
+
; _slim_controls2 << ("<t".freeze); _slim_controls2 << ((tblsec).to_s); _slim_controls2 << (">".freeze);
|
1320
|
+
; @rows[tblsec].each do |row|;
|
1321
|
+
; _slim_controls2 << ("<tr>".freeze);
|
1322
|
+
; row.each do |cell|;
|
1323
|
+
;
|
1324
|
+
; if tblsec == :head;
|
1325
|
+
; cell_content = cell.text;
|
1326
|
+
; else;
|
1327
|
+
; case cell.style;
|
1328
|
+
; when :literal;
|
1329
|
+
; cell_content = cell.text;
|
1330
|
+
; else;
|
1331
|
+
; cell_content = cell.content;
|
1332
|
+
; end; end; _slim_controls3 = html_tag(tblsec == :head || cell.style == :header ? 'th' : 'td',
|
1333
|
+
:class=>['tableblock', "halign-#{cell.attr :halign}", "valign-#{cell.attr :valign}"],
|
1334
|
+
:colspan=>cell.colspan, :rowspan=>cell.rowspan,
|
1335
|
+
:style=>((@document.attr? :cellbgcolor) ? %(background-color:#{@document.attr :cellbgcolor};) : nil)) do; _slim_controls4 = '';
|
1336
|
+
; if tblsec == :head;
|
1337
|
+
; _slim_controls4 << ((cell_content).to_s);
|
1338
|
+
; else;
|
1339
|
+
; case cell.style;
|
1340
|
+
; when :asciidoc;
|
1341
|
+
; _slim_controls4 << ("<div>".freeze); _slim_controls4 << ((cell_content).to_s);
|
1342
|
+
; _slim_controls4 << ("</div>".freeze); when :literal;
|
1343
|
+
; _slim_controls4 << ("<div class=\"literal\"><pre>".freeze); _slim_controls4 << ((cell_content).to_s);
|
1344
|
+
; _slim_controls4 << ("</pre></div>".freeze); when :header;
|
1345
|
+
; cell_content.each do |text|;
|
1346
|
+
; _slim_controls4 << ("<p class=\"tableblock header\">".freeze); _slim_controls4 << ((text).to_s);
|
1347
|
+
; _slim_controls4 << ("</p>".freeze); end; else;
|
1348
|
+
; cell_content.each do |text|;
|
1349
|
+
; _slim_controls4 << ("<p class=\"tableblock\">".freeze); _slim_controls4 << ((text).to_s);
|
1350
|
+
; _slim_controls4 << ("</p>".freeze); end; end; end; _slim_controls4; end; _slim_controls2 << ((_slim_controls3).to_s); end; _slim_controls2 << ("</tr>".freeze); end; end; end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1446
1351
|
end
|
1447
1352
|
end
|
1448
1353
|
|
1449
|
-
def
|
1354
|
+
def listing(node, opts = {})
|
1450
1355
|
node.extend(Helpers)
|
1451
1356
|
node.instance_eval do
|
1452
1357
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
1453
|
-
_buf = '';
|
1358
|
+
_buf = ''; nowrap = (option? 'nowrap') || !(document.attr? 'prewrap');
|
1359
|
+
; if @style == 'source';
|
1360
|
+
; syntax_hl = document.syntax_highlighter;
|
1361
|
+
; lang = attr :language;
|
1362
|
+
; if syntax_hl;
|
1363
|
+
; doc_attrs = document.attributes;
|
1364
|
+
; css_mode = (doc_attrs[%(#{syntax_hl.name}-css)] || :class).to_sym;
|
1365
|
+
; style = doc_attrs[%(#{syntax_hl.name}-style)];
|
1366
|
+
; opts = syntax_hl.highlight? ? { css_mode: css_mode, style: style } : {};
|
1367
|
+
; opts[:nowrap] = nowrap;
|
1368
|
+
; end; end; _slim_controls1 = html_tag('div', { :id => id, :class => ['listingblock', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1454
1369
|
; if title?;
|
1455
|
-
;
|
1456
|
-
;
|
1457
|
-
;
|
1458
|
-
;
|
1459
|
-
;
|
1460
|
-
;
|
1461
|
-
;
|
1462
|
-
; end;
|
1370
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
|
1371
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<div class=\"content\">".freeze);
|
1372
|
+
; if syntax_hl;
|
1373
|
+
; _slim_controls2 << (((syntax_hl.format self, lang, opts)).to_s);
|
1374
|
+
; else;
|
1375
|
+
; if @style == 'source';
|
1376
|
+
; _slim_controls2 << ("<pre".freeze); _temple_html_attributeremover1 = ''; _slim_codeattributes1 = ['highlight', ('nowrap' if nowrap)]; if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes1.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes1).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _slim_controls2 << (" class=\"".freeze); _slim_controls2 << ((_temple_html_attributeremover1).to_s); _slim_controls2 << ("\"".freeze); end; _slim_controls2 << ("><code".freeze);
|
1377
|
+
; _temple_html_attributeremover2 = ''; _slim_codeattributes2 = [("language-#{lang}" if lang)]; if Array === _slim_codeattributes2; _slim_codeattributes2 = _slim_codeattributes2.flatten; _slim_codeattributes2.map!(&:to_s); _slim_codeattributes2.reject!(&:empty?); _temple_html_attributeremover2 << ((_slim_codeattributes2.join(" ")).to_s); else; _temple_html_attributeremover2 << ((_slim_codeattributes2).to_s); end; _temple_html_attributeremover2; if !_temple_html_attributeremover2.empty?; _slim_controls2 << (" class=\"".freeze); _slim_controls2 << ((_temple_html_attributeremover2).to_s); _slim_controls2 << ("\"".freeze); end; _slim_codeattributes3 = ("#{lang}" if lang); if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls2 << (" data-lang".freeze); else; _slim_controls2 << (" data-lang=\"".freeze); _slim_controls2 << ((_slim_codeattributes3).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << (">".freeze);
|
1378
|
+
; _slim_controls2 << ((content || '').to_s);
|
1379
|
+
; _slim_controls2 << ("</code></pre>".freeze); else;
|
1380
|
+
; _slim_controls2 << ("<pre".freeze); _temple_html_attributeremover3 = ''; _slim_codeattributes4 = [('nowrap' if nowrap)]; if Array === _slim_codeattributes4; _slim_codeattributes4 = _slim_codeattributes4.flatten; _slim_codeattributes4.map!(&:to_s); _slim_codeattributes4.reject!(&:empty?); _temple_html_attributeremover3 << ((_slim_codeattributes4.join(" ")).to_s); else; _temple_html_attributeremover3 << ((_slim_codeattributes4).to_s); end; _temple_html_attributeremover3; if !_temple_html_attributeremover3.empty?; _slim_controls2 << (" class=\"".freeze); _slim_controls2 << ((_temple_html_attributeremover3).to_s); _slim_controls2 << ("\"".freeze); end; _slim_controls2 << (">".freeze);
|
1381
|
+
; _slim_controls2 << ((content || '').to_s);
|
1382
|
+
; _slim_controls2 << ("</pre>".freeze); end; end; _slim_controls2 << ("</div>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1383
|
+
end
|
1384
|
+
end
|
1385
|
+
|
1386
|
+
def inline_callout(node, opts = {})
|
1387
|
+
node.extend(Helpers)
|
1388
|
+
node.instance_eval do
|
1389
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1390
|
+
_buf = ''; if @document.attr? :icons, 'font';
|
1391
|
+
; _buf << ("<i class=\"conum\"".freeze); _slim_codeattributes1 = @text; if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" data-value".freeze); else; _buf << (" data-value=\"".freeze); _buf << ((_slim_codeattributes1).to_s); _buf << ("\"".freeze); end; end; _buf << ("></i><b>".freeze);
|
1392
|
+
; _buf << (("(#{@text})").to_s);
|
1393
|
+
; _buf << ("</b>".freeze); elsif @document.attr? :icons;
|
1394
|
+
; _buf << ("<img".freeze); _slim_codeattributes2 = icon_uri("callouts/#{@text}"); if _slim_codeattributes2; if _slim_codeattributes2 == true; _buf << (" src".freeze); else; _buf << (" src=\"".freeze); _buf << ((_slim_codeattributes2).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes3 = @text; if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" alt".freeze); else; _buf << (" alt=\"".freeze); _buf << ((_slim_codeattributes3).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
1395
|
+
; else;
|
1396
|
+
; _buf << ("<b>".freeze); _buf << (("(#{@text})").to_s);
|
1397
|
+
; _buf << ("</b>".freeze); end; _buf
|
1398
|
+
end
|
1399
|
+
end
|
1400
|
+
|
1401
|
+
def inline_indexterm(node, opts = {})
|
1402
|
+
node.extend(Helpers)
|
1403
|
+
node.instance_eval do
|
1404
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1405
|
+
_buf = ''; if @type == :visible;
|
1406
|
+
; _buf << ((@text).to_s);
|
1407
|
+
; end; _buf
|
1408
|
+
end
|
1409
|
+
end
|
1410
|
+
|
1411
|
+
def floating_title(node, opts = {})
|
1412
|
+
node.extend(Helpers)
|
1413
|
+
node.instance_eval do
|
1414
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1415
|
+
_buf = ''; _slim_htag_filter1 = ((level + 1)).to_s; _buf << ("<h".freeze); _buf << ((_slim_htag_filter1).to_s); _slim_codeattributes1 = id; if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" id".freeze); else; _buf << (" id=\"".freeze); _buf << ((_slim_codeattributes1).to_s); _buf << ("\"".freeze); end; end; _temple_html_attributeremover1 = ''; _slim_codeattributes2 = [style, role]; if Array === _slim_codeattributes2; _slim_codeattributes2 = _slim_codeattributes2.flatten; _slim_codeattributes2.map!(&:to_s); _slim_codeattributes2.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes2.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes2).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover1).to_s); _buf << ("\"".freeze); end; _buf << (">".freeze);
|
1416
|
+
; _buf << ((title).to_s);
|
1417
|
+
; _buf << ("</h".freeze); _buf << ((_slim_htag_filter1).to_s); _buf << (">".freeze); _buf
|
1463
1418
|
end
|
1464
1419
|
end
|
1465
1420
|
|
@@ -1470,16 +1425,42 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
1470
1425
|
_buf = ''; case @type;
|
1471
1426
|
; when :xref;
|
1472
1427
|
; refid = (attr :refid) || @target;
|
1473
|
-
;
|
1474
|
-
;
|
1475
|
-
;
|
1428
|
+
; _slim_controls1 = html_tag('a', { :href => @target, :class => [role, ('fragment' if (option? :step) || (attr? 'step'))].compact }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1429
|
+
; _slim_controls2 << (((@text || @document.references[:ids].fetch(refid, "[#{refid}]")).tr_s("\n", ' ')).to_s);
|
1430
|
+
; _slim_controls2; end; _buf << ((_slim_controls1).to_s); when :ref;
|
1431
|
+
; _buf << ((html_tag('a', { :id => @target }.merge(data_attrs(@attributes)))).to_s);
|
1476
1432
|
; when :bibref;
|
1477
|
-
; _buf << (
|
1478
|
-
; _buf << ((@target).to_s); _buf << ("]".freeze);
|
1433
|
+
; _buf << ((html_tag('a', { :id => @target }.merge(data_attrs(@attributes)))).to_s);
|
1434
|
+
; _buf << ("[".freeze); _buf << ((@target).to_s); _buf << ("]".freeze);
|
1479
1435
|
; else;
|
1480
|
-
;
|
1481
|
-
;
|
1482
|
-
; _buf << (
|
1436
|
+
; _slim_controls3 = html_tag('a', { :href => @target, :class => [role, ('fragment' if (option? :step) || (attr? 'step'))].compact, :target => (attr :window), 'data-preview-link' => (bool_data_attr :preview) }.merge(data_attrs(@attributes))) do; _slim_controls4 = '';
|
1437
|
+
; _slim_controls4 << ((@text).to_s);
|
1438
|
+
; _slim_controls4; end; _buf << ((_slim_controls3).to_s); end; _buf
|
1439
|
+
end
|
1440
|
+
end
|
1441
|
+
|
1442
|
+
def inline_break(node, opts = {})
|
1443
|
+
node.extend(Helpers)
|
1444
|
+
node.instance_eval do
|
1445
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1446
|
+
_buf = ''; _buf << ((@text).to_s);
|
1447
|
+
; _buf << ("<br>".freeze);
|
1448
|
+
; _buf
|
1449
|
+
end
|
1450
|
+
end
|
1451
|
+
|
1452
|
+
def paragraph(node, opts = {})
|
1453
|
+
node.extend(Helpers)
|
1454
|
+
node.instance_eval do
|
1455
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1456
|
+
_buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['paragraph', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1457
|
+
; if title?;
|
1458
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
1459
|
+
; _slim_controls2 << ("</div>".freeze); end; if has_role? 'small';
|
1460
|
+
; _slim_controls2 << ("<small>".freeze); _slim_controls2 << ((content).to_s);
|
1461
|
+
; _slim_controls2 << ("</small>".freeze); else;
|
1462
|
+
; _slim_controls2 << ("<p>".freeze); _slim_controls2 << ((content).to_s);
|
1463
|
+
; _slim_controls2 << ("</p>".freeze); end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1483
1464
|
end
|
1484
1465
|
end
|
1485
1466
|
|
@@ -1491,121 +1472,247 @@ class Asciidoctor::Revealjs::Converter < ::Asciidoctor::Converter::Base
|
|
1491
1472
|
; _buf << ("<aside class=\"notes\">".freeze); _buf << ((resolve_content).to_s);
|
1492
1473
|
; _buf << ("</aside>".freeze);
|
1493
1474
|
; else;
|
1494
|
-
;
|
1495
|
-
;
|
1475
|
+
; _slim_controls1 = html_tag('div', { :id => @id, :class => ['admonitionblock', (attr :name), role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1476
|
+
; _slim_controls2 << ("<table><tr><td class=\"icon\">".freeze);
|
1496
1477
|
;
|
1497
1478
|
; if @document.attr? :icons, 'font';
|
1498
1479
|
; icon_mapping = Hash['caution', 'fire', 'important', 'exclamation-circle', 'note', 'info-circle', 'tip', 'lightbulb-o', 'warning', 'warning'];
|
1499
|
-
;
|
1480
|
+
; _slim_controls2 << ("<i".freeze); _temple_html_attributeremover1 = ''; _slim_codeattributes1 = %(fa fa-#{icon_mapping[attr :name]}); if Array === _slim_codeattributes1; _slim_codeattributes1 = _slim_codeattributes1.flatten; _slim_codeattributes1.map!(&:to_s); _slim_codeattributes1.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes1.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes1).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _slim_controls2 << (" class=\"".freeze); _slim_controls2 << ((_temple_html_attributeremover1).to_s); _slim_controls2 << ("\"".freeze); end; _slim_codeattributes2 = (attr :textlabel || @caption); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls2 << (" title".freeze); else; _slim_controls2 << (" title=\"".freeze); _slim_controls2 << ((_slim_codeattributes2).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << ("></i>".freeze);
|
1500
1481
|
; elsif @document.attr? :icons;
|
1501
|
-
;
|
1482
|
+
; _slim_controls2 << ("<img".freeze); _slim_codeattributes3 = icon_uri(attr :name); if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls2 << (" src".freeze); else; _slim_controls2 << (" src=\"".freeze); _slim_controls2 << ((_slim_codeattributes3).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes4 = @caption; if _slim_codeattributes4; if _slim_codeattributes4 == true; _slim_controls2 << (" alt".freeze); else; _slim_controls2 << (" alt=\"".freeze); _slim_controls2 << ((_slim_codeattributes4).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << (">".freeze);
|
1502
1483
|
; else;
|
1503
|
-
;
|
1504
|
-
;
|
1484
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << (((attr :textlabel) || @caption).to_s);
|
1485
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("</td><td class=\"content\">".freeze);
|
1505
1486
|
; if title?;
|
1506
|
-
;
|
1507
|
-
;
|
1508
|
-
;
|
1487
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
1488
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ((content).to_s);
|
1489
|
+
; _slim_controls2 << ("</td></tr></table>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); end; _buf
|
1509
1490
|
end
|
1510
1491
|
end
|
1511
1492
|
|
1512
|
-
def
|
1493
|
+
def image(node, opts = {})
|
1513
1494
|
node.extend(Helpers)
|
1514
1495
|
node.instance_eval do
|
1515
1496
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
1516
|
-
_buf = '';
|
1517
|
-
;
|
1518
|
-
;
|
1519
|
-
;
|
1520
|
-
;
|
1521
|
-
;
|
1522
|
-
;
|
1523
|
-
;
|
1524
|
-
;
|
1525
|
-
;
|
1526
|
-
;
|
1527
|
-
;
|
1528
|
-
;
|
1529
|
-
;
|
1530
|
-
;
|
1531
|
-
;
|
1532
|
-
;
|
1533
|
-
; when :asciimath, :latexmath;
|
1534
|
-
; open, close = Asciidoctor::INLINE_MATH_DELIMITERS[@type];
|
1535
|
-
; _buf << ((open).to_s); _buf << ((@text).to_s); _buf << ((close).to_s);
|
1497
|
+
_buf = ''; width = (attr? :width) ? (attr :width) : nil;
|
1498
|
+
; height = (attr? :height) ? (attr :height) : nil;
|
1499
|
+
;
|
1500
|
+
;
|
1501
|
+
;
|
1502
|
+
;
|
1503
|
+
;
|
1504
|
+
;
|
1505
|
+
; if (has_role? 'stretch') && !((attr? :width) || (attr? :height));
|
1506
|
+
; height = "100%";
|
1507
|
+
;
|
1508
|
+
; end; unless attributes[1] == 'background' || attributes[1] == 'canvas';
|
1509
|
+
; inline_style = [("text-align: #{attr :align}" if attr? :align),("float: #{attr :float}" if attr? :float)].compact.join('; ');
|
1510
|
+
; _slim_controls1 = html_tag('div', { :id => @id, :class => ['imageblock', role, ('fragment' if (option? :step) || (attr? 'step'))], :style => inline_style }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1511
|
+
; if attr? :link;
|
1512
|
+
; _slim_controls2 << ("<a class=\"image\"".freeze); _slim_codeattributes1 = (attr :link); if _slim_codeattributes1; if _slim_codeattributes1 == true; _slim_controls2 << (" href".freeze); else; _slim_controls2 << (" href=\"".freeze); _slim_controls2 << ((_slim_codeattributes1).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes2 = (attr :window); if _slim_codeattributes2; if _slim_codeattributes2 == true; _slim_controls2 << (" target".freeze); else; _slim_controls2 << (" target=\"".freeze); _slim_controls2 << ((_slim_codeattributes2).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes3 = (bool_data_attr :link_preview); if _slim_codeattributes3; if _slim_codeattributes3 == true; _slim_controls2 << (" data-preview-link".freeze); else; _slim_controls2 << (" data-preview-link=\"".freeze); _slim_controls2 << ((_slim_codeattributes3).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << ("><img".freeze);
|
1513
|
+
; _slim_codeattributes4 = image_uri(attr :target); if _slim_codeattributes4; if _slim_codeattributes4 == true; _slim_controls2 << (" src".freeze); else; _slim_controls2 << (" src=\"".freeze); _slim_controls2 << ((_slim_codeattributes4).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes5 = (attr :alt); if _slim_codeattributes5; if _slim_codeattributes5 == true; _slim_controls2 << (" alt".freeze); else; _slim_controls2 << (" alt=\"".freeze); _slim_controls2 << ((_slim_codeattributes5).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes6 = (width); if _slim_codeattributes6; if _slim_codeattributes6 == true; _slim_controls2 << (" width".freeze); else; _slim_controls2 << (" width=\"".freeze); _slim_controls2 << ((_slim_codeattributes6).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes7 = (height); if _slim_codeattributes7; if _slim_codeattributes7 == true; _slim_controls2 << (" height".freeze); else; _slim_controls2 << (" height=\"".freeze); _slim_controls2 << ((_slim_codeattributes7).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes8 = ((attr? :background) ? "background: #{attr :background}" : nil); if _slim_codeattributes8; if _slim_codeattributes8 == true; _slim_controls2 << (" style".freeze); else; _slim_controls2 << (" style=\"".freeze); _slim_controls2 << ((_slim_codeattributes8).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << ("></a>".freeze);
|
1536
1514
|
; else;
|
1537
|
-
;
|
1538
|
-
; end; _buf
|
1515
|
+
; _slim_controls2 << ("<img".freeze); _slim_codeattributes9 = image_uri(attr :target); if _slim_codeattributes9; if _slim_codeattributes9 == true; _slim_controls2 << (" src".freeze); else; _slim_controls2 << (" src=\"".freeze); _slim_controls2 << ((_slim_codeattributes9).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes10 = (attr :alt); if _slim_codeattributes10; if _slim_codeattributes10 == true; _slim_controls2 << (" alt".freeze); else; _slim_controls2 << (" alt=\"".freeze); _slim_controls2 << ((_slim_codeattributes10).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes11 = (width); if _slim_codeattributes11; if _slim_codeattributes11 == true; _slim_controls2 << (" width".freeze); else; _slim_controls2 << (" width=\"".freeze); _slim_controls2 << ((_slim_codeattributes11).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes12 = (height); if _slim_codeattributes12; if _slim_codeattributes12 == true; _slim_controls2 << (" height".freeze); else; _slim_controls2 << (" height=\"".freeze); _slim_controls2 << ((_slim_codeattributes12).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_codeattributes13 = ((attr? :background) ? "background: #{attr :background}" : nil); if _slim_codeattributes13; if _slim_codeattributes13 == true; _slim_controls2 << (" style".freeze); else; _slim_controls2 << (" style=\"".freeze); _slim_controls2 << ((_slim_codeattributes13).to_s); _slim_controls2 << ("\"".freeze); end; end; _slim_controls2 << (">".freeze);
|
1516
|
+
; end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); if title?;
|
1517
|
+
; _buf << ("<div class=\"title\">".freeze); _buf << ((captioned_title).to_s);
|
1518
|
+
; _buf << ("</div>".freeze); end; end; _buf
|
1539
1519
|
end
|
1540
1520
|
end
|
1541
1521
|
|
1542
|
-
def
|
1522
|
+
def preamble(node, opts = {})
|
1543
1523
|
node.extend(Helpers)
|
1544
1524
|
node.instance_eval do
|
1545
1525
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
1546
|
-
_buf = '';
|
1547
|
-
;
|
1548
|
-
;
|
1549
|
-
|
1526
|
+
_buf = '';
|
1527
|
+
;
|
1528
|
+
; _buf
|
1529
|
+
end
|
1530
|
+
end
|
1531
|
+
|
1532
|
+
def section(node, opts = {})
|
1533
|
+
node.extend(Helpers)
|
1534
|
+
node.instance_eval do
|
1535
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1536
|
+
_buf = '';
|
1537
|
+
;
|
1538
|
+
; titleless = (title = self.title) == '!';
|
1539
|
+
; hide_title = (titleless || (option? :notitle) || (option? :conceal));
|
1540
|
+
;
|
1541
|
+
; vertical_slides = find_by(context: :section) {|section| section.level == 2 };
|
1542
|
+
;
|
1543
|
+
;
|
1544
|
+
;
|
1545
|
+
; data_background_image, data_background_size, data_background_repeat,
|
1546
|
+
data_background_position, data_background_transition = nil;
|
1547
|
+
;
|
1548
|
+
;
|
1549
|
+
; section_images = blocks.map do |block|;
|
1550
|
+
; if (ctx = block.context) == :image;
|
1551
|
+
; ['background', 'canvas'].include?(block.attributes[1]) ? block : [];
|
1552
|
+
; elsif ctx == :section;
|
1553
|
+
; [];
|
1550
1554
|
; else;
|
1551
|
-
;
|
1552
|
-
;
|
1553
|
-
;
|
1555
|
+
; block.find_by(context: :image) {|image| ['background', 'canvas'].include?(image.attributes[1]) } || [];
|
1556
|
+
; end; end; if (bg_image = section_images.flatten.first);
|
1557
|
+
; data_background_image = image_uri(bg_image.attr 'target');
|
1558
|
+
;
|
1559
|
+
; data_background_size = bg_image.attr 'size';
|
1560
|
+
; data_background_repeat = bg_image.attr 'repeat';
|
1561
|
+
; data_background_transition = bg_image.attr 'transition';
|
1562
|
+
; data_background_position = bg_image.attr 'position';
|
1563
|
+
;
|
1564
|
+
;
|
1565
|
+
; end; if attr? 'background-image';
|
1566
|
+
; data_background_image = image_uri(attr 'background-image');
|
1567
|
+
;
|
1568
|
+
; end; if attr? 'background-video';
|
1569
|
+
; data_background_video = media_uri(attr 'background-video');
|
1570
|
+
;
|
1571
|
+
; end; if attr? 'background-color';
|
1572
|
+
; data_background_color = attr 'background-color';
|
1573
|
+
;
|
1574
|
+
; end; parent_section_with_vertical_slides = @level == 1 && !vertical_slides.empty?;
|
1575
|
+
;
|
1576
|
+
; content_for :footnotes do;
|
1577
|
+
; slide_footnotes = slide_footnotes(self);
|
1578
|
+
; if document.footnotes? && !(parent.attr? 'nofootnotes') && !slide_footnotes.empty?;
|
1579
|
+
; _buf << ("<div class=\"footnotes\">".freeze);
|
1580
|
+
; slide_footnotes.each do |footnote|;
|
1581
|
+
; _buf << ("<div class=\"footnote\">".freeze);
|
1582
|
+
; _buf << (("#{footnote.index}. #{footnote.text}").to_s);
|
1583
|
+
;
|
1584
|
+
; _buf << ("</div>".freeze); end; _buf << ("</div>".freeze); end; end; content_for :section do;
|
1585
|
+
;
|
1586
|
+
;
|
1587
|
+
;
|
1588
|
+
;
|
1589
|
+
;
|
1590
|
+
;
|
1591
|
+
;
|
1592
|
+
;
|
1593
|
+
;
|
1594
|
+
;
|
1595
|
+
;
|
1596
|
+
;
|
1597
|
+
;
|
1598
|
+
;
|
1599
|
+
;
|
1600
|
+
;
|
1601
|
+
; _buf << ("<section".freeze); _slim_codeattributes1 = (titleless ? nil : id); if _slim_codeattributes1; if _slim_codeattributes1 == true; _buf << (" id".freeze); else; _buf << (" id=\"".freeze); _buf << ((_slim_codeattributes1).to_s); _buf << ("\"".freeze); end; end; _temple_html_attributeremover1 = ''; _slim_codeattributes2 = roles; if Array === _slim_codeattributes2; _slim_codeattributes2 = _slim_codeattributes2.flatten; _slim_codeattributes2.map!(&:to_s); _slim_codeattributes2.reject!(&:empty?); _temple_html_attributeremover1 << ((_slim_codeattributes2.join(" ")).to_s); else; _temple_html_attributeremover1 << ((_slim_codeattributes2).to_s); end; _temple_html_attributeremover1; if !_temple_html_attributeremover1.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover1).to_s); _buf << ("\"".freeze); end; _slim_codeattributes3 = (attr 'transition'); if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" data-transition".freeze); else; _buf << (" data-transition=\"".freeze); _buf << ((_slim_codeattributes3).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes4 = (attr 'transition-speed'); if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" data-transition-speed".freeze); else; _buf << (" data-transition-speed=\"".freeze); _buf << ((_slim_codeattributes4).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes5 = data_background_color; if _slim_codeattributes5; if _slim_codeattributes5 == true; _buf << (" data-background-color".freeze); else; _buf << (" data-background-color=\"".freeze); _buf << ((_slim_codeattributes5).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes6 = data_background_image; if _slim_codeattributes6; if _slim_codeattributes6 == true; _buf << (" data-background-image".freeze); else; _buf << (" data-background-image=\"".freeze); _buf << ((_slim_codeattributes6).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes7 = (data_background_size || attr('background-size')); if _slim_codeattributes7; if _slim_codeattributes7 == true; _buf << (" data-background-size".freeze); else; _buf << (" data-background-size=\"".freeze); _buf << ((_slim_codeattributes7).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes8 = (data_background_repeat || attr('background-repeat')); if _slim_codeattributes8; if _slim_codeattributes8 == true; _buf << (" data-background-repeat".freeze); else; _buf << (" data-background-repeat=\"".freeze); _buf << ((_slim_codeattributes8).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes9 = (data_background_transition || attr('background-transition')); if _slim_codeattributes9; if _slim_codeattributes9 == true; _buf << (" data-background-transition".freeze); else; _buf << (" data-background-transition=\"".freeze); _buf << ((_slim_codeattributes9).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes10 = (data_background_position || attr('background-position')); if _slim_codeattributes10; if _slim_codeattributes10 == true; _buf << (" data-background-position".freeze); else; _buf << (" data-background-position=\"".freeze); _buf << ((_slim_codeattributes10).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes11 = (attr "background-iframe"); if _slim_codeattributes11; if _slim_codeattributes11 == true; _buf << (" data-background-iframe".freeze); else; _buf << (" data-background-iframe=\"".freeze); _buf << ((_slim_codeattributes11).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes12 = data_background_video; if _slim_codeattributes12; if _slim_codeattributes12 == true; _buf << (" data-background-video".freeze); else; _buf << (" data-background-video=\"".freeze); _buf << ((_slim_codeattributes12).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes13 = ((attr? 'background-video-loop') || (option? 'loop')); if _slim_codeattributes13; if _slim_codeattributes13 == true; _buf << (" data-background-video-loop".freeze); else; _buf << (" data-background-video-loop=\"".freeze); _buf << ((_slim_codeattributes13).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes14 = ((attr? 'background-video-muted') || (option? 'muted')); if _slim_codeattributes14; if _slim_codeattributes14 == true; _buf << (" data-background-video-muted".freeze); else; _buf << (" data-background-video-muted=\"".freeze); _buf << ((_slim_codeattributes14).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes15 = (attr "background-opacity"); if _slim_codeattributes15; if _slim_codeattributes15 == true; _buf << (" data-background-opacity".freeze); else; _buf << (" data-background-opacity=\"".freeze); _buf << ((_slim_codeattributes15).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes16 = (attr "autoslide"); if _slim_codeattributes16; if _slim_codeattributes16 == true; _buf << (" data-autoslide".freeze); else; _buf << (" data-autoslide=\"".freeze); _buf << ((_slim_codeattributes16).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes17 = (attr 'state'); if _slim_codeattributes17; if _slim_codeattributes17 == true; _buf << (" data-state".freeze); else; _buf << (" data-state=\"".freeze); _buf << ((_slim_codeattributes17).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
1602
|
+
; unless hide_title;
|
1603
|
+
; _buf << ("<h2>".freeze); _buf << ((section_title).to_s);
|
1604
|
+
; _buf << ("</h2>".freeze); end; if parent_section_with_vertical_slides;
|
1605
|
+
; unless (_blocks = blocks - vertical_slides).empty?;
|
1606
|
+
; _buf << ("<div class=\"slide-content\">".freeze);
|
1607
|
+
; _blocks.each do |block|;
|
1608
|
+
; _buf << ((block.convert).to_s);
|
1609
|
+
; end; _buf << ("</div>".freeze); end; yield_content :footnotes;
|
1610
|
+
;
|
1554
1611
|
; else;
|
1612
|
+
; unless (_content = content.chomp).empty?;
|
1613
|
+
; _buf << ("<div class=\"slide-content\">".freeze);
|
1614
|
+
; _buf << ((_content).to_s);
|
1615
|
+
; _buf << ("</div>".freeze); end; yield_content :footnotes;
|
1555
1616
|
;
|
1556
|
-
;
|
1557
|
-
; marker_unchecked = '<input type="checkbox" data-item-complete="0" disabled>';
|
1558
|
-
; end; end; end; _buf << ("<div".freeze); _temple_html_attributeremover1 = ''; _temple_html_attributemerger1 = []; _temple_html_attributemerger1[0] = "ulist"; _temple_html_attributemerger1[1] = ''; _slim_codeattributes1 = [checklist,@style,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; _slim_codeattributes2 = @id; if _slim_codeattributes2; if _slim_codeattributes2 == true; _buf << (" id".freeze); else; _buf << (" id=\"".freeze); _buf << ((_slim_codeattributes2).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
1559
|
-
; if title?;
|
1560
|
-
; _buf << ("<div class=\"title\">".freeze); _buf << ((title).to_s);
|
1561
|
-
; _buf << ("</div>".freeze); end; _buf << ("<ul".freeze); _temple_html_attributeremover2 = ''; _slim_codeattributes3 = (checklist || @style); if Array === _slim_codeattributes3; _slim_codeattributes3 = _slim_codeattributes3.flatten; _slim_codeattributes3.map!(&:to_s); _slim_codeattributes3.reject!(&:empty?); _temple_html_attributeremover2 << ((_slim_codeattributes3.join(" ")).to_s); else; _temple_html_attributeremover2 << ((_slim_codeattributes3).to_s); end; _temple_html_attributeremover2; if !_temple_html_attributeremover2.empty?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover2).to_s); _buf << ("\"".freeze); end; _buf << (">".freeze);
|
1562
|
-
; items.each do |item|;
|
1563
|
-
; _buf << ("<li".freeze); _temple_html_attributeremover3 = ''; _slim_codeattributes4 = ('fragment' if (option? :step) || (has_role? 'step')); 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?; _buf << (" class=\"".freeze); _buf << ((_temple_html_attributeremover3).to_s); _buf << ("\"".freeze); end; _buf << ("><p>".freeze);
|
1617
|
+
; end; clear_slide_footnotes;
|
1564
1618
|
;
|
1565
|
-
;
|
1566
|
-
;
|
1619
|
+
; _buf << ("</section>".freeze);
|
1620
|
+
;
|
1621
|
+
; end; if parent_section_with_vertical_slides;
|
1622
|
+
; _buf << ("<section>".freeze);
|
1623
|
+
; yield_content :section;
|
1624
|
+
; vertical_slides.each do |subsection|;
|
1625
|
+
; _buf << ((subsection.convert).to_s);
|
1626
|
+
;
|
1627
|
+
; end; _buf << ("</section>".freeze);
|
1628
|
+
; else;
|
1629
|
+
; if @level >= 3;
|
1630
|
+
;
|
1631
|
+
; _slim_htag_filter1 = ((@level)).to_s; _buf << ("<h".freeze); _buf << ((_slim_htag_filter1).to_s); _buf << (">".freeze); _buf << ((title).to_s);
|
1632
|
+
; _buf << ("</h".freeze); _buf << ((_slim_htag_filter1).to_s); _buf << (">".freeze); _buf << ((content.chomp).to_s);
|
1567
1633
|
; else;
|
1568
|
-
;
|
1569
|
-
; end;
|
1570
|
-
; _buf << ((item.content).to_s);
|
1571
|
-
; end; _buf << ("</li>".freeze); end; _buf << ("</ul></div>".freeze); _buf
|
1634
|
+
; yield_content :section;
|
1635
|
+
; end; end; _buf
|
1572
1636
|
end
|
1573
1637
|
end
|
1574
1638
|
|
1575
|
-
def
|
1639
|
+
def open(node, opts = {})
|
1576
1640
|
node.extend(Helpers)
|
1577
1641
|
node.instance_eval do
|
1578
1642
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
1579
|
-
_buf = '';
|
1580
|
-
;
|
1643
|
+
_buf = ''; if @style == 'abstract';
|
1644
|
+
; if @parent == @document && @document.doctype == 'book';
|
1645
|
+
; puts 'asciidoctor: WARNING: abstract block cannot be used in a document without a title when doctype is book. Excluding block content.';
|
1646
|
+
; else;
|
1647
|
+
; _slim_controls1 = html_tag('div', { :id => @id, :class => ['quoteblock', 'abstract', role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1648
|
+
; if title?;
|
1649
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((title).to_s);
|
1650
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<blockquote>".freeze); _slim_controls2 << ((content).to_s);
|
1651
|
+
; _slim_controls2 << ("</blockquote>".freeze); _slim_controls2; end; _buf << ((_slim_controls1).to_s); end; elsif @style == 'partintro' && (@level != 0 || @parent.context != :section || @document.doctype != 'book');
|
1652
|
+
; puts 'asciidoctor: ERROR: partintro block can only be used when doctype is book and it\'s a child of a book part. Excluding block content.';
|
1653
|
+
; else;
|
1654
|
+
; if (has_role? 'aside') or (has_role? 'speaker') or (has_role? 'notes');
|
1655
|
+
; _buf << ("<aside class=\"notes\">".freeze); _buf << ((resolve_content).to_s);
|
1656
|
+
; _buf << ("</aside>".freeze);
|
1657
|
+
; else;
|
1658
|
+
; _slim_controls3 = html_tag('div', { :id => @id, :class => ['openblock', (@style != 'open' ? @style : nil), role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes))) do; _slim_controls4 = '';
|
1659
|
+
; if title?;
|
1660
|
+
; _slim_controls4 << ("<div class=\"title\">".freeze); _slim_controls4 << ((title).to_s);
|
1661
|
+
; _slim_controls4 << ("</div>".freeze); end; _slim_controls4 << ("<div class=\"content\">".freeze); _slim_controls4 << ((content).to_s);
|
1662
|
+
; _slim_controls4 << ("</div>".freeze); _slim_controls4; end; _buf << ((_slim_controls3).to_s); end; end; _buf
|
1581
1663
|
end
|
1582
1664
|
end
|
1583
1665
|
|
1584
|
-
def
|
1666
|
+
def inline_button(node, opts = {})
|
1585
1667
|
node.extend(Helpers)
|
1586
1668
|
node.instance_eval do
|
1587
1669
|
converter.set_local_variables(binding, opts) unless opts.empty?
|
1588
|
-
_buf = '';
|
1670
|
+
_buf = ''; _slim_controls1 = html_tag('b', { :class => ['button'] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1671
|
+
; _slim_controls2 << ((@text).to_s);
|
1672
|
+
; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1673
|
+
end
|
1674
|
+
end
|
1675
|
+
|
1676
|
+
def inline_image(node, opts = {})
|
1677
|
+
node.extend(Helpers)
|
1678
|
+
node.instance_eval do
|
1679
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1680
|
+
_buf = ''; _slim_controls1 = html_tag('span', { :class => [@type, role, ('fragment' if (option? :step) || (attr? 'step'))], :style => ("float: #{attr :float}" if attr? :float) }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1681
|
+
; if @type == 'icon' && (@document.attr? :icons, 'font');
|
1682
|
+
; 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)];
|
1683
|
+
; if attr? :link;
|
1684
|
+
; _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);
|
1685
|
+
; _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);
|
1686
|
+
; else;
|
1687
|
+
; _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);
|
1688
|
+
; end; elsif @type == 'icon' && !(@document.attr? :icons);
|
1689
|
+
; if attr? :link;
|
1690
|
+
; _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);
|
1691
|
+
; _slim_controls2 << ((attr :alt).to_s); _slim_controls2 << ("]</a>".freeze);
|
1692
|
+
; else;
|
1693
|
+
; _slim_controls2 << ("[".freeze); _slim_controls2 << ((attr :alt).to_s); _slim_controls2 << ("]".freeze);
|
1694
|
+
; end; else;
|
1695
|
+
; src = (@type == 'icon' ? (icon_uri @target) : (image_uri @target));
|
1696
|
+
; if attr? :link;
|
1697
|
+
; _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);
|
1698
|
+
; _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);
|
1699
|
+
; else;
|
1700
|
+
; _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);
|
1701
|
+
; end; end; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1702
|
+
end
|
1703
|
+
end
|
1704
|
+
|
1705
|
+
def audio(node, opts = {})
|
1706
|
+
node.extend(Helpers)
|
1707
|
+
node.instance_eval do
|
1708
|
+
converter.set_local_variables(binding, opts) unless opts.empty?
|
1709
|
+
_buf = ''; _slim_controls1 = html_tag('div', { :id => @id, :class => ['audioblock', @style, role] }.merge(data_attrs(@attributes))) do; _slim_controls2 = '';
|
1589
1710
|
; if title?;
|
1590
|
-
;
|
1591
|
-
;
|
1592
|
-
;
|
1593
|
-
; _buf << ("<table>".freeze);
|
1594
|
-
; items.each_with_index do |item, i|;
|
1595
|
-
; num = i + 1;
|
1596
|
-
; _buf << ("<tr><td>".freeze);
|
1711
|
+
; _slim_controls2 << ("<div class=\"title\">".freeze); _slim_controls2 << ((captioned_title).to_s);
|
1712
|
+
; _slim_controls2 << ("</div>".freeze); end; _slim_controls2 << ("<div class=\"content\"><audio".freeze);
|
1713
|
+
; _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);
|
1597
1714
|
;
|
1598
|
-
;
|
1599
|
-
; _buf << ("<i class=\"conum\"".freeze); _slim_codeattributes3 = num; if _slim_codeattributes3; if _slim_codeattributes3 == true; _buf << (" data-value".freeze); else; _buf << (" data-value=\"".freeze); _buf << ((_slim_codeattributes3).to_s); _buf << ("\"".freeze); end; end; _buf << ("></i><b>".freeze);
|
1600
|
-
; _buf << ((num).to_s);
|
1601
|
-
; _buf << ("</b>".freeze); else;
|
1602
|
-
; _buf << ("<img".freeze); _slim_codeattributes4 = icon_uri("callouts/#{num}"); if _slim_codeattributes4; if _slim_codeattributes4 == true; _buf << (" src".freeze); else; _buf << (" src=\"".freeze); _buf << ((_slim_codeattributes4).to_s); _buf << ("\"".freeze); end; end; _slim_codeattributes5 = num; if _slim_codeattributes5; if _slim_codeattributes5 == true; _buf << (" alt".freeze); else; _buf << (" alt=\"".freeze); _buf << ((_slim_codeattributes5).to_s); _buf << ("\"".freeze); end; end; _buf << (">".freeze);
|
1603
|
-
; end; _buf << ("</td><td>".freeze); _buf << ((item.text).to_s);
|
1604
|
-
; _buf << ("</td></tr>".freeze); end; _buf << ("</table>".freeze); else;
|
1605
|
-
; _buf << ("<ol>".freeze);
|
1606
|
-
; items.each do |item|;
|
1607
|
-
; _buf << ("<li><p>".freeze); _buf << ((item.text).to_s);
|
1608
|
-
; _buf << ("</p></li>".freeze); end; _buf << ("</ol>".freeze); end; _buf << ("</div>".freeze); _buf
|
1715
|
+
; _slim_controls2; end; _buf << ((_slim_controls1).to_s); _buf
|
1609
1716
|
end
|
1610
1717
|
end
|
1611
1718
|
#------------------ End of generated transformation methods ------------------#
|