hyla 1.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (404) hide show
  1. checksums.yaml +15 -0
  2. data/Gemfile.lock +35 -7
  3. data/README.adoc +10 -2
  4. data/bin/hyla +16 -13
  5. data/hyla.gemspec +6 -3
  6. data/lib/hyla.rb +5 -1
  7. data/lib/hyla/command.rb +12 -10
  8. data/lib/hyla/commands/create.rb +21 -12
  9. data/lib/hyla/commands/generate.rb +168 -59
  10. data/lib/hyla/commands/new.rb +36 -15
  11. data/lib/hyla/commands/watch.rb +6 -2
  12. data/lib/hyla/configuration.rb +169 -27
  13. data/lib/hyla/core_ext.rb +24 -0
  14. data/lib/hyla/project.rb +1 -1
  15. data/lib/resources/backends/haml/deckjs/block_admonition.html.haml +14 -0
  16. data/lib/resources/backends/haml/deckjs/block_audio.html.haml +7 -0
  17. data/lib/resources/backends/haml/deckjs/block_colist.html.haml +21 -0
  18. data/lib/resources/backends/haml/deckjs/block_dlist.html.haml +54 -0
  19. data/lib/resources/backends/haml/deckjs/block_example.haml.haml +5 -0
  20. data/lib/resources/backends/haml/deckjs/block_floating_title.html.haml +1 -0
  21. data/lib/resources/backends/haml/deckjs/block_image.html.haml +11 -0
  22. data/lib/resources/backends/haml/deckjs/block_listing.html.haml +32 -0
  23. data/lib/resources/backends/haml/deckjs/block_literal.html.haml +5 -0
  24. data/lib/resources/backends/haml/deckjs/block_olist.html.haml +11 -0
  25. data/lib/resources/backends/haml/deckjs/block_open.html.haml +5 -0
  26. data/lib/resources/backends/haml/deckjs/block_page_break.html.haml +1 -0
  27. data/lib/resources/backends/haml/deckjs/block_paragraph.html.haml +4 -0
  28. data/lib/resources/backends/haml/deckjs/block_pass.html.haml +1 -0
  29. data/lib/resources/backends/haml/deckjs/block_preamble.html.haml +3 -0
  30. data/lib/resources/backends/haml/deckjs/block_quote.html.haml +12 -0
  31. data/lib/resources/backends/haml/deckjs/block_ruler.html.haml +1 -0
  32. data/lib/resources/backends/haml/deckjs/block_sidebar.html.haml +5 -0
  33. data/lib/resources/backends/haml/deckjs/block_table.html.haml +48 -0
  34. data/lib/resources/backends/haml/deckjs/block_ulist.html.haml +25 -0
  35. data/lib/resources/backends/haml/deckjs/block_verse.html.haml +13 -0
  36. data/lib/resources/backends/haml/deckjs/block_video.html.haml +24 -0
  37. data/lib/resources/backends/haml/deckjs/document.html.haml +182 -0
  38. data/lib/resources/backends/haml/deckjs/embedded.html.haml +10 -0
  39. data/lib/resources/backends/haml/deckjs/inline_anchor.html.haml +12 -0
  40. data/lib/resources/backends/haml/deckjs/inline_break.html.haml +2 -0
  41. data/lib/resources/backends/haml/deckjs/inline_callout.html.haml +7 -0
  42. data/lib/resources/backends/haml/deckjs/inline_footnote.html.haml +8 -0
  43. data/lib/resources/backends/haml/deckjs/inline_image.html.haml +24 -0
  44. data/lib/resources/backends/haml/deckjs/inline_indexterm.html.haml +2 -0
  45. data/lib/resources/backends/haml/deckjs/inline_quoted.html.haml +19 -0
  46. data/lib/resources/backends/haml/deckjs/section.html.haml +7 -0
  47. data/lib/resources/backends/haml/docbook45/block_admonition.xml.haml +7 -0
  48. data/lib/resources/backends/haml/docbook45/block_colist.xml.haml +8 -0
  49. data/lib/resources/backends/haml/docbook45/block_dlist.xml.haml +61 -0
  50. data/lib/resources/backends/haml/docbook45/block_example.xml.haml +14 -0
  51. data/lib/resources/backends/haml/docbook45/block_floating_title.xml.haml +1 -0
  52. data/lib/resources/backends/haml/docbook45/block_image.xml.haml +8 -0
  53. data/lib/resources/backends/haml/docbook45/block_listing.xml.haml +14 -0
  54. data/lib/resources/backends/haml/docbook45/block_literal.xml.haml +7 -0
  55. data/lib/resources/backends/haml/docbook45/block_olist.xml.haml +8 -0
  56. data/lib/resources/backends/haml/docbook45/block_open.xml.haml +25 -0
  57. data/lib/resources/backends/haml/docbook45/block_page_break.xml.haml +1 -0
  58. data/lib/resources/backends/haml/docbook45/block_paragraph.xml.haml +6 -0
  59. data/lib/resources/backends/haml/docbook45/block_pass.xml.haml +1 -0
  60. data/lib/resources/backends/haml/docbook45/block_preamble.xml.haml +7 -0
  61. data/lib/resources/backends/haml/docbook45/block_quote.xml.haml +13 -0
  62. data/lib/resources/backends/haml/docbook45/block_ruler.xml.haml +2 -0
  63. data/lib/resources/backends/haml/docbook45/block_sidebar.xml.haml +7 -0
  64. data/lib/resources/backends/haml/docbook45/block_table.xml.haml +37 -0
  65. data/lib/resources/backends/haml/docbook45/block_ulist.xml.haml +18 -0
  66. data/lib/resources/backends/haml/docbook45/block_verse.xml.haml +10 -0
  67. data/lib/resources/backends/haml/docbook45/document.xml.haml +63 -0
  68. data/lib/resources/backends/haml/docbook45/embedded.xml.haml +1 -0
  69. data/lib/resources/backends/haml/docbook45/helpers.rb +7 -0
  70. data/lib/resources/backends/haml/docbook45/inline_anchor.xml.haml +13 -0
  71. data/lib/resources/backends/haml/docbook45/inline_break.xml.haml +2 -0
  72. data/lib/resources/backends/haml/docbook45/inline_callout.xml.haml +1 -0
  73. data/lib/resources/backends/haml/docbook45/inline_footnote.xml.haml +5 -0
  74. data/lib/resources/backends/haml/docbook45/inline_image.xml.haml +5 -0
  75. data/lib/resources/backends/haml/docbook45/inline_indexterm.xml.haml +18 -0
  76. data/lib/resources/backends/haml/docbook45/inline_quoted.xml.haml +21 -0
  77. data/lib/resources/backends/haml/docbook45/section.xml.haml +5 -0
  78. data/lib/resources/backends/haml/html5/block_admonition.html.haml +14 -0
  79. data/lib/resources/backends/haml/html5/block_audio.html.haml +7 -0
  80. data/lib/resources/backends/haml/html5/block_colist.html.haml +21 -0
  81. data/lib/resources/backends/haml/html5/block_dlist.html.haml +54 -0
  82. data/lib/resources/backends/haml/html5/block_example.haml.haml +5 -0
  83. data/lib/resources/backends/haml/html5/block_floating_title.html.haml +1 -0
  84. data/lib/resources/backends/haml/html5/block_image.html.haml +11 -0
  85. data/lib/resources/backends/haml/html5/block_listing.html.haml +31 -0
  86. data/lib/resources/backends/haml/html5/block_literal.html.haml +5 -0
  87. data/lib/resources/backends/haml/html5/block_math.html.haml +10 -0
  88. data/lib/resources/backends/haml/html5/block_olist.html.haml +9 -0
  89. data/lib/resources/backends/haml/html5/block_open.html.haml +15 -0
  90. data/lib/resources/backends/haml/html5/block_page_break.html.haml +1 -0
  91. data/lib/resources/backends/haml/html5/block_paragraph.html.haml +4 -0
  92. data/lib/resources/backends/haml/html5/block_pass.html.haml +1 -0
  93. data/lib/resources/backends/haml/html5/block_preamble.html.haml +6 -0
  94. data/lib/resources/backends/haml/html5/block_quote.html.haml +12 -0
  95. data/lib/resources/backends/haml/html5/block_ruler.html.haml +1 -0
  96. data/lib/resources/backends/haml/html5/block_sidebar.html.haml +5 -0
  97. data/lib/resources/backends/haml/html5/block_table.html.haml +47 -0
  98. data/lib/resources/backends/haml/html5/block_toc.html.haml +11 -0
  99. data/lib/resources/backends/haml/html5/block_ulist.html.haml +25 -0
  100. data/lib/resources/backends/haml/html5/block_verse.html.haml +13 -0
  101. data/lib/resources/backends/haml/html5/block_video.html.haml +27 -0
  102. data/lib/resources/backends/haml/html5/document.html.haml +114 -0
  103. data/lib/resources/backends/haml/html5/embedded.html.haml +10 -0
  104. data/lib/resources/backends/haml/html5/helpers.rb +7 -0
  105. data/lib/resources/backends/haml/html5/inline_anchor.html.haml +11 -0
  106. data/lib/resources/backends/haml/html5/inline_break.html.haml +2 -0
  107. data/lib/resources/backends/haml/html5/inline_button.html.haml +1 -0
  108. data/lib/resources/backends/haml/html5/inline_callout.html.haml +7 -0
  109. data/lib/resources/backends/haml/html5/inline_footnote.html.haml +8 -0
  110. data/lib/resources/backends/haml/html5/inline_image.html.haml +24 -0
  111. data/lib/resources/backends/haml/html5/inline_indexterm.html.haml +2 -0
  112. data/lib/resources/backends/haml/html5/inline_kbd.html.haml +8 -0
  113. data/lib/resources/backends/haml/html5/inline_menu.html.haml +15 -0
  114. data/lib/resources/backends/haml/html5/inline_quoted.html.haml +22 -0
  115. data/lib/resources/backends/haml/html5/section.html.haml +21 -0
  116. data/lib/resources/backends/haml/revealjs/block_image.html.haml +11 -0
  117. data/lib/resources/backends/haml/revealjs/block_olist.html.haml +8 -0
  118. data/lib/resources/backends/haml/revealjs/block_ulist.html.haml +8 -0
  119. data/lib/resources/backends/haml/revealjs/document.html.haml +61 -0
  120. data/lib/resources/backends/haml/revealjs/section.html.haml +10 -0
  121. data/lib/resources/backends/slim/docbook45/block_admonition.xml.slim +7 -0
  122. data/lib/resources/backends/slim/docbook45/block_colist.xml.slim +8 -0
  123. data/lib/resources/backends/slim/docbook45/block_dlist.xml.slim +61 -0
  124. data/lib/resources/backends/slim/docbook45/block_example.xml.slim +13 -0
  125. data/lib/resources/backends/slim/docbook45/block_floating_title.xml.slim +1 -0
  126. data/lib/resources/backends/slim/docbook45/block_image.xml.slim +7 -0
  127. data/lib/resources/backends/slim/docbook45/block_listing.xml.slim +14 -0
  128. data/lib/resources/backends/slim/docbook45/block_literal.xml.slim +7 -0
  129. data/lib/resources/backends/slim/docbook45/block_olist.xml.slim +8 -0
  130. data/lib/resources/backends/slim/docbook45/block_open.xml.slim +25 -0
  131. data/lib/resources/backends/slim/docbook45/block_page_break.xml.slim +1 -0
  132. data/lib/resources/backends/slim/docbook45/block_paragraph.xml.slim +6 -0
  133. data/lib/resources/backends/slim/docbook45/block_pass.xml.slim +1 -0
  134. data/lib/resources/backends/slim/docbook45/block_preamble.xml.slim +7 -0
  135. data/lib/resources/backends/slim/docbook45/block_quote.xml.slim +13 -0
  136. data/lib/resources/backends/slim/docbook45/block_ruler.xml.slim +2 -0
  137. data/lib/resources/backends/slim/docbook45/block_sidebar.xml.slim +7 -0
  138. data/lib/resources/backends/slim/docbook45/block_table.xml.slim +36 -0
  139. data/lib/resources/backends/slim/docbook45/block_ulist.xml.slim +18 -0
  140. data/lib/resources/backends/slim/docbook45/block_verse.xml.slim +10 -0
  141. data/lib/resources/backends/slim/docbook45/document.xml.slim +63 -0
  142. data/lib/resources/backends/slim/docbook45/embedded.xml.slim +1 -0
  143. data/lib/resources/backends/slim/docbook45/helpers.rb +9 -0
  144. data/lib/resources/backends/slim/docbook45/inline_anchor.xml.slim +13 -0
  145. data/lib/resources/backends/slim/docbook45/inline_break.xml.slim +2 -0
  146. data/lib/resources/backends/slim/docbook45/inline_callout.xml.slim +1 -0
  147. data/lib/resources/backends/slim/docbook45/inline_footnote.xml.slim +4 -0
  148. data/lib/resources/backends/slim/docbook45/inline_image.xml.slim +4 -0
  149. data/lib/resources/backends/slim/docbook45/inline_indexterm.xml.slim +16 -0
  150. data/lib/resources/backends/slim/docbook45/inline_quoted.xml.slim +21 -0
  151. data/lib/resources/backends/slim/docbook45/section.xml.slim +5 -0
  152. data/lib/resources/backends/slim/document.html.bk.slim +335 -0
  153. data/lib/resources/backends/slim/dzslides/block_admonition.html.slim +19 -0
  154. data/lib/resources/backends/slim/dzslides/block_colist.html.slim +20 -0
  155. data/lib/resources/backends/slim/dzslides/block_dlist.html.slim +10 -0
  156. data/lib/resources/backends/slim/dzslides/block_example.html.slim +4 -0
  157. data/lib/resources/backends/slim/dzslides/block_floating_title.html.slim +1 -0
  158. data/lib/resources/backends/slim/dzslides/block_image.html.slim +14 -0
  159. data/lib/resources/backends/slim/dzslides/block_listing.html.slim +8 -0
  160. data/lib/resources/backends/slim/dzslides/block_literal.html.slim +11 -0
  161. data/lib/resources/backends/slim/dzslides/block_olist.html.slim +6 -0
  162. data/lib/resources/backends/slim/dzslides/block_open.html.slim +4 -0
  163. data/lib/resources/backends/slim/dzslides/block_paragraph.html.slim +1 -0
  164. data/lib/resources/backends/slim/dzslides/block_pass.html.slim +1 -0
  165. data/lib/resources/backends/slim/dzslides/block_quote.html.slim +11 -0
  166. data/lib/resources/backends/slim/dzslides/block_ruler.html.slim +1 -0
  167. data/lib/resources/backends/slim/dzslides/block_table.html.slim +45 -0
  168. data/lib/resources/backends/slim/dzslides/block_ulist.html.slim +6 -0
  169. data/lib/resources/backends/slim/dzslides/block_verse.html.slim +12 -0
  170. data/lib/resources/backends/slim/dzslides/block_video.html.slim +6 -0
  171. data/lib/resources/backends/slim/dzslides/document.html.slim +67 -0
  172. data/lib/resources/backends/slim/dzslides/embedded.html.slim +1 -0
  173. data/lib/resources/backends/slim/dzslides/helpers.rb +9 -0
  174. data/lib/resources/backends/slim/dzslides/inline_anchor.html.slim +11 -0
  175. data/lib/resources/backends/slim/dzslides/inline_break.html.slim +2 -0
  176. data/lib/resources/backends/slim/dzslides/inline_callout.html.slim +7 -0
  177. data/lib/resources/backends/slim/dzslides/inline_footnote.html.slim +6 -0
  178. data/lib/resources/backends/slim/dzslides/inline_image.html.slim +24 -0
  179. data/lib/resources/backends/slim/dzslides/inline_indexterm.html.slim +2 -0
  180. data/lib/resources/backends/slim/dzslides/inline_kbd.html.slim +8 -0
  181. data/lib/resources/backends/slim/dzslides/inline_quoted.html.slim +23 -0
  182. data/lib/resources/backends/slim/dzslides/section.html.slim +4 -0
  183. data/lib/resources/backends/slim/html5/block_admonition.html.slim +13 -0
  184. data/lib/resources/backends/slim/html5/block_audio.html.slim +6 -0
  185. data/lib/resources/backends/slim/html5/block_colist.html.slim +20 -0
  186. data/lib/resources/backends/slim/html5/block_dlist.html.slim +53 -0
  187. data/lib/resources/backends/slim/html5/block_example.html.slim +4 -0
  188. data/lib/resources/backends/slim/html5/block_floating_title.html.slim +1 -0
  189. data/lib/resources/backends/slim/html5/block_image.html.slim +10 -0
  190. data/lib/resources/backends/slim/html5/block_listing.html.slim +31 -0
  191. data/lib/resources/backends/slim/html5/block_literal.html.slim +4 -0
  192. data/lib/resources/backends/slim/html5/block_math.html.slim +10 -0
  193. data/lib/resources/backends/slim/html5/block_olist.html.slim +9 -0
  194. data/lib/resources/backends/slim/html5/block_open.html.slim +15 -0
  195. data/lib/resources/backends/slim/html5/block_page_break.html.slim +1 -0
  196. data/lib/resources/backends/slim/html5/block_paragraph.html.slim +4 -0
  197. data/lib/resources/backends/slim/html5/block_pass.html.slim +1 -0
  198. data/lib/resources/backends/slim/html5/block_preamble.html.slim +6 -0
  199. data/lib/resources/backends/slim/html5/block_quote.html.slim +14 -0
  200. data/lib/resources/backends/slim/html5/block_ruler.html.slim +1 -0
  201. data/lib/resources/backends/slim/html5/block_sidebar.html.slim +5 -0
  202. data/lib/resources/backends/slim/html5/block_table.html.slim +45 -0
  203. data/lib/resources/backends/slim/html5/block_toc.html.slim +12 -0
  204. data/lib/resources/backends/slim/html5/block_ulist.html.slim +25 -0
  205. data/lib/resources/backends/slim/html5/block_verse.html.slim +14 -0
  206. data/lib/resources/backends/slim/html5/block_video.html.slim +27 -0
  207. data/lib/resources/backends/slim/html5/document.html.slim +112 -0
  208. data/lib/resources/backends/slim/html5/embedded.html.slim +9 -0
  209. data/lib/resources/backends/slim/html5/helpers.rb +8 -0
  210. data/lib/resources/backends/slim/html5/inline_anchor.html.slim +11 -0
  211. data/lib/resources/backends/slim/html5/inline_break.html.slim +2 -0
  212. data/lib/resources/backends/slim/html5/inline_button.html.slim +1 -0
  213. data/lib/resources/backends/slim/html5/inline_callout.html.slim +7 -0
  214. data/lib/resources/backends/slim/html5/inline_footnote.html.slim +6 -0
  215. data/lib/resources/backends/slim/html5/inline_image.html.slim +24 -0
  216. data/lib/resources/backends/slim/html5/inline_indexterm.html.slim +2 -0
  217. data/lib/resources/backends/slim/html5/inline_kbd.html.slim +8 -0
  218. data/lib/resources/backends/slim/html5/inline_menu.html.slim +15 -0
  219. data/lib/resources/backends/slim/html5/inline_quoted.html.slim +22 -0
  220. data/lib/resources/backends/slim/html5/section.html.slim +20 -0
  221. data/lib/resources/backends/slim/revealjs/block_admonition.html.slim +13 -0
  222. data/lib/resources/backends/slim/revealjs/block_audio.html.slim +6 -0
  223. data/lib/resources/backends/slim/revealjs/block_colist.html.slim +20 -0
  224. data/lib/resources/backends/slim/revealjs/block_dlist.html.slim +53 -0
  225. data/lib/resources/backends/slim/revealjs/block_example.html.slim +4 -0
  226. data/lib/resources/backends/slim/revealjs/block_floating_title.html.slim +1 -0
  227. data/lib/resources/backends/slim/revealjs/block_image.html.slim +10 -0
  228. data/lib/resources/backends/slim/revealjs/block_listing.html.slim +31 -0
  229. data/lib/resources/backends/slim/revealjs/block_literal.html.slim +4 -0
  230. data/lib/resources/backends/slim/revealjs/block_math.html.slim +10 -0
  231. data/lib/resources/backends/slim/revealjs/block_olist.html.slim +9 -0
  232. data/lib/resources/backends/slim/revealjs/block_open.html.slim +15 -0
  233. data/lib/resources/backends/slim/revealjs/block_page_break.html.slim +1 -0
  234. data/lib/resources/backends/slim/revealjs/block_paragraph.html.slim +4 -0
  235. data/lib/resources/backends/slim/revealjs/block_pass.html.slim +1 -0
  236. data/lib/resources/backends/slim/revealjs/block_preamble.html.slim +6 -0
  237. data/lib/resources/backends/slim/revealjs/block_quote.html.slim +14 -0
  238. data/lib/resources/backends/slim/revealjs/block_ruler.html.slim +1 -0
  239. data/lib/resources/backends/slim/revealjs/block_sidebar.html.slim +5 -0
  240. data/lib/resources/backends/slim/revealjs/block_table.html.slim +45 -0
  241. data/lib/resources/backends/slim/revealjs/block_toc.html.slim +12 -0
  242. data/lib/resources/backends/slim/revealjs/block_ulist.html.slim +25 -0
  243. data/lib/resources/backends/slim/revealjs/block_verse.html.slim +14 -0
  244. data/lib/resources/backends/slim/revealjs/block_video.html.slim +27 -0
  245. data/lib/resources/backends/slim/revealjs/document.html.slim +87 -0
  246. data/lib/resources/backends/slim/revealjs/embedded.html.slim +9 -0
  247. data/lib/resources/backends/slim/revealjs/helpers.rb +8 -0
  248. data/lib/resources/backends/slim/revealjs/inline_anchor.html.slim +11 -0
  249. data/lib/resources/backends/slim/revealjs/inline_break.html.slim +2 -0
  250. data/lib/resources/backends/slim/revealjs/inline_button.html.slim +1 -0
  251. data/lib/resources/backends/slim/revealjs/inline_callout.html.slim +7 -0
  252. data/lib/resources/backends/slim/revealjs/inline_footnote.html.slim +6 -0
  253. data/lib/resources/backends/slim/revealjs/inline_image.html.slim +24 -0
  254. data/lib/resources/backends/slim/revealjs/inline_indexterm.html.slim +2 -0
  255. data/lib/resources/backends/slim/revealjs/inline_kbd.html.slim +8 -0
  256. data/lib/resources/backends/slim/revealjs/inline_menu.html.slim +15 -0
  257. data/lib/resources/backends/slim/revealjs/inline_quoted.html.slim +22 -0
  258. data/lib/resources/backends/slim/revealjs/section.html.slim +3 -0
  259. data/lib/resources/deck.js/core/deck.core.css +407 -0
  260. data/lib/resources/deck.js/core/deck.core.js +498 -0
  261. data/lib/resources/deck.js/extensions/deck.js-blank/README.md +10 -0
  262. data/lib/resources/deck.js/extensions/deck.js-blank/deck.blank.js +33 -0
  263. data/lib/resources/deck.js/extensions/goto/deck.goto.css +41 -0
  264. data/lib/resources/deck.js/extensions/goto/deck.goto.html +7 -0
  265. data/lib/resources/deck.js/extensions/goto/deck.goto.js +170 -0
  266. data/lib/resources/deck.js/extensions/hash/deck.hash.css +13 -0
  267. data/lib/resources/deck.js/extensions/hash/deck.hash.html +2 -0
  268. data/lib/resources/deck.js/extensions/hash/deck.hash.js +142 -0
  269. data/lib/resources/deck.js/extensions/menu/deck.menu.css +47 -0
  270. data/lib/resources/deck.js/extensions/menu/deck.menu.js +187 -0
  271. data/lib/resources/deck.js/extensions/navigation/deck.navigation.css +43 -0
  272. data/lib/resources/deck.js/extensions/navigation/deck.navigation.html +3 -0
  273. data/lib/resources/deck.js/extensions/navigation/deck.navigation.js +92 -0
  274. data/lib/resources/deck.js/extensions/scale/deck.scale.css +28 -0
  275. data/lib/resources/deck.js/extensions/scale/deck.scale.js +170 -0
  276. data/lib/resources/deck.js/extensions/split/README.md +30 -0
  277. data/lib/resources/deck.js/extensions/split/deck.split.js +59 -0
  278. data/lib/resources/deck.js/extensions/status/deck.status.css +18 -0
  279. data/lib/resources/deck.js/extensions/status/deck.status.html +6 -0
  280. data/lib/resources/deck.js/extensions/status/deck.status.js +95 -0
  281. data/lib/resources/deck.js/extensions/toc/deck.toc.css +40 -0
  282. data/lib/resources/deck.js/extensions/toc/deck.toc.html +12 -0
  283. data/lib/resources/deck.js/extensions/toc/deck.toc.js +271 -0
  284. data/lib/resources/deck.js/jquery-1.7.2.min.js +4 -0
  285. data/lib/resources/deck.js/jquery.min.js +4 -0
  286. data/lib/resources/deck.js/modernizr.custom.js +4 -0
  287. data/lib/resources/deck.js/themes/style/beamer.css +286 -0
  288. data/lib/resources/deck.js/themes/style/neon.css +123 -0
  289. data/lib/resources/deck.js/themes/style/swiss.css +84 -0
  290. data/lib/resources/deck.js/themes/style/web-2.0.css +214 -0
  291. data/lib/resources/deck.js/themes/transition/beamer.css +66 -0
  292. data/lib/resources/deck.js/themes/transition/fade.css +43 -0
  293. data/lib/resources/deck.js/themes/transition/horizontal-slide.css +76 -0
  294. data/lib/resources/deck.js/themes/transition/vertical-slide.css +94 -0
  295. data/lib/resources/revealjs/LICENSE +19 -0
  296. data/lib/resources/revealjs/css/print/paper.css +176 -0
  297. data/lib/resources/revealjs/css/print/pdf.css +190 -0
  298. data/lib/resources/revealjs/css/reveal.css +1880 -0
  299. data/lib/resources/revealjs/css/reveal.min.css +7 -0
  300. data/lib/resources/revealjs/css/theme/README.md +25 -0
  301. data/lib/resources/revealjs/css/theme/beige.css +148 -0
  302. data/lib/resources/revealjs/css/theme/blood.css +175 -0
  303. data/lib/resources/revealjs/css/theme/default.css +148 -0
  304. data/lib/resources/revealjs/css/theme/moon.css +148 -0
  305. data/lib/resources/revealjs/css/theme/night.css +136 -0
  306. data/lib/resources/revealjs/css/theme/serif.css +138 -0
  307. data/lib/resources/revealjs/css/theme/simple.css +138 -0
  308. data/lib/resources/revealjs/css/theme/sky.css +145 -0
  309. data/lib/resources/revealjs/css/theme/solarized.css +148 -0
  310. data/lib/resources/revealjs/css/theme/source/beige.scss +50 -0
  311. data/lib/resources/revealjs/css/theme/source/blood.scss +91 -0
  312. data/lib/resources/revealjs/css/theme/source/default.scss +42 -0
  313. data/lib/resources/revealjs/css/theme/source/moon.scss +68 -0
  314. data/lib/resources/revealjs/css/theme/source/night.scss +35 -0
  315. data/lib/resources/revealjs/css/theme/source/serif.scss +35 -0
  316. data/lib/resources/revealjs/css/theme/source/simple.scss +38 -0
  317. data/lib/resources/revealjs/css/theme/source/sky.scss +46 -0
  318. data/lib/resources/revealjs/css/theme/source/solarized.scss +74 -0
  319. data/lib/resources/revealjs/css/theme/template/mixins.scss +29 -0
  320. data/lib/resources/revealjs/css/theme/template/settings.scss +34 -0
  321. data/lib/resources/revealjs/css/theme/template/theme.scss +170 -0
  322. data/lib/resources/revealjs/js/reveal.js +3382 -0
  323. data/lib/resources/revealjs/js/reveal.min.js +9 -0
  324. data/lib/resources/revealjs/lib/css/zenburn.css +114 -0
  325. data/lib/resources/revealjs/lib/font/league_gothic-webfont.eot +0 -0
  326. data/lib/resources/revealjs/lib/font/league_gothic-webfont.svg +230 -0
  327. data/lib/resources/revealjs/lib/font/league_gothic-webfont.ttf +0 -0
  328. data/lib/resources/revealjs/lib/font/league_gothic-webfont.woff +0 -0
  329. data/lib/resources/revealjs/lib/font/league_gothic_license +2 -0
  330. data/lib/resources/revealjs/lib/js/classList.js +2 -0
  331. data/lib/resources/revealjs/lib/js/head.min.js +8 -0
  332. data/lib/resources/revealjs/lib/js/html5shiv.js +7 -0
  333. data/lib/resources/revealjs/plugin/highlight/highlight.js +32 -0
  334. data/lib/resources/revealjs/plugin/leap/leap.js +157 -0
  335. data/lib/resources/revealjs/plugin/markdown/example.html +129 -0
  336. data/lib/resources/revealjs/plugin/markdown/example.md +31 -0
  337. data/lib/resources/revealjs/plugin/markdown/markdown.js +392 -0
  338. data/lib/resources/revealjs/plugin/markdown/marked.js +37 -0
  339. data/lib/resources/revealjs/plugin/math/math.js +64 -0
  340. data/lib/resources/revealjs/plugin/multiplex/client.js +13 -0
  341. data/lib/resources/revealjs/plugin/multiplex/index.js +56 -0
  342. data/lib/resources/revealjs/plugin/multiplex/master.js +51 -0
  343. data/lib/resources/revealjs/plugin/notes-server/client.js +57 -0
  344. data/lib/resources/revealjs/plugin/notes-server/index.js +59 -0
  345. data/lib/resources/revealjs/plugin/notes-server/notes.html +142 -0
  346. data/lib/resources/revealjs/plugin/notes/notes.html +267 -0
  347. data/lib/resources/revealjs/plugin/notes/notes.js +78 -0
  348. data/lib/resources/revealjs/plugin/postmessage/example.html +39 -0
  349. data/lib/resources/revealjs/plugin/postmessage/postmessage.js +42 -0
  350. data/lib/resources/revealjs/plugin/print-pdf/print-pdf.js +44 -0
  351. data/lib/resources/revealjs/plugin/remotes/remotes.js +39 -0
  352. data/lib/resources/revealjs/plugin/search/search.js +196 -0
  353. data/lib/resources/revealjs/plugin/zoom-js/zoom.js +258 -0
  354. data/lib/resources/styles/asciidoctor.css +652 -0
  355. data/lib/resources/styles/colony.css +660 -0
  356. data/lib/resources/styles/foundation-lime.css +657 -0
  357. data/lib/resources/styles/foundation-potion.css +657 -0
  358. data/lib/resources/styles/foundation.css +648 -0
  359. data/lib/resources/styles/github.css +669 -0
  360. data/lib/resources/styles/golo.css +669 -0
  361. data/lib/resources/styles/iconic.css +692 -0
  362. data/lib/resources/styles/maker.css +668 -0
  363. data/lib/resources/styles/readthedocs.css +669 -0
  364. data/lib/resources/styles/redhat.css +654 -0
  365. data/lib/resources/styles/riak.css +689 -0
  366. data/lib/resources/styles/rocket-panda.css +662 -0
  367. data/lib/resources/styles/rubygems.css +650 -0
  368. data/lib/templates/_config.yml +27 -0
  369. data/lib/templates/{training → book}/GemFile +2 -1
  370. data/lib/templates/{training → book}/development/audio/ocean_waves.mp3 +0 -0
  371. data/lib/templates/book/development/book.adoc +121 -0
  372. data/lib/templates/{training → book}/development/image/hyla_frog.jpg +0 -0
  373. data/lib/templates/{training → book}/development/video/small.ogv +0 -0
  374. data/lib/templates/{training → book}/introduction/audio/ocean_waves.mp3 +0 -0
  375. data/lib/templates/book/introduction/book.adoc +121 -0
  376. data/lib/templates/{training → book}/introduction/image/hyla_frog.jpg +0 -0
  377. data/lib/templates/{training → book}/introduction/video/small.ogv +0 -0
  378. data/lib/templates/book/readme.adoc +10 -0
  379. data/lib/templates/sample/asciidoc_article.adoc +101 -10
  380. data/lib/templates/sample/asciidoc_audio.adoc +1 -1
  381. data/lib/templates/sample/asciidoc_book.adoc +125 -0
  382. data/lib/templates/sample/asciidoc_image.adoc +26 -0
  383. data/lib/templates/sample/asciidoc_report.adoc +66 -0
  384. data/lib/templates/sample/asciidoc_source.adoc +53 -0
  385. data/lib/templates/sample/asciidoc_table.adoc +36 -0
  386. data/lib/templates/sample/asciidoc_video.adoc +9 -1
  387. data/lib/templates/sample/slideshow_revealjs.adoc +26 -0
  388. data/lib/templates/training-exercises/_config.yml +3 -0
  389. data/lib/templates/training/{introduction → module-1}/article.adoc +7 -2
  390. data/lib/templates/training/module-1/audio/ocean_waves.mp3 +0 -0
  391. data/lib/templates/training/module-1/image/hyla_arborea.jpg +0 -0
  392. data/lib/templates/training/module-1/video/small.ogv +0 -0
  393. data/lib/templates/training/{development → module-2}/article.adoc +7 -2
  394. data/lib/templates/training/module-2/audio/ocean_waves.mp3 +0 -0
  395. data/lib/templates/training/module-2/image/hyla_arborea.jpg +0 -0
  396. data/lib/templates/training/module-2/video/small.ogv +0 -0
  397. data/lib/templates/training/readme.adoc +10 -1
  398. data/scenario.adoc +113 -20
  399. data/test/reports/test-1.0.x-11-12-2013.txt +123 -0
  400. data/todo.adoc +39 -0
  401. metadata +473 -51
  402. data/lib/hyla/training.rb +0 -25
  403. data/lib/templates/sample/asciidoc_source_highlight.adoc +0 -37
  404. data/lib/templates/training-exercises/Gemfile +0 -4
