slide_hero 0.0.10 → 0.0.11

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 (75) hide show
  1. checksums.yaml +4 -4
  2. data/.ruby-version +1 -1
  3. data/Gemfile +1 -1
  4. data/README.md +2 -2
  5. data/lib/slide_hero/blockquote.rb +10 -0
  6. data/lib/slide_hero/pluggable.rb +4 -4
  7. data/lib/slide_hero/plugins.rb +0 -1
  8. data/lib/slide_hero/presentation.rb +3 -3
  9. data/lib/slide_hero/slide.rb +2 -2
  10. data/lib/slide_hero/version.rb +1 -1
  11. data/lib/slide_hero/views/blockquote.html.erb +3 -0
  12. data/lib/slide_hero.rb +1 -0
  13. data/test/slide_hero/blockquote_spec.rb +13 -0
  14. data/test/slide_hero/plugins_spec.rb +0 -1
  15. data/test/slide_hero/presentation_spec.rb +2 -1
  16. data/test/slide_hero/slide_spec.rb +14 -3
  17. data/test/slide_hero_spec.rb +1 -0
  18. data/vendor/reveal.js/.gitignore +6 -1
  19. data/vendor/reveal.js/.travis.yml +1 -1
  20. data/vendor/reveal.js/CONTRIBUTING.md +4 -0
  21. data/vendor/reveal.js/Gruntfile.js +26 -24
  22. data/vendor/reveal.js/LICENSE +1 -1
  23. data/vendor/reveal.js/README.md +215 -124
  24. data/vendor/reveal.js/bower.json +27 -0
  25. data/vendor/reveal.js/css/print/paper.css +1 -1
  26. data/vendor/reveal.js/css/print/pdf.css +30 -27
  27. data/vendor/reveal.js/css/reveal.css +381 -191
  28. data/vendor/reveal.js/css/reveal.scss +259 -164
  29. data/vendor/reveal.js/css/theme/README.md +2 -6
  30. data/vendor/reveal.js/css/theme/beige.css +75 -49
  31. data/vendor/reveal.js/css/theme/black.css +64 -38
  32. data/vendor/reveal.js/css/theme/blood.css +75 -56
  33. data/vendor/reveal.js/css/theme/league.css +69 -43
  34. data/vendor/reveal.js/css/theme/moon.css +69 -43
  35. data/vendor/reveal.js/css/theme/night.css +64 -38
  36. data/vendor/reveal.js/css/theme/serif.css +66 -40
  37. data/vendor/reveal.js/css/theme/simple.css +63 -37
  38. data/vendor/reveal.js/css/theme/sky.css +69 -43
  39. data/vendor/reveal.js/css/theme/solarized.css +69 -43
  40. data/vendor/reveal.js/css/theme/source/black.scss +1 -1
  41. data/vendor/reveal.js/css/theme/source/blood.scss +3 -15
  42. data/vendor/reveal.js/css/theme/source/white.scss +1 -1
  43. data/vendor/reveal.js/css/theme/template/theme.scss +30 -23
  44. data/vendor/reveal.js/css/theme/white.css +69 -43
  45. data/vendor/reveal.js/demo.html +410 -0
  46. data/vendor/reveal.js/index.html +13 -371
  47. data/vendor/reveal.js/js/reveal.js +643 -175
  48. data/vendor/reveal.js/lib/css/zenburn.css +41 -78
  49. data/vendor/reveal.js/lib/js/head.min.js +9 -8
  50. data/vendor/reveal.js/package.json +20 -24
  51. data/vendor/reveal.js/plugin/highlight/highlight.js +4 -3
  52. data/vendor/reveal.js/plugin/markdown/example.html +1 -1
  53. data/vendor/reveal.js/plugin/markdown/markdown.js +19 -7
  54. data/vendor/reveal.js/plugin/markdown/marked.js +2 -33
  55. data/vendor/reveal.js/plugin/math/math.js +5 -2
  56. data/vendor/reveal.js/plugin/multiplex/client.js +1 -1
  57. data/vendor/reveal.js/plugin/multiplex/index.js +24 -16
  58. data/vendor/reveal.js/plugin/multiplex/master.js +22 -42
  59. data/vendor/reveal.js/plugin/multiplex/package.json +19 -0
  60. data/vendor/reveal.js/plugin/notes/notes.html +11 -3
  61. data/vendor/reveal.js/plugin/notes/notes.js +19 -5
  62. data/vendor/reveal.js/plugin/notes-server/client.js +6 -1
  63. data/vendor/reveal.js/plugin/notes-server/index.js +17 -14
  64. data/vendor/reveal.js/plugin/notes-server/notes.html +17 -6
  65. data/vendor/reveal.js/plugin/print-pdf/print-pdf.js +1 -1
  66. data/vendor/reveal.js/plugin/zoom-js/zoom.js +1 -1
  67. data/vendor/reveal.js/test/examples/slide-backgrounds.html +1 -1
  68. data/vendor/reveal.js/test/examples/slide-transitions.html +101 -0
  69. data/vendor/reveal.js/test/test-markdown-element-attributes.html +3 -3
  70. data/vendor/reveal.js/test/test-markdown-element-attributes.js +1 -1
  71. data/vendor/reveal.js/test/test.html +5 -1
  72. data/vendor/reveal.js/test/test.js +26 -1
  73. metadata +11 -5
  74. data/vendor/reveal.js/plugin/leap/leap.js +0 -159
  75. data/vendor/reveal.js/plugin/remotes/remotes.js +0 -39
