asciidoctor-revealjs 4.1.0 → 5.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (88) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +7 -2
  3. data/README.adoc +12 -1351
  4. data/asciidoctor-revealjs.gemspec +2 -3
  5. data/examples/auto-animate-code.adoc +47 -0
  6. data/examples/auto-animate.adoc +351 -0
  7. data/examples/favicon.adoc +13 -0
  8. data/examples/images/sample.svg +27 -0
  9. data/examples/mathjax-cdn.adoc +1 -1
  10. data/examples/mathjax.adoc +1 -1
  11. data/examples/revealjs-custom-theme.adoc +1 -1
  12. data/examples/revealjs-plugin-activation.adoc +3 -2
  13. data/examples/revealjs-plugins/chalkboard/README.md +94 -61
  14. data/examples/revealjs-plugins/chalkboard/img/boardmarker-black.png +0 -0
  15. data/examples/revealjs-plugins/chalkboard/img/boardmarker-blue.png +0 -0
  16. data/examples/revealjs-plugins/chalkboard/img/boardmarker-green.png +0 -0
  17. data/examples/revealjs-plugins/chalkboard/img/boardmarker-orange.png +0 -0
  18. data/examples/revealjs-plugins/chalkboard/img/boardmarker-purple.png +0 -0
  19. data/examples/revealjs-plugins/chalkboard/img/boardmarker-red.png +0 -0
  20. data/examples/revealjs-plugins/chalkboard/img/boardmarker-yellow.png +0 -0
  21. data/examples/revealjs-plugins/chalkboard/img/chalk-blue.png +0 -0
  22. data/examples/revealjs-plugins/chalkboard/img/chalk-green.png +0 -0
  23. data/examples/revealjs-plugins/chalkboard/img/chalk-orange.png +0 -0
  24. data/examples/revealjs-plugins/chalkboard/img/chalk-purple.png +0 -0
  25. data/examples/revealjs-plugins/chalkboard/img/chalk-red.png +0 -0
  26. data/examples/revealjs-plugins/chalkboard/img/chalk-yellow.png +0 -0
  27. data/examples/revealjs-plugins/chalkboard/plugin.js +1836 -0
  28. data/examples/revealjs-plugins/chalkboard/style.css +38 -0
  29. data/examples/revealjs-plugins/{reveal.js-menu → menu}/LICENSE +1 -1
  30. data/examples/revealjs-plugins/menu/README.md +368 -0
  31. data/examples/revealjs-plugins/{reveal.js-menu → menu}/menu.css +116 -115
  32. data/examples/revealjs-plugins/menu/menu.esm.js +1 -0
  33. data/examples/revealjs-plugins/menu/menu.js +1 -0
  34. data/examples/revealjs-plugins/menu/plugin.js +1252 -0
  35. data/examples/revealjs-plugins-docinfo-footer.html +20 -0
  36. data/examples/revealjs-plugins.adoc +2 -3
  37. data/examples/search-plugin.adoc +26 -0
  38. data/examples/source-rouge.adoc +1 -1
  39. data/examples/svg-images-docinfo-revealjs.html +15 -0
  40. data/examples/svg-images.adoc +41 -0
  41. data/examples/text-formatting.adoc +34 -0
  42. data/lib/asciidoctor-revealjs/converter.rb +819 -686
  43. data/lib/asciidoctor-revealjs/highlightjs.rb +155 -14
  44. data/lib/asciidoctor-revealjs/version.rb +1 -1
  45. data/templates/asciidoctor-compatibility.css +26 -1
  46. data/templates/document.html.slim +28 -44
  47. data/templates/helpers.rb +188 -10
  48. data/templates/image.html.slim +1 -16
  49. data/templates/inline_image.html.slim +1 -20
  50. data/templates/inline_quoted.html.slim +2 -2
  51. data/templates/listing.html.slim +2 -1
  52. data/templates/section.html.slim +7 -1
  53. data/templates/title_slide.html.slim +1 -2
  54. metadata +58 -81
  55. data/examples/revealjs-plugins/chalkboard/chalkboard.js +0 -1288
  56. data/examples/revealjs-plugins/chalkboard/img/boardmarker.png +0 -0
  57. data/examples/revealjs-plugins/reveal.js-menu/CONTRIBUTING.md +0 -9
  58. data/examples/revealjs-plugins/reveal.js-menu/README.md +0 -334
  59. data/examples/revealjs-plugins/reveal.js-menu/bower.json +0 -21
  60. data/examples/revealjs-plugins/reveal.js-menu/menu.js +0 -949
  61. data/examples/revealjs-plugins/reveal.js-menu/package.json +0 -22
  62. data/examples/revealjs-plugins-conf.js +0 -10
  63. data/examples/revealjs-plugins.js +0 -2
  64. /data/examples/revealjs-plugins/chalkboard/img/{chalk.png → chalk-white.png} +0 -0
  65. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/LICENSE.txt +0 -0
  66. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/all.css +0 -0
  67. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/brands.css +0 -0
  68. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/fontawesome.css +0 -0
  69. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/regular.css +0 -0
  70. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/solid.css +0 -0
  71. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/svg-with-js.css +0 -0
  72. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/v4-shims.css +0 -0
  73. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/css/v4-shims.min.css +0 -0
  74. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-brands-400.eot +0 -0
  75. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-brands-400.svg +0 -0
  76. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-brands-400.ttf +0 -0
  77. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-brands-400.woff +0 -0
  78. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-brands-400.woff2 +0 -0
  79. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-regular-400.eot +0 -0
  80. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-regular-400.svg +0 -0
  81. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-regular-400.ttf +0 -0
  82. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-regular-400.woff +0 -0
  83. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-regular-400.woff2 +0 -0
  84. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-solid-900.eot +0 -0
  85. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-solid-900.svg +0 -0
  86. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-solid-900.ttf +0 -0
  87. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-solid-900.woff +0 -0
  88. /data/examples/revealjs-plugins/{reveal.js-menu → menu}/font-awesome/webfonts/fa-solid-900.woff2 +0 -0
