reveal-ck 3.6.0 → 3.7.0

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.
Files changed (68) hide show
  1. checksums.yaml +4 -4
  2. data/files/reveal.js/CONTRIBUTING.md +4 -0
  3. data/files/reveal.js/Gruntfile.js +44 -26
  4. data/files/reveal.js/LICENSE +1 -1
  5. data/files/reveal.js/README.md +375 -161
  6. data/files/reveal.js/bower.json +27 -0
  7. data/files/reveal.js/css/print/paper.css +4 -3
  8. data/files/reveal.js/css/print/pdf.css +53 -38
  9. data/files/reveal.js/css/reveal.css +452 -206
  10. data/files/reveal.js/css/reveal.scss +328 -175
  11. data/files/reveal.js/css/theme/README.md +2 -6
  12. data/files/reveal.js/css/theme/beige.css +81 -50
  13. data/files/reveal.js/css/theme/black.css +70 -39
  14. data/files/reveal.js/css/theme/blood.css +81 -57
  15. data/files/reveal.js/css/theme/league.css +75 -44
  16. data/files/reveal.js/css/theme/moon.css +75 -44
  17. data/files/reveal.js/css/theme/night.css +70 -39
  18. data/files/reveal.js/css/theme/serif.css +72 -41
  19. data/files/reveal.js/css/theme/simple.css +72 -38
  20. data/files/reveal.js/css/theme/sky.css +75 -44
  21. data/files/reveal.js/css/theme/solarized.css +75 -44
  22. data/files/reveal.js/css/theme/source/black.scss +2 -2
  23. data/files/reveal.js/css/theme/source/blood.scss +3 -16
  24. data/files/reveal.js/css/theme/source/night.scss +0 -1
  25. data/files/reveal.js/css/theme/source/simple.scss +5 -0
  26. data/files/reveal.js/css/theme/source/white.scss +2 -2
  27. data/files/reveal.js/css/theme/template/settings.scss +1 -1
  28. data/files/reveal.js/css/theme/template/theme.scss +36 -23
  29. data/files/reveal.js/css/theme/white.css +75 -44
  30. data/files/reveal.js/demo.html +410 -0
  31. data/files/reveal.js/index.html +14 -373
  32. data/files/reveal.js/js/reveal.js +1186 -350
  33. data/files/reveal.js/lib/css/zenburn.css +41 -78
  34. data/files/reveal.js/lib/js/head.min.js +9 -8
  35. data/files/reveal.js/package.json +22 -26
  36. data/files/reveal.js/plugin/highlight/highlight.js +52 -4
  37. data/files/reveal.js/plugin/markdown/example.html +1 -1
  38. data/files/reveal.js/plugin/markdown/markdown.js +40 -21
  39. data/files/reveal.js/plugin/markdown/marked.js +2 -33
  40. data/files/reveal.js/plugin/math/math.js +5 -2
  41. data/files/reveal.js/plugin/multiplex/client.js +1 -1
  42. data/files/reveal.js/plugin/multiplex/index.js +24 -16
  43. data/files/reveal.js/plugin/multiplex/master.js +22 -42
  44. data/files/reveal.js/plugin/multiplex/package.json +19 -0
  45. data/files/reveal.js/plugin/notes-server/client.js +6 -1
  46. data/files/reveal.js/plugin/notes-server/index.js +17 -14
  47. data/files/reveal.js/plugin/notes-server/notes.html +215 -26
  48. data/files/reveal.js/plugin/notes/notes.html +372 -32
  49. data/files/reveal.js/plugin/notes/notes.js +40 -7
  50. data/files/reveal.js/plugin/print-pdf/print-pdf.js +47 -26
  51. data/files/reveal.js/plugin/zoom-js/zoom.js +12 -2
  52. data/files/reveal.js/test/examples/math.html +1 -1
  53. data/files/reveal.js/test/examples/slide-backgrounds.html +1 -1
  54. data/files/reveal.js/test/examples/slide-transitions.html +101 -0
  55. data/files/reveal.js/test/simple.md +12 -0
  56. data/files/reveal.js/test/test-markdown-element-attributes.html +3 -3
  57. data/files/reveal.js/test/test-markdown-element-attributes.js +1 -1
  58. data/files/reveal.js/test/test-markdown-external.html +36 -0
  59. data/files/reveal.js/test/test-markdown-external.js +24 -0
  60. data/files/reveal.js/test/test-markdown-options.html +41 -0
  61. data/files/reveal.js/test/test-markdown-options.js +26 -0
  62. data/files/reveal.js/test/test-markdown.html +1 -1
  63. data/files/reveal.js/test/test.html +5 -1
  64. data/files/reveal.js/test/test.js +26 -1
  65. data/lib/reveal-ck/version.rb +1 -1
  66. metadata +11 -4
  67. data/files/reveal.js/plugin/leap/leap.js +0 -159
  68. data/files/reveal.js/plugin/remotes/remotes.js +0 -39
