asciidoctor-revealjs 2.0.1 → 3.0.0.pre.rc1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.adoc +51 -0
- data/Gemfile +2 -2
- data/README.adoc +96 -35
- data/Rakefile +2 -1
- data/asciidoctor-revealjs.gemspec +6 -3
- data/examples/font-awesome.adoc +24 -0
- data/examples/multi-destination-content.adoc +2 -0
- data/examples/source-rouge.adoc +41 -0
- data/examples/tables-styles.adoc +141 -0
- data/lib/asciidoctor-revealjs.rb +2 -0
- data/lib/asciidoctor-revealjs/converter.rb +143 -66
- data/lib/asciidoctor-revealjs/highlightjs.rb +41 -0
- data/lib/asciidoctor-revealjs/version.rb +1 -1
- data/templates/asciidoctor_revealjs.css.slim +45 -0
- data/templates/document.html.slim +17 -19
- data/templates/listing.html.slim +18 -34
- data/templates/section.html.slim +6 -1
- metadata +41 -9
data/templates/listing.html.slim
CHANGED
@@ -1,35 +1,19 @@
|
|
1
|
-
-
|
2
|
-
|
3
|
-
-
|
4
|
-
|
5
|
-
|
6
|
-
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
-
|
12
|
-
|
13
|
-
|
14
|
-
- pre_class = ['CodeRay']
|
15
|
-
- when 'pygments'
|
16
|
-
- pre_class = ['pygments','highlight']
|
17
|
-
- when 'prettify'
|
18
|
-
- pre_class = ['prettyprint']
|
19
|
-
- pre_class << 'linenums' if attr? :linenums
|
20
|
-
- pre_class << language if language
|
21
|
-
- pre_class << "language-#{language}" if language
|
22
|
-
- code_class = nil
|
23
|
-
- when 'html-pipeline'
|
24
|
-
- pre_lang = language
|
25
|
-
- pre_class = code_class = nil
|
26
|
-
- nowrap = false
|
27
|
-
- when 'highlightjs', 'highlight.js'
|
28
|
-
- code_noescape=true
|
29
|
-
- pre_class << 'nowrap' if nowrap
|
30
|
-
- pre_class << 'listingblock'
|
31
|
-
- pre_class << role if role
|
32
|
-
pre class=pre_class lang=pre_lang id=@id
|
33
|
-
code data-noescape=code_noescape class=code_class =content
|
1
|
+
- nowrap = (option? 'nowrap') || !(document.attr? 'prewrap')
|
2
|
+
- syntax_hl = document.syntax_highlighter
|
3
|
+
- if @style == 'source'
|
4
|
+
- lang = attr :language
|
5
|
+
- if syntax_hl
|
6
|
+
- doc_attrs = document.attributes
|
7
|
+
- css_mode = (doc_attrs[%(#{syntax_hl.name}-css)] || :class).to_sym
|
8
|
+
- style = doc_attrs[%(#{syntax_hl.name}-style)]
|
9
|
+
- opts = syntax_hl.highlight? ? { css_mode: css_mode, style: style } : {}
|
10
|
+
- opts[:nowrap] = nowrap
|
11
|
+
- else
|
12
|
+
- pre_open = %(<pre class="highlight#{nowrap ? ' nowrap' : ''}"><code#{lang ? %[ class="language-#{lang}" data-lang="#{lang}"] : ''}>)
|
13
|
+
- pre_close = '</code></pre>'
|
34
14
|
- else
|
35
|
-
|
15
|
+
- pre_open = %(<pre#{nowrap ? ' class="nowrap"' : ''}>)
|
16
|
+
- pre_close = '</pre>'
|
17
|
+
- id_attribute = id ? %( id="#{id}") : ''
|
18
|
+
- title_element = title? ? %(<div class="title">#{captioned_title}</div>\n) : ''
|
19
|
+
=%(<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>)
|
data/templates/section.html.slim
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
/ extracting block image attributes to find an image to use as a
|
9
9
|
/ background_image attribute
|
10
10
|
- data_background_image, data_background_size, data_background_repeat,
|
11
|
-
data_background_transition = nil
|
11
|
+
data_background_position, data_background_transition = nil
|
12
12
|
|
13
13
|
/ process the first image block in the current section that acts as a background
|
14
14
|
- section_images = blocks.map do |block|
|
@@ -24,6 +24,7 @@
|
|
24
24
|
- data_background_size = bg_image.attr 'size'
|
25
25
|
- data_background_repeat = bg_image.attr 'repeat'
|
26
26
|
- data_background_transition = bg_image.attr 'transition'
|
27
|
+
- data_background_position = bg_image.attr 'position'
|
27
28
|
|
28
29
|
/ background-image section attribute overrides the image one
|
29
30
|
- if attr? 'background-image'
|
@@ -46,10 +47,12 @@
|
|
46
47
|
data-background-size=(data_background_size || attr('background-size'))
|
47
48
|
data-background-repeat=(data_background_repeat || attr('background-repeat'))
|
48
49
|
data-background-transition=(data_background_transition || attr('background-transition'))
|
50
|
+
data-background-position=(data_background_position || attr('background-position'))
|
49
51
|
data-background-iframe=(attr "background-iframe")
|
50
52
|
data-background-video=(attr "background-video")
|
51
53
|
data-background-video-loop=((attr? 'background-video-loop') || (option? 'loop'))
|
52
54
|
data-background-video-muted=((attr? 'background-video-muted') || (option? 'muted'))
|
55
|
+
data-background-opacity=(attr "background-opacity")
|
53
56
|
data-state=(attr 'state'))
|
54
57
|
|
55
58
|
- unless hide_title
|
@@ -75,10 +78,12 @@
|
|
75
78
|
data-background-size=(data_background_size || attr('background-size'))
|
76
79
|
data-background-repeat=(data_background_repeat || attr('background-repeat'))
|
77
80
|
data-background-transition=(data_background_transition || attr('background-transition'))
|
81
|
+
data-background-position=(data_background_position || attr('background-position'))
|
78
82
|
data-background-iframe=(attr "background-iframe")
|
79
83
|
data-background-video=(attr "background-video")
|
80
84
|
data-background-video-loop=((attr? 'background-video-loop') || (option? 'loop'))
|
81
85
|
data-background-video-muted=((attr? 'background-video-muted') || (option? 'muted'))
|
86
|
+
data-background-opacity=(attr "background-opacity")
|
82
87
|
data-state=(attr 'state'))
|
83
88
|
|
84
89
|
- unless hide_title
|
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:
|
4
|
+
version: 3.0.0.pre.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Olivier Bilodeau
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-12-
|
11
|
+
date: 2019-12-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: asciidoctor
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.0.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 3.0.0
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: 2.0.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 3.0.0
|
@@ -114,6 +114,20 @@ dependencies:
|
|
114
114
|
- - ">="
|
115
115
|
- !ruby/object:Gem::Version
|
116
116
|
version: '0'
|
117
|
+
- !ruby/object:Gem::Dependency
|
118
|
+
name: pygments.rb
|
119
|
+
requirement: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0'
|
124
|
+
type: :development
|
125
|
+
prerelease: false
|
126
|
+
version_requirements: !ruby/object:Gem::Requirement
|
127
|
+
requirements:
|
128
|
+
- - ">="
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
version: '0'
|
117
131
|
- !ruby/object:Gem::Dependency
|
118
132
|
name: colorize
|
119
133
|
requirement: !ruby/object:Gem::Requirement
|
@@ -170,8 +184,22 @@ dependencies:
|
|
170
184
|
- - "~>"
|
171
185
|
- !ruby/object:Gem::Version
|
172
186
|
version: 0.1.0
|
173
|
-
|
174
|
-
|
187
|
+
- !ruby/object:Gem::Dependency
|
188
|
+
name: rouge
|
189
|
+
requirement: !ruby/object:Gem::Requirement
|
190
|
+
requirements:
|
191
|
+
- - ">="
|
192
|
+
- !ruby/object:Gem::Version
|
193
|
+
version: '0'
|
194
|
+
type: :development
|
195
|
+
prerelease: false
|
196
|
+
version_requirements: !ruby/object:Gem::Requirement
|
197
|
+
requirements:
|
198
|
+
- - ">="
|
199
|
+
- !ruby/object:Gem::Version
|
200
|
+
version: '0'
|
201
|
+
description: Converts AsciiDoc documents into HTML5 presentations designed to be executed
|
202
|
+
by the reveal.js presentation framework.
|
175
203
|
email:
|
176
204
|
- olivier@bottomlesspit.org
|
177
205
|
executables:
|
@@ -200,6 +228,7 @@ files:
|
|
200
228
|
- examples/customcss.css
|
201
229
|
- examples/data-background-newstyle.adoc
|
202
230
|
- examples/data-background-oldstyle.adoc
|
231
|
+
- examples/font-awesome.adoc
|
203
232
|
- examples/history-regression-tests.adoc
|
204
233
|
- examples/history.adoc
|
205
234
|
- examples/images.adoc
|
@@ -268,7 +297,9 @@ files:
|
|
268
297
|
- examples/source-highlightjs.adoc
|
269
298
|
- examples/source-prettify.adoc
|
270
299
|
- examples/source-pygments.adoc
|
300
|
+
- examples/source-rouge.adoc
|
271
301
|
- examples/speaker-notes.adoc
|
302
|
+
- examples/tables-styles.adoc
|
272
303
|
- examples/theme-custom.adoc
|
273
304
|
- examples/theme-custom.css
|
274
305
|
- examples/title-preamble.adoc
|
@@ -281,6 +312,7 @@ files:
|
|
281
312
|
- examples/video.adoc
|
282
313
|
- lib/asciidoctor-revealjs.rb
|
283
314
|
- lib/asciidoctor-revealjs/converter.rb
|
315
|
+
- lib/asciidoctor-revealjs/highlightjs.rb
|
284
316
|
- lib/asciidoctor-revealjs/version.rb
|
285
317
|
- lib/asciidoctor-templates-compiler.rb
|
286
318
|
- templates/admonition.html.slim
|
@@ -340,12 +372,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
340
372
|
version: '0'
|
341
373
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
342
374
|
requirements:
|
343
|
-
- - "
|
375
|
+
- - ">"
|
344
376
|
- !ruby/object:Gem::Version
|
345
|
-
version:
|
377
|
+
version: 1.3.1
|
346
378
|
requirements: []
|
347
379
|
rubygems_version: 3.0.6
|
348
380
|
signing_key:
|
349
381
|
specification_version: 4
|
350
|
-
summary:
|
382
|
+
summary: A reveal.js converter for Asciidoctor. Write your slides in AsciiDoc!
|
351
383
|
test_files: []
|