rhet-butler 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. data/bin/rhet-butler +5 -0
  2. data/default-configuration/assets/apple-touch-icon-precomposed.png +0 -0
  3. data/default-configuration/assets/apple-touch-icon.png +0 -0
  4. data/default-configuration/assets/favicon.ico +0 -0
  5. data/default-configuration/assets/fonts/opensans/v6/MTP_ySUJH_bn48VBG8sNSonF5uFdDttMLvmWuJdhhgs.ttf +0 -0
  6. data/default-configuration/assets/fonts/opensans/v6/PRmiXeptR36kaC0GEAetxi8cqLH4MEiSE0ROcU-qHOA.ttf +0 -0
  7. data/default-configuration/assets/fonts/opensans/v6/cJZKeOuBrn4kERxqtaUH3aCWcynf_cDxXwCLxiixG1c.ttf +0 -0
  8. data/default-configuration/assets/fonts/opensans/v6/xjAJXh38I15wypJXxuGMBp0EAVxt0G0biEntp43Qt6E.ttf +0 -0
  9. data/default-configuration/assets/fonts/ptsans/v5/0XxGQsSc1g4rdRdjJKZrNC3USBnSvpkopQaUR-2r7iU.ttf +0 -0
  10. data/default-configuration/assets/fonts/ptsans/v5/FUDHvzEKSJww3kCxuiAo2A.ttf +0 -0
  11. data/default-configuration/assets/fonts/ptsans/v5/PIPMHY90P7jtyjpXuZ2cLKCWcynf_cDxXwCLxiixG1c.ttf +0 -0
  12. data/default-configuration/assets/fonts/ptsans/v5/lILlYDvubYemzYzN7GbLkInF5uFdDttMLvmWuJdhhgs.ttf +0 -0
  13. data/default-configuration/assets/fonts/ptserif/v5/03aPdn7fFF3H6ngCgAlQzC3USBnSvpkopQaUR-2r7iU.ttf +0 -0
  14. data/default-configuration/assets/fonts/ptserif/v5/EgBlzoNBIHxNPCMwXaAhYPesZW2xOQ-xsNqO47m55DA.ttf +0 -0
  15. data/default-configuration/assets/fonts/ptserif/v5/Foydq9xJp--nfYIx2TBz9fEr6Hm6RMS0v1dtXsGir4g.ttf +0 -0
  16. data/default-configuration/assets/fonts/ptserif/v5/QABk9IxT-LFTJ_dQzv7xpJ0EAVxt0G0biEntp43Qt6E.ttf +0 -0
  17. data/default-configuration/assets/javascript/highlight.js/LICENSE +24 -0
  18. data/default-configuration/assets/javascript/highlight.js/README.md +143 -0
  19. data/default-configuration/assets/javascript/highlight.js/README.ru.md +149 -0
  20. data/default-configuration/assets/javascript/highlight.js/classref.txt +568 -0
  21. data/default-configuration/assets/javascript/highlight.pack.js +1 -0
  22. data/default-configuration/assets/javascript/impress.js +800 -0
  23. data/default-configuration/assets/javascript/sockjs-0.2.1.js +2014 -0
  24. data/default-configuration/assets/javascript/sockjs-0.3.js +2314 -0
  25. data/default-configuration/assets/rhet-butler.jpg +0 -0
  26. data/default-configuration/assets/stylesheets/google-open-sans.css +72 -0
  27. data/default-configuration/assets/stylesheets/highlight/solarized_dark.css +88 -0
  28. data/default-configuration/assets/stylesheets/presentation.css +483 -0
  29. data/default-configuration/assets/stylesheets/presenter/presentation.css +477 -0
  30. data/default-configuration/assets/stylesheets/setup.css +0 -0
  31. data/default-configuration/common/config.yaml +4 -0
  32. data/default-configuration/common/templates/header-javascript.html +3 -0
  33. data/default-configuration/common/templates/presentation.html.erb +44 -0
  34. data/default-configuration/common/templates/presenter-qr.html.erb +77 -0
  35. data/default-configuration/common/templates/stylesheets.html.erb +3 -0
  36. data/default-configuration/presenter/config.yaml +7 -0
  37. data/default-configuration/presenter/templates/live-javascript.html.erb +26 -0
  38. data/default-configuration/presenter/templates/slide-notes.html.erb +3 -0
  39. data/default-configuration/presenter/templates/stylesheets.html.erb +3 -0
  40. data/default-configuration/viewer/config.yaml +7 -0
  41. data/default-configuration/viewer/templates/live-javascript.html.erb +16 -0
  42. data/default-configuration/viewer/templates/slide-notes.html.erb +0 -0
  43. data/lib/rhet-butler/arrangement.rb +78 -0
  44. data/lib/rhet-butler/command-line.rb +49 -0
  45. data/lib/rhet-butler/configuration.rb +76 -0
  46. data/lib/rhet-butler/file-manager.rb +126 -0
  47. data/lib/rhet-butler/html-generator.rb +29 -0
  48. data/lib/rhet-butler/layout-rule.rb +57 -0
  49. data/lib/rhet-butler/messaging.rb +58 -0
  50. data/lib/rhet-butler/slide-group.rb +56 -0
  51. data/lib/rhet-butler/slide-includer.rb +34 -0
  52. data/lib/rhet-butler/slide-loader.rb +361 -0
  53. data/lib/rhet-butler/slide.rb +164 -0
  54. data/lib/rhet-butler/static-generator.rb +44 -0
  55. data/lib/rhet-butler/web/assets-app.rb +40 -0
  56. data/lib/rhet-butler/web/main-app.rb +139 -0
  57. data/lib/rhet-butler/web/presentation-app.rb +50 -0
  58. data/lib/rhet-butler/web/qr-display-app.rb +37 -0
  59. data/lib/rhet-butler/yaml-schema.rb +9 -0
  60. data/lib/rhet-butler/yaml-type.rb +23 -0
  61. data/lib/rhet-butler.rb +2 -0
  62. data/spec/arrangements.rb +76 -0
  63. data/spec/html-generation.rb +48 -0
  64. data/spec/presentation-view.rb +72 -0
  65. data/spec/rhet-butler.rb +59 -0
  66. data/spec/slide-loader.rb +51 -0
  67. data/spec/slide-processing.rb +73 -0
  68. data/spec_support/gem_test_suite.rb +17 -0
  69. metadata +324 -0
