slippery 0.4.1 → 0.4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (293) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +2 -2
  3. data/assets/LICENSE.md +21 -0
  4. data/assets/README.md +48 -0
  5. data/assets/highlight.js/CHANGES.md +693 -0
  6. data/assets/highlight.js/README.md +86 -37
  7. data/assets/highlight.js/README.ru.md +65 -24
  8. data/assets/highlight.js/highlight.pack.js +2 -1
  9. data/assets/highlight.js/styles/agate.css +108 -0
  10. data/assets/highlight.js/styles/androidstudio.css +66 -0
  11. data/assets/highlight.js/styles/arduino-light.css +88 -0
  12. data/assets/highlight.js/styles/arta.css +25 -93
  13. data/assets/highlight.js/styles/ascetic.css +20 -28
  14. data/assets/highlight.js/styles/atelier-cave-dark.css +83 -0
  15. data/assets/highlight.js/styles/atelier-cave-light.css +85 -0
  16. data/assets/highlight.js/styles/atelier-dune-dark.css +69 -0
  17. data/assets/highlight.js/styles/atelier-dune-light.css +69 -0
  18. data/assets/highlight.js/styles/atelier-estuary-dark.css +84 -0
  19. data/assets/highlight.js/styles/atelier-estuary-light.css +84 -0
  20. data/assets/highlight.js/styles/atelier-forest-dark.css +69 -0
  21. data/assets/highlight.js/styles/atelier-forest-light.css +69 -0
  22. data/assets/highlight.js/styles/atelier-heath-dark.css +69 -0
  23. data/assets/highlight.js/styles/atelier-heath-light.css +69 -0
  24. data/assets/highlight.js/styles/atelier-lakeside-dark.css +69 -0
  25. data/assets/highlight.js/styles/atelier-lakeside-light.css +69 -0
  26. data/assets/highlight.js/styles/atelier-plateau-dark.css +84 -0
  27. data/assets/highlight.js/styles/atelier-plateau-light.css +84 -0
  28. data/assets/highlight.js/styles/atelier-savanna-dark.css +84 -0
  29. data/assets/highlight.js/styles/atelier-savanna-light.css +84 -0
  30. data/assets/highlight.js/styles/atelier-seaside-dark.css +69 -0
  31. data/assets/highlight.js/styles/atelier-seaside-light.css +69 -0
  32. data/assets/highlight.js/styles/atelier-sulphurpool-dark.css +69 -0
  33. data/assets/highlight.js/styles/atelier-sulphurpool-light.css +69 -0
  34. data/assets/highlight.js/styles/atom-one-dark.css +96 -0
  35. data/assets/highlight.js/styles/atom-one-light.css +96 -0
  36. data/assets/highlight.js/styles/brown-paper.css +64 -0
  37. data/assets/highlight.js/styles/codepen-embed.css +22 -70
  38. data/assets/highlight.js/styles/color-brewer.css +20 -118
  39. data/assets/highlight.js/styles/darcula.css +77 -0
  40. data/assets/highlight.js/styles/dark.css +20 -62
  41. data/assets/highlight.js/styles/darkula.css +6 -0
  42. data/assets/highlight.js/styles/default.css +67 -121
  43. data/assets/highlight.js/styles/docco.css +22 -61
  44. data/assets/highlight.js/styles/dracula.css +76 -0
  45. data/assets/highlight.js/styles/far.css +26 -67
  46. data/assets/highlight.js/styles/foundation.css +22 -70
  47. data/assets/highlight.js/styles/github-gist.css +71 -0
  48. data/assets/highlight.js/styles/github.css +23 -51
  49. data/assets/highlight.js/styles/googlecode.css +29 -88
  50. data/assets/highlight.js/styles/grayscale.css +101 -0
  51. data/assets/highlight.js/styles/gruvbox-dark.css +108 -0
  52. data/assets/highlight.js/styles/gruvbox-light.css +108 -0
  53. data/assets/highlight.js/styles/hopscotch.css +83 -0
  54. data/assets/highlight.js/styles/hybrid.css +22 -91
  55. data/assets/highlight.js/styles/idea.css +24 -53
  56. data/assets/highlight.js/styles/ir-black.css +73 -0
  57. data/assets/highlight.js/styles/kimbie.dark.css +24 -46
  58. data/assets/highlight.js/styles/kimbie.light.css +24 -46
  59. data/assets/highlight.js/styles/magula.css +19 -71
  60. data/assets/highlight.js/styles/mono-blue.css +22 -33
  61. data/assets/highlight.js/styles/monokai-sublime.css +83 -0
  62. data/assets/highlight.js/styles/monokai.css +23 -80
  63. data/assets/highlight.js/styles/obsidian.css +26 -92
  64. data/assets/highlight.js/styles/ocean.css +74 -0
  65. data/assets/highlight.js/styles/paraiso-dark.css +72 -0
  66. data/assets/highlight.js/styles/paraiso-light.css +72 -0
  67. data/assets/highlight.js/styles/pojoaque.css +29 -54
  68. data/assets/highlight.js/styles/purebasic.css +96 -0
  69. data/assets/highlight.js/styles/qtcreator_dark.css +83 -0
  70. data/assets/highlight.js/styles/qtcreator_light.css +83 -0
  71. data/assets/highlight.js/styles/railscasts.css +32 -111
  72. data/assets/highlight.js/styles/rainbow.css +34 -58
  73. data/assets/highlight.js/styles/routeros.css +108 -0
  74. data/assets/highlight.js/styles/school-book.css +72 -0
  75. data/assets/highlight.js/styles/solarized-dark.css +84 -0
  76. data/assets/highlight.js/styles/solarized-light.css +84 -0
  77. data/assets/highlight.js/styles/sunburst.css +28 -91
  78. data/assets/highlight.js/styles/tomorrow-night-blue.css +23 -43
  79. data/assets/highlight.js/styles/tomorrow-night-bright.css +23 -43
  80. data/assets/highlight.js/styles/tomorrow-night-eighties.css +23 -43
  81. data/assets/highlight.js/styles/tomorrow-night.css +23 -43
  82. data/assets/highlight.js/styles/tomorrow.css +23 -43
  83. data/assets/highlight.js/styles/vs.css +33 -59
  84. data/assets/highlight.js/styles/vs2015.css +115 -0
  85. data/assets/highlight.js/styles/xcode.css +28 -94
  86. data/assets/highlight.js/styles/xt256.css +92 -0
  87. data/assets/highlight.js/styles/zenburn.css +26 -65
  88. data/assets/index.html +186 -0
  89. data/assets/pictures/cover.jpg +0 -0
  90. data/assets/pictures/logo.svg +3 -0
  91. data/assets/pictures/picture.jpg +0 -0
  92. data/assets/reveal.js/css/print/paper.css +193 -167
  93. data/assets/reveal.js/css/print/pdf.css +20 -53
  94. data/assets/reveal.js/css/reveal.css +953 -1663
  95. data/assets/reveal.js/css/reveal.min.css +3 -3
  96. data/assets/reveal.js/css/reveal.scss +1319 -0
  97. data/assets/reveal.js/css/theme/README.md +2 -4
  98. data/assets/reveal.js/css/theme/beige.css +183 -60
  99. data/assets/reveal.js/css/theme/black.css +267 -0
  100. data/assets/reveal.js/css/theme/blood.css +190 -80
  101. data/assets/reveal.js/css/theme/league.css +273 -0
  102. data/assets/reveal.js/css/theme/moon.css +174 -51
  103. data/assets/reveal.js/css/theme/night.css +171 -42
  104. data/assets/reveal.js/css/theme/serif.css +187 -58
  105. data/assets/reveal.js/css/theme/simple.css +179 -50
  106. data/assets/reveal.js/css/theme/sky.css +176 -47
  107. data/assets/reveal.js/css/theme/solarized.css +174 -51
  108. data/assets/reveal.js/css/theme/source/beige.scss +1 -12
  109. data/assets/reveal.js/css/theme/source/black.scss +49 -0
  110. data/assets/reveal.js/css/theme/source/blood.scss +3 -15
  111. data/assets/reveal.js/css/theme/source/{default.scss → league.scss} +5 -13
  112. data/assets/reveal.js/css/theme/source/moon.scss +1 -12
  113. data/assets/reveal.js/css/theme/source/serif.scss +1 -1
  114. data/assets/reveal.js/css/theme/source/sky.scss +1 -1
  115. data/assets/reveal.js/css/theme/source/solarized.scss +1 -12
  116. data/assets/reveal.js/css/theme/source/white.scss +49 -0
  117. data/assets/reveal.js/css/theme/template/settings.scss +13 -4
  118. data/assets/reveal.js/css/theme/template/theme.scss +193 -14
  119. data/assets/reveal.js/css/theme/white.css +267 -0
  120. data/assets/reveal.js/js/reveal.js +1572 -446
  121. data/assets/reveal.js/js/reveal.min.js +4 -4
  122. data/assets/reveal.js/lib/css/zenburn.css +74 -71
  123. data/assets/reveal.js/lib/font/league-gothic/league-gothic.css +10 -0
  124. data/assets/reveal.js/lib/font/league-gothic/league-gothic.eot +0 -0
  125. data/assets/reveal.js/lib/font/league-gothic/league-gothic.ttf +0 -0
  126. data/assets/reveal.js/lib/font/league-gothic/league-gothic.woff +0 -0
  127. data/assets/reveal.js/lib/font/source-sans-pro/LICENSE +45 -0
  128. data/assets/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.eot +0 -0
  129. data/assets/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.ttf +0 -0
  130. data/assets/reveal.js/lib/font/source-sans-pro/source-sans-pro-italic.woff +0 -0
  131. data/assets/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.eot +0 -0
  132. data/assets/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.ttf +0 -0
  133. data/assets/reveal.js/lib/font/source-sans-pro/source-sans-pro-regular.woff +0 -0
  134. data/assets/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.eot +0 -0
  135. data/assets/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.ttf +0 -0
  136. data/assets/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibold.woff +0 -0
  137. data/assets/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.eot +0 -0
  138. data/assets/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.ttf +0 -0
  139. data/assets/reveal.js/lib/font/source-sans-pro/source-sans-pro-semibolditalic.woff +0 -0
  140. data/assets/reveal.js/lib/font/source-sans-pro/source-sans-pro.css +39 -0
  141. data/assets/reveal.js/plugin/highlight/highlight.js +2 -4
  142. data/assets/reveal.js/plugin/leap/leap.js +4 -2
  143. data/assets/reveal.js/plugin/markdown/example.html +3 -3
  144. data/assets/reveal.js/plugin/markdown/markdown.js +10 -9
  145. data/assets/reveal.js/plugin/markdown/marked.js +2 -33
  146. data/assets/reveal.js/plugin/math/math.js +1 -1
  147. data/assets/reveal.js/plugin/notes/notes.html +321 -182
  148. data/assets/reveal.js/plugin/notes/notes.js +89 -45
  149. data/assets/reveal.js/plugin/notes-server/client.js +49 -46
  150. data/assets/reveal.js/plugin/notes-server/index.js +28 -21
  151. data/assets/reveal.js/plugin/notes-server/notes.html +351 -97
  152. data/assets/reveal.js/plugin/print-pdf/print-pdf.js +24 -20
  153. data/assets/reveal.js/plugin/zoom-js/zoom.js +78 -58
  154. data/assets/shower/shower.min.js +8 -0
  155. data/assets/shower/themes/material/LICENSE.md +21 -0
  156. data/assets/shower/themes/material/README.md +45 -0
  157. data/assets/shower/themes/material/fonts/COPYRIGHT.txt +1 -0
  158. data/assets/shower/themes/material/fonts/LICENSE.txt +202 -0
  159. data/assets/shower/themes/material/fonts/roboto-bold-italic.woff2 +0 -0
  160. data/assets/shower/themes/material/fonts/roboto-bold.woff2 +0 -0
  161. data/assets/shower/themes/material/fonts/roboto-italic.woff2 +0 -0
  162. data/assets/shower/themes/material/fonts/roboto-light.woff2 +0 -0
  163. data/assets/shower/themes/material/fonts/roboto-mono-regular.woff2 +0 -0
  164. data/assets/shower/themes/material/fonts/roboto-regular.woff2 +0 -0
  165. data/assets/shower/themes/material/index.html +488 -0
  166. data/assets/shower/themes/material/pictures/canvas.png +0 -0
  167. data/assets/shower/themes/material/pictures/exact.svg +3 -0
  168. data/assets/shower/themes/material/pictures/picture-1.svg +3 -0
  169. data/assets/shower/themes/material/pictures/picture-2.svg +3 -0
  170. data/assets/shower/themes/material/pictures/picture-3.svg +3 -0
  171. data/assets/shower/themes/material/pictures/square.svg +3 -0
  172. data/assets/shower/themes/material/pictures/tall.svg +3 -0
  173. data/assets/shower/themes/material/pictures/wide.svg +3 -0
  174. data/assets/shower/themes/material/styles/blocks/badge.css +65 -0
  175. data/assets/shower/themes/material/styles/blocks/caption.css +67 -0
  176. data/assets/shower/themes/material/styles/blocks/progress.css +37 -0
  177. data/assets/shower/themes/material/styles/blocks/region.css +29 -0
  178. data/assets/shower/themes/material/styles/fonts.css +64 -0
  179. data/assets/shower/themes/material/styles/shower/grid.svg +50 -0
  180. data/assets/shower/themes/material/styles/shower/shower-full.css +13 -0
  181. data/assets/shower/themes/material/styles/shower/shower-grid.css +13 -0
  182. data/assets/shower/themes/material/styles/shower/shower-list.css +30 -0
  183. data/assets/shower/themes/material/styles/shower/shower-print.css +11 -0
  184. data/assets/shower/themes/material/styles/shower/shower.css +39 -0
  185. data/assets/shower/themes/material/styles/slide/content/basic.css +23 -0
  186. data/assets/shower/themes/material/styles/slide/content/code.css +80 -0
  187. data/assets/shower/themes/material/styles/slide/content/footer.css +29 -0
  188. data/assets/shower/themes/material/styles/slide/content/inline.css +49 -0
  189. data/assets/shower/themes/material/styles/slide/content/lists.css +54 -0
  190. data/assets/shower/themes/material/styles/slide/content/quote.css +24 -0
  191. data/assets/shower/themes/material/styles/slide/content/table.css +53 -0
  192. data/assets/shower/themes/material/styles/slide/elements/columns.css +19 -0
  193. data/assets/shower/themes/material/styles/slide/elements/copyright.css +38 -0
  194. data/assets/shower/themes/material/styles/slide/elements/cover.css +25 -0
  195. data/assets/shower/themes/material/styles/slide/elements/next.css +9 -0
  196. data/assets/shower/themes/material/styles/slide/elements/place.css +63 -0
  197. data/assets/shower/themes/material/styles/slide/elements/shout.css +53 -0
  198. data/assets/shower/themes/material/styles/slide/modifiers/black.css +5 -0
  199. data/assets/shower/themes/material/styles/slide/modifiers/clear.css +11 -0
  200. data/assets/shower/themes/material/styles/slide/modifiers/white.css +5 -0
  201. data/assets/shower/themes/material/styles/slide/slide-full.css +16 -0
  202. data/assets/shower/themes/material/styles/slide/slide-list.css +68 -0
  203. data/assets/shower/themes/material/styles/slide/slide.css +56 -0
  204. data/assets/shower/themes/material/styles/styles.css +9 -0
  205. data/assets/shower/themes/ribbon/LICENSE.md +21 -0
  206. data/assets/shower/themes/ribbon/README.md +41 -0
  207. data/assets/shower/themes/ribbon/fonts/LICENSE.txt +44 -0
  208. data/assets/shower/themes/ribbon/fonts/pt-mono-regular.woff2 +0 -0
  209. data/assets/shower/themes/ribbon/fonts/pt-sans-bold-italic.woff2 +0 -0
  210. data/assets/shower/themes/ribbon/fonts/pt-sans-bold.woff2 +0 -0
  211. data/assets/shower/themes/ribbon/fonts/pt-sans-italic.woff2 +0 -0
  212. data/assets/shower/themes/ribbon/fonts/pt-sans-narrow-bold.woff2 +0 -0
  213. data/assets/shower/themes/ribbon/fonts/pt-sans-regular.woff2 +0 -0
  214. data/assets/shower/themes/ribbon/index.html +490 -0
  215. data/assets/shower/themes/ribbon/pictures/canvas.png +0 -0
  216. data/assets/shower/themes/ribbon/pictures/exact.svg +3 -0
  217. data/assets/shower/themes/ribbon/pictures/picture-1.svg +3 -0
  218. data/assets/shower/themes/ribbon/pictures/picture-2.svg +3 -0
  219. data/assets/shower/themes/ribbon/pictures/picture-3.svg +3 -0
  220. data/assets/shower/themes/ribbon/pictures/square.svg +3 -0
  221. data/assets/shower/themes/ribbon/pictures/tall.svg +3 -0
  222. data/assets/shower/themes/ribbon/pictures/wide.svg +3 -0
  223. data/assets/shower/themes/ribbon/styles/blocks/badge.css +63 -0
  224. data/assets/shower/themes/ribbon/styles/blocks/caption.css +63 -0
  225. data/assets/shower/themes/ribbon/styles/blocks/progress.css +46 -0
  226. data/assets/shower/themes/ribbon/styles/blocks/region.css +29 -0
  227. data/assets/shower/themes/ribbon/styles/fonts.css +64 -0
  228. data/assets/shower/themes/ribbon/styles/shower/grid.svg +40 -0
  229. data/assets/shower/themes/ribbon/styles/shower/shower-full.css +13 -0
  230. data/assets/shower/themes/ribbon/styles/shower/shower-grid.css +13 -0
  231. data/assets/shower/themes/ribbon/styles/shower/shower-list.css +30 -0
  232. data/assets/shower/themes/ribbon/styles/shower/shower-print.css +11 -0
  233. data/assets/shower/themes/ribbon/styles/shower/shower.css +32 -0
  234. data/assets/shower/themes/ribbon/styles/slide/content/basic.css +21 -0
  235. data/assets/shower/themes/ribbon/styles/slide/content/code.css +82 -0
  236. data/assets/shower/themes/ribbon/styles/slide/content/footer.css +29 -0
  237. data/assets/shower/themes/ribbon/styles/slide/content/inline.css +50 -0
  238. data/assets/shower/themes/ribbon/styles/slide/content/lists.css +55 -0
  239. data/assets/shower/themes/ribbon/styles/slide/content/quote.css +23 -0
  240. data/assets/shower/themes/ribbon/styles/slide/content/table.css +53 -0
  241. data/assets/shower/themes/ribbon/styles/slide/elements/columns.css +19 -0
  242. data/assets/shower/themes/ribbon/styles/slide/elements/copyright.css +38 -0
  243. data/assets/shower/themes/ribbon/styles/slide/elements/cover.css +25 -0
  244. data/assets/shower/themes/ribbon/styles/slide/elements/next.css +9 -0
  245. data/assets/shower/themes/ribbon/styles/slide/elements/place.css +63 -0
  246. data/assets/shower/themes/ribbon/styles/slide/elements/shout.css +54 -0
  247. data/assets/shower/themes/ribbon/styles/slide/modifiers/black.css +5 -0
  248. data/assets/shower/themes/ribbon/styles/slide/modifiers/clear.css +11 -0
  249. data/assets/shower/themes/ribbon/styles/slide/modifiers/white.css +5 -0
  250. data/assets/shower/themes/ribbon/styles/slide/ribbon.svg +1 -0
  251. data/assets/shower/themes/ribbon/styles/slide/slide-full.css +16 -0
  252. data/assets/shower/themes/ribbon/styles/slide/slide-list.css +68 -0
  253. data/assets/shower/themes/ribbon/styles/slide/slide.css +60 -0
  254. data/assets/shower/themes/ribbon/styles/styles.css +9 -0
  255. data/lib/slippery/presentation.rb +4 -0
  256. data/lib/slippery/processors/add_highlight.rb +3 -8
  257. data/lib/slippery/processors/reveal_js/add_reveal_js.rb +1 -1
  258. data/lib/slippery/processors/shower.rb +76 -0
  259. data/lib/slippery/rake_tasks.rb +8 -3
  260. data/lib/slippery/version.rb +1 -1
  261. data/lib/slippery.rb +1 -0
  262. data/slippery.gemspec +3 -3
  263. metadata +194 -56
  264. data/assets/highlight.js/highlight-0.8.default.min.css +0 -1
  265. data/assets/highlight.js/highlight-0.8.min.js +0 -1
  266. data/assets/highlight.js/styles/atelier-dune.dark.css +0 -95
  267. data/assets/highlight.js/styles/atelier-dune.light.css +0 -95
  268. data/assets/highlight.js/styles/atelier-forest.dark.css +0 -95
  269. data/assets/highlight.js/styles/atelier-forest.light.css +0 -95
  270. data/assets/highlight.js/styles/atelier-heath.dark.css +0 -95
  271. data/assets/highlight.js/styles/atelier-heath.light.css +0 -95
  272. data/assets/highlight.js/styles/atelier-lakeside.dark.css +0 -95
  273. data/assets/highlight.js/styles/atelier-lakeside.light.css +0 -95
  274. data/assets/highlight.js/styles/atelier-seaside.dark.css +0 -95
  275. data/assets/highlight.js/styles/atelier-seaside.light.css +0 -95
  276. data/assets/highlight.js/styles/brown_paper.css +0 -105
  277. data/assets/highlight.js/styles/ir_black.css +0 -110
  278. data/assets/highlight.js/styles/monokai_sublime.css +0 -148
  279. data/assets/highlight.js/styles/paraiso.dark.css +0 -95
  280. data/assets/highlight.js/styles/paraiso.light.css +0 -95
  281. data/assets/highlight.js/styles/school_book.css +0 -113
  282. data/assets/highlight.js/styles/solarized_dark.css +0 -109
  283. data/assets/highlight.js/styles/solarized_light.css +0 -109
  284. data/assets/reveal.js/css/theme/default.css +0 -148
  285. data/assets/reveal.js/lib/font/league_gothic-webfont.eot +0 -0
  286. data/assets/reveal.js/lib/font/league_gothic-webfont.svg +0 -230
  287. data/assets/reveal.js/lib/font/league_gothic-webfont.ttf +0 -0
  288. data/assets/reveal.js/lib/font/league_gothic-webfont.woff +0 -0
  289. data/assets/reveal.js/plugin/postmessage/example.html +0 -39
  290. data/assets/reveal.js/plugin/postmessage/postmessage.js +0 -42
  291. /data/assets/highlight.js/styles/{brown_papersq.png → brown-papersq.png} +0 -0
  292. /data/assets/highlight.js/styles/{school_book.png → school-book.png} +0 -0
  293. /data/assets/reveal.js/lib/font/{league_gothic_license → league-gothic/LICENSE} +0 -0