@@ -11,10 +11,18 @@
11
11
  */
12
12
  var RevealNotes = (function() {
13
13
 
14
- function openNotes() {
15
- var jsFileLocation = document.querySelector('script[src$="notes.js"]').src; // this js file path
16
- jsFileLocation = jsFileLocation.replace(/notes\.js(\?.*)?$/, ''); // the js folder path
17
- var notesPopup = window.open( jsFileLocation + 'notes.html', 'reveal.js - Notes', 'width=1100,height=700' );
14
+ function openNotes( notesFilePath ) {
15
+
16
+ if( !notesFilePath ) {
17
+ var jsFileLocation = document.querySelector('script[src$="notes.js"]').src; // this js file path
18
+ jsFileLocation = jsFileLocation.replace(/notes\.js(\?.*)?$/, ''); // the js folder path
19
+ notesFilePath = jsFileLocation + 'notes.html';
20
+ }
21
+
22
+ var notesPopup = window.open( notesFilePath, 'reveal.js - Notes', 'width=1100,height=700' );
23
+
24
+ // Allow popup window access to Reveal API
25
+ notesPopup.Reveal = this.Reveal;
18
26
 
19
27
  /**
20
28
  * Connect to the notes window through a postmessage handshake.
@@ -28,7 +36,7 @@ var RevealNotes = (function() {
28
36
  notesPopup.postMessage( JSON.stringify( {
29
37
  namespace: 'reveal-notes',
30
38
  type: 'connect',
31
- url: window.location.protocol + '//' + window.location.host + window.location.pathname,
39
+ url: window.location.protocol + '//' + window.location.host + window.location.pathname + window.location.search,
32
40
  state: Reveal.getState()
33
41
  } ), '*' );
34
42
  }, 500 );
@@ -45,22 +53,40 @@ var RevealNotes = (function() {
45
53
  /**
46
54
  * Posts the current slide data to the notes window
47
55
  */
48
- function post() {
56
+ function post( event ) {
49
57
 
50
58
  var slideElement = Reveal.getCurrentSlide(),
51
- notesElement = slideElement.querySelector( 'aside.notes' );
59
+ notesElement = slideElement.querySelector( 'aside.notes' ),
60
+ fragmentElement = slideElement.querySelector( '.current-fragment' );
52
61
 
53
62
  var messageData = {
54
63
  namespace: 'reveal-notes',
55
64
  type: 'state',
56
65
  notes: '',
57
66
  markdown: false,
67
+ whitespace: 'normal',
58
68
  state: Reveal.getState()
59
69
  };
60
70
 
61
71
  // Look for notes defined in a slide attribute
62
72
  if( slideElement.hasAttribute( 'data-notes' ) ) {
63
73
  messageData.notes = slideElement.getAttribute( 'data-notes' );
74
+ messageData.whitespace = 'pre-wrap';
75
+ }
76
+
77
+ // Look for notes defined in a fragment
78
+ if( fragmentElement ) {
79
+ var fragmentNotes = fragmentElement.querySelector( 'aside.notes' );
80
+ if( fragmentNotes ) {
81
+ notesElement = fragmentNotes;
82
+ }
83
+ else if( fragmentElement.hasAttribute( 'data-notes' ) ) {
84
+ messageData.notes = fragmentElement.getAttribute( 'data-notes' );
85
+ messageData.whitespace = 'pre-wrap';
86
+
87
+ // In case there are slide notes
88
+ notesElement = null;
89
+ }
64
90
  }
65
91
 
66
92
  // Look for notes defined in an aside element
@@ -94,6 +120,7 @@ var RevealNotes = (function() {
94
120
  }
95
121
 
96
122
  connect();
123
+
97
124
  }
98
125
 
99
126
  if( !/receiver/i.test( window.location.search ) ) {
@@ -109,12 +136,18 @@ var RevealNotes = (function() {
109
136
  // modifier is present
110
137
  if ( document.querySelector( ':focus' ) !== null || event.shiftKey || event.altKey || event.ctrlKey || event.metaKey ) return;
111
138
 
139
+ // Disregard the event if keyboard is disabled
140
+ if ( Reveal.getConfig().keyboard === false ) return;
141
+
112
142
  if( event.keyCode === 83 ) {
113
143
  event.preventDefault();
114
144
  openNotes();
115
145
  }
116
146
  }, false );
117
147
 
148
+ // Show our keyboard shortcut in the reveal.js help overlay
149
+ if( window.Reveal ) Reveal.registerKeyboardShortcut( 'S', 'Speaker notes view' );
150
+
118
151
  }
119
152
 
120
153
  return { open: openNotes };
@@ -4,30 +4,16 @@
4
4
  * Example:
5
5
  * phantomjs print-pdf.js "http://lab.hakim.se/reveal-js?print-pdf" reveal-demo.pdf
6
6
  *
7
- * By Manuel Bieh (https://github.com/manuelbieh)
7
+ * @author Manuel Bieh (https://github.com/manuelbieh)
8
+ * @author Hakim El Hattab (https://github.com/hakimel)
9
+ * @author Manuel Riezebosch (https://github.com/riezebosch)
8
10
  */
9
11
 
10
12
  // html2pdf.js
11
- var page = new WebPage();
12
13
  var system = require( 'system' );
13
14
 
14
- var slideWidth = system.args[3] ? system.args[3].split( 'x' )[0] : 960;
15
- var slideHeight = system.args[3] ? system.args[3].split( 'x' )[1] : 700;
16
-
17
- page.viewportSize = {
18
- width: slideWidth,
19
- height: slideHeight
20
- };
21
-
22
- // TODO
23
- // Something is wrong with these config values. An input
24
- // paper width of 1920px actually results in a 756px wide
25
- // PDF.
26
- page.paperSize = {
27
- width: Math.round( slideWidth * 2 ),
28
- height: Math.round( slideHeight * 2 ),
29
- border: 0
30
- };
15
+ var probePage = new WebPage();
16
+ var printPage = new WebPage();
31
17
 
32
18
  var inputFile = system.args[1] || 'index.html?print-pdf';
33
19
  var outputFile = system.args[2] || 'slides.pdf';
@@ -36,13 +22,48 @@ if( outputFile.match( /\.pdf$/gi ) === null ) {
36
22
  outputFile += '.pdf';
37
23
  }
38
24
 
39
- console.log( 'Printing PDF (Paper size: '+ page.paperSize.width + 'x' + page.paperSize.height +')' );
25
+ console.log( 'Export PDF: Reading reveal.js config [1/4]' );
26
+
27
+ probePage.open( inputFile, function( status ) {
28
+
29
+ console.log( 'Export PDF: Preparing print layout [2/4]' );
30
+
31
+ var config = probePage.evaluate( function() {
32
+ return Reveal.getConfig();
33
+ } );
34
+
35
+ if( config ) {
40
36
 
41
- page.open( inputFile, function( status ) {
42
- window.setTimeout( function() {
43
- console.log( 'Printed succesfully' );
44
- page.render( outputFile );
45
- phantom.exit();
46
- }, 1000 );
37
+ printPage.paperSize = {
38
+ width: Math.floor( config.width * ( 1 + config.margin ) ),
39
+ height: Math.floor( config.height * ( 1 + config.margin ) ),
40
+ border: 0
41
+ };
42
+
43
+ printPage.open( inputFile, function( status ) {
44
+ console.log( 'Export PDF: Preparing pdf [3/4]')
45
+ printPage.evaluate(function() {
46
+ Reveal.isReady() ? window.callPhantom() : Reveal.addEventListener( 'pdf-ready', window.callPhantom );
47
+ });
48
+ } );
49
+
50
+ printPage.onCallback = function(data) {
51
+ // For some reason we need to "jump the queue" for syntax highlighting to work.
52
+ // See: http://stackoverflow.com/a/3580132/129269
53
+ setTimeout(function() {
54
+ console.log( 'Export PDF: Writing file [4/4]' );
55
+ printPage.render( outputFile );
56
+ console.log( 'Export PDF: Finished successfully!' );
57
+ phantom.exit();
58
+ }, 0);
59
+ };
60
+ }
61
+ else {
62
+
63
+ console.log( 'Export PDF: Unable to read reveal.js config. Make sure the input address points to a reveal.js page.' );
64
+ phantom.exit(1);
65
+
66
+ }
47
67
  } );
48
68
 
69
+
@@ -2,7 +2,7 @@
2
2
  (function(){
3
3
  var isEnabled = true;
4
4
 
5
- document.querySelector( '.reveal' ).addEventListener( 'mousedown', function( event ) {
5
+ document.querySelector( '.reveal .slides' ).addEventListener( 'mousedown', function( event ) {
6
6
  var modifier = ( Reveal.getConfig().zoomKey ? Reveal.getConfig().zoomKey : 'alt' ) + 'Key';
7
7
 
8
8
  var zoomPadding = 20;
@@ -11,7 +11,17 @@
11
11
  if( event[ modifier ] && isEnabled ) {
12
12
  event.preventDefault();
13
13
 
14
- var bounds = event.target.getBoundingClientRect();
14
+ var bounds;
15
+ var originalDisplay = event.target.style.display;
16
+
17
+ // Get the bounding rect of the contents, not the containing box
18
+ if( window.getComputedStyle( event.target ).display === 'block' ) {
19
+ event.target.style.display = 'inline-block';
20
+ bounds = event.target.getBoundingClientRect();
21
+ event.target.style.display = originalDisplay;
22
+ } else {
23
+ bounds = event.target.getBoundingClientRect();
24
+ }
15
25
 
16
26
  zoom.to({
17
27
  x: ( bounds.left * revealScale ) - zoomPadding,
@@ -169,7 +169,7 @@
169
169
  transition: 'linear',
170
170
 
171
171
  math: {
172
- // mathjax: 'http://cdn.mathjax.org/mathjax/latest/MathJax.js',
172
+ // mathjax: 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js',
173
173
  config: 'TeX-AMS_HTML-full'
174
174
  },
175
175
 
@@ -93,7 +93,7 @@
93
93
  <h2>Video background</h2>
94
94
  </section>
95
95
 
96
- <section data-background-iframe="https://slides.com">
96
+ <section data-background-iframe="https://slides.com/news/make-better-presentations/embed?style=hidden&autoSlide=4000">
97
97
  <h2>Iframe background</h2>
98
98
  </section>
99
99
 
@@ -0,0 +1,101 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="utf-8">
6
+
7
+ <title>reveal.js - Slide Transitions</title>
8
+
9
+ <link rel="stylesheet" href="../../css/reveal.css">
10
+ <link rel="stylesheet" href="../../css/theme/white.css" id="theme">
11
+ <style type="text/css" media="screen">
12
+ .slides section.has-dark-background,
13
+ .slides section.has-dark-background h3 {
14
+ color: #fff;
15
+ }
16
+ .slides section.has-light-background,
17
+ .slides section.has-light-background h3 {
18
+ color: #222;
19
+ }
20
+ </style>
21
+ </head>
22
+
23
+ <body>
24
+
25
+ <div class="reveal">
26
+
27
+ <div class="slides">
28
+
29
+ <section>
30
+ <h3>Default</h3>
31
+ </section>
32
+
33
+ <section>
34
+ <h3>Default</h3>
35
+ </section>
36
+
37
+ <section data-transition="zoom">
38
+ <h3>data-transition: zoom</h3>
39
+ </section>
40
+
41
+ <section data-transition="zoom-in fade-out">
42
+ <h3>data-transition: zoom-in fade-out</h3>
43
+ </section>
44
+
45
+ <section>
46
+ <h3>Default</h3>
47
+ </section>
48
+
49
+ <section data-transition="convex">
50
+ <h3>data-transition: convex</h3>
51
+ </section>
52
+
53
+ <section data-transition="convex-in concave-out">
54
+ <h3>data-transition: convex-in concave-out</h3>
55
+ </section>
56
+
57
+ <section>
58
+ <section data-transition="zoom">
59
+ <h3>Default</h3>
60
+ </section>
61
+ <section data-transition="concave">
62
+ <h3>data-transition: concave</h3>
63
+ </section>
64
+ <section data-transition="convex-in fade-out">
65
+ <h3>data-transition: convex-in fade-out</h3>
66
+ </section>
67
+ <section>
68
+ <h3>Default</h3>
69
+ </section>
70
+ </section>
71
+
72
+ <section data-transition="none">
73
+ <h3>data-transition: none</h3>
74
+ </section>
75
+
76
+ <section>
77
+ <h3>Default</h3>
78
+ </section>
79
+
80
+ </div>
81
+
82
+ </div>
83
+
84
+ <script src="../../lib/js/head.min.js"></script>
85
+ <script src="../../js/reveal.js"></script>
86
+
87
+ <script>
88
+
89
+ Reveal.initialize({
90
+ center: true,
91
+ history: true,
92
+
93
+ // transition: 'slide',
94
+ // transitionSpeed: 'slow',
95
+ // backgroundTransition: 'slide'
96
+ });
97
+
98
+ </script>
99
+
100
+ </body>
101
+ </html>
@@ -0,0 +1,12 @@
1
+ ## Slide 1.1
2
+
3
+ ```js
4
+ var a = 1;
5
+ ```
6
+
7
+
8
+ ## Slide 1.2
9
+
10
+
11
+
12
+ ## Slide 2
@@ -38,9 +38,9 @@
38
38
  Paragraph 2
39
39
  <!-- {_class="fragment grow"} -->
40
40
 
41
- - list item 1 <!-- {_class="fragment roll-in"} -->
42
- - list item 2 <!-- {_class="fragment roll-in"} -->
43
- - list item 3 <!-- {_class="fragment roll-in"} -->
41
+ - list item 1 <!-- {_class="fragment grow"} -->
42
+ - list item 2 <!-- {_class="fragment grow"} -->
43
+ - list item 3 <!-- {_class="fragment grow"} -->
44
44
 
45
45
 
46
46
  ---
@@ -19,7 +19,7 @@ Reveal.addEventListener( 'ready', function() {
19
19
  });
20
20
 
21
21
  test( 'Attributes on element list items in vertical slides', function() {
22
- strictEqual( document.querySelectorAll( '.reveal .slides section>section li.fragment.roll-in' ).length, 3, 'found a vertical slide with three list items with class fragment.roll-in' );
22
+ strictEqual( document.querySelectorAll( '.reveal .slides section>section li.fragment.grow' ).length, 3, 'found a vertical slide with three list items with class fragment.grow' );
23
23
  });
24
24
 
25
25
  test( 'Attributes on element paragraphs in horizontal slides', function() {
@@ -0,0 +1,36 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="utf-8">
6
+
7
+ <title>reveal.js - Test Markdown</title>
8
+
9
+ <link rel="stylesheet" href="../css/reveal.css">
10
+ <link rel="stylesheet" href="qunit-1.12.0.css">
11
+ </head>
12
+
13
+ <body style="overflow: auto;">
14
+
15
+ <div id="qunit"></div>
16
+ <div id="qunit-fixture"></div>
17
+
18
+ <div class="reveal" style="display: none;">
19
+
20
+ <div class="slides">
21
+ <section data-markdown="simple.md" data-separator="^\n\n\n" data-separator-vertical="^\n\n"></section>
22
+ </div>
23
+
24
+ </div>
25
+
26
+ <script src="../lib/js/head.min.js"></script>
27
+ <script src="../js/reveal.js"></script>
28
+ <script src="../plugin/highlight/highlight.js"></script>
29
+ <script src="../plugin/markdown/marked.js"></script>
30
+ <script src="../plugin/markdown/markdown.js"></script>
31
+ <script src="qunit-1.12.0.js"></script>
32
+
33
+ <script src="test-markdown-external.js"></script>
34
+
35
+ </body>
36
+ </html>
@@ -0,0 +1,24 @@
1
+
2
+
3
+ Reveal.addEventListener( 'ready', function() {
4
+
5
+ QUnit.module( 'Markdown' );
6
+
7
+ test( 'Vertical separator', function() {
8
+ strictEqual( document.querySelectorAll( '.reveal .slides>section>section' ).length, 2, 'found two slides' );
9
+ });
10
+
11
+ test( 'Horizontal separator', function() {
12
+ strictEqual( document.querySelectorAll( '.reveal .slides>section' ).length, 2, 'found two slides' );
13
+ });
14
+
15
+ test( 'Language highlighter', function() {
16
+ strictEqual( document.querySelectorAll( '.hljs-keyword' ).length, 1, 'got rendered highlight tag.' );
17
+ strictEqual( document.querySelector( '.hljs-keyword' ).innerHTML, 'var', 'the same keyword: var.' );
18
+ });
19
+
20
+
21
+ } );
22
+
23
+ Reveal.initialize();
24
+
@@ -0,0 +1,41 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="utf-8">
6
+
7
+ <title>reveal.js - Test Markdown Options</title>
8
+
9
+ <link rel="stylesheet" href="../css/reveal.css">
10
+ <link rel="stylesheet" href="qunit-1.12.0.css">
11
+ </head>
12
+
13
+ <body style="overflow: auto;">
14
+
15
+ <div id="qunit"></div>
16
+ <div id="qunit-fixture"></div>
17
+
18
+ <div class="reveal" style="display: none;">
19
+
20
+ <div class="slides">
21
+
22
+ <section data-markdown>
23
+ <script type="text/template">
24
+ ## Testing Markdown Options
25
+
26
+ This "slide" should contain 'smart' quotes.
27
+ </script>
28
+ </section>
29
+
30
+ </div>
31
+
32
+ </div>
33
+
34
+ <script src="../lib/js/head.min.js"></script>
35
+ <script src="../js/reveal.js"></script>
36
+ <script src="qunit-1.12.0.js"></script>
37
+
38
+ <script src="test-markdown-options.js"></script>
39
+
40
+ </body>
41
+ </html>