asciidoctor-revealjs 3.0.0.pre.rc1 → 4.1.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (92) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.adoc +1 -1
  3. data/README.adoc +416 -64
  4. data/Rakefile +30 -7
  5. data/asciidoctor-revealjs.gemspec +6 -4
  6. data/bin/asciidoctor-revealjs +7 -0
  7. data/examples/a11y-dark.css +99 -0
  8. data/examples/autoslide.adoc +22 -0
  9. data/examples/custom-layout.adoc +10 -0
  10. data/examples/customcss.adoc +1 -1
  11. data/examples/data-attributes.adoc +245 -0
  12. data/examples/docinfo-footer-revealjs.html +10 -0
  13. data/examples/docinfo-revealjs.html +7 -0
  14. data/examples/font-awesome-specific-version.adoc +11 -0
  15. data/examples/font-awesome.adoc +23 -4
  16. data/examples/font-awesome.css +3 -0
  17. data/examples/footnotes.adoc +46 -0
  18. data/examples/fragments.adoc +44 -0
  19. data/examples/fragments.css +18 -0
  20. data/examples/grid-layout-3x2.adoc +50 -0
  21. data/examples/grid-layout-docinfo-revealjs.html +11 -0
  22. data/examples/grid-layout.adoc +194 -0
  23. data/examples/history-hash.adoc +19 -0
  24. data/examples/history-regression-tests.adoc +0 -5
  25. data/examples/history.adoc +4 -4
  26. data/examples/images/asciidoctor-logo.svg +102 -0
  27. data/examples/images/cute-cat-1.jpg +0 -0
  28. data/examples/images/cute-cat-2.jpg +0 -0
  29. data/examples/images/cute-cat-3.jpg +0 -0
  30. data/examples/images/flock-of-seagulls_daniel-simion.mp3 +0 -0
  31. data/examples/issue-grid-layout-images.adoc +25 -0
  32. data/examples/level-sectnums.adoc +24 -0
  33. data/examples/links-preview.adoc +32 -0
  34. data/examples/links.adoc +39 -0
  35. data/examples/mathjax-cdn.adoc +21 -0
  36. data/examples/mathjax.adoc +20 -0
  37. data/examples/release-4.0.adoc +192 -0
  38. data/examples/release-4.0.css +23 -0
  39. data/examples/release-4.1.adoc +133 -0
  40. data/examples/release-4.1.css +50 -0
  41. data/examples/revealjs-custom-theme.adoc +10 -0
  42. data/examples/source-coderay.adoc +15 -0
  43. data/examples/source-emphasis.adoc +128 -0
  44. data/examples/source-highlightjs-html.adoc +1 -1
  45. data/examples/source-highlightjs-languages.adoc +27 -0
  46. data/examples/source-highlightjs.adoc +85 -2
  47. data/examples/source-pygments.adoc +12 -0
  48. data/examples/source-rouge-docinfo.html +8 -0
  49. data/examples/source-rouge.adoc +18 -0
  50. data/examples/steps.adoc +87 -0
  51. data/examples/text-alignments.adoc +44 -0
  52. data/examples/video.adoc +30 -8
  53. data/examples/with-docinfo-shared.adoc +13 -0
  54. data/lib/asciidoctor-revealjs/converter.rb +1053 -769
  55. data/lib/asciidoctor-revealjs/highlightjs.rb +333 -2
  56. data/lib/asciidoctor-revealjs/version.rb +1 -1
  57. data/templates/admonition.html.slim +1 -1
  58. data/templates/asciidoctor-compatibility.css +390 -0
  59. data/templates/audio.html.slim +1 -1
  60. data/templates/colist.html.slim +1 -1
  61. data/templates/dlist.html.slim +3 -3
  62. data/templates/document.html.slim +76 -59
  63. data/templates/example.html.slim +1 -1
  64. data/templates/helpers.rb +170 -5
  65. data/templates/image.html.slim +3 -3
  66. data/templates/inline_anchor.html.slim +6 -4
  67. data/templates/inline_button.html.slim +2 -1
  68. data/templates/inline_footnote.html.slim +11 -4
  69. data/templates/inline_image.html.slim +5 -8
  70. data/templates/inline_kbd.html.slim +3 -2
  71. data/templates/inline_menu.html.slim +4 -3
  72. data/templates/inline_quoted.html.slim +13 -21
  73. data/templates/listing.html.slim +15 -10
  74. data/templates/literal.html.slim +1 -1
  75. data/templates/olist.html.slim +2 -2
  76. data/templates/open.html.slim +3 -3
  77. data/templates/paragraph.html.slim +1 -1
  78. data/templates/quote.html.slim +1 -1
  79. data/templates/section.html.slim +51 -43
  80. data/templates/sidebar.html.slim +1 -1
  81. data/templates/stem.html.slim +1 -1
  82. data/templates/stretch_nested_elements.js.slim +65 -0
  83. data/templates/table.html.slim +3 -2
  84. data/templates/title_slide.html.slim +28 -0
  85. data/templates/ulist.html.slim +3 -3
  86. data/templates/verse.html.slim +1 -1
  87. data/templates/video.html.slim +14 -8
  88. metadata +79 -16
  89. data/CHANGELOG.adoc +0 -396
  90. data/HACKING.adoc +0 -343
  91. data/examples/revealjs-features.adoc +0 -23
  92. data/templates/asciidoctor_revealjs.css.slim +0 -59