@@ -3,8 +3,6 @@
3
3
  <head>
4
4
  <meta charset="utf-8">
5
5
 
6
- <meta name="viewport" content="width=1150">
7
-
8
6
  <title>reveal.js - Slide Notes</title>
9
7
 
10
8
  <style>
@@ -12,130 +10,386 @@
12
10
  font-family: Helvetica;
13
11
  }
14
12
 
15
- #notes {
16
- font-size: 24px;
17
- width: 640px;
18
- margin-top: 5px;
19
- clear: left;
13
+ #current-slide,
14
+ #upcoming-slide,
15
+ #speaker-controls {
16
+ padding: 6px;
17
+ box-sizing: border-box;
18
+ -moz-box-sizing: border-box;
20
19
  }
21
20
 
22
- #wrap-current-slide {
23
- width: 640px;
24
- height: 512px;
25
- float: left;
26
- overflow: hidden;
21
+ #current-slide iframe,
22
+ #upcoming-slide iframe {
23
+ width: 100%;
24
+ height: 100%;
25
+ border: 1px solid #ddd;
27
26
  }
28
27
 
29
- #current-slide {
30
- width: 1280px;
31
- height: 1024px;
32
- border: none;
33
-
34
- -webkit-transform-origin: 0 0;
35
- -moz-transform-origin: 0 0;
36
- -ms-transform-origin: 0 0;
37
- -o-transform-origin: 0 0;
38
- transform-origin: 0 0;
39
-
40
- -webkit-transform: scale(0.5);
41
- -moz-transform: scale(0.5);
42
- -ms-transform: scale(0.5);
43
- -o-transform: scale(0.5);
44
- transform: scale(0.5);
45
- }
46
-
47
- #wrap-next-slide {
48
- width: 448px;
49
- height: 358px;
50
- float: left;
51
- margin: 0 0 0 10px;
52
- overflow: hidden;
53
- }
54
-
55
- #next-slide {
56
- width: 1280px;
57
- height: 1024px;
58
- border: none;
59
-
60
- -webkit-transform-origin: 0 0;
61
- -moz-transform-origin: 0 0;
62
- -ms-transform-origin: 0 0;
63
- -o-transform-origin: 0 0;
64
- transform-origin: 0 0;
65
-
66
- -webkit-transform: scale(0.35);
67
- -moz-transform: scale(0.35);
68
- -ms-transform: scale(0.35);
69
- -o-transform: scale(0.35);
70
- transform: scale(0.35);
71
- }
72
-
73
- .slides {
74
- position: relative;
75
- margin-bottom: 10px;
76
- border: 1px solid black;
77
- border-radius: 2px;
78
- background: rgb(28, 30, 32);
79
- }
80
-
81
- .slides span {
28
+ #current-slide .label,
29
+ #upcoming-slide .label {
82
30
  position: absolute;
83
- top: 3px;
84
- left: 3px;
31
+ top: 10px;
32
+ left: 10px;
85
33
  font-weight: bold;
86
34
  font-size: 14px;
35
+ z-index: 2;
87
36
  color: rgba( 255, 255, 255, 0.9 );
88
37
  }