@@ -0,0 +1,187 @@
1
+ /*!
2
+ Deck JS - deck.menu
3
+ Copyright (c) 2011 Caleb Troughton
4
+ Dual licensed under the MIT license and GPL license.
5
+ https://github.com/imakewebthings/deck.js/blob/master/MIT-license.txt
6
+ https://github.com/imakewebthings/deck.js/blob/master/GPL-license.txt
7
+ */
8
+
9
+ /*
10
+ This module adds the methods and key binding to show and hide a menu of all
11
+ slides in the deck. The deck menu state is indicated by the presence of a class
12
+ on the deck container.
13
+ */
14
+ (function($, deck, undefined) {
15
+ var $d = $(document),
16
+ rootSlides; // Array of top level slides
17
+
18
+ /*
19
+ Extends defaults/options.
20
+
21
+ options.classes.menu
22
+ This class is added to the deck container when showing the slide menu.
23
+
24
+ options.keys.menu
25
+ The numeric keycode used to toggle between showing and hiding the slide
26
+ menu.
27
+
28
+ options.touch.doubletapWindow
29
+ Two consecutive touch events within this number of milliseconds will
30
+ be considered a double tap, and will toggle the menu on touch devices.
31
+ */
32
+ $.extend(true, $[deck].defaults, {
33
+ classes: {
34
+ menu: 'deck-menu'
35
+ },
36
+
37
+ keys: {
38
+ menu: 77 // m
39
+ },
40
+
41
+ touch: {
42
+ doubletapWindow: 400
43
+ }
44
+ });
45
+
46
+ /*
47
+ jQuery.deck('showMenu')
48
+
49
+ Shows the slide menu by adding the class specified by the menu class option
50
+ to the deck container.
51
+ */
52
+ $[deck]('extend', 'showMenu', function() {
53
+ var $c = $[deck]('getContainer'),
54
+ opts = $[deck]('getOptions');
55
+
56
+ if ($c.hasClass(opts.classes.menu)) return;
57
+
58
+ // Hide through loading class to short-circuit transitions (perf)
59
+ $c.addClass([opts.classes.loading, opts.classes.menu].join(' '));
60
+
61
+ /* Forced to do this in JS until CSS learns second-grade math. Save old
62
+ style value for restoration when menu is hidden. */
63
+ if (Modernizr.csstransforms) {
64
+ $.each(rootSlides, function(i, $slide) {
65
+ $slide.data('oldStyle', $slide.attr('style'));
66
+ $slide.css({
67
+ 'position': 'absolute',
68
+ 'left': ((i % 4) * 25) + '%',
69
+ 'top': (Math.floor(i / 4) * 25) + '%'
70
+ });
71
+ });
72
+ }
73
+
74
+ // Need to ensure the loading class renders first, then remove
75
+ window.setTimeout(function() {
76
+ $c.removeClass(opts.classes.loading)
77
+ .scrollTop($[deck]('getSlide').offset().top);
78
+ }, 0);
79
+ });
80
+
81
+ /*
82
+ jQuery.deck('hideMenu')
83
+
84
+ Hides the slide menu by removing the class specified by the menu class
85
+ option from the deck container.
86
+ */
87
+ $[deck]('extend', 'hideMenu', function() {
88
+ var $c = $[deck]('getContainer'),
89
+ opts = $[deck]('getOptions');
90
+
91
+ if (!$c.hasClass(opts.classes.menu)) return;
92
+
93
+ $c.removeClass(opts.classes.menu);
94
+ $c.addClass(opts.classes.loading);
95
+
96
+ /* Restore old style value */
97
+ if (Modernizr.csstransforms) {
98
+ $.each(rootSlides, function(i, $slide) {
99
+ var oldStyle = $slide.data('oldStyle');
100
+
101
+ $slide.attr('style', oldStyle ? oldStyle : '');
102
+ });
103
+ }
104
+
105
+ window.setTimeout(function() {
106
+ $c.removeClass(opts.classes.loading).scrollTop(0);
107
+ }, 0);
108
+ });
109
+
110
+ /*
111
+ jQuery.deck('toggleMenu')
112
+
113
+ Toggles between showing and hiding the slide menu.
114
+ */
115
+ $[deck]('extend', 'toggleMenu', function() {
116
+ $[deck]('getContainer').hasClass($[deck]('getOptions').classes.menu) ?
117
+ $[deck]('hideMenu') : $[deck]('showMenu');
118
+ });
119
+
120
+ $d.bind('deck.init', function() {
121
+ var opts = $[deck]('getOptions'),
122
+ touchEndTime = 0,
123
+ currentSlide,
124
+ slideTest = $.map([
125
+ opts.classes.before,
126
+ opts.classes.previous,
127
+ opts.classes.current,
128
+ opts.classes.next,
129
+ opts.classes.after
130
+ ], function(el, i) {
131
+ return '.' + el;
132
+ }).join(', ');
133
+
134
+ // Build top level slides array
135
+ rootSlides = [];
136
+ $.each($[deck]('getSlides'), function(i, $el) {
137
+ if (!$el.parentsUntil(opts.selectors.container, slideTest).length) {
138
+ rootSlides.push($el);
139
+ }
140
+ });
141
+
142
+ // Bind key events
143
+ $d.unbind('keydown.deckmenu').bind('keydown.deckmenu', function(e) {
144
+ if (e.which === opts.keys.menu || $.inArray(e.which, opts.keys.menu) > -1) {
145
+ $[deck]('toggleMenu');
146
+ e.preventDefault();
147
+ }
148
+ });
149
+
150
+ // Double tap to toggle slide menu for touch devices
151
+ $[deck]('getContainer').unbind('touchstart.deckmenu').bind('touchstart.deckmenu', function(e) {
152
+ currentSlide = $[deck]('getSlide');
153
+ })
154
+ .unbind('touchend.deckmenu').bind('touchend.deckmenu', function(e) {
155
+ var now = Date.now();
156
+
157
+ // Ignore this touch event if it caused a nav change (swipe)
158
+ if (currentSlide !== $[deck]('getSlide')) return;
159
+
160
+ if (now - touchEndTime < opts.touch.doubletapWindow) {
161
+ $[deck]('toggleMenu');
162
+ e.preventDefault();
163
+ }
164
+ touchEndTime = now;
165
+ });
166
+
167
+ // Selecting slides from the menu
168
+ $.each($[deck]('getSlides'), function(i, $s) {
169
+ $s.unbind('click.deckmenu').bind('click.deckmenu', function(e) {
170
+ if (!$[deck]('getContainer').hasClass(opts.classes.menu)) return;
171
+
172
+ $[deck]('go', i);
173
+ $[deck]('hideMenu');
174
+ e.stopPropagation();
175
+ e.preventDefault();
176
+ });
177
+ });
178
+ })
179
+ .bind('deck.change', function(e, from, to) {
180
+ var container = $[deck]('getContainer');
181
+
182
+ if (container.hasClass($[deck]('getOptions').classes.menu)) {
183
+ container.scrollTop($[deck]('getSlide', to).offset().top);
184
+ }
185
+ });
186
+ })(jQuery, 'deck');
187
+
@@ -0,0 +1,43 @@
1
+ .deck-container .deck-prev-link, .deck-container .deck-next-link {
2
+ display: none;
3
+ position: absolute;
4
+ z-index: 3;
5
+ top: 50%;
6
+ width: 32px;
7
+ height: 32px;
8
+ margin-top: -16px;
9
+ font-size: 20px;
10
+ font-weight: bold;
11
+ line-height: 32px;
12
+ vertical-align: middle;
13
+ text-align: center;
14
+ text-decoration: none;
15
+ color: #fff;
16
+ background: #888;
17
+ }
18
+ .borderradius .deck-container .deck-prev-link, .borderradius .deck-container .deck-next-link {
19
+ -webkit-border-radius: 16px;
20
+ -moz-border-radius: 16px;
21
+ border-radius: 16px;
22
+ }
23
+ .deck-container .deck-prev-link:hover, .deck-container .deck-prev-link:focus, .deck-container .deck-prev-link:active, .deck-container .deck-prev-link:visited, .deck-container .deck-next-link:hover, .deck-container .deck-next-link:focus, .deck-container .deck-next-link:active, .deck-container .deck-next-link:visited {
24
+ color: #fff;
25
+ }
26
+ .deck-container .deck-prev-link {
27
+ left: 8px;
28
+ }
29
+ .deck-container .deck-next-link {
30
+ right: 8px;
31
+ }
32
+ .deck-container:hover .deck-prev-link, .deck-container:hover .deck-next-link {
33
+ display: block;
34
+ }
35
+ .deck-container:hover .deck-prev-link.deck-nav-disabled, .touch .deck-container:hover .deck-prev-link, .deck-container:hover .deck-next-link.deck-nav-disabled, .touch .deck-container:hover .deck-next-link {
36
+ display: none;
37
+ }
38
+
39
+ @media print {
40
+ .deck-prev-link, .deck-next-link {
41
+ display: none !important;
42
+ }
43
+ }
@@ -0,0 +1,3 @@
1
+ <!-- Place the following snippet at the bottom of the deck container. -->
2
+ <a href="#" class="deck-prev-link" title="Previous">&#8592;</a>
3
+ <a href="#" class="deck-next-link" title="Next">&#8594;</a>
@@ -0,0 +1,92 @@
1
+ /*!
2
+ Deck JS - deck.navigation
3
+ Copyright (c) 2011 Caleb Troughton
4
+ Dual licensed under the MIT license and GPL license.
5
+ https://github.com/imakewebthings/deck.js/blob/master/MIT-license.txt
6
+ https://github.com/imakewebthings/deck.js/blob/master/GPL-license.txt
7
+ */
8
+
9
+ /*
10
+ This module adds clickable previous and next links to the deck.
11
+ */
12
+ (function($, deck, undefined) {
13
+ var $d = $(document),
14
+
15
+ /* Updates link hrefs, and disabled states if last/first slide */
16
+ updateButtons = function(e, from, to) {
17
+ var opts = $[deck]('getOptions'),
18
+ last = $[deck]('getSlides').length - 1,
19
+ prevSlide = $[deck]('getSlide', to - 1),
20
+ nextSlide = $[deck]('getSlide', to + 1),
21
+ hrefBase = window.location.href.replace(/#.*/, ''),
22
+ prevId = prevSlide ? prevSlide.attr('id') : undefined,
23
+ nextId = nextSlide ? nextSlide.attr('id') : undefined;
24
+
25
+ $(opts.selectors.previousLink)
26
+ .toggleClass(opts.classes.navDisabled, !to)
27
+ .attr('href', hrefBase + '#' + (prevId ? prevId : ''));
28
+ $(opts.selectors.nextLink)
29
+ .toggleClass(opts.classes.navDisabled, to === last)
30
+ .attr('href', hrefBase + '#' + (nextId ? nextId : ''));
31
+ };
32
+
33
+ /*
34
+ Extends defaults/options.
35
+
36
+ options.classes.navDisabled
37
+ This class is added to a navigation link when that action is disabled.
38
+ It is added to the previous link when on the first slide, and to the
39
+ next link when on the last slide.
40
+
41
+ options.selectors.nextLink
42
+ The elements that match this selector will move the deck to the next
43
+ slide when clicked.
44
+
45
+ options.selectors.previousLink
46
+ The elements that match this selector will move to deck to the previous
47
+ slide when clicked.
48
+ */
49
+ $.extend(true, $[deck].defaults, {
50
+ classes: {
51
+ navDisabled: 'deck-nav-disabled'
52
+ },
53
+
54
+ selectors: {
55
+ nextLink: '.deck-next-link',
56
+ previousLink: '.deck-prev-link'
57
+ }
58
+ });
59
+
60
+ $d.bind('deck.init', function() {
61
+ var opts = $[deck]('getOptions'),
62
+ slides = $[deck]('getSlides'),
63
+ $current = $[deck]('getSlide'),
64
+ ndx;
65
+
66
+ // Setup prev/next link events
67
+ $(opts.selectors.previousLink)
68
+ .unbind('click.decknavigation')
69
+ .bind('click.decknavigation', function(e) {
70
+ $[deck]('prev');
71
+ e.preventDefault();
72
+ });
73
+
74
+ $(opts.selectors.nextLink)
75
+ .unbind('click.decknavigation')
76
+ .bind('click.decknavigation', function(e) {
77
+ $[deck]('next');
78
+ e.preventDefault();
79
+ });
80
+
81
+ // Find where we started in the deck and set initial states
82
+ $.each(slides, function(i, $slide) {
83
+ if ($slide === $current) {
84
+ ndx = i;
85
+ return false;
86
+ }
87
+ });
88
+ updateButtons(null, ndx, ndx);
89
+ })
90
+ .bind('deck.change', updateButtons);
91
+ })(jQuery, 'deck');
92
+
@@ -0,0 +1,28 @@
1
+ /* Remove this line if you are embedding deck.js in a page and
2
+ using the scale extension. */
3
+ .csstransforms {
4
+ overflow: hidden;
5
+ }
6
+
7
+ .csstransforms .deck-container.deck-scale:not(.deck-menu) > .slide {
8
+ -webkit-box-sizing: padding-box;
9
+ -moz-box-sizing: padding-box;
10
+ box-sizing: padding-box;
11
+ width: 100%;
12
+ padding-bottom: 20px;
13
+ }
14
+ .csstransforms .deck-container.deck-scale:not(.deck-menu) > .slide > .deck-slide-scaler {
15
+ -webkit-transform-origin: 50% 0;
16
+ -moz-transform-origin: 50% 0;
17
+ -o-transform-origin: 50% 0;
18
+ -ms-transform-origin: 50% 0;
19
+ transform-origin: 50% 0;
20
+ }
21
+
22
+ .csstransforms .deck-container.deck-menu .deck-slide-scaler {
23
+ -webkit-transform: none !important;
24
+ -moz-transform: none !important;
25
+ -o-transform: none !important;
26
+ -ms-transform: none !important;
27
+ transform: none !important;
28
+ }
@@ -0,0 +1,170 @@
1
+ /*!
2
+ Deck JS - deck.scale
3
+ Copyright (c) 2011-2012 Caleb Troughton
4
+ Dual licensed under the MIT license and GPL license.
5
+ https://github.com/imakewebthings/deck.js/blob/master/MIT-license.txt
6
+ https://github.com/imakewebthings/deck.js/blob/master/GPL-license.txt
7
+ */
8
+
9
+ /*
10
+ This module adds automatic scaling to the deck. Slides are scaled down
11
+ using CSS transforms to fit within the deck container. If the container is
12
+ big enough to hold the slides without scaling, no scaling occurs. The user
13
+ can disable and enable scaling with a keyboard shortcut.
14
+
15
+ Note: CSS transforms may make Flash videos render incorrectly. Presenters
16
+ that need to use video may want to disable scaling to play them. HTML5 video
17
+ works fine.
18
+ */
19
+ (function($, deck, window, undefined) {
20
+ var $d = $(document),
21
+ $w = $(window),
22
+ baseHeight, // Value to scale against
23
+ timer, // Timeout id for debouncing
24
+ rootSlides,
25
+
26
+ /*
27
+ Internal function to do all the dirty work of scaling the slides.
28
+ */
29
+ scaleDeck = function() {
30
+ var opts = $[deck]('getOptions'),
31
+ obh = opts.baseHeight,
32
+ $container = $[deck]('getContainer'),
33
+ baseHeight = obh ? obh : $container.height();
34
+
35
+ // Scale each slide down if necessary (but don't scale up)
36
+ $.each(rootSlides, function(i, $slide) {
37
+ var slideHeight = $slide.innerHeight(),
38
+ $scaler = $slide.find('.' + opts.classes.scaleSlideWrapper),
39
+ scale = $container.hasClass(opts.classes.scale) ?
40
+ baseHeight / slideHeight :
41
+ 1;
42
+
43
+ $.each('Webkit Moz O ms Khtml'.split(' '), function(i, prefix) {
44
+ if (scale === 1) {
45
+ $scaler.css(prefix + 'Transform', '');
46
+ }
47
+ else {
48
+ $scaler.css(prefix + 'Transform', 'scale(' + scale + ')');
49
+ }
50
+ });
51
+ });
52
+ }
53
+
54
+ /*
55
+ Extends defaults/options.
56
+
57
+ options.classes.scale
58
+ This class is added to the deck container when scaling is enabled.
59
+ It is enabled by default when the module is included.
60
+
61
+ options.classes.scaleSlideWrapper
62
+ Scaling is done using a wrapper around the contents of each slide. This
63
+ class is applied to that wrapper.
64
+
65
+ options.keys.scale
66
+ The numeric keycode used to toggle enabling and disabling scaling.
67
+
68
+ options.baseHeight
69
+ When baseHeight is falsy, as it is by default, the deck is scaled in
70
+ proportion to the height of the deck container. You may instead specify
71
+ a height as a number of px, and slides will be scaled against this
72
+ height regardless of the container size.
73
+
74
+ options.scaleDebounce
75
+ Scaling on the browser resize event is debounced. This number is the
76
+ threshold in milliseconds. You can learn more about debouncing here:
77
+ http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
78
+
79
+ */
80
+ $.extend(true, $[deck].defaults, {
81
+ classes: {
82
+ scale: 'deck-scale',
83
+ scaleSlideWrapper: 'deck-slide-scaler'
84
+ },
85
+
86
+ keys: {
87
+ scale: 83 // s
88
+ },
89
+
90
+ baseHeight: null,
91
+ scaleDebounce: 200
92
+ });
93
+
94
+ /*
95
+ jQuery.deck('disableScale')
96
+
97
+ Disables scaling and removes the scale class from the deck container.
98
+ */
99
+ $[deck]('extend', 'disableScale', function() {
100
+ $[deck]('getContainer').removeClass($[deck]('getOptions').classes.scale);
101
+ scaleDeck();
102
+ });
103
+
104
+ /*
105
+ jQuery.deck('enableScale')
106
+
107
+ Enables scaling and adds the scale class to the deck container.
108
+ */
109
+ $[deck]('extend', 'enableScale', function() {
110
+ $[deck]('getContainer').addClass($[deck]('getOptions').classes.scale);
111
+ scaleDeck();
112
+ });
113
+
114
+ /*
115
+ jQuery.deck('toggleScale')
116
+
117
+ Toggles between enabling and disabling scaling.
118
+ */
119
+ $[deck]('extend', 'toggleScale', function() {
120
+ var $c = $[deck]('getContainer');
121
+ $[deck]($c.hasClass($[deck]('getOptions').classes.scale) ?
122
+ 'disableScale' : 'enableScale');
123
+ });
124
+
125
+ $d.bind('deck.init', function() {
126
+ var opts = $[deck]('getOptions'),
127
+ slideTest = $.map([
128
+ opts.classes.before,
129
+ opts.classes.previous,
130
+ opts.classes.current,
131
+ opts.classes.next,
132
+ opts.classes.after
133
+ ], function(el, i) {
134
+ return '.' + el;
135
+ }).join(', ');
136
+
137
+ // Build top level slides array
138
+ rootSlides = [];
139
+ $.each($[deck]('getSlides'), function(i, $el) {
140
+ if (!$el.parentsUntil(opts.selectors.container, slideTest).length) {
141
+ rootSlides.push($el);
142
+ }
143
+ });
144
+
145
+ // Use a wrapper on each slide to handle content scaling
146
+ $.each(rootSlides, function(i, $slide) {
147
+ $slide.children().wrapAll('<div class="' + opts.classes.scaleSlideWrapper + '"/>');
148
+ });
149
+
150
+ // Debounce the resize scaling
151
+ $w.unbind('resize.deckscale').bind('resize.deckscale', function() {
152
+ window.clearTimeout(timer);
153
+ timer = window.setTimeout(scaleDeck, opts.scaleDebounce);
154
+ })
155
+ // Scale once on load, in case images or something change layout
156
+ .unbind('load.deckscale').bind('load.deckscale', scaleDeck);
157
+
158
+ // Bind key events
159
+ $d.unbind('keydown.deckscale').bind('keydown.deckscale', function(e) {
160
+ if (e.which === opts.keys.scale || $.inArray(e.which, opts.keys.scale) > -1) {
161
+ $[deck]('toggleScale');
162
+ e.preventDefault();
163
+ }
164
+ });
165
+
166
+ // Enable scale on init
167
+ $[deck]('enableScale');
168
+ });
169
+ })(jQuery, 'deck', this);
170
+