@@ -195,7 +195,6 @@
195
195
  if( connected === false ) {
196
196
  connected = true;
197
197
 
198
- setupIframes( data );
199
198
  setupKeyboard();
200
199
  setupNotes();
201
200
  setupTimer();
@@ -206,13 +205,26 @@
206
205
 
207
206
  } );
208
207
 
208
+ // Load our presentation iframes
209
+ setupIframes();
210
+
211
+ // Once the iframes have loaded, emit a signal saying there's
212
+ // a new subscriber which will trigger a 'statechanged'
213
+ // message to be sent back
209
214
  window.addEventListener( 'message', function( event ) {
210
215
 
211
216
  var data = JSON.parse( event.data );
212
217
 
213
218
  if( data && data.namespace === 'reveal' ) {
214
219
  if( /ready/.test( data.eventName ) ) {
215
- socket.emit( 'connect', { socketId: socketId } );
220
+ socket.emit( 'new-subscriber', { socketId: socketId } );
221
+ }
222
+ }
223
+
224
+ // Messages sent by reveal.js inside of the current slide preview
225
+ if( data && data.namespace === 'reveal' ) {
226
+ if( /slidechanged|fragmentshown|fragmenthidden|overviewshown|overviewhidden|paused|resumed/.test( data.eventName ) && currentState !== JSON.stringify( data.state ) ) {
227
+ socket.emit( 'statechanged-speaker', { state: data.state } );
216
228
  }
217
229
  }
218
230
 
@@ -267,7 +279,7 @@
267
279
  /**
268
280
  * Creates the preview iframes.
269
281
  */
270
- function setupIframes( data ) {
282
+ function setupIframes() {
271
283
 
272
284
  var params = [
273
285
  'receiver',
@@ -277,9 +289,8 @@
277
289
  'backgroundTransition=none'
278
290
  ].join( '&' );
279
291
 
280
- var hash = '#/' + data.state.indexh + '/' + data.state.indexv;
281
- var currentURL = '/?' + params + '&postMessageEvents=true' + hash;
282
- var upcomingURL = '/?' + params + '&controls=false' + hash;
292
+ var currentURL = '/?' + params + '&postMessageEvents=true';
293
+ var upcomingURL = '/?' + params + '&controls=false';
283
294
 
284
295
  currentSlide = document.createElement( 'iframe' );
285
296
  currentSlide.setAttribute( 'width', 1280 );
@@ -40,7 +40,7 @@ console.log( 'Printing PDF (Paper size: '+ page.paperSize.width + 'x' + page.pap
40
40
 
41
41
  page.open( inputFile, function( status ) {
42
42
  window.setTimeout( function() {
43
- console.log( 'Printed succesfully' );
43
+ console.log( 'Printed successfully' );
44
44
  page.render( outputFile );
45
45
  phantom.exit();
46
46
  }, 1000 );
@@ -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;
@@ -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>
@@ -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() {
@@ -22,10 +22,13 @@
22
22
  <section data-background-image="examples/assets/image1.png">
23
23
  <h1>1</h1>
24
24
  <img data-src="fake-url.png">
25
+ <video data-src="fake-url.mp4"></video>
26
+ <audio data-src="fake-url.mp3"></audio>
27
+ <aside class="notes">speaker notes 1</aside>
25
28
  </section>
26
29
 
27
30
  <section>
28
- <section data-background="examples/assets/image2.png">
31
+ <section data-background="examples/assets/image2.png" data-notes="speaker notes 2">
29
32
  <h1>2.1</h1>
30
33
  </section>
31
34
  <section>
@@ -52,6 +55,7 @@
52
55
  <li class="fragment" data-fragment-index="0">4.1</li>
53
56
  <li class="fragment" data-fragment-index="0">4.2</li>
54
57
  </ul>
58
+ <iframe data-src="http://example.com"></iframe>
55
59
  </section>
56
60
 
57
61
  <section>
@@ -89,7 +89,7 @@ Reveal.addEventListener( 'ready', function() {
89
89
 
90
90
  test( 'Reveal.isLastSlide after vertical slide', function() {
91
91
  var lastSlideIndex = document.querySelectorAll( '.reveal .slides>section' ).length - 1;
92
-
92
+
93
93
  Reveal.slide( 1, 1 );
94
94
  Reveal.slide( lastSlideIndex );
95
95
  strictEqual( Reveal.isLastSlide(), true, 'true after Reveal.slide( 1, 1 ) and then Reveal.slide( '+ lastSlideIndex +', 0 )' );
@@ -139,6 +139,14 @@ Reveal.addEventListener( 'ready', function() {
139
139
  strictEqual( Reveal.getSlideBackground( 1, 100 ), undefined, 'undefined when out of vertical bounds' );
140
140
  });
141
141
 
142
+ test( 'Reveal.getSlideNotes', function() {
143
+ Reveal.slide( 0, 0 );
144
+ ok( Reveal.getSlideNotes() === 'speaker notes 1', 'works with <aside class="notes">' );
145
+
146
+ Reveal.slide( 1, 0 );
147
+ ok( Reveal.getSlideNotes() === 'speaker notes 2', 'works with <section data-notes="">' );
148
+ });
149
+
142
150
  test( 'Reveal.getPreviousSlide/getCurrentSlide', function() {
143
151
  Reveal.slide( 0, 0 );
144
152
  Reveal.slide( 1, 0 );
@@ -495,6 +503,23 @@ Reveal.addEventListener( 'ready', function() {
495
503
  strictEqual( document.querySelectorAll( '.reveal section img[src]' ).length, 1, 'Image source has been set' );
496
504
  });
497
505
 
506
+ test( 'video with data-src', function() {
507
+ strictEqual( document.querySelectorAll( '.reveal section video[src]' ).length, 1, 'Video source has been set' );
508
+ });
509
+
510
+ test( 'audio with data-src', function() {
511
+ strictEqual( document.querySelectorAll( '.reveal section audio[src]' ).length, 1, 'Audio source has been set' );
512
+ });
513
+
514
+ test( 'iframe with data-src', function() {
515
+ Reveal.slide( 0, 0 );
516
+ strictEqual( document.querySelectorAll( '.reveal section iframe[src]' ).length, 0, 'Iframe source is not set' );
517
+ Reveal.slide( 2, 1 );
518
+ strictEqual( document.querySelectorAll( '.reveal section iframe[src]' ).length, 1, 'Iframe source is set' );
519
+ Reveal.slide( 2, 2 );
520
+ strictEqual( document.querySelectorAll( '.reveal section iframe[src]' ).length, 0, 'Iframe source is not set' );
521
+ });
522
+
498
523
  test( 'background images', function() {
499
524
  var imageSource1 = Reveal.getSlide( 0 ).getAttribute( 'data-background-image' );
500
525
  var imageSource2 = Reveal.getSlide( 1, 0 ).getAttribute( 'data-background' );
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slide_hero
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Steven Nunez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-28 00:00:00.000000000 Z
11
+ date: 2016-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tilt
@@ -142,6 +142,7 @@ files:
142
142
  - Rakefile
143
143
  - bin/slidehero
144
144
  - lib/slide_hero.rb
145
+ - lib/slide_hero/blockquote.rb
145
146
  - lib/slide_hero/code.rb
146
147
  - lib/slide_hero/compilable.rb
147
148
  - lib/slide_hero/dsl.rb
@@ -160,6 +161,7 @@ files:
160
161
  - lib/slide_hero/version.rb
161
162
  - lib/slide_hero/views/_footer.html.erb
162
163
  - lib/slide_hero/views/_header.html.erb
164
+ - lib/slide_hero/views/blockquote.html.erb
163
165
  - lib/slide_hero/views/code.html.erb
164
166
  - lib/slide_hero/views/empty.html
165
167
  - lib/slide_hero/views/grouped_slides.html.erb
@@ -177,6 +179,7 @@ files:
177
179
  - test/fixtures/code/testclass.rb
178
180
  - test/fixtures/images/image.png
179
181
  - test/minitest_helper.rb
182
+ - test/slide_hero/blockquote_spec.rb
180
183
  - test/slide_hero/code_spec.rb
181
184
  - test/slide_hero/dsl_spec.rb
182
185
  - test/slide_hero/grouped_slides_spec.rb
@@ -197,6 +200,7 @@ files:
197
200
  - vendor/reveal.js/Gruntfile.js
198
201
  - vendor/reveal.js/LICENSE
199
202
  - vendor/reveal.js/README.md
203
+ - vendor/reveal.js/bower.json
200
204
  - vendor/reveal.js/css/print/paper.css
201
205
  - vendor/reveal.js/css/print/pdf.css
202
206
  - vendor/reveal.js/css/reveal.css
@@ -227,6 +231,7 @@ files:
227
231
  - vendor/reveal.js/css/theme/template/settings.scss
228
232
  - vendor/reveal.js/css/theme/template/theme.scss
229
233
  - vendor/reveal.js/css/theme/white.css
234
+ - vendor/reveal.js/demo.html
230
235
  - vendor/reveal.js/index.html
231
236
  - vendor/reveal.js/js/reveal.js
232
237
  - vendor/reveal.js/lib/css/zenburn.css
@@ -254,7 +259,6 @@ files:
254
259
  - vendor/reveal.js/lib/js/html5shiv.js
255
260
  - vendor/reveal.js/package.json
256
261
  - vendor/reveal.js/plugin/highlight/highlight.js
257
- - vendor/reveal.js/plugin/leap/leap.js
258
262
  - vendor/reveal.js/plugin/markdown/example.html
259
263
  - vendor/reveal.js/plugin/markdown/example.md
260
264
  - vendor/reveal.js/plugin/markdown/markdown.js
@@ -263,13 +267,13 @@ files:
263
267
  - vendor/reveal.js/plugin/multiplex/client.js
264
268
  - vendor/reveal.js/plugin/multiplex/index.js
265
269
  - vendor/reveal.js/plugin/multiplex/master.js
270
+ - vendor/reveal.js/plugin/multiplex/package.json
266
271
  - vendor/reveal.js/plugin/notes-server/client.js
267
272
  - vendor/reveal.js/plugin/notes-server/index.js
268
273
  - vendor/reveal.js/plugin/notes-server/notes.html
269
274
  - vendor/reveal.js/plugin/notes/notes.html
270
275
  - vendor/reveal.js/plugin/notes/notes.js
271
276
  - vendor/reveal.js/plugin/print-pdf/print-pdf.js
272
- - vendor/reveal.js/plugin/remotes/remotes.js
273
277
  - vendor/reveal.js/plugin/search/search.js
274
278
  - vendor/reveal.js/plugin/zoom-js/zoom.js
275
279
  - vendor/reveal.js/test/examples/assets/image1.png
@@ -278,6 +282,7 @@ files:
278
282
  - vendor/reveal.js/test/examples/embedded-media.html
279
283
  - vendor/reveal.js/test/examples/math.html
280
284
  - vendor/reveal.js/test/examples/slide-backgrounds.html
285
+ - vendor/reveal.js/test/examples/slide-transitions.html
281
286
  - vendor/reveal.js/test/qunit-1.12.0.css
282
287
  - vendor/reveal.js/test/qunit-1.12.0.js
283
288
  - vendor/reveal.js/test/test-markdown-element-attributes.html
@@ -310,7 +315,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
310
315
  version: '0'
311
316
  requirements: []
312
317
  rubyforge_project:
313
- rubygems_version: 2.4.5
318
+ rubygems_version: 2.5.1
314
319
  signing_key:
315
320
  specification_version: 4
316
321
  summary: Used for creating slide decks backed by reveal.js
@@ -318,6 +323,7 @@ test_files:
318
323
  - test/fixtures/code/testclass.rb
319
324
  - test/fixtures/images/image.png
320
325
  - test/minitest_helper.rb
326
+ - test/slide_hero/blockquote_spec.rb
321
327
  - test/slide_hero/code_spec.rb
322
328
  - test/slide_hero/dsl_spec.rb
323
329
  - test/slide_hero/grouped_slides_spec.rb