38
+
39
+ #current-slide {
40
+ position: absolute;
41
+ width: 65%;
42
+ height: 100%;
43
+ top: 0;
44
+ left: 0;
45
+ padding-right: 0;
46
+ }
47
+
48
+ #upcoming-slide {
49
+ position: absolute;
50
+ width: 35%;
51
+ height: 40%;
52
+ right: 0;
53
+ top: 0;
54
+ }
55
+
56
+ #speaker-controls {
57
+ position: absolute;
58
+ top: 40%;
59
+ right: 0;
60
+ width: 35%;
61
+ height: 60%;
62
+
63
+ font-size: 18px;
64
+ }
65
+
66
+ .speaker-controls-time.hidden,
67
+ .speaker-controls-notes.hidden {
68
+ display: none;
69
+ }
70
+
71
+ .speaker-controls-time .label,
72
+ .speaker-controls-notes .label {
73
+ text-transform: uppercase;
74
+ font-weight: normal;
75
+ font-size: 0.66em;
76
+ color: #666;
77
+ margin: 0;
78
+ }
79
+
80
+ .speaker-controls-time {
81
+ border-bottom: 1px solid rgba( 200, 200, 200, 0.5 );
82
+ margin-bottom: 10px;
83
+ padding: 10px 16px;
84
+ padding-bottom: 20px;
85
+ cursor: pointer;
86
+ }
87
+
88
+ .speaker-controls-time .reset-button {
89
+ opacity: 0;
90
+ float: right;
91
+ color: #666;
92
+ text-decoration: none;
93
+ }
94
+ .speaker-controls-time:hover .reset-button {
95
+ opacity: 1;
96
+ }
97
+
98
+ .speaker-controls-time .timer,
99
+ .speaker-controls-time .clock {
100
+ width: 50%;
101
+ font-size: 1.9em;
102
+ }
103
+
104
+ .speaker-controls-time .timer {
105
+ float: left;
106
+ }
107
+
108
+ .speaker-controls-time .clock {
109
+ float: right;
110
+ text-align: right;
111
+ }
112
+
113
+ .speaker-controls-time span.mute {
114
+ color: #bbb;
115
+ }
116
+
117
+ .speaker-controls-notes {
118
+ padding: 10px 16px;
119
+ }
120
+
121
+ .speaker-controls-notes .value {
122
+ margin-top: 5px;
123
+ line-height: 1.4;
124
+ font-size: 1.2em;
125
+ }
126
+
127
+ .clear {
128
+ clear: both;
129
+ }
130
+
131
+ @media screen and (max-width: 1080px) {
132
+ #speaker-controls {
133
+ font-size: 16px;
134
+ }
135
+ }
136
+
137
+ @media screen and (max-width: 900px) {
138
+ #speaker-controls {
139
+ font-size: 14px;
140
+ }
141
+ }
142
+
143
+ @media screen and (max-width: 800px) {
144
+ #speaker-controls {
145
+ font-size: 12px;
146
+ }
147
+ }
148
+
89
149
  </style>
