asciidoctor-revealjs 5.0.1 → 5.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -2
- data/Rakefile +3 -0
- data/asciidoctor-revealjs.gemspec +2 -2
- data/examples/release-5.1.adoc +43 -0
- data/examples/release-5.1.css +7 -0
- data/examples/release-5.2.adoc +49 -0
- data/examples/steps.adoc +13 -0
- data/lib/asciidoctor-revealjs/converter.rb +576 -578
- data/lib/asciidoctor-revealjs/highlightjs.rb +7 -1
- data/lib/asciidoctor-revealjs/version.rb +1 -1
- data/templates/colist.html.slim +4 -3
- data/templates/section.html.slim +1 -0
- metadata +15 -6
@@ -223,12 +223,18 @@ hljs.highlightAll();
|
|
223
223
|
var highlightSteps = RevealHighlight.deserializeHighlightSteps( block.getAttribute( 'data-line-numbers' ) );
|
224
224
|
if( highlightSteps.length > 1 ) {
|
225
225
|
|
226
|
+
// When rendered with asciidoc, data-fragment index if it exists lies on the listing block element, so we have to lookup
|
226
227
|
// If the original code block has a fragment-index,
|
227
228
|
// each clone should follow in an incremental sequence
|
228
|
-
var
|
229
|
+
var preCodeWrapper = block.parentElement;
|
230
|
+
var divContent = preCodeWrapper.parentElement;
|
231
|
+
var listingBlock = divContent.parentElement;
|
232
|
+
var fragmentIndex = parseInt( listingBlock.getAttribute( 'data-fragment-index' ), 10 );
|
229
233
|
|
230
234
|
if( typeof fragmentIndex !== 'number' || isNaN( fragmentIndex ) ) {
|
231
235
|
fragmentIndex = null;
|
236
|
+
} else {
|
237
|
+
fragmentIndex += 1;
|
232
238
|
}
|
233
239
|
|
234
240
|
// Generate fragments for all steps except the original block
|
data/templates/colist.html.slim
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
= html_tag('div', { :id => @id, :class => ['colist', @style, role
|
1
|
+
= html_tag('div', { :id => @id, :class => ['colist', @style, role] }.merge(data_attrs(@attributes)))
|
2
2
|
- if title?
|
3
3
|
.title=title
|
4
4
|
- if @document.attr? :icons
|
@@ -6,7 +6,7 @@
|
|
6
6
|
table
|
7
7
|
- items.each_with_index do |item, i|
|
8
8
|
- num = i + 1
|
9
|
-
tr
|
9
|
+
tr class=('fragment' if (option? :step) || (has_role? 'step') || (attr? 'step'))
|
10
10
|
td
|
11
11
|
- if font_icons
|
12
12
|
i.conum data-value=num
|
@@ -17,4 +17,5 @@
|
|
17
17
|
- else
|
18
18
|
ol
|
19
19
|
- items.each do |item|
|
20
|
-
li:
|
20
|
+
li class=('fragment' if (option? :step) || (has_role? 'step') || (attr? 'step'))
|
21
|
+
p=item.text
|
data/templates/section.html.slim
CHANGED
@@ -49,6 +49,7 @@
|
|
49
49
|
- content_for :section
|
50
50
|
section(id=(titleless ? nil : id)
|
51
51
|
class=roles
|
52
|
+
data-background-gradient=(attr "background-gradient")
|
52
53
|
data-transition=(attr 'transition')
|
53
54
|
data-transition-speed=(attr 'transition-speed')
|
54
55
|
data-background-color=data_background_color
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: asciidoctor-revealjs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0
|
4
|
+
version: 5.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Olivier Bilodeau
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|
@@ -50,14 +50,20 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
53
|
+
version: 5.24.0
|
54
|
+
- - "<"
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '5.25'
|
54
57
|
type: :development
|
55
58
|
prerelease: false
|
56
59
|
version_requirements: !ruby/object:Gem::Requirement
|
57
60
|
requirements:
|
58
61
|
- - "~>"
|
59
62
|
- !ruby/object:Gem::Version
|
60
|
-
version:
|
63
|
+
version: 5.24.0
|
64
|
+
- - "<"
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '5.25'
|
61
67
|
- !ruby/object:Gem::Dependency
|
62
68
|
name: pry
|
63
69
|
requirement: !ruby/object:Gem::Requirement
|
@@ -134,14 +140,14 @@ dependencies:
|
|
134
140
|
requirements:
|
135
141
|
- - "~>"
|
136
142
|
- !ruby/object:Gem::Version
|
137
|
-
version: 0.
|
143
|
+
version: 0.7.0
|
138
144
|
type: :development
|
139
145
|
prerelease: false
|
140
146
|
version_requirements: !ruby/object:Gem::Requirement
|
141
147
|
requirements:
|
142
148
|
- - "~>"
|
143
149
|
- !ruby/object:Gem::Version
|
144
|
-
version: 0.
|
150
|
+
version: 0.7.0
|
145
151
|
- !ruby/object:Gem::Dependency
|
146
152
|
name: slim
|
147
153
|
requirement: !ruby/object:Gem::Requirement
|
@@ -258,6 +264,9 @@ files:
|
|
258
264
|
- examples/release-4.0.css
|
259
265
|
- examples/release-4.1.adoc
|
260
266
|
- examples/release-4.1.css
|
267
|
+
- examples/release-5.1.adoc
|
268
|
+
- examples/release-5.1.css
|
269
|
+
- examples/release-5.2.adoc
|
261
270
|
- examples/revealjs-custom-theme.adoc
|
262
271
|
- examples/revealjs-plugin-activation.adoc
|
263
272
|
- examples/revealjs-plugins-docinfo-footer.html
|