@@ -6,15 +6,34 @@ module Asciidoctor
6
6
  class HighlightJsAdapter < Asciidoctor::SyntaxHighlighter::Base
7
7
  register_for 'highlightjs', 'highlight.js'
8
8
 
9
+ HIGHLIGHT_JS_VERSION = '9.18.1'
10
+
9
11
  def initialize *args
10
12
  super
11
13
  @name = @pre_class = 'highlightjs'
12
14
  end
13
15
 
16
+ # Convert between highlight notation formats
17
+ # In addition to Asciidoctor's linenum converter leveraging core's resolve_lines_to_highlight,
18
+ # we also support reveal.js step-by-step highlights.
19
+ # The steps are split using the | character
20
+ # For example, this method makes "1..3|6,7" into "1,2,3|6,7"
21
+ def _convert_highlight_to_revealjs node
22
+ return node.attributes["highlight"].split("|").collect { |linenums|
23
+ node.resolve_lines_to_highlight(node.content, linenums).join(",")
24
+ }.join("|")
25
+ end
26
+
14
27
  def format node, lang, opts
15
28
  super node, lang, (opts.merge transform: proc { |_, code|
16
29
  code['class'] = %(language-#{lang || 'none'} hljs)
17
30
  code['data-noescape'] = true
31
+
32
+ if node.attributes.key?("highlight")
33
+ code['data-line-numbers'] = self._convert_highlight_to_revealjs(node)
34
+ elsif node.attributes.key?("linenums")
35
+ code['data-line-numbers'] = ''
36
+ end
18
37
  })
19
38
  end
20
39
 
@@ -31,10 +50,322 @@ module Asciidoctor
31
50
  if doc.attr? 'highlightjs-theme'
32
51
  theme_href = doc.attr 'highlightjs-theme'
33
52
  else
34
- theme_href = "#{revealjsdir}/lib/css/zenburn.css"
53
+ theme_href = "#{revealjsdir}/lib/css/monokai.css"
35
54
  end
36
- %(<link rel="stylesheet" href="#{theme_href}"#{opts[:self_closing_tag_slash]}>)
55
+ base_url = doc.attr 'highlightjsdir', %(#{opts[:cdn_base_url]}/highlight.js/#{HIGHLIGHT_JS_VERSION})
56
+ %(<link rel="stylesheet" href="#{theme_href}"#{opts[:self_closing_tag_slash]}>
57
+ <script src="#{base_url}/highlight.min.js"></script>
58
+ #{(doc.attr? 'highlightjs-languages') ? ((doc.attr 'highlightjs-languages').split ',').map {|lang| %[<script src="#{base_url}/languages/#{lang.lstrip}.min.js"></script>\n] }.join : ''}
59
+ <script>
60
+ #{HIGHLIGHT_PLUGIN_SOURCE}
61
+ hljs.initHighlightingOnLoad();
62
+ </script>)
37
63
  end
64
+
65
+ # this file was copied-pasted from https://raw.githubusercontent.com/hakimel/reveal.js/3.9.2/plugin/highlight/highlight.js
66
+ # please note that the bundled highlight.js code was removed so we can use the latest version from cdnjs.
67
+ HIGHLIGHT_PLUGIN_SOURCE = %q{
68
+ /* highlightjs-line-numbers.js 2.6.0 | (C) 2018 Yauheni Pakala | MIT License | github.com/wcoder/highlightjs-line-numbers.js */
69
+ /* Edited by Hakim for reveal.js; removed async timeout */
70
+ !function(n,e){"use strict";function t(){var n=e.createElement("style");n.type="text/css",n.innerHTML=g(".{0}{border-collapse:collapse}.{0} td{padding:0}.{1}:before{content:attr({2})}",[v,L,b]),e.getElementsByTagName("head")[0].appendChild(n)}function r(t){"interactive"===e.readyState||"complete"===e.readyState?i(t):n.addEventListener("DOMContentLoaded",function(){i(t)})}function i(t){try{var r=e.querySelectorAll("code.hljs,code.nohighlight");for(var i in r)r.hasOwnProperty(i)&&l(r[i],t)}catch(o){n.console.error("LineNumbers error: ",o)}}function l(n,e){"object"==typeof n&&f(function(){n.innerHTML=s(n,e)})}function o(n,e){if("string"==typeof n){var t=document.createElement("code");return t.innerHTML=n,s(t,e)}}function s(n,e){e=e||{singleLine:!1};var t=e.singleLine?0:1;return c(n),a(n.innerHTML,t)}function a(n,e){var t=u(n);if(""===t[t.length-1].trim()&&t.pop(),t.length>e){for(var r="",i=0,l=t.length;i<l;i++)r+=g('<tr><td class="{0}"><div class="{1} {2}" {3}="{5}"></div></td><td class="{4}"><div class="{1}">{6}</div></td></tr>',[j,m,L,b,p,i+1,t[i].length>0?t[i]:" "]);return g('<table class="{0}">{1}</table>',[v,r])}return n}function c(n){var e=n.childNodes;for(var t in e)if(e.hasOwnProperty(t)){var r=e[t];h(r.textContent)>0&&(r.childNodes.length>0?c(r):d(r.parentNode))}}function d(n){var e=n.className;if(/hljs-/.test(e)){for(var t=u(n.innerHTML),r=0,i="";r<t.length;r++){var l=t[r].length>0?t[r]:" ";i+=g('<span class="{0}">{1}</span>\n',[e,l])}n.innerHTML=i.trim()}}function u(n){return 0===n.length?[]:n.split(y)}function h(n){return(n.trim().match(y)||[]).length}function f(e){e()}function g(n,e){return n.replace(/\{(\d+)\}/g,function(n,t){return e[t]?e[t]:n})}var v="hljs-ln",m="hljs-ln-line",p="hljs-ln-code",j="hljs-ln-numbers",L="hljs-ln-n",b="data-line-number",y=/\r\n|\r|\n/g;n.hljs?(n.hljs.initLineNumbersOnLoad=r,n.hljs.lineNumbersBlock=l,n.hljs.lineNumbersValue=o,t()):n.console.error("highlight.js not detected!")}(window,document);
71
+
72
+ /**
73
+ * This reveal.js plugin is wrapper around the highlight.js
74
+ * syntax highlighting library.
75
+ */
76
+ (function( root, factory ) {
77
+ if (typeof define === 'function' && define.amd) {
78
+ root.RevealHighlight = factory();
79
+ } else if( typeof exports === 'object' ) {
80
+ module.exports = factory();
81
+ } else {
82
+ // Browser globals (root is window)
83
+ root.RevealHighlight = factory();
84
+ }
85
+ }( this, function() {
86
+
87
+ // Function to perform a better "data-trim" on code snippets
88
+ // Will slice an indentation amount on each line of the snippet (amount based on the line having the lowest indentation length)
89
+ function betterTrim(snippetEl) {
90
+ // Helper functions
91
+ function trimLeft(val) {
92
+ // Adapted from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/Trim#Polyfill
93
+ return val.replace(/^[\s\uFEFF\xA0]+/g, '');
94
+ }
95
+ function trimLineBreaks(input) {
96
+ var lines = input.split('\n');
97
+
98
+ // Trim line-breaks from the beginning
99
+ for (var i = 0; i < lines.length; i++) {
100
+ if (lines[i].trim() === '') {
101
+ lines.splice(i--, 1);
102
+ } else break;
103
+ }
104
+
105
+ // Trim line-breaks from the end
106
+ for (var i = lines.length-1; i >= 0; i--) {
107
+ if (lines[i].trim() === '') {
108
+ lines.splice(i, 1);
109
+ } else break;
110
+ }
111
+
112
+ return lines.join('\n');
113
+ }
114
+
115
+ // Main function for betterTrim()
116
+ return (function(snippetEl) {
117
+ var content = trimLineBreaks(snippetEl.innerHTML);
118
+ var lines = content.split('\n');
119
+ // Calculate the minimum amount to remove on each line start of the snippet (can be 0)
120
+ var pad = lines.reduce(function(acc, line) {
121
+ if (line.length > 0 && trimLeft(line).length > 0 && acc > line.length - trimLeft(line).length) {
122
+ return line.length - trimLeft(line).length;
123
+ }
124
+ return acc;
125
+ }, Number.POSITIVE_INFINITY);
126
+ // Slice each line with this amount
127
+ return lines.map(function(line, index) {
128
+ return line.slice(pad);
129
+ })
130
+ .join('\n');
131
+ })(snippetEl);
132
+ }
133
+
134
+ var RevealHighlight = {
135
+
136
+ HIGHLIGHT_STEP_DELIMITER: '|',
137
+ HIGHLIGHT_LINE_DELIMITER: ',',
138
+ HIGHLIGHT_LINE_RANGE_DELIMITER: '-',
139
+
140
+ init: function() {
141
+
142
+ // Read the plugin config options and provide fallbacks
143
+ var config = Reveal.getConfig().highlight || {};
144
+ config.highlightOnLoad = typeof config.highlightOnLoad === 'boolean' ? config.highlightOnLoad : true;
145
+ config.escapeHTML = typeof config.escapeHTML === 'boolean' ? config.escapeHTML : true;
146
+
147
+ [].slice.call( document.querySelectorAll( '.reveal pre code' ) ).forEach( function( block ) {
148
+
149
+ // Trim whitespace if the "data-trim" attribute is present
150
+ if( block.hasAttribute( 'data-trim' ) && typeof block.innerHTML.trim === 'function' ) {
151
+ block.innerHTML = betterTrim( block );
152
+ }
153
+
154
+ // Escape HTML tags unless the "data-noescape" attrbute is present
155
+ if( config.escapeHTML && !block.hasAttribute( 'data-noescape' )) {
156
+ block.innerHTML = block.innerHTML.replace( /</g,"&lt;").replace(/>/g, '&gt;' );
157
+ }
158
+
159
+ // Re-highlight when focus is lost (for contenteditable code)
160
+ block.addEventListener( 'focusout', function( event ) {
161
+ hljs.highlightBlock( event.currentTarget );
162
+ }, false );
163
+
164
+ if( config.highlightOnLoad ) {
165
+ RevealHighlight.highlightBlock( block );
166
+ }
167
+ } );
168
+
169
+ },
170
+
171
+ /**
172
+ * Highlights a code block. If the <code> node has the
173
+ * 'data-line-numbers' attribute we also generate slide
174
+ * numbers.
175
+ *
176
+ * If the block contains multiple line highlight steps,
177
+ * we clone the block and create a fragment for each step.
178
+ */
179
+ highlightBlock: function( block ) {
180
+
181
+ hljs.highlightBlock( block );
182
+
183
+ // Don't generate line numbers for empty code blocks
184
+ if( block.innerHTML.trim().length === 0 ) return;
185
+
186
+ if( block.hasAttribute( 'data-line-numbers' ) ) {
187
+ hljs.lineNumbersBlock( block, { singleLine: true } );
188
+
189
+ // If there is at least one highlight step, generate
190
+ // fragments
191
+ var highlightSteps = RevealHighlight.deserializeHighlightSteps( block.getAttribute( 'data-line-numbers' ) );
192
+ if( highlightSteps.length > 1 ) {
193
+
194
+ // If the original code block has a fragment-index,
195
+ // each clone should follow in an incremental sequence
196
+ var fragmentIndex = parseInt( block.getAttribute( 'data-fragment-index' ), 10 );
197
+ if( typeof fragmentIndex !== 'number' || isNaN( fragmentIndex ) ) {
198
+ fragmentIndex = null;
199
+ }
200
+
201
+ // Generate fragments for all steps except the original block
202
+ highlightSteps.slice(1).forEach( function( highlight ) {
203
+
204
+ var fragmentBlock = block.cloneNode( true );
205
+ fragmentBlock.setAttribute( 'data-line-numbers', RevealHighlight.serializeHighlightSteps( [ highlight ] ) );
206
+ fragmentBlock.classList.add( 'fragment' );
207
+ block.parentNode.appendChild( fragmentBlock );
208
+ RevealHighlight.highlightLines( fragmentBlock );
209
+
210
+ if( typeof fragmentIndex === 'number' ) {
211
+ fragmentBlock.setAttribute( 'data-fragment-index', fragmentIndex );
212
+ fragmentIndex += 1;
213
+ }
214
+ else {
215
+ fragmentBlock.removeAttribute( 'data-fragment-index' );
216
+ }
217
+
218
+ } );
219
+
220
+ block.removeAttribute( 'data-fragment-index' )
221
+ block.setAttribute( 'data-line-numbers', RevealHighlight.serializeHighlightSteps( [ highlightSteps[0] ] ) );
222
+
223
+ }
224
+
225
+ RevealHighlight.highlightLines( block );
226
+
227
+ }
228
+
229
+ },
230
+
231
+ /**
232
+ * Visually emphasize specific lines within a code block.
233
+ * This only works on blocks with line numbering turned on.
234
+ *
235
+ * @param {HTMLElement} block a <code> block
236
+ * @param {String} [linesToHighlight] The lines that should be
237
+ * highlighted in this format:
238
+ * "1" = highlights line 1
239
+ * "2,5" = highlights lines 2 & 5
240
+ * "2,5-7" = highlights lines 2, 5, 6 & 7
241
+ */
242
+ highlightLines: function( block, linesToHighlight ) {
243
+
244
+ var highlightSteps = RevealHighlight.deserializeHighlightSteps( linesToHighlight || block.getAttribute( 'data-line-numbers' ) );
245
+
246
+ if( highlightSteps.length ) {
247
+
248
+ highlightSteps[0].forEach( function( highlight ) {
249
+
250
+ var elementsToHighlight = [];
251
+
252
+ // Highlight a range
253
+ if( typeof highlight.end === 'number' ) {
254
+ elementsToHighlight = [].slice.call( block.querySelectorAll( 'table tr:nth-child(n+'+highlight.start+'):nth-child(-n+'+highlight.end+')' ) );
255
+ }
256
+ // Highlight a single line
257
+ else if( typeof highlight.start === 'number' ) {
258
+ elementsToHighlight = [].slice.call( block.querySelectorAll( 'table tr:nth-child('+highlight.start+')' ) );
259
+ }
260
+
261
+ if( elementsToHighlight.length ) {
262
+ elementsToHighlight.forEach( function( lineElement ) {
263
+ lineElement.classList.add( 'highlight-line' );
264
+ } );
265
+
266
+ block.classList.add( 'has-highlights' );
267
+ }
268
+
269
+ } );
270
+
271
+ }
272
+
273
+ },
274
+
275
+ /**
276
+ * Parses and formats a user-defined string of line
277
+ * numbers to highlight.
278
+ *
279
+ * @example
280
+ * RevealHighlight.deserializeHighlightSteps( '1,2|3,5-10' )
281
+ * // [
282
+ * // [ { start: 1 }, { start: 2 } ],
283
+ * // [ { start: 3 }, { start: 5, end: 10 } ]
284
+ * // ]
285
+ */
286
+ deserializeHighlightSteps: function( highlightSteps ) {
287
+
288
+ // Remove whitespace
289
+ highlightSteps = highlightSteps.replace( /\s/g, '' );
290
+
291
+ // Divide up our line number groups
292
+ highlightSteps = highlightSteps.split( RevealHighlight.HIGHLIGHT_STEP_DELIMITER );
293
+
294
+ return highlightSteps.map( function( highlights ) {
295
+
296
+ return highlights.split( RevealHighlight.HIGHLIGHT_LINE_DELIMITER ).map( function( highlight ) {
297
+
298
+ // Parse valid line numbers
299
+ if( /^[\d-]+$/.test( highlight ) ) {
300
+
301
+ highlight = highlight.split( RevealHighlight.HIGHLIGHT_LINE_RANGE_DELIMITER );
302
+
303
+ var lineStart = parseInt( highlight[0], 10 ),
304
+ lineEnd = parseInt( highlight[1], 10 );
305
+
306
+ if( isNaN( lineEnd ) ) {
307
+ return {
308
+ start: lineStart
309
+ };
310
+ }
311
+ else {
312
+ return {
313
+ start: lineStart,
314
+ end: lineEnd
315
+ };
316
+ }
317
+
318
+ }
319
+ // If no line numbers are provided, no code will be highlighted
320
+ else {
321
+
322
+ return {};
323
+
324
+ }
325
+
326
+ } );
327
+
328
+ } );
329
+
330
+ },
331
+
332
+ /**
333
+ * Serializes parsed line number data into a string so
334
+ * that we can store it in the DOM.
335
+ */
336
+ serializeHighlightSteps: function( highlightSteps ) {
337
+
338
+ return highlightSteps.map( function( highlights ) {
339
+
340
+ return highlights.map( function( highlight ) {
341
+
342
+ // Line range
343
+ if( typeof highlight.end === 'number' ) {
344
+ return highlight.start + RevealHighlight.HIGHLIGHT_LINE_RANGE_DELIMITER + highlight.end;
345
+ }
346
+ // Single line
347
+ else if( typeof highlight.start === 'number' ) {
348
+ return highlight.start;
349
+ }
350
+ // All lines
351
+ else {
352
+ return '';
353
+ }
354
+
355
+ } ).join( RevealHighlight.HIGHLIGHT_LINE_DELIMITER );
356
+
357
+ } ).join( RevealHighlight.HIGHLIGHT_STEP_DELIMITER );
358
+
359
+ }
360
+
361
+ }
362
+
363
+ Reveal.registerPlugin( 'highlight', RevealHighlight );
364
+
365
+ return RevealHighlight;
366
+
367
+ }));
368
+ }
38
369
  end
39
370
  end
40
371
  end
@@ -1,5 +1,5 @@
1
1
  module Asciidoctor
2
2
  module Revealjs
3
- VERSION = '3.0.0-rc1'
3
+ VERSION = '4.1.0.rc2'
4
4
  end
5
5
  end
@@ -1,7 +1,7 @@
1
1
  - if (has_role? 'aside') or (has_role? 'speaker') or (has_role? 'notes')
2
2
  include notes.html.slim
3
3
  - else
4
- .admonitionblock id=@id class=[(attr :name),role]
4
+ = html_tag('div', { :id => @id, :class => ['admonitionblock', (attr :name), role, ('fragment' if (option? :step) || (attr? 'step'))] }.merge(data_attrs(@attributes)))
5
5
  table: tr
6
6
  td.icon
7
7
  - if @document.attr? :icons, 'font'
@@ -0,0 +1,390 @@
1
+ .reveal div.right {
2
+ float: right
3
+ }
4
+
5
+ /* listing block */
6
+ .reveal .listingblock.stretch > .content {
7
+ height: 100%
8
+ }
9
+
10
+ .reveal .listingblock.stretch > .content > pre {
11
+ height: 100%
12
+ }
13
+
14
+ .reveal .listingblock.stretch > .content > pre > code {
15
+ height: 100%;
16
+ max-height: 100%
17
+ }
18
+
19
+ /* tables */
20
+ table {
21
+ border-collapse: collapse;
22
+ border-spacing: 0
23
+ }
24
+
25
+ table {
26
+ margin-bottom: 1.25em;
27
+ border: solid 1px #dedede
28
+ }
29
+
30
+ table thead tr th, table thead tr td, table tfoot tr th, table tfoot tr td {
31
+ padding: .5em .625em .625em;
32
+ font-size: inherit;
33
+ text-align: left
34
+ }
35
+
36
+ table tr th, table tr td {
37
+ padding: .5625em .625em;
38
+ font-size: inherit
39
+ }
40
+
41
+ table thead tr th, table tfoot tr th, table tbody tr td, table tr td, table tfoot tr td {
42
+ display: table-cell;
43
+ line-height: 1.6
44
+ }
45
+
46
+ td.tableblock > .content {
47
+ margin-bottom: 1.25em
48
+ }
49
+
50
+ td.tableblock > .content > :last-child {
51
+ margin-bottom: -1.25em
52
+ }
53
+
54
+ table.tableblock, th.tableblock, td.tableblock {
55
+ border: 0 solid #dedede
56
+ }
57
+
58
+ table.grid-all > thead > tr > .tableblock, table.grid-all > tbody > tr > .tableblock {
59
+ border-width: 0 1px 1px 0
60
+ }
61
+
62
+ table.grid-all > tfoot > tr > .tableblock {
63
+ border-width: 1px 1px 0 0
64
+ }
65
+
66
+ table.grid-cols > * > tr > .tableblock {
67
+ border-width: 0 1px 0 0
68
+ }
69
+
70
+ table.grid-rows > thead > tr > .tableblock, table.grid-rows > tbody > tr > .tableblock {
71
+ border-width: 0 0 1px
72
+ }
73
+
74
+ table.grid-rows > tfoot > tr > .tableblock {
75
+ border-width: 1px 0 0
76
+ }
77
+
78
+ table.grid-all > * > tr > .tableblock:last-child, table.grid-cols > * > tr > .tableblock:last-child {
79
+ border-right-width: 0
80
+ }
81
+
82
+ table.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 {
83
+ border-bottom-width: 0
84
+ }
85
+
86
+ table.frame-all {
87
+ border-width: 1px
88
+ }
89
+
90
+ table.frame-sides {
91
+ border-width: 0 1px
92
+ }
93
+
94
+ table.frame-topbot, table.frame-ends {
95
+ border-width: 1px 0
96
+ }
97
+
98
+ .reveal table th.halign-left, .reveal table td.halign-left {
99
+ text-align: left
100
+ }
101
+
102
+ .reveal table th.halign-right, .reveal table td.halign-right {
103
+ text-align: right
104
+ }
105
+
106
+ .reveal table th.halign-center, .reveal table td.halign-center {
107
+ text-align: center
108
+ }
109
+
110
+ .reveal table th.valign-top, .reveal table td.valign-top {
111
+ vertical-align: top
112
+ }
113
+
114
+ .reveal table th.valign-bottom, .reveal table td.valign-bottom {
115
+ vertical-align: bottom
116
+ }
117
+
118
+ .reveal table th.valign-middle, .reveal table td.valign-middle {
119
+ vertical-align: middle
120
+ }
121
+
122
+ table thead th, table tfoot th {
123
+ font-weight: bold
124
+ }
125
+
126
+ tbody tr th {
127
+ display: table-cell;
128
+ line-height: 1.6
129
+ }
130
+
131
+ tbody tr th, tbody tr th p, tfoot tr th, tfoot tr th p {
132
+ font-weight: bold
133
+ }
134
+
135
+ thead {
136
+ display: table-header-group
137
+ }
138
+
139
+ .reveal table.grid-none th, .reveal table.grid-none td {
140
+ border-bottom: 0 !important
141
+ }
142
+
143
+ /* kbd macro */
144
+ kbd {
145
+ font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace;
146
+ display: inline-block;
147
+ color: rgba(0, 0, 0, .8);
148
+ font-size: .65em;
149
+ line-height: 1.45;
150
+ background: #f7f7f7;
151
+ border: 1px solid #ccc;
152
+ -webkit-border-radius: 3px;
153
+ border-radius: 3px;
154
+ -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 0 0 .1em white inset;
155
+ box-shadow: 0 1px 0 rgba(0, 0, 0, .2), 0 0 0 .1em #fff inset;
156
+ margin: 0 .15em;
157
+ padding: .2em .5em;
158
+ vertical-align: middle;
159
+ position: relative;
160
+ top: -.1em;
161
+ white-space: nowrap
162
+ }
163
+
164
+ .keyseq kbd:first-child {
165
+ margin-left: 0
166
+ }
167
+
168
+ .keyseq kbd:last-child {
169
+ margin-right: 0
170
+ }
171
+
172
+ /* callouts */
173
+ .conum[data-value] {
174
+ display: inline-block;
175
+ color: #fff !important;
176
+ background: rgba(0, 0, 0, .8);
177
+ -webkit-border-radius: 50%;
178
+ border-radius: 50%;
179
+ text-align: center;
180
+ font-size: .75em;
181
+ width: 1.67em;
182
+ height: 1.67em;
183
+ line-height: 1.67em;
184
+ font-family: "Open Sans", "DejaVu Sans", sans-serif;
185
+ font-style: normal;
186
+ font-weight: bold
187
+ }
188
+
189
+ .conum[data-value] * {
190
+ color: #fff !important
191
+ }
192
+
193
+ .conum[data-value] + b {
194
+ display: none
195
+ }
196
+
197
+ .conum[data-value]:after {
198
+ content: attr(data-value)
199
+ }
200
+
201
+ pre .conum[data-value] {
202
+ position: relative;
203
+ top: -.125em
204
+ }
205
+
206
+ b.conum * {
207
+ color: inherit !important
208
+ }
209
+
210
+ .conum:not([data-value]):empty {
211
+ display: none
212
+ }
213
+
214
+ /* Callout list */
215
+ .hdlist > table, .colist > table {
216
+ border: 0;
217
+ background: none
218
+ }
219
+
220
+ .hdlist > table > tbody > tr, .colist > table > tbody > tr {
221
+ background: none
222
+ }
223
+
224
+ td.hdlist1, td.hdlist2 {
225
+ vertical-align: top;
226
+ padding: 0 .625em
227
+ }
228
+
229
+ td.hdlist1 {
230
+ font-weight: bold;
231
+ padding-bottom: 1.25em
232
+ }
233
+
234
+ /* Disabled from Asciidoctor CSS because it caused callout list to go under the
235
+ * source listing when .stretch is applied (see #335)
236
+ * .literalblock+.colist,.listingblock+.colist{margin-top:-.5em} */
237
+ .colist td:not([class]):first-child {
238
+ padding: .4em .75em 0;
239
+ line-height: 1;
240
+ vertical-align: top
241
+ }
242
+
243
+ .colist td:not([class]):first-child img {
244
+ max-width: none
245
+ }
246
+
247
+ .colist td:not([class]):last-child {
248
+ padding: .25em 0
249
+ }
250
+
251
+ /* Override Asciidoctor CSS that causes issues with reveal.js features */
252
+ .reveal .hljs table {
253
+ border: 0
254
+ }
255
+
256
+ /* Callout list rows would have a bottom border with some reveal.js themes (see #335) */
257
+ .reveal .colist > table th, .reveal .colist > table td {
258
+ border-bottom: 0
259
+ }
260
+
261
+ /* Fixes line height with Highlight.js source listing when linenums enabled (see #331) */
262
+ .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 {
263
+ line-height: inherit
264
+ }
265
+
266
+ /* Columns layout */
267
+ .columns .slide-content {
268
+ display: flex;
269
+ }
270
+
271
+ .columns.wrap .slide-content {
272
+ flex-wrap: wrap;
273
+ }
274
+
275
+ .columns.is-vcentered .slide-content {
276
+ align-items: center;
277
+ }
278
+
279
+ .columns .slide-content > .column {
280
+ display: block;
281
+ flex-basis: 0;
282
+ flex-grow: 1;
283
+ flex-shrink: 1;
284
+ }
285
+
286
+ .columns .slide-content > .column > * {
287
+ padding: .75rem;
288
+ }
289
+
290
+ /* See #353 */
291
+ .columns.wrap .slide-content > .column {
292
+ flex-basis: auto;
293
+ }
294
+
295
+ .columns .slide-content > .column.is-full {
296
+ flex: none;
297
+ width: 100%;
298
+ }
299
+
300
+ .columns .slide-content > .column.is-four-fifths {
301
+ flex: none;
302
+ width: 80%;
303
+ }
304
+
305
+ .columns .slide-content > .column.is-three-quarters {
306
+ flex: none;
307
+ width: 75%;
308
+ }
309
+
310
+ .columns .slide-content > .column.is-two-thirds {
311
+ flex: none;
312
+ width: 66.6666%;
313
+ }
314
+
315
+ .columns .slide-content > .column.is-three-fifths {
316
+ flex: none;
317
+ width: 60%;
318
+ }
319
+
320
+ .columns .slide-content > .column.is-half {
321
+ flex: none;
322
+ width: 50%;
323
+ }
324
+
325
+ .columns .slide-content > .column.is-two-fifths {
326
+ flex: none;
327
+ width: 40%;
328
+ }
329
+
330
+ .columns .slide-content > .column.is-one-third {
331
+ flex: none;
332
+ width: 33.3333%;
333
+ }
334
+
335
+ .columns .slide-content > .column.is-one-quarter {
336
+ flex: none;
337
+ width: 25%;
338
+ }
339
+
340
+ .columns .slide-content > .column.is-one-fifth {
341
+ flex: none;
342
+ width: 20%;
343
+ }
344
+
345
+ .columns .slide-content > .column.has-text-left {
346
+ text-align: left;
347
+ }
348
+
349
+ .columns .slide-content > .column.has-text-justified {
350
+ text-align: justify;
351
+ }
352
+
353
+ .columns .slide-content > .column.has-text-right {
354
+ text-align: right;
355
+ }
356
+
357
+ .columns .slide-content > .column.has-text-left {
358
+ text-align: left;
359
+ }
360
+
361
+ .columns .slide-content > .column.has-text-justified {
362
+ text-align: justify;
363
+ }
364
+
365
+ .columns .slide-content > .column.has-text-right {
366
+ text-align: right;
367
+ }
368
+
369
+ .text-left {
370
+ text-align: left !important
371
+ }
372
+
373
+ .text-right {
374
+ text-align: right !important
375
+ }
376
+
377
+ .text-center {
378
+ text-align: center !important
379
+ }
380
+
381
+ .text-justify {
382
+ text-align: justify !important
383
+ }
384
+
385
+ .footnotes {
386
+ border-top: 1px solid rgba(0, 0, 0, 0.2);
387
+ padding: 0.5em 0 0 0;
388
+ font-size: 0.65em;
389
+ margin-top: 4em;
390
+ }