90
150
  </head>
91
151
 
92
152
  <body>
93
153
 
94
- <div id="wrap-current-slide" class="slides">
95
- <iframe src="/?receiver" width="1280" height="1024" id="current-slide"></iframe>
96
- </div>
154
+ <div id="current-slide"></div>
155
+ <div id="upcoming-slide"><span class="label">UPCOMING:</span></div>
156
+ <div id="speaker-controls">
157
+ <div class="speaker-controls-time">
158
+ <h4 class="label">Time <span class="reset-button">Click to Reset</span></h4>
159
+ <div class="clock">
160
+ <span class="clock-value">0:00 AM</span>
161
+ </div>
162
+ <div class="timer">
163
+ <span class="hours-value">00</span><span class="minutes-value">:00</span><span class="seconds-value">:00</span>
164
+ </div>
165
+ <div class="clear"></div>
166
+ </div>
97
167
 
98
- <div id="wrap-next-slide" class="slides">
99
- <iframe src="/?receiver" width="640" height="512" id="next-slide"></iframe>
100
- <span>UPCOMING:</span>
168
+ <div class="speaker-controls-notes hidden">
169
+ <h4 class="label">Notes</h4>
170
+ <div class="value"></div>
171
+ </div>
101
172
  </div>
102
- <div id="notes"></div>
103
173
 