@@ -1,9 +0,0 @@
1
- ## Contributing
2
-
3
- ### Bug Reports
4
- When reporting a bug make sure to include information about which browser and operating system you are on as well as the necessary steps to reproduce the issue. If possible please include a link to a sample presentation where the bug can be tested.
5
-
6
- ### Pull Requests
7
- - Should follow the coding style of the file you work in
8
- - Should be made towards the **dev branch**
9
- - Should be submitted from a feature/topic branch (not your master)
@@ -1,334 +0,0 @@
1
- # reveal.js-menu
2
-
3
- A slideout menu plugin for [Reveal.js](https://github.com/hakimel/reveal.js) to quickly jump to any slide by title. Also optionally change the theme and set the default transition. [Check out the live demo](https://denehyg.github.io/reveal.js-menu)
4
-
5
- ## Installation
6
-
7
- ### Bower
8
-
9
- Download and install the package in your project:
10
-
11
- ```bower install reveal.js-menu```
12
-
13
- Add the plugin to the dependencies in your presentation, as below.
14
-
15
- ```javascript
16
- Reveal.initialize({
17
- // ...
18
-
19
- dependencies: [
20
- // ...
21
-
22
- { src: 'bower_components/reveal.js-menu/menu.js' }
23
- ]
24
- });
25
- ```
26
-
27
- ### npm
28
-
29
- Download and install the package in your project:
30
-
31
- ```npm install --save reveal.js-menu```
32
-
33
- Add the plugin to the dependencies in your presentation, as below.
34
-
35
- ```javascript
36
- Reveal.initialize({
37
- // ...
38
-
39
- dependencies: [
40
- // ...
41
-
42
- { src: 'node_modules/reveal.js-menu/menu.js' }
43
- ]
44
- });
45
- ```
46
-
47
- ### Manual
48
-
49
- Copy this repository into the plugins folder of your reveal.js presentation, ie ```plugins/menu```.
50
-
51
- Add the plugin to the dependencies in your presentation, as below.
52
-
53
- ```javascript
54
- Reveal.initialize({
55
- // ...
56
-
57
- dependencies: [
58
- // ...
59
-
60
- { src: 'plugin/menu/menu.js' }
61
- ]
62
- });
63
- ```
64
-
65
- ## Configuration
66
-
67
- You can configure the menu for your presentation by providing a ```menu``` option in the reveal.js initialization options. Note that all config values are optional and will default as specified below.
68
-
69
- ```javascript
70
- Reveal.initialize({
71
- // ...
72
-
73
- menu: {
74
- // Specifies which side of the presentation the menu will
75
- // be shown. Use 'left' or 'right'.
76
- side: 'left',
77
-
78
- // Specifies the width of the menu.
79
- // Can be one of the following:
80
- // 'normal', 'wide', 'third', 'half', 'full', or
81
- // any valid css length value
82
- width: 'normal',
83
-
84
- // Add slide numbers to the titles in the slide list.
85
- // Use 'true' or format string (same as reveal.js slide numbers)
86
- numbers: false,
87
-
88
- // Specifies which slide elements will be used for generating
89
- // the slide titles in the menu. The default selects the first
90
- // heading element found in the slide, but you can specify any
91
- // valid css selector and the text from the first matching
92
- // element will be used.
93
- // Note: that a section data-menu-title attribute or an element
94
- // with a menu-title class will take precedence over this option
95
- titleSelector: 'h1, h2, h3, h4, h5, h6',
96
-
97
- // If slides do not have a matching title, attempt to use the
98
- // start of the text content as the title instead
99
- useTextContentForMissingTitles: false,
100
-
101
- // Hide slides from the menu that do not have a title.
102
- // Set to 'true' to only list slides with titles.
103
- hideMissingTitles: false,
104
-
105
- // Adds markers to the slide titles to indicate the
106
- // progress through the presentation. Set to 'false'
107
- // to hide the markers.
108
- markers: true,
109
-
110
- // Specify custom panels to be included in the menu, by
111
- // providing an array of objects with 'title', 'icon'
112
- // properties, and either a 'src' or 'content' property.
113
- custom: false,
114
-
115
- // Specifies the themes that will be available in the themes
116
- // menu panel. Set to 'true' to show the themes menu panel
117
- // with the default themes list. Alternatively, provide an
118
- // array to specify the themes to make available in the
119
- // themes menu panel, for example...
120
- // [
121
- // { name: 'Black', theme: 'css/theme/black.css' },
122
- // { name: 'White', theme: 'css/theme/white.css' },
123
- // { name: 'League', theme: 'css/theme/league.css' }
124
- // ]
125
- themes: false,
126
-
127
- // Specifies the path to the default theme files. If your
128
- // presentation uses a different path to the standard reveal
129
- // layout then you need to provide this option, but only
130
- // when 'themes' is set to 'true'. If you provide your own
131
- // list of themes or 'themes' is set to 'false' the
132
- // 'themesPath' option is ignored.
133
- themesPath: 'css/theme/',
134
-
135
- // Specifies if the transitions menu panel will be shown.
136
- // Set to 'true' to show the transitions menu panel with
137
- // the default transitions list. Alternatively, provide an
138
- // array to specify the transitions to make available in
139
- // the transitions panel, for example...
140
- // ['None', 'Fade', 'Slide']
141
- transitions: false,
142
-
143
- // Adds a menu button to the slides to open the menu panel.
144
- // Set to 'false' to hide the button.
145
- openButton: true,
146
-
147
- // If 'true' allows the slide number in the presentation to
148
- // open the menu panel. The reveal.js slideNumber option must
149
- // be displayed for this to take effect
150
- openSlideNumber: false,
151
-
152
- // If true allows the user to open and navigate the menu using
153
- // the keyboard. Standard keyboard interaction with reveal
154
- // will be disabled while the menu is open.
155
- keyboard: true,
156
-
157
- // Normally the menu will close on user actions such as
158
- // selecting a menu item, or clicking the presentation area.
159
- // If 'true', the sticky option will leave the menu open
160
- // until it is explicitly closed, that is, using the close
161
- // button or pressing the ESC or m key (when the keyboard
162
- // interaction option is enabled).
163
- sticky: false,
164
-
165
- // If 'true' standard menu items will be automatically opened
166
- // when navigating using the keyboard. Note: this only takes
167
- // effect when both the 'keyboard' and 'sticky' options are enabled.
168
- autoOpen: true,
169
-
170
- // If 'true' the menu will not be created until it is explicitly
171
- // requested by calling RevealMenu.init(). Note this will delay
172
- // the creation of all menu panels, including custom panels, and
173
- // the menu button.
174
- delayInit: false,
175
-
176
- // If 'true' the menu will be shown when the menu is initialised.
177
- openOnInit: false,
178
-
179
- // By default the menu will load it's own font-awesome library
180
- // icons. If your presentation needs to load a different
181
- // font-awesome library the 'loadIcons' option can be set to false
182
- // and the menu will not attempt to load the font-awesome library.
183
- loadIcons: true
184
- },
185
-
186
- });
187
- ```
188
-
189
- ### Themes Stylesheet
190
-
191
- If you are using the themes panel you need to ensure the theme stylesheet in the presentation uses the ```id="theme"``` attribute. For example...
192
- ```html
193
- <link rel="stylesheet" href="css/theme/black.css" id="theme">
194
- ```
195
-
196
- ## Slide Titles
197
-
198
- The slide titles used in the menu can be supplied explicitly or are taken directly from the presentation, using the following rules...
199
-
200
- ###### 1. The section's ```data-menu-title``` attribute.
201
- If the slide's section element contains a ```data-menu-title``` attribute this will be used for the slide title in the menu. For example...
202
-
203
- ```html
204
- <section data-menu-title="Custom Menu Title">
205
- <h1>Title</h1>
206
- <p>...</p>
207
- </section>
208
- ```
209
-
210
- ###### 2. Any element with the class ```menu-title```.
211
- If the slide's section contains an element with the class ```menu-title``` then the element's text will be used for the title. The first such element found will be used if there are more than one. Note the element need not be displayed to be used. For example...
212
-
213
- ```html
214
- <section>
215
- <h1>Title</h1>
216
- <span class="menu-title" style="display: none">Custom Menu Title</span>
217
- <p>...</p>
218
- </section>
219
- ```
220
-
221
- ###### 3. The first heading found or a custom element selector
222
- The ```titleSelector``` option can be used to customise the elements that will be used to generate the slide titles in the menu. The default option selects the first heading element found in the slide. For example...
223
-
224
- ```html
225
- <section>
226
- <h3>This will be the slide title in the menu</h3>
227
- <h1>Title</h1>
228
- <p>...</p>
229
- </section>
230
- ```
231
-
232
- Any valid CSS selector should work but note the selector will only be applied to elements contained within the slide section. You could use the ```'h1'``` selector to only use level 1 headings or ```'p'``` to use the first paragraph element. For example, ```titleSelector: 'p.lead'``` would be used like this...
233
-
234
- ```html
235
- <section>
236
- <h1>Title</h1>
237
- <p class="lead">This will be the slide title in the menu</p>
238
- <p>...</p>
239
- </section>
240
- ```
241
-
242
- Using ```titleSelector: ''``` will ignore all elements and no title will be provided, unless the slide section contains a ```data-menu-title``` attribute or an element with the ```menu-title``` class.
243
-
244
- ###### 4. No title is provided
245
- If no title can be found using the above methods, a default title incorporating the slide number will be used. For example, the following would result in a slide title in the format of 'Slide 12'...
246
-
247
- ```html
248
- <section>
249
- <p>...</p>
250
- </section>
251
- ```
252
-
253
- If the ```hideMissingTitles``` option is set to ```true```, however, the slide will not be listed in the menu.
254
-
255
-
256
- ## Custom Menu Panels
257
-
258
- Additional custom panels can be added the menu using the ```custom``` option.
259
-
260
- ```javascript
261
- Reveal.initialize({
262
- // ...
263
-
264
- menu: {
265
- // ...
266
-
267
- custom: [
268
- { title: 'Links', icon: '<i class="fa fa-external-link">', src: 'links.html' },
269
- { title: 'About', icon: '<i class="fa fa-info">', content: '<p>This slidedeck is created with reveal.js</p>' }
270
- ]
271
- }
272
- });
273
- ```
274
-
275
- ```title``` and ```icon``` are used for the toolbar buttons at the top of the menu. There are two approaches you can use to provide content for the panels...
276
-
277
- * You can provide a URL in ```src``` to load html from another file.
278
- * Alternatively, you can provide html in ```content``` and this will be added to the custom panel.
279
-
280
- ###### Custom slide menu items
281
-
282
- You can provide menu items in your custom panels using the following format. This allows you to define your own navigation links for your presentation.
283
-
284
- ```html
285
- <h1>Links</h1>
286
- <ul class="slide-menu-items">
287
- <li class="slide-menu-item"><a href="#/transitions">Transitions</a></li>
288
- <li class="slide-menu-item"><a href="#/13">Code highlighting</a></li>
289
- </ul>
290
- ```
291
-
292
- You are not limited to linking to presentation slides. You can provide any link you wish.
293
-
294
- ```html
295
- <h1>External Links</h1>
296
- <ul class="slide-menu-items">
297
- <li class="slide-menu-item"><a href="https://github.com/denehyg/reveal.js-menu">Reveal.js-menu</a></li>
298
- <li class="slide-menu-item"><a href="https://github.com/hakimel/reveal.js">Reveal.js</a></li>
299
- </ul>
300
- ```
301
-
302
- Using menu items enables keyboard navigation of your links as with the other panels. However, you don't have to use menu items for your links. You can simply provide standard links and unordered lists in your html. Notice you can provide your custom menu items mixed with other html if you wish.
303
-
304
-
305
- ## Ready Event
306
-
307
- A 'menu-ready' event is fired when reveal.js-menu has loaded all non-async dependencies and is ready to start navigating.
308
-
309
- ```javascript
310
- Reveal.addEventListener( 'menu-ready', function( event ) {
311
- // your code
312
- } );
313
- ```
314
-
315
- ## API
316
-
317
- The `RevealMenu` object exposes a JavaScript API for controlling the menu:
318
-
319
- | Function | Description |
320
- |--------------------------|---------------|
321
- | toggle(event) | Toggles the open state of the menu, ie open if it is closed, and close if it is open |
322
- | openMenu(event) | Opens the menu |
323
- | closeMenu(event, force) | Closes the menu. To force the menu to close (ie when `sticky` option is `true`) call `closeMenu(null, true)` |
324
- | openPanel(event, ref) | Opens the menu to a specific panel, passing the name of the panel or the panel element itself |
325
- | isOpen() | Returns true if the menu is open |
326
- | init() | Initialises the menu if it has not already been initialised. Used in conjunction with the `delayInit` option |
327
- | isInit() | Returns true if the menu has been initialised |
328
-
329
-
330
- ## License
331
-
332
- MIT licensed
333
-
334
- Copyright (C) 2015 Greg Denehy
@@ -1,21 +0,0 @@
1
- {
2
- "name": "reveal.js-menu",
3
- "version": "1.1.3",
4
- "homepage": "https://denehyg.github.io/reveal.js-menu",
5
- "authors": [
6
- "Greg Denehy"
7
- ],
8
- "description": "A slideout menu for navigating reveal.js presentations",
9
- "keywords": [
10
- "reveal",
11
- "menu"
12
- ],
13
- "license": "MIT, Copyright (C) 2016 Greg Denehy",
14
- "ignore": [
15
- "**/.*",
16
- "node_modules",
17
- "bower_components",
18
- "test",
19
- "tests"
20
- ]
21
- }