@@ -0,0 +1,477 @@
1
+ /*
2
+ So you like the style of impress.js demo?
3
+ Or maybe you are just curious how it was done?
4
+
5
+ You couldn't find a better place to find out!
6
+
7
+ Welcome to the stylesheet impress.js demo presentation.
8
+
9
+ Please remember that it is not meant to be a part of impress.js and is
10
+ not required by impress.js.
11
+ I expect that anyone creating a presentation for impress.js would create
12
+ their own set of styles.
13
+
14
+ But feel free to read through it and learn how to get the most of what
15
+ impress.js provides.
16
+
17
+ And let me be your guide.
18
+
19
+ Shall we begin?
20
+ */
21
+
22
+
23
+ /*
24
+ We start with a good ol' reset.
25
+ That's the one by Eric Meyer http://meyerweb.com/eric/tools/css/reset/
26
+
27
+ You can probably argue if it is needed here, or not, but for sure it
28
+ doesn't do any harm and gives us a fresh start.
29
+ */
30
+
31
+ html, body, div, span, applet, object, iframe,
32
+ h1, h2, h3, h4, h5, h6, p, blockquote, pre,
33
+ a, abbr, acronym, address, big, cite, code,
34
+ del, dfn, em, img, ins, kbd, q, s, samp,
35
+ small, strike, strong, sub, sup, tt, var,
36
+ b, u, i, center,
37
+ dl, dt, dd, ol, ul, li,
38
+ fieldset, form, label, legend,
39
+ table, caption, tbody, tfoot, thead, tr, th, td,
40
+ article, aside, canvas, details, embed,
41
+ figure, figcaption, footer, header, hgroup,
42
+ menu, nav, output, ruby, section, summary,
43
+ time, mark, audio, video {
44
+ margin: 0;
45
+ padding: 0;
46
+ border: 0;
47
+ font-size: 100%;
48
+ font: inherit;
49
+ vertical-align: baseline;
50
+ }
51
+
52
+ /* HTML5 display-role reset for older browsers */
53
+ article, aside, details, figcaption, figure,
54
+ footer, header, hgroup, menu, nav, section {
55
+ display: block;
56
+ }
57
+ body {
58
+ line-height: 1;
59
+ }
60
+ ol, ul {
61
+ list-style: none;
62
+ }
63
+ blockquote, q {
64
+ quotes: none;
65
+ }
66
+ blockquote:before, blockquote:after,
67
+ q:before, q:after {
68
+ content: '';
69
+ content: none;
70
+ }
71
+
72
+ table {
73
+ border-collapse: collapse;
74
+ border-spacing: 0;
75
+ }
76
+
77
+ /*
78
+ Now here is when interesting things start to appear.
79
+
80
+ We set up <body> styles with default font and nice gradient in the background.
81
+ And yes, there is a lot of repetition there because of -prefixes but we don't
82
+ want to leave anybody behind.
83
+ */
84
+ body {
85
+ font-family: 'PT Sans', sans-serif;
86
+ min-height: 740px;
87
+
88
+ background: rgb(215, 215, 215);
89
+ }
90
+
91
+ /*
92
+ Now let's bring some text styles back ...
93
+ */
94
+ b, strong { font-weight: bold }
95
+ i, em { font-style: italic }
96
+
97
+ /*
98
+ ... and give links a nice look.
99
+ */
100
+ a {
101
+ color: inherit;
102
+ text-decoration: none;
103
+ padding: 0 0.1em;
104
+ background: rgba(255,255,255,0.5);
105
+ text-shadow: -1px -1px 2px rgba(100,100,100,0.9);
106
+ border-radius: 0.2em;
107
+
108
+ -webkit-transition: 0.5s;
109
+ -moz-transition: 0.5s;
110
+ -ms-transition: 0.5s;
111
+ -o-transition: 0.5s;
112
+ transition: 0.5s;
113
+ }
114
+
115
+ a:hover,
116
+ a:focus {
117
+ background: rgba(255,255,255,1);
118
+ text-shadow: -1px -1px 2px rgba(100,100,100,0.5);
119
+ }
120
+
121
+ code {
122
+ font-size: 24px;
123
+ }
124
+
125
+ .notes {
126
+ font-size: 18px;
127
+ background-color: honeydew;
128
+ }
129
+
130
+ /*
131
+ Because the main point behind the impress.js demo is to demo impress.js
132
+ we display a fallback message for users with browsers that don't support
133
+ all the features required by it.
134
+
135
+ All of the content will be still fully accessible for them, but I want
136
+ them to know that they are missing something - that's what the demo is
137
+ about, isn't it?
138
+
139
+ And then we hide the message, when support is detected in the browser.
140
+ */
141
+
142
+ .fallback-message {
143
+ font-family: sans-serif;
144
+ line-height: 1.3;
145
+
146
+ width: 780px;
147
+ padding: 10px 10px 0;
148
+ margin: 20px auto;
149
+
150
+ border: 1px solid #E4C652;
151
+ border-radius: 10px;
152
+ background: #EEDC94;
153
+ }
154
+
155
+ .fallback-message p {
156
+ margin-bottom: 10px;
157
+ }
158
+
159
+ .impress-supported .fallback-message {
160
+ display: none;
161
+ }
162
+
163
+ /*
164
+ Now let's style the presentation steps.
165
+
166
+ We start with basics to make sure it displays correctly in everywhere ...
167
+ */
168
+
169
+ .step {
170
+ position: relative;
171
+ width: 900px;
172
+ padding: 40px;
173
+ margin: 20px auto;
174
+
175
+ -webkit-box-sizing: border-box;
176
+ -moz-box-sizing: border-box;
177
+ -ms-box-sizing: border-box;
178
+ -o-box-sizing: border-box;
179
+ box-sizing: border-box;
180
+
181
+ font-family: 'PT Serif', georgia, serif;
182
+ font-size: 48px;
183
+ line-height: 1.5;
184
+ }
185
+
186
+ /*
187
+ ... and we enhance the styles for impress.js.
188
+
189
+ Basically we remove the margin and make inactive steps a little bit transparent.
190
+ */
191
+ .impress-enabled .step {
192
+ margin: 0;
193
+ opacity: 0.3;
194
+
195
+ -webkit-transition: opacity 1s;
196
+ -moz-transition: opacity 1s;
197
+ -ms-transition: opacity 1s;
198
+ -o-transition: opacity 1s;
199
+ transition: opacity 1s;
200
+ }
201
+
202
+ .impress-enabled .step.active { opacity: 1 }
203
+
204
+ /*
205
+ These 'slide' step styles were heavily inspired by HTML5 Slides:
206
+ http://html5slides.googlecode.com/svn/trunk/styles.css
207
+
208
+ ;)
209
+
210
+ They cover everything what you see on first three steps of the demo.
211
+ */
212
+ .slide {
213
+ display: block;
214
+
215
+ width: 900px;
216
+ height: 700px;
217
+ padding: 40px 60px;
218
+
219
+ background-color: white;
220
+ border: 1px solid rgba(0, 0, 0, .3);
221
+ border-radius: 10px;
222
+ box-shadow: 0 2px 6px rgba(0, 0, 0, .1);
223
+
224
+ color: rgb(102, 102, 102);
225
+ text-shadow: 0 2px 2px rgba(0, 0, 0, .1);
226
+
227
+ font-family: 'Open Sans', Arial, sans-serif;
228
+ font-size: 30px;
229
+ line-height: 36px;
230
+ letter-spacing: -1px;
231
+ }
232
+
233
+ .slide q {
234
+ display: block;
235
+ font-size: 50px;
236
+ line-height: 72px;
237
+
238
+ margin-top: 100px;
239
+ }
240
+
241
+ .slide q strong {
242
+ white-space: nowrap;
243
+ }
244
+
245
+ /*
246
+ And now we start to style each step separately.
247
+
248
+ I agree that this may be not the most efficient, object-oriented and
249
+ scalable way of styling, but most of steps have quite a custom look
250
+ and typography tricks here and there, so they had to be styles separately.
251
+
252
+ First is the title step with a big <h1> (no room for padding) and some
253
+ 3D positioning along Z axis.
254
+ */
255
+
256
+ #title {
257
+ padding: 0;
258
+ }
259
+
260
+ #title .try {
261
+ font-size: 64px;
262
+ position: absolute;
263
+ top: -0.5em;
264
+ left: 1.5em;
265
+
266
+ -webkit-transform: translateZ(20px);
267
+ -moz-transform: translateZ(20px);
268
+ -ms-transform: translateZ(20px);
269
+ -o-transform: translateZ(20px);
270
+ transform: translateZ(20px);
271
+ }
272
+
273
+ #title h1 {
274
+ font-size: 190px;
275
+
276
+ -webkit-transform: translateZ(50px);
277
+ -moz-transform: translateZ(50px);
278
+ -ms-transform: translateZ(50px);
279
+ -o-transform: translateZ(50px);
280
+ transform: translateZ(50px);
281
+ }
282
+
283
+ #title .footnote {
284
+ font-size: 32px;
285
+ }
286
+
287
+ /*
288
+ The last step is an overview.
289
+ There is no content in it, so we make sure it's not visible because we want
290
+ to be able to click on other steps.
291
+
292
+ */
293
+ #overview { display: none }
294
+
295
+ /*
296
+ We also make other steps visible and give them a pointer cursor using the
297
+ `impress-on-` class.
298
+ */
299
+ .impress-on-overview .step {
300
+ opacity: 1;
301
+ cursor: pointer;
302
+ }
303
+
304
+
305
+ /*
306
+ Now, when we have all the steps styled let's give users a hint how to navigate
307
+ around the presentation.
308
+
309
+ The best way to do this would be to use JavaScript, show a delayed hint for a
310
+ first time users, then hide it and store a status in cookie or localStorage...
311
+
312
+ But I wanted to have some CSS fun and avoid additional scripting...
313
+
314
+ Let me explain it first, so maybe the transition magic will be more readable
315
+ when you read the code.
316
+
317
+ First of all I wanted the hint to appear only when user is idle for a while.
318
+ You can't detect the 'idle' state in CSS, but I delayed a appearing of the
319
+ hint by 5s using transition-delay.
320
+
321
+ You also can't detect in CSS if the user is a first-time visitor, so I had to
322
+ make an assumption that I'll only show the hint on the first step. And when
323
+ the step is changed hide the hint, because I can assume that user already
324
+ knows how to navigate.
325
+
326
+ To summarize it - hint is shown when the user is on the first step for longer
327
+ than 5 seconds.
328
+
329
+ The other problem I had was caused by the fact that I wanted the hint to fade
330
+ in and out. It can be easily achieved by transitioning the opacity property.
331
+ But that also meant that the hint was always on the screen, even if totally
332
+ transparent. It covered part of the screen and you couldn't correctly clicked
333
+ through it.
334
+ Unfortunately you cannot transition between display `block` and `none` in pure
335
+ CSS, so I needed a way to not only fade out the hint but also move it out of
336
+ the screen.
337
+
338
+ I solved this problem by positioning the hint below the bottom of the screen
339
+ with CSS transform and moving it up to show it. But I also didn't want this move
340
+ to be visible. I wanted the hint only to fade in and out visually, so I delayed
341
+ the fade in transition, so it starts when the hint is already in its correct
342
+ position on the screen.
343
+
344
+ I know, it sounds complicated ... maybe it would be easier with the code?
345
+ */
346
+
347
+ .hint {
348
+ /*
349
+ We hide the hint until presentation is started and from browsers not supporting
350
+ impress.js, as they will have a linear scrollable view ...
351
+ */
352
+ display: none;
353
+
354
+ /*
355
+ ... and give it some fixed position and nice styles.
356
+ */
357
+ position: fixed;
358
+ left: 0;
359
+ right: 0;
360
+ bottom: 200px;
361
+
362
+ background: rgba(0,0,0,0.5);
363
+ color: #EEE;
364
+ text-align: center;
365
+
366
+ font-size: 50px;
367
+ padding: 20px;
368
+
369
+ z-index: 100;
370
+
371
+ /*
372
+ By default we don't want the hint to be visible, so we make it transparent ...
373
+ */
374
+ opacity: 0;
375
+
376
+ /*
377
+ ... and position it below the bottom of the screen (relative to it's fixed position)
378
+ */
379
+ -webkit-transform: translateY(400px);
380
+ -moz-transform: translateY(400px);
381
+ -ms-transform: translateY(400px);
382
+ -o-transform: translateY(400px);
383
+ transform: translateY(400px);
384
+
385
+ /*
386
+ Now let's imagine that the hint is visible and we want to fade it out and move out
387
+ of the screen.
388
+
389
+ So we define the transition on the opacity property with 1s duration and another
390
+ transition on transform property delayed by 1s so it will happen after the fade out
391
+ on opacity finished.
392
+
393
+ This way user will not see the hint moving down.
394
+ */
395
+ -webkit-transition: opacity 1s, -webkit-transform 0.5s 1s;
396
+ -moz-transition: opacity 1s, -moz-transform 0.5s 1s;
397
+ -ms-transition: opacity 1s, -ms-transform 0.5s 1s;
398
+ -o-transition: opacity 1s, -o-transform 0.5s 1s;
399
+ transition: opacity 1s, transform 0.5s 1s;
400
+ }
401
+
402
+ /*
403
+ Now we 'enable' the hint when presentation is initialized ...
404
+ */
405
+ .impress-enabled .hint { display: block }
406
+
407
+ /*
408
+ ... and we will show it when the first step (with id 'bored') is active.
409
+ */
410
+ .impress-on-bored .hint {
411
+ /*
412
+ We remove the transparency and position the hint in its default fixed
413
+ position.
414
+ */
415
+ opacity: 1;
416
+
417
+ -webkit-transform: translateY(0px);
418
+ -moz-transform: translateY(0px);
419
+ -ms-transform: translateY(0px);
420
+ -o-transform: translateY(0px);
421
+ transform: translateY(0px);
422
+
423
+ /*
424
+ Now for fade in transition we have the oposite situation from the one
425
+ above.
426
+
427
+ First after 4.5s delay we animate the transform property to move the hint
428
+ into its correct position and after that we fade it in with opacity
429
+ transition.
430
+ */
431
+ -webkit-transition: opacity 1s 5s, -webkit-transform 0.5s 4.5s;
432
+ -moz-transition: opacity 1s 5s, -moz-transform 0.5s 4.5s;
433
+ -ms-transition: opacity 1s 5s, -ms-transform 0.5s 4.5s;
434
+ -o-transition: opacity 1s 5s, -o-transform 0.5s 4.5s;
435
+ transition: opacity 1s 5s, transform 0.5s 4.5s;
436
+ }
437
+
438
+ /*
439
+ And as the last thing there is a workaround for quite strange bug.
440
+ It happens a lot in Chrome. I don't remember if I've seen it in Firefox.
441
+
442
+ Sometimes the element positioned in 3D (especially when it's moved back
443
+ along Z axis) is not clickable, because it falls 'behind' the <body>
444
+ element.
445
+
446
+ To prevent this, I decided to make <body> non clickable by setting
447
+ pointer-events property to `none` value.
448
+ Value if this property is inherited, so to make everything else clickable
449
+ I bring it back on the #impress element.
450
+
451
+ If you want to know more about `pointer-events` here are some docs:
452
+ https://developer.mozilla.org/en/CSS/pointer-events
453
+
454
+ There is one very important thing to notice about this workaround - it makes
455
+ everything 'unclickable' except what's in #impress element.
456
+
457
+ So use it wisely ... or don't use at all.
458
+ */
459
+ .impress-enabled { pointer-events: none }
460
+ .impress-enabled #impress { pointer-events: auto }
461
+
462
+ /*
463
+ There is one funny thing I just realized.
464
+
465
+ Thanks to this workaround above everything except #impress element is invisible
466
+ for click events. That means that the hint element is also not clickable.
467
+ So basically all of this transforms and delayed transitions trickery was probably
468
+ not needed at all...
469
+
470
+ But it was fun to learn about it, wasn't it?
471
+ */
472
+
473
+ /*
474
+ That's all I have for you in this file.
475
+ Thanks for reading. I hope you enjoyed it at least as much as I enjoyed writing it
476
+ for you.
477
+ */
@@ -0,0 +1,4 @@
1
+ ---
2
+ arrangement: horizontal
3
+ impress-config:
4
+ transition-duration: 200
@@ -0,0 +1,3 @@
1
+ <script type="text/javascript" src="assets/javascript/sockjs-0.2.1.js"></script>
2
+ <script src="assets/javascript/highlight.pack.js"></script>
3
+ <script>hljs.initHighlightingOnLoad();</script>
@@ -0,0 +1,44 @@
1
+ <!doctype html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <meta name="viewport" content="width=1024" />
6
+ <meta name="apple-mobile-web-app-capable" content="yes" />
7
+ <title><%= presentation.title %></title>
8
+
9
+ <meta name="description" content="<%= presentation.description %>" />
10
+ <meta name="author" content="<%= presentation.author_name %>" />
11
+
12
+ <%= render 'stylesheets.html' %>
13
+ <%= render 'header-javascript.html' %>
14
+ </head>
15
+
16
+ <body class="impress-not-supported">
17
+
18
+ <div class="fallback-message">
19
+ <p>Your browser <b>doesn't support the features required</b> by impress.js, so you are presented with a simplified version of this presentation.</p>
20
+ <p>For the best experience please use the latest <b>Chrome</b>, <b>Safari</b> or <b>Firefox</b> browser.</p>
21
+ </div>
22
+
23
+ <div id="impress" <% impress_config.each_pair do |name, value| %>
24
+ data-<%= name %>="<%= value %>"
25
+ <% end %>>
26
+ <% slides.each do |slide| %>
27
+ <div <%= slide.impress_attrs %>>
28
+ <%= slide.content %>
29
+ <%= render 'slide-notes.html', slide %>
30
+ </div>
31
+ <% end %>
32
+ </div>
33
+
34
+ <div class="hint">
35
+ <p id="mouse-hint">Use a spacebar or arrow keys to navigate</p>
36
+ <p id="touch-hint" style="display:none">Tap on the left or right to navigate</p>
37
+ </div>
38
+
39
+ <script src="/javascript/impress.js"></script>
40
+ <%= render 'live-javascript.html' %>
41
+ <script>impress().init();</script>
42
+
43
+ </body>
44
+ </html>
@@ -0,0 +1,77 @@
1
+ <html>
2
+ <head>
3
+ <style type="text/css">
4
+ table{
5
+ font-size: 1px
6
+ }
7
+ td {
8
+ padding: 0;
9
+ width: 10px;
10
+ height: 10px
11
+ }
12
+
13
+ td.light {
14
+ background-color: white
15
+ }
16
+
17
+ td.dark {
18
+ background-color: black
19
+ }
20
+ </style>
21
+
22
+ <script type="text/javascript" src="/assets/javascript/sockjs-0.2.1.js"></script>
23
+ <script type="text/javascript">
24
+ var sock = new SockJS("/live/follower");
25
+
26
+ sock.onopen = function() {
27
+ console.log("open");
28
+ };
29
+
30
+ sock.onmessage = function(e) {
31
+ console.log("message", e.data);
32
+ document.location = "<%= view_url %>"
33
+ };
34
+
35
+ sock.onclose = function() {
36
+ console.log("close");
37
+ };
38
+ </script>
39
+ <link href="assets/stylesheets/setup.css" rel="stylesheet" />
40
+ </head>
41
+ <body>
42
+ <h2>Welcome to your presentation!</h2>
43
+ <p>This is the setup page. From here, there are three steps to getting started:</p>
44
+ <ol>
45
+ <li>
46
+ <p>Start a presenter's control page by either:
47
+ <ul>
48
+ <li>
49
+ Scanning this QR code to control the presentation from your smart phone
50
+ <table cellspacing="0">
51
+ <% module_count.times do |x| %>
52
+ <tr>
53
+ <% module_count.times do |y| %>
54
+ <td class='<%= dark?(x,y) ? "dark" : "light" %>'>&nbsp</td>
55
+ <% end %>
56
+ </tr>
57
+ <% end %>
58
+ </table>
59
+ </li>
60
+ <li>
61
+ <a href="<%= presenter_url %>" target="rhet-butler-presenter">Clicking on this link</a>
62
+ to control the presentation from another browser window
63
+ </li>
64
+ </ul>
65
+
66
+ <p>This window will become a viewer window when you do that.</p>
67
+ </li>
68
+ <li>Connect a projector, and configure your computer to output side-by-side.</li>
69
+ <li>Maximize this window on the projector, and begin.</li>
70
+ </ol>
71
+
72
+ <p> If you have trouble, or just don't want to use this technique, you can always just
73
+ <a href="<%= view_url %>">go to presentation</a></p>
74
+
75
+ <p>Breathe deep, relax, make eye contact. Have fun!</p>
76
+ </body>
77
+ </html>
@@ -0,0 +1,3 @@
1
+ <link href="/stylesheets/google-open-sans.css" rel="stylesheet" />
2
+ <link href="/stylesheets/presentation.css" rel="stylesheet" />
3
+ <link href="/stylesheets/highlight/solarized_dark.css" rel="stylesheet" />
@@ -0,0 +1,7 @@
1
+ ---
2
+ impress-config:
3
+ transition-duration: 200
4
+ blueprint:
5
+ - !layout-rule
6
+ - default
7
+ - [ linear, [ 1000, 0 ]]
@@ -0,0 +1,26 @@
1
+ <script type="text/javascript">
2
+ function sockJSSetup(){
3
+ var sock = new SockJS("/live/leader", null, {debug: true});
4
+ var currentStep = null;
5
+
6
+ var earlyStepEnter = function(event){ currentStep = event.target.id };
7
+ document.addEventListener("impress:stepenter", earlyStepEnter);
8
+
9
+ var handleSockOpen = function() {
10
+ document.removeEventListener("impress:stepenter", earlyStepEnter);
11
+ document.addEventListener("impress:stepenter", function(event){
12
+ sock.send(event.target.id);
13
+ })
14
+ if(currentStep !== null){
15
+ sock.send(currentStep);
16
+ }
17
+ sock.removeEventListener("open", handleSockOpen);
18
+ };
19
+
20
+ sock.addEventListener("open", handleSockOpen);
21
+ if(sock.readyState === SockJS.OPEN){
22
+ handleSockOpen();
23
+ }
24
+ };
25
+ sockJSSetup();
26
+ </script>
@@ -0,0 +1,3 @@
1
+ <div class="notes">
2
+ <%= notes %>
3
+ </div>
@@ -0,0 +1,3 @@
1
+ <link href="/stylesheets/google-open-sans.css" rel="stylesheet" />
2
+ <link href="/stylesheets/presenter/presentation.css" rel="stylesheet" />
3
+ <link href="/stylesheets/highlight/solarized_dark.css" rel="stylesheet" />
@@ -0,0 +1,7 @@
1
+ ---
2
+ impress-config:
3
+ transition-duration: 200
4
+ blueprint:
5
+ - !layout-rule
6
+ - default
7
+ - [ linear, [ 1000, 0 ]]
@@ -0,0 +1,16 @@
1
+ <script type="text/javascript">
2
+ var sock = new SockJS("/live/follower");
3
+
4
+ sock.onopen = function() {
5
+ console.log("open");
6
+ };
7
+
8
+ sock.onmessage = function(e) {
9
+ console.log("message", e.data);
10
+ impress().goto(e.data);
11
+ };
12
+
13
+ sock.onclose = function() {
14
+ console.log("close");
15
+ };
16
+ </script>