104
174
  <script src="/socket.io/socket.io.js"></script>
105
175
  <script src="/plugin/markdown/marked.js"></script>
106
176
 
107
177
  <script>
108
- var socketId = '{{socketId}}';
109
- var socket = io.connect(window.location.origin);
110
- var notes = document.getElementById('notes');
111
- var currentSlide = document.getElementById('current-slide');
112
- var nextSlide = document.getElementById('next-slide');
178
+ (function() {
179
+
180
+ var notes,
181
+ notesValue,
182
+ currentState,
183
+ currentSlide,
184
+ upcomingSlide,
185
+ connected = false;
186
+
187
+ var socket = io.connect( window.location.origin ),
188
+ socketId = '{{socketId}}';
189
+
190
+ socket.on( 'statechanged', function( data ) {
191
+
192
+ // ignore data from sockets that aren't ours
193
+ if( data.socketId !== socketId ) { return; }
194
+
195
+ if( connected === false ) {
196
+ connected = true;
197
+
198
+ setupIframes( data );
199
+ setupKeyboard();
200
+ setupNotes();
201
+ setupTimer();
202
+
203
+ }
204
+
205
+ handleStateMessage( data );
206
+
207
+ } );
208
+
209
+ window.addEventListener( 'message', function( event ) {
113
210
 
114
- socket.on('slidedata', function(data) {
115
- // ignore data from sockets that aren't ours
116
- if (data.socketId !== socketId) { return; }
211
+ var data = JSON.parse( event.data );
212
+
213
+ if( data && data.namespace === 'reveal' ) {
214
+ if( /ready/.test( data.eventName ) ) {
215
+ socket.emit( 'connect', { socketId: socketId } );
216
+ }
217
+ }
218
+
219
+ } );
220
+
221
+ /**
222
+ * Called when the main window sends an updated state.
223
+ */
224
+ function handleStateMessage( data ) {
225
+
226
+ // Store the most recently set state to avoid circular loops
227
+ // applying the same state
228
+ currentState = JSON.stringify( data.state );
229
+
230
+ // No need for updating the notes in case of fragment changes
231
+ if ( data.notes ) {
232
+ notes.classList.remove( 'hidden' );
233
+ if( data.markdown ) {
234
+ notesValue.innerHTML = marked( data.notes );
235
+ }
236
+ else {
237
+ notesValue.innerHTML = data.notes;
238
+ }
239
+ }
240
+ else {
241
+ notes.classList.add( 'hidden' );
242
+ }
243
+
244
+ // Update the note slides
245
+ currentSlide.contentWindow.postMessage( JSON.stringify({ method: 'setState', args: [ data.state ] }), '*' );
246
+ upcomingSlide.contentWindow.postMessage( JSON.stringify({ method: 'setState', args: [ data.state ] }), '*' );
247
+ upcomingSlide.contentWindow.postMessage( JSON.stringify({ method: 'next' }), '*' );
117
248
 
118
- if (data.markdown) {
119
- notes.innerHTML = marked(data.notes);
120
249
  }
121
- else {
122
- notes.innerHTML = data.notes;
250
+
251
+ // Limit to max one state update per X ms
252
+ handleStateMessage = debounce( handleStateMessage, 200 );
253
+
254
+ /**
255
+ * Forward keyboard events to the current slide window.
256
+ * This enables keyboard events to work even if focus
257
+ * isn't set on the current slide iframe.
258
+ */
259
+ function setupKeyboard() {
260
+
261
+ document.addEventListener( 'keydown', function( event ) {
262
+ currentSlide.contentWindow.postMessage( JSON.stringify({ method: 'triggerKey', args: [ event.keyCode ] }), '*' );
263
+ } );
264
+
123
265
  }
124
266
 
125
- currentSlide.contentWindow.Reveal.slide(data.indexh, data.indexv);
126
- nextSlide.contentWindow.Reveal.slide(data.nextindexh, data.nextindexv);
127
- });
128
- socket.on('fragmentdata', function(data) {
129
- // ignore data from sockets that aren't ours
130
- if (data.socketId !== socketId) { return; }
267
+ /**
268
+ * Creates the preview iframes.
269
+ */
270
+ function setupIframes( data ) {
271
+
272
+ var params = [
273
+ 'receiver',
274
+ 'progress=false',
275
+ 'history=false',
276
+ 'transition=none',
277
+ 'backgroundTransition=none'
278
+ ].join( '&' );
279
+
280
+ var hash = '#/' + data.state.indexh + '/' + data.state.indexv;
281
+ var currentURL = '/?' + params + '&postMessageEvents=true' + hash;
282
+ var upcomingURL = '/?' + params + '&controls=false' + hash;
283
+
284
+ currentSlide = document.createElement( 'iframe' );
285
+ currentSlide.setAttribute( 'width', 1280 );
286
+ currentSlide.setAttribute( 'height', 1024 );
287
+ currentSlide.setAttribute( 'src', currentURL );
288
+ document.querySelector( '#current-slide' ).appendChild( currentSlide );
289
+
290
+ upcomingSlide = document.createElement( 'iframe' );
291
+ upcomingSlide.setAttribute( 'width', 640 );
292
+ upcomingSlide.setAttribute( 'height', 512 );
293
+ upcomingSlide.setAttribute( 'src', upcomingURL );
294
+ document.querySelector( '#upcoming-slide' ).appendChild( upcomingSlide );
131
295
 
132
- if (data.fragment === 'next') {
133
- currentSlide.contentWindow.Reveal.nextFragment();
134
296
  }
135
- else if (data.fragment === 'previous') {
136
- currentSlide.contentWindow.Reveal.prevFragment();
297
+
298
+ /**
299
+ * Setup the notes UI.
300
+ */
301
+ function setupNotes() {
302
+
303
+ notes = document.querySelector( '.speaker-controls-notes' );
304
+ notesValue = document.querySelector( '.speaker-controls-notes .value' );
305
+
137
306
  }
138
- });
307
+
308
+ /**
309
+ * Create the timer and clock and start updating them
310
+ * at an interval.
311
+ */
312
+ function setupTimer() {
313
+
314
+ var start = new Date(),
315
+ timeEl = document.querySelector( '.speaker-controls-time' ),
316
+ clockEl = timeEl.querySelector( '.clock-value' ),
317
+ hoursEl = timeEl.querySelector( '.hours-value' ),
318
+ minutesEl = timeEl.querySelector( '.minutes-value' ),
319
+ secondsEl = timeEl.querySelector( '.seconds-value' );
320
+
321
+ function _updateTimer() {
322
+
323
+ var diff, hours, minutes, seconds,
324
+ now = new Date();
325
+
326
+ diff = now.getTime() - start.getTime();
327
+ hours = Math.floor( diff / ( 1000 * 60 * 60 ) );
328
+ minutes = Math.floor( ( diff / ( 1000 * 60 ) ) % 60 );
329
+ seconds = Math.floor( ( diff / 1000 ) % 60 );
330
+
331
+ clockEl.innerHTML = now.toLocaleTimeString( 'en-US', { hour12: true, hour: '2-digit', minute:'2-digit' } );
332
+ hoursEl.innerHTML = zeroPadInteger( hours );
333
+ hoursEl.className = hours > 0 ? '' : 'mute';
334
+ minutesEl.innerHTML = ':' + zeroPadInteger( minutes );
335
+ minutesEl.className = minutes > 0 ? '' : 'mute';
336
+ secondsEl.innerHTML = ':' + zeroPadInteger( seconds );
337
+
338
+ }
339
+
340
+ // Update once directly
341
+ _updateTimer();
342
+
343
+ // Then update every second
344
+ setInterval( _updateTimer, 1000 );
345
+
346
+ timeEl.addEventListener( 'click', function() {
347
+ start = new Date();
348
+ _updateTimer();
349
+ return false;
350
+ } );
351
+
352
+ }
353
+
354
+ function zeroPadInteger( num ) {
355
+
356
+ var str = '00' + parseInt( num );
357
+ return str.substring( str.length - 2 );
358
+
359
+ }
360
+
361
+ /**
362
+ * Limits the frequency at which a function can be called.
363
+ */
364
+ function debounce( fn, ms ) {
365
+
366
+ var lastTime = 0,
367
+ timeout;
368
+
369
+ return function() {
370
+
371
+ var args = arguments;
372
+ var context = this;
373
+
374
+ clearTimeout( timeout );
375
+
376
+ var timeSinceLastCall = Date.now() - lastTime;
377
+ if( timeSinceLastCall > ms ) {
378
+ fn.apply( context, args );
379
+ lastTime = Date.now();
380
+ }
381
+ else {
382
+ timeout = setTimeout( function() {
383
+ fn.apply( context, args );
384
+ lastTime = Date.now();
385
+ }, ms - timeSinceLastCall );
386
+ }
387
+
388
+ }
389
+
390
+ }
391
+
392
+ })();
139
393
  </script>
140
394
 
141
395
  </body>
@@ -11,34 +11,38 @@
11
11
  var page = new WebPage();
12
12
  var system = require( 'system' );
13
13
 
14
- page.viewportSize = {
15
- width: 1024,
16
- height: 768
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
17
20
  };
18
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.
19
26
  page.paperSize = {
20
- format: 'letter',
21
- orientation: 'landscape',
22
- margin: {
23
- left: '0',
24
- right: '0',
25
- top: '0',
26
- bottom: '0'
27
- }
27
+ width: Math.round( slideWidth * 2 ),
28
+ height: Math.round( slideHeight * 2 ),
29
+ border: 0
28
30
  };
29
31
 
30
- var revealFile = system.args[1] || 'index.html?print-pdf';
31
- var slideFile = system.args[2] || 'slides.pdf';
32
+ var inputFile = system.args[1] || 'index.html?print-pdf';
33
+ var outputFile = system.args[2] || 'slides.pdf';
32
34
 
33
- if( slideFile.match( /\.pdf$/gi ) === null ) {
34
- slideFile += '.pdf';
35
+ if( outputFile.match( /\.pdf$/gi ) === null ) {
36
+ outputFile += '.pdf';
35
37
  }
36
38
 
37
- console.log( 'Printing PDF...' );
39
+ console.log( 'Printing PDF (Paper size: '+ page.paperSize.width + 'x' + page.paperSize.height +')' );
38
40
 
39
- page.open( revealFile, function( status ) {
40
- console.log( 'Printed succesfully' );
41
- page.render( slideFile );
42
- phantom.exit();
41
+ page.open( inputFile, function( status ) {
42
+ window.setTimeout( function() {
43
+ console.log( 'Printed succesfully' );
44
+ page.render( outputFile );
45
+ phantom.exit();
46
+ }, 1000 );
43
47
  } );
44
48