asciidoctor-revealjs 4.1.0 → 5.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/README.adoc +11 -1350
  3. data/asciidoctor-revealjs.gemspec +0 -2
  4. data/examples/auto-animate-code.adoc +47 -0
  5. data/examples/auto-animate.adoc +351 -0
  6. data/examples/favicon.adoc +13 -0
  7. data/examples/mathjax-cdn.adoc +1 -1
  8. data/examples/mathjax.adoc +1 -1
  9. data/examples/revealjs-custom-theme.adoc +1 -1
  10. data/examples/revealjs-plugin-activation.adoc +3 -2
  11. data/examples/revealjs-plugins/chalkboard/README.md +94 -61
  12. data/examples/revealjs-plugins/chalkboard/img/boardmarker-black.png +0 -0
  13. data/examples/revealjs-plugins/chalkboard/img/boardmarker-blue.png +0 -0
  14. data/examples/revealjs-plugins/chalkboard/img/boardmarker-green.png +0 -0
  15. data/examples/revealjs-plugins/chalkboard/img/boardmarker-orange.png +0 -0
  16. data/examples/revealjs-plugins/chalkboard/img/boardmarker-purple.png +0 -0
  17. data/examples/revealjs-plugins/chalkboard/img/boardmarker-red.png +0 -0
  18. data/examples/revealjs-plugins/chalkboard/img/boardmarker-yellow.png +0 -0
  19. data/examples/revealjs-plugins/chalkboard/img/chalk-blue.png +0 -0
  20. data/examples/revealjs-plugins/chalkboard/img/chalk-green.png +0 -0
  21. data/examples/revealjs-plugins/chalkboard/img/chalk-orange.png +0 -0
  22. data/examples/revealjs-plugins/chalkboard/img/chalk-purple.png +0 -0
  23. data/examples/revealjs-plugins/chalkboard/img/chalk-red.png +0 -0
  24. data/examples/revealjs-plugins/chalkboard/img/{chalk.png → chalk-white.png} +0 -0
  25. data/examples/revealjs-plugins/chalkboard/img/chalk-yellow.png +0 -0
  26. data/examples/revealjs-plugins/chalkboard/plugin.js +1836 -0
  27. data/examples/revealjs-plugins/chalkboard/style.css +38 -0
  28. data/examples/revealjs-plugins/{reveal.js-menu → menu}/LICENSE +1 -1
  29. data/examples/revealjs-plugins/menu/README.md +368 -0
  30. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/LICENSE.txt +0 -0
  31. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/all.css +0 -0
  32. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/brands.css +0 -0
  33. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/fontawesome.css +0 -0
  34. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/regular.css +0 -0
  35. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/solid.css +0 -0
  36. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/svg-with-js.css +0 -0
  37. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/v4-shims.css +0 -0
  38. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/v4-shims.min.css +0 -0
  39. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-brands-400.eot +0 -0
  40. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-brands-400.svg +0 -0
  41. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-brands-400.ttf +0 -0
  42. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-brands-400.woff +0 -0
  43. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-brands-400.woff2 +0 -0
  44. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-regular-400.eot +0 -0
  45. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-regular-400.svg +0 -0
  46. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-regular-400.ttf +0 -0
  47. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-regular-400.woff +0 -0
  48. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-regular-400.woff2 +0 -0
  49. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-solid-900.eot +0 -0
  50. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-solid-900.svg +0 -0
  51. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-solid-900.ttf +0 -0
  52. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-solid-900.woff +0 -0
  53. data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-solid-900.woff2 +0 -0
  54. data/examples/revealjs-plugins/{reveal.js-menu → menu}/menu.css +116 -115
  55. data/examples/revealjs-plugins/menu/menu.esm.js +1 -0
  56. data/examples/revealjs-plugins/menu/menu.js +1 -0
  57. data/examples/revealjs-plugins/menu/plugin.js +1252 -0
  58. data/examples/revealjs-plugins-docinfo-footer.html +20 -0
  59. data/examples/revealjs-plugins.adoc +2 -3
  60. data/examples/search-plugin.adoc +26 -0
  61. data/examples/source-rouge.adoc +1 -1
  62. data/examples/text-formatting.adoc +34 -0
  63. data/lib/asciidoctor-revealjs/converter.rb +1029 -966
  64. data/lib/asciidoctor-revealjs/highlightjs.rb +155 -14
  65. data/lib/asciidoctor-revealjs/version.rb +1 -1
  66. data/templates/asciidoctor-compatibility.css +26 -1
  67. data/templates/document.html.slim +28 -44
  68. data/templates/helpers.rb +83 -9
  69. data/templates/inline_quoted.html.slim +2 -2
  70. data/templates/listing.html.slim +2 -1
  71. data/templates/section.html.slim +7 -1
  72. data/templates/title_slide.html.slim +1 -2
  73. metadata +57 -69
  74. data/examples/revealjs-plugins/chalkboard/chalkboard.js +0 -1288
  75. data/examples/revealjs-plugins/chalkboard/img/boardmarker.png +0 -0
  76. data/examples/revealjs-plugins/reveal.js-menu/CONTRIBUTING.md +0 -9
  77. data/examples/revealjs-plugins/reveal.js-menu/README.md +0 -334
  78. data/examples/revealjs-plugins/reveal.js-menu/bower.json +0 -21
  79. data/examples/revealjs-plugins/reveal.js-menu/menu.js +0 -949
  80. data/examples/revealjs-plugins/reveal.js-menu/package.json +0 -22
  81. data/examples/revealjs-plugins-conf.js +0 -10
  82. data/examples/revealjs-plugins.js +0 -2
@@ -31,8 +31,6 @@ Gem::Specification.new do |s|
31
31
  s.require_paths = ['lib']
32
32
 
33
33
  s.add_runtime_dependency 'asciidoctor', ['>= 2.0.0', '< 3.0.0']
34
- s.add_runtime_dependency 'thread_safe', '~> 0.3.5'
35
- s.add_runtime_dependency 'concurrent-ruby', '~> 1.0'
36
34
 
37
35
  s.add_development_dependency 'rake', '~> 13.0.0'
38
36
  s.add_development_dependency 'asciidoctor-doctest', '= 2.0.0.beta.7'
@@ -0,0 +1,47 @@
1
+ = Auto-Animate code
2
+ :source-highlighter: highlight.js
3
+
4
+ ++++
5
+ <style>
6
+ .reveal pre {
7
+ overflow: hidden;
8
+ }
9
+ .reveal pre code {
10
+ overflow: hidden;
11
+ }
12
+ .reveal pre code table {
13
+ overflow: hidden;
14
+ }
15
+ </style>
16
+ <section data-auto-animate>
17
+ <pre data-id="code-animation"><code class="language-js" data-trim data-line-numbers>
18
+ let planets = [
19
+ { name: 'mars', diameter: 6779 },
20
+ ]
21
+ </code></pre>
22
+ </section>
23
+ <section data-auto-animate>
24
+ <pre data-id="code-animation"><code class="language-js" data-trim data-line-numbers>
25
+ let planets = [
26
+ { name: 'mars', diameter: 6779 },
27
+ { name: 'earth', diameter: 12742 },
28
+ { name: 'jupiter', diameter: 139820 }
29
+ ]
30
+ </code></pre>
31
+ </section>
32
+ <section data-auto-animate>
33
+ <pre data-id="code-animation"><code class="language-js" data-trim data-line-numbers>
34
+ let circumferenceReducer = ( c, planet ) => {
35
+ return c + planet.diameter * Math.PI;
36
+ }
37
+
38
+ let planets = [
39
+ { name: 'mars', diameter: 6779 },
40
+ { name: 'earth', diameter: 12742 },
41
+ { name: 'jupiter', diameter: 139820 }
42
+ ]
43
+
44
+ let c = planets.reduce( circumferenceReducer, 0 )
45
+ </code></pre>
46
+ </section>
47
+ ++++
@@ -0,0 +1,351 @@
1
+ = Auto-Animate
2
+ :source-highlighter: highlight.js
3
+ :revealjsdir: ../reveal.js
4
+ :revealjs_hash: true
5
+
6
+ ++++
7
+ <style>
8
+ .highlight {
9
+ color: gold;
10
+ }
11
+ </style>
12
+ ++++
13
+
14
+ == Description
15
+
16
+ [.small%hardbreaks]
17
+ _reveal.js_ can automatically animate elements across slides.
18
+ Use `[%auto-animate]` on two (or more) adjacent sections:
19
+
20
+ [source,asciidoc]
21
+ ----
22
+ [%auto-animate]
23
+ == Title
24
+
25
+ This is a paragraph.
26
+
27
+ [%auto-animate]
28
+ == Title
29
+
30
+ This is a paragraph.
31
+
32
+ This is another paragraph.
33
+ ----
34
+
35
+ [%auto-animate]
36
+ == Title
37
+
38
+ This is a paragraph.
39
+
40
+ [%auto-animate]
41
+ == Title
42
+
43
+ This is a paragraph.
44
+
45
+ This is another paragraph.
46
+
47
+ [%auto-animate]
48
+ == !
49
+
50
+ Matched element will be animated automatically!
51
+
52
+ [%auto-animate]
53
+ == !
54
+
55
+ [.highlight]
56
+ Matched element will be animated automatically!
57
+
58
+ And move to the right position!
59
+
60
+ [%hardbreaks]
61
+ ⬆️
62
+ ⬆️
63
+ ⬆️
64
+
65
+ == Source Blocks
66
+
67
+ reveal.js supports animation between code blocks.
68
+ To enable this feature, all source blocks must have the same `data-id` value.
69
+
70
+ IMPORTANT: This feature is only supported when using Highlight.js as syntax highlighter and when the option `%linenums` is present.
71
+
72
+ == Source Blocks
73
+
74
+ Here's a simple example:
75
+
76
+ [source.stretch%linenums,asciidoc]
77
+ -----
78
+ [%auto-animate]
79
+ == !
80
+
81
+ [source%linenums,js,data-id=hello]
82
+ ----
83
+ console.log('Hello')
84
+ ----
85
+
86
+ [%auto-animate]
87
+ == !
88
+
89
+ [source%linenums,js,data-id=hello]
90
+ ----
91
+ console.log('Hello')
92
+ console.log('Bonjour')
93
+ ----
94
+ -----
95
+
96
+ [%auto-animate]
97
+ == !
98
+
99
+ [source%linenums,js,data-id=hello]
100
+ ----
101
+ console.log('Hello')
102
+ ----
103
+
104
+ [%auto-animate]
105
+ == !
106
+
107
+ [source%linenums,js,data-id=hello]
108
+ ----
109
+ console.log('Hello')
110
+ console.log('Bonjour')
111
+ ----
112
+
113
+ == Source Blocks
114
+
115
+ And here's a more complex example...
116
+
117
+ [%auto-animate]
118
+ == !
119
+
120
+ [source%linenums,js,data-id=planets]
121
+ ----
122
+ let planets = [
123
+ { name: 'mars', diameter: 6779 },
124
+ ]
125
+ ----
126
+
127
+ [%auto-animate]
128
+ == !
129
+
130
+ [source%linenums,js,data-id=planets]
131
+ ----
132
+ let planets = [
133
+ { name: 'mars', diameter: 6779 },
134
+ { name: 'earth', diameter: 12742 },
135
+ { name: 'jupiter', diameter: 139820 }
136
+ ]
137
+ ----
138
+
139
+ [%auto-animate]
140
+ == !
141
+
142
+ [source%linenums,js,data-id=planets]
143
+ ----
144
+ let circumferenceReducer = ( c, planet ) => {
145
+ return c + planet.diameter * Math.PI;
146
+ }
147
+
148
+ let planets = [
149
+ { name: 'mars', diameter: 6779 },
150
+ { name: 'earth', diameter: 12742 },
151
+ { name: 'jupiter', diameter: 139820 }
152
+ ]
153
+
154
+ let c = planets.reduce( circumferenceReducer, 0 )
155
+ ----
156
+
157
+ [%auto-animate]
158
+ == Easing
159
+
160
+ [%hardbreaks.small]
161
+ The attribute `auto-animate-easing` is used to control the speed of the transition.
162
+ You can use any value supported by https://developer.mozilla.org/fr/docs/Web/CSS/transition-timing-function[transition-timing-function].
163
+
164
+ For instance:
165
+ [source,asciidoc]
166
+ ----
167
+ [%auto-animate,auto-animate-easing="ease-in-out"]
168
+ == Easing In Out
169
+ ----
170
+
171
+ [%auto-animate,auto-animate-easing="ease-in-out"]
172
+ == Easing In Out
173
+
174
+ 🏓 Ping?
175
+
176
+ [%auto-animate,auto-animate-easing="ease-in-out"]
177
+ == Easing In Out
178
+
179
+ 🏓 Ping?
180
+
181
+ Pong! 🏓
182
+
183
+ [%auto-animate,auto-animate-easing="ease-in-out"]
184
+ == Easing In Out
185
+
186
+ 🏓 Ping?
187
+
188
+ Pong! 🏓
189
+
190
+ 🏓 Ping?
191
+
192
+ [%auto-animate,auto-animate-easing="ease-in-out"]
193
+ == Easing In Out
194
+
195
+ 🏓 Ping?
196
+
197
+ Pong! 🏓
198
+
199
+ 🏓 Ping?
200
+
201
+ Pong! 🏓
202
+
203
+ == Unmatched
204
+
205
+ [.small]
206
+ Determines whether elements with no matching `auto-animate` target should fade in.
207
+ Set to `false` to make them appear instantly.
208
+
209
+ For instance:
210
+
211
+ [source,asciidoc]
212
+ ----
213
+ [%auto-animate,auto-animate-unmatched=false]
214
+ == Unmatched
215
+
216
+ Introduction. (matched)
217
+
218
+ [%auto-animate,auto-animate-unmatched=false]
219
+ == Unmatched
220
+
221
+ Introduction. (matched)
222
+
223
+ This will be shown instantly ⚡ (unmatched)
224
+ ----
225
+
226
+ [%auto-animate,auto-animate-unmatched=false]
227
+ == Unmatched
228
+
229
+ Introduction. (matched)
230
+
231
+ [%auto-animate,auto-animate-unmatched=false]
232
+ == Unmatched
233
+
234
+ Introduction. (matched)
235
+
236
+ This will be shown instantly ⚡ (unmatched)
237
+
238
+ == Duration
239
+
240
+ Animation duration in seconds.
241
+
242
+ For instance:
243
+ [source,asciidoc]
244
+ ----
245
+ [%auto-animate,auto-animate-duration=5]
246
+ == Duration
247
+ ----
248
+
249
+ [%auto-animate,auto-animate-duration=5]
250
+ == Duration
251
+
252
+ This animation...
253
+
254
+ [%auto-animate,auto-animate-duration=5]
255
+ == Duration
256
+
257
+ This animation...
258
+
259
+ ...will take 5 seconds! ⌚
260
+
261
+ [%auto-animate]
262
+ == Delay
263
+
264
+ [.small]
265
+ Animation delay in seconds (can only be set for specific elements, not at the slide level)
266
+
267
+ For instance:
268
+ [source,asciidoc]
269
+ ----
270
+ [%auto-animate]
271
+ == Lift Off
272
+
273
+ Final countdown...
274
+
275
+ [%auto-animate]
276
+ == Lift Off
277
+
278
+ Final countdown...
279
+
280
+ [data-auto-animate-delay=1]
281
+ 3,
282
+ [data-auto-animate-delay=2]
283
+ 2,
284
+ [data-auto-animate-delay=3]
285
+ 1...
286
+ [data-auto-animate-delay=4]
287
+ Lift off! 🚀
288
+ ----
289
+
290
+ [%auto-animate]
291
+ == Lift Off
292
+
293
+ Final countdown...
294
+
295
+ [%auto-animate]
296
+ == Lift Off
297
+
298
+ Final countdown...
299
+
300
+ [data-auto-animate-delay=1]
301
+ 3,
302
+ [data-auto-animate-delay=2]
303
+ 2,
304
+ [data-auto-animate-delay=3]
305
+ 1...
306
+ [data-auto-animate-delay=4]
307
+ Lift off! 🚀
308
+
309
+ == Id and Restart
310
+
311
+ When you want separate groups of auto-animated slides right next to each other you can use the `auto-animate-id` and `auto-animate-restart` attributes.
312
+
313
+ == Id and Restart
314
+
315
+ Two adjacent slides will only auto-animate if they have the same id or if both don't have one.
316
+
317
+ == Id and Restart
318
+
319
+ `auto-animate-restart` will prevent auto-animate between the previous slide even if they have the same id but _not_ between it and the next slide.
320
+
321
+ [%auto-animate]
322
+ == !
323
+
324
+ First Item
325
+
326
+ [%auto-animate]
327
+ == !
328
+
329
+ First Item
330
+
331
+ Second Item
332
+
333
+ [%auto-animate%auto-animate-restart]
334
+ == !
335
+
336
+ First Item
337
+
338
+ Second Item
339
+
340
+ Third Item (restart)
341
+
342
+ [%auto-animate]
343
+ == !
344
+
345
+ First Item
346
+
347
+ Second Item
348
+
349
+ Third Item (restart)
350
+
351
+ Fourth Item
@@ -0,0 +1,13 @@
1
+ // .favicon
2
+ // Include default favicon (`./favicon.ico`)
3
+ // :include: //head/link[@rel="icon"]
4
+ // :header_footer:
5
+ = Favicon
6
+ :favicon:
7
+
8
+ // .favicon-by-path
9
+ // Include favicon by path
10
+ // :include: //head/link[@rel="icon"]
11
+ // :header_footer:
12
+ = Favicon by Path
13
+ :favicon: img/favicon.png
@@ -4,7 +4,7 @@
4
4
  // :header_footer:
5
5
  = MathJax
6
6
  :stem:
7
- :revealjsdir: https://cdn.jsdelivr.net/npm/reveal.js@3.9.2
7
+ :revealjsdir: https://cdn.jsdelivr.net/npm/reveal.js@4.1.1
8
8
  :mathjaxdir: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/
9
9
 
10
10
  == Math Equation
@@ -4,7 +4,7 @@
4
4
  // :header_footer:
5
5
  = MathJax
6
6
  :stem:
7
- :revealjsdir: https://cdn.jsdelivr.net/npm/reveal.js@3.9.2
7
+ :revealjsdir: https://cdn.jsdelivr.net/npm/reveal.js@4.1.2
8
8
 
9
9
  == Math Equation
10
10
 
@@ -3,7 +3,7 @@
3
3
  // :header_footer:
4
4
  = Use a Custom reveal.js Theme
5
5
  // please note that in this specific case it would be better to use :revealjs_theme: beige
6
- :revealjs_customtheme: reveal.js/css/theme/beige.css
6
+ :revealjs_customtheme: reveal.js/dist/theme/beige.css
7
7
 
8
8
  == Beige is the New Black
9
9