slippery 0.3.0 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (212) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -0
  3. data/assets/deck.js/core/deck.core.css +60 -0
  4. data/assets/deck.js/core/deck.core.js +728 -0
  5. data/assets/deck.js/core/deck.core.scss +65 -0
  6. data/assets/deck.js/core/print.css +25 -0
  7. data/assets/deck.js/core/print.scss +14 -0
  8. data/assets/deck.js/css/common.css +216 -0
  9. data/assets/deck.js/css/common.scss +233 -0
  10. data/assets/deck.js/css/home.css +790 -0
  11. data/assets/deck.js/css/home.scss +892 -0
  12. data/assets/deck.js/extensions/goto/deck.goto.css +36 -0
  13. data/assets/deck.js/extensions/goto/deck.goto.html +7 -0
  14. data/assets/deck.js/extensions/goto/deck.goto.js +190 -0
  15. data/assets/deck.js/extensions/goto/deck.goto.scss +39 -0
  16. data/assets/deck.js/extensions/hash/deck.hash.css +13 -0
  17. data/assets/deck.js/extensions/hash/deck.hash.html +2 -0
  18. data/assets/deck.js/extensions/hash/deck.hash.js +145 -0
  19. data/assets/deck.js/extensions/hash/deck.hash.scss +13 -0
  20. data/assets/deck.js/extensions/menu/deck.menu.css +45 -0
  21. data/assets/deck.js/extensions/menu/deck.menu.js +225 -0
  22. data/assets/deck.js/extensions/menu/deck.menu.scss +55 -0
  23. data/assets/deck.js/extensions/navigation/deck.navigation.css +42 -0
  24. data/assets/deck.js/extensions/navigation/deck.navigation.html +5 -0
  25. data/assets/deck.js/extensions/navigation/deck.navigation.js +94 -0
  26. data/assets/deck.js/extensions/navigation/deck.navigation.scss +44 -0
  27. data/assets/deck.js/extensions/scale/deck.scale.css +20 -0
  28. data/assets/deck.js/extensions/scale/deck.scale.js +190 -0
  29. data/assets/deck.js/extensions/scale/deck.scale.scss +22 -0
  30. data/assets/deck.js/extensions/status/deck.status.css +18 -0
  31. data/assets/deck.js/extensions/status/deck.status.html +6 -0
  32. data/assets/deck.js/extensions/status/deck.status.js +108 -0
  33. data/assets/deck.js/extensions/status/deck.status.scss +18 -0
  34. data/assets/deck.js/modernizr.custom.js +4 -0
  35. data/assets/deck.js/themes/style/_reset.scss +300 -0
  36. data/assets/deck.js/themes/style/neon.css +421 -0
  37. data/assets/deck.js/themes/style/neon.scss +148 -0
  38. data/assets/deck.js/themes/style/swiss.css +389 -0
  39. data/assets/deck.js/themes/style/swiss.scss +109 -0
  40. data/assets/deck.js/themes/style/web-2.0.css +500 -0
  41. data/assets/deck.js/themes/style/web-2.0.scss +228 -0
  42. data/assets/deck.js/themes/transition/fade.css +35 -0
  43. data/assets/deck.js/themes/transition/fade.scss +59 -0
  44. data/assets/deck.js/themes/transition/horizontal-slide.css +53 -0
  45. data/assets/deck.js/themes/transition/horizontal-slide.scss +72 -0
  46. data/assets/deck.js/themes/transition/vertical-slide.css +67 -0
  47. data/assets/deck.js/themes/transition/vertical-slide.scss +92 -0
  48. data/assets/highlight.js/CHANGES.md +953 -0
  49. data/assets/highlight.js/LICENSE +24 -0
  50. data/assets/highlight.js/README.md +101 -0
  51. data/assets/highlight.js/README.ru.md +101 -0
  52. data/assets/highlight.js/highlight-0.8.default.min.css +1 -0
  53. data/assets/highlight.js/highlight-0.8.min.js +1 -0
  54. data/assets/highlight.js/highlight.pack.js +1 -0
  55. data/assets/highlight.js/styles/arta.css +141 -0
  56. data/assets/highlight.js/styles/ascetic.css +53 -0
  57. data/assets/highlight.js/styles/atelier-dune.dark.css +95 -0
  58. data/assets/highlight.js/styles/atelier-dune.light.css +95 -0
  59. data/assets/highlight.js/styles/atelier-forest.dark.css +95 -0
  60. data/assets/highlight.js/styles/atelier-forest.light.css +95 -0
  61. data/assets/highlight.js/styles/atelier-heath.dark.css +95 -0
  62. data/assets/highlight.js/styles/atelier-heath.light.css +95 -0
  63. data/assets/highlight.js/styles/atelier-lakeside.dark.css +95 -0
  64. data/assets/highlight.js/styles/atelier-lakeside.light.css +95 -0
  65. data/assets/highlight.js/styles/atelier-seaside.dark.css +95 -0
  66. data/assets/highlight.js/styles/atelier-seaside.light.css +95 -0
  67. data/assets/highlight.js/styles/brown_paper.css +105 -0
  68. data/assets/highlight.js/styles/brown_papersq.png +0 -0
  69. data/assets/highlight.js/styles/codepen-embed.css +108 -0
  70. data/assets/highlight.js/styles/color-brewer.css +169 -0
  71. data/assets/highlight.js/styles/dark.css +105 -0
  72. data/assets/highlight.js/styles/default.css +153 -0
  73. data/assets/highlight.js/styles/docco.css +136 -0
  74. data/assets/highlight.js/styles/far.css +112 -0
  75. data/assets/highlight.js/styles/foundation.css +136 -0
  76. data/assets/highlight.js/styles/github.css +127 -0
  77. data/assets/highlight.js/styles/googlecode.css +148 -0
  78. data/assets/highlight.js/styles/hybrid.css +171 -0
  79. data/assets/highlight.js/styles/idea.css +126 -0
  80. data/assets/highlight.js/styles/ir_black.css +110 -0
  81. data/assets/highlight.js/styles/kimbie.dark.css +96 -0
  82. data/assets/highlight.js/styles/kimbie.light.css +96 -0
  83. data/assets/highlight.js/styles/magula.css +122 -0
  84. data/assets/highlight.js/styles/mono-blue.css +70 -0
  85. data/assets/highlight.js/styles/monokai.css +127 -0
  86. data/assets/highlight.js/styles/monokai_sublime.css +148 -0
  87. data/assets/highlight.js/styles/obsidian.css +154 -0
  88. data/assets/highlight.js/styles/paraiso.dark.css +95 -0
  89. data/assets/highlight.js/styles/paraiso.light.css +95 -0
  90. data/assets/highlight.js/styles/pojoaque.css +108 -0
  91. data/assets/highlight.js/styles/pojoaque.jpg +0 -0
  92. data/assets/highlight.js/styles/railscasts.css +185 -0
  93. data/assets/highlight.js/styles/rainbow.css +109 -0
  94. data/assets/highlight.js/styles/school_book.css +113 -0
  95. data/assets/highlight.js/styles/school_book.png +0 -0
  96. data/assets/highlight.js/styles/solarized_dark.css +109 -0
  97. data/assets/highlight.js/styles/solarized_light.css +109 -0
  98. data/assets/highlight.js/styles/sunburst.css +165 -0
  99. data/assets/highlight.js/styles/tomorrow-night-blue.css +95 -0
  100. data/assets/highlight.js/styles/tomorrow-night-bright.css +94 -0
  101. data/assets/highlight.js/styles/tomorrow-night-eighties.css +94 -0
  102. data/assets/highlight.js/styles/tomorrow-night.css +95 -0
  103. data/assets/highlight.js/styles/tomorrow.css +92 -0
  104. data/assets/highlight.js/styles/vs.css +94 -0
  105. data/assets/highlight.js/styles/xcode.css +159 -0
  106. data/assets/highlight.js/styles/zenburn.css +119 -0
  107. data/assets/jquery/jquery-2.1.0.min.js +4 -0
  108. data/assets/reveal.js/css/print/paper.css +1 -1
  109. data/assets/reveal.js/css/print/pdf.css +2 -2
  110. data/assets/reveal.js/css/reveal.css +372 -108
  111. data/assets/reveal.js/css/reveal.min.css +2 -2
  112. data/assets/reveal.js/css/theme/README.md +3 -1
  113. data/assets/reveal.js/css/theme/beige.css +7 -1
  114. data/assets/reveal.js/css/theme/blood.css +175 -0
  115. data/assets/reveal.js/css/theme/default.css +7 -1
  116. data/assets/reveal.js/css/theme/moon.css +7 -1
  117. data/assets/reveal.js/css/theme/night.css +7 -1
  118. data/assets/reveal.js/css/theme/serif.css +7 -1
  119. data/assets/reveal.js/css/theme/simple.css +7 -1
  120. data/assets/reveal.js/css/theme/sky.css +7 -1
  121. data/assets/reveal.js/css/theme/solarized.css +7 -1
  122. data/assets/reveal.js/css/theme/source/blood.scss +91 -0
  123. data/assets/reveal.js/css/theme/template/settings.scss +1 -0
  124. data/assets/reveal.js/css/theme/template/theme.scss +9 -2
  125. data/assets/reveal.js/js/reveal.js +1238 -433
  126. data/assets/reveal.js/js/reveal.min.js +4 -3
  127. data/assets/reveal.js/lib/css/zenburn.css +16 -17
  128. data/assets/reveal.js/plugin/highlight/highlight.js +3 -2
  129. data/assets/reveal.js/plugin/leap/leap.js +3 -0
  130. data/assets/reveal.js/plugin/markdown/example.html +37 -5
  131. data/assets/reveal.js/plugin/markdown/example.md +2 -0
  132. data/assets/reveal.js/plugin/markdown/markdown.js +373 -171
  133. data/assets/reveal.js/plugin/math/math.js +64 -0
  134. data/assets/reveal.js/plugin/multiplex/master.js +2 -1
  135. data/assets/reveal.js/plugin/notes/notes.html +33 -19
  136. data/assets/reveal.js/plugin/notes/notes.js +25 -47
  137. data/assets/reveal.js/plugin/remotes/remotes.js +4 -4
  138. data/assets/reveal.js/plugin/zoom-js/zoom.js +3 -1
  139. data/assets/reveal.old/css/print/paper.css +176 -0
  140. data/assets/reveal.old/css/print/pdf.css +190 -0
  141. data/assets/reveal.old/css/reveal.css +1616 -0
  142. data/assets/reveal.old/css/reveal.min.css +7 -0
  143. data/assets/reveal.old/css/theme/README.md +23 -0
  144. data/assets/reveal.old/css/theme/beige.css +142 -0
  145. data/assets/reveal.old/css/theme/default.css +142 -0
  146. data/assets/reveal.old/css/theme/moon.css +142 -0
  147. data/assets/reveal.old/css/theme/night.css +130 -0
  148. data/assets/reveal.old/css/theme/serif.css +132 -0
  149. data/assets/reveal.old/css/theme/simple.css +132 -0
  150. data/assets/reveal.old/css/theme/sky.css +139 -0
  151. data/assets/reveal.old/css/theme/solarized.css +142 -0
  152. data/assets/reveal.old/css/theme/source/beige.scss +50 -0
  153. data/assets/reveal.old/css/theme/source/default.scss +42 -0
  154. data/assets/reveal.old/css/theme/source/moon.scss +68 -0
  155. data/assets/reveal.old/css/theme/source/night.scss +35 -0
  156. data/assets/reveal.old/css/theme/source/serif.scss +35 -0
  157. data/assets/reveal.old/css/theme/source/simple.scss +38 -0
  158. data/assets/reveal.old/css/theme/source/sky.scss +46 -0
  159. data/assets/reveal.old/css/theme/source/solarized.scss +74 -0
  160. data/assets/reveal.old/css/theme/template/mixins.scss +29 -0
  161. data/assets/reveal.old/css/theme/template/settings.scss +33 -0
  162. data/assets/reveal.old/css/theme/template/theme.scss +163 -0
  163. data/assets/{reveal.js → reveal.old}/js/head.min.js +0 -0
  164. data/assets/reveal.old/js/reveal.js +2577 -0
  165. data/assets/reveal.old/js/reveal.min.js +8 -0
  166. data/assets/reveal.old/lib/css/zenburn.css +115 -0
  167. data/assets/reveal.old/lib/font/league_gothic-webfont.eot +0 -0
  168. data/assets/reveal.old/lib/font/league_gothic-webfont.svg +230 -0
  169. data/assets/reveal.old/lib/font/league_gothic-webfont.ttf +0 -0
  170. data/assets/reveal.old/lib/font/league_gothic-webfont.woff +0 -0
  171. data/assets/reveal.old/lib/font/league_gothic_license +2 -0
  172. data/assets/reveal.old/lib/js/classList.js +2 -0
  173. data/assets/reveal.old/lib/js/head.min.js +8 -0
  174. data/assets/reveal.old/lib/js/html5shiv.js +7 -0
  175. data/assets/reveal.old/plugin/highlight/highlight.js +31 -0
  176. data/assets/reveal.old/plugin/leap/leap.js +154 -0
  177. data/assets/reveal.old/plugin/markdown/example.html +97 -0
  178. data/assets/reveal.old/plugin/markdown/example.md +29 -0
  179. data/assets/reveal.old/plugin/markdown/markdown.js +190 -0
  180. data/assets/reveal.old/plugin/markdown/marked.js +37 -0
  181. data/assets/reveal.old/plugin/multiplex/client.js +13 -0
  182. data/assets/reveal.old/plugin/multiplex/index.js +56 -0
  183. data/assets/reveal.old/plugin/multiplex/master.js +50 -0
  184. data/assets/reveal.old/plugin/notes-server/client.js +57 -0
  185. data/assets/reveal.old/plugin/notes-server/index.js +59 -0
  186. data/assets/reveal.old/plugin/notes-server/notes.html +142 -0
  187. data/assets/reveal.old/plugin/notes/notes.html +253 -0
  188. data/assets/reveal.old/plugin/notes/notes.js +100 -0
  189. data/assets/reveal.old/plugin/postmessage/example.html +39 -0
  190. data/assets/reveal.old/plugin/postmessage/postmessage.js +42 -0
  191. data/assets/reveal.old/plugin/print-pdf/print-pdf.js +44 -0
  192. data/assets/reveal.old/plugin/remotes/remotes.js +39 -0
  193. data/assets/reveal.old/plugin/search/search.js +196 -0
  194. data/assets/reveal.old/plugin/zoom-js/zoom.js +256 -0
  195. data/bin/slippery +1 -0
  196. data/code_of_conduct.md +32 -0
  197. data/lib/slippery.rb +5 -3
  198. data/lib/slippery/document.rb +2 -2
  199. data/lib/slippery/presentation.rb +10 -1
  200. data/lib/slippery/processor.rb +18 -0
  201. data/lib/slippery/processor_helpers.rb +16 -2
  202. data/lib/slippery/processors/add_highlight.rb +9 -2
  203. data/lib/slippery/processors/deck_js.rb +81 -0
  204. data/lib/slippery/processors/fathom_js.rb +31 -0
  205. data/lib/slippery/processors/impress_js/add_impress_js.rb +2 -2
  206. data/lib/slippery/processors/jquery.rb +12 -0
  207. data/lib/slippery/processors/reveal_js/add_reveal_js.rb +12 -9
  208. data/lib/slippery/rake_tasks.rb +59 -31
  209. data/lib/slippery/version.rb +1 -1
  210. data/slippery.gemspec +5 -4
  211. metadata +215 -33
  212. data/lib/slippery/converter.rb +0 -132
@@ -0,0 +1,45 @@
1
+ .deck-menu {
2
+ overflow: auto;
3
+ }
4
+ .deck-menu .slide {
5
+ background: #eee;
6
+ position: relative;
7
+ left: 0;
8
+ top: 0;
9
+ visibility: visible;
10
+ cursor: pointer;
11
+ }
12
+ .no-csstransforms .deck-menu > .slide {
13
+ float: left;
14
+ width: 22%;
15
+ height: 22%;
16
+ min-height: 0;
17
+ margin: 1%;
18
+ font-size: 0.22em;
19
+ overflow: hidden;
20
+ padding: 0 0.5%;
21
+ }
22
+ .csstransforms .deck-menu > .slide {
23
+ -webkit-transform: scale(0.22) !important;
24
+ -ms-transform: scale(0.22) !important;
25
+ transform: scale(0.22) !important;
26
+ -webkit-transform-origin: 0 0;
27
+ -ms-transform-origin: 0 0;
28
+ transform-origin: 0 0;
29
+ -moz-box-sizing: border-box;
30
+ box-sizing: border-box;
31
+ width: 100%;
32
+ height: 100%;
33
+ overflow: hidden;
34
+ padding: 0 48px;
35
+ margin: 12px;
36
+ }
37
+ .deck-menu iframe, .deck-menu img, .deck-menu video {
38
+ max-width: 100%;
39
+ }
40
+ .deck-menu .deck-current, .no-touch .deck-menu .slide:hover {
41
+ background: #ddf;
42
+ }
43
+ .deck-menu.deck-container:hover .deck-prev-link, .deck-menu.deck-container:hover .deck-next-link {
44
+ display: none;
45
+ }
@@ -0,0 +1,225 @@
1
+ /*!
2
+ Deck JS - deck.menu
3
+ Copyright (c) 2011-2014 Caleb Troughton
4
+ Dual licensed under the MIT license.
5
+ https://github.com/imakewebthings/deck.js/blob/master/MIT-license.txt
6
+ */
7
+
8
+ /*
9
+ This module adds the methods and key binding to show and hide a menu of all
10
+ slides in the deck. The deck menu state is indicated by the presence of a class
11
+ on the deck container.
12
+ */
13
+ (function($, undefined) {
14
+ var $document = $(document);
15
+ var $html = $('html');
16
+ var rootSlides;
17
+
18
+ var populateRootSlidesArray = function() {
19
+ var options = $.deck('getOptions');
20
+ var slideTest = $.map([
21
+ options.classes.before,
22
+ options.classes.previous,
23
+ options.classes.current,
24
+ options.classes.next,
25
+ options.classes.after
26
+ ], function(el, i) {
27
+ return '.' + el;
28
+ }).join(', ');
29
+
30
+ rootSlides = [];
31
+ $.each($.deck('getSlides'), function(i, $slide) {
32
+ var $parentSlides = $slide.parentsUntil(
33
+ options.selectors.container,
34
+ slideTest
35
+ );
36
+ if (!$parentSlides.length) {
37
+ rootSlides.push($slide);
38
+ }
39
+ });
40
+ };
41
+
42
+ var bindKeyEvents = function() {
43
+ var options = $.deck('getOptions');
44
+ $document.unbind('keydown.deckmenu');
45
+ $document.bind('keydown.deckmenu', function(event) {
46
+ var isMenuKey = event.which === options.keys.menu;
47
+ isMenuKey = isMenuKey || $.inArray(event.which, options.keys.menu) > -1;
48
+ if (isMenuKey && !event.ctrlKey) {
49
+ $.deck('toggleMenu');
50
+ event.preventDefault();
51
+ }
52
+ });
53
+ };
54
+
55
+ var bindTouchEvents = function() {
56
+ var $container = $.deck('getContainer');
57
+ var options = $.deck('getOptions');
58
+ var touchEndTime = 0;
59
+ var currentSlide;
60
+
61
+ $container.unbind('touchstart.deckmenu');
62
+ $container.bind('touchstart.deckmenu', function() {
63
+ currentSlide = $.deck('getSlide');
64
+ });
65
+ $container.unbind('touchend.deckmenu');
66
+ $container.bind('touchend.deckmenu', function(event) {
67
+ var now = Date.now();
68
+ var isDoubletap = now - touchEndTime < options.touch.doubletapWindow;
69
+
70
+ // Ignore this touch event if it caused a nav change (swipe)
71
+ if (currentSlide !== $.deck('getSlide')) {
72
+ return;
73
+ }
74
+ if (isDoubletap) {
75
+ $.deck('toggleMenu');
76
+ event.preventDefault();
77
+ }
78
+ touchEndTime = now;
79
+ });
80
+ };
81
+
82
+ var setupMenuSlideSelection = function() {
83
+ var options = $.deck('getOptions');
84
+
85
+ $.each($.deck('getSlides'), function(i, $slide) {
86
+ $slide.unbind('click.deckmenu');
87
+ $slide.bind('click.deckmenu', function(event) {
88
+ if (!$.deck('getContainer').hasClass(options.classes.menu)) {
89
+ return;
90
+ }
91
+ $.deck('go', i);
92
+ $.deck('hideMenu');
93
+ event.stopPropagation();
94
+ event.preventDefault();
95
+ });
96
+ });
97
+ };
98
+
99
+ /*
100
+ Extends defaults/options.
101
+
102
+ options.classes.menu
103
+ This class is added to the deck container when showing the slide menu.
104
+
105
+ options.keys.menu
106
+ The numeric keycode used to toggle between showing and hiding the slide
107
+ menu.
108
+
109
+ options.touch.doubletapWindow
110
+ Two consecutive touch events within this number of milliseconds will
111
+ be considered a double tap, and will toggle the menu on touch devices.
112
+ */
113
+ $.extend(true, $.deck.defaults, {
114
+ classes: {
115
+ menu: 'deck-menu'
116
+ },
117
+
118
+ keys: {
119
+ menu: 77 // m
120
+ },
121
+
122
+ touch: {
123
+ doubletapWindow: 400
124
+ }
125
+ });
126
+
127
+ /*
128
+ jQuery.deck('showMenu')
129
+
130
+ Shows the slide menu by adding the class specified by the menu class option
131
+ to the deck container.
132
+ */
133
+ $.deck('extend', 'showMenu', function() {
134
+ var $container = $.deck('getContainer');
135
+ var options = $.deck('getOptions');
136
+
137
+ if ($container.hasClass(options.classes.menu)) {
138
+ return;
139
+ }
140
+
141
+ // Hide through loading class to short-circuit transitions (perf)
142
+ $container.addClass([
143
+ options.classes.loading,
144
+ options.classes.menu
145
+ ].join(' '));
146
+
147
+ /* Forced to do this in JS until CSS learns second-grade math. Save old
148
+ style value for restoration when menu is hidden. */
149
+ if (Modernizr.csstransforms) {
150
+ $.each(rootSlides, function(i, $slide) {
151
+ $slide.data('oldStyle', $slide.attr('style'));
152
+ $slide.css({
153
+ 'position': 'absolute',
154
+ 'left': ((i % 4) * 25) + '%',
155
+ 'top': (Math.floor(i / 4) * 25) + '%'
156
+ });
157
+ });
158
+ }
159
+
160
+ // Need to ensure the loading class renders first, then remove
161
+ window.setTimeout(function() {
162
+ $container.removeClass(options.classes.loading);
163
+ $container.scrollTop($.deck('getSlide').position().top);
164
+ }, 0);
165
+ });
166
+
167
+ /*
168
+ jQuery.deck('hideMenu')
169
+
170
+ Hides the slide menu by removing the class specified by the menu class
171
+ option from the deck container.
172
+ */
173
+ $.deck('extend', 'hideMenu', function() {
174
+ var $container = $.deck('getContainer');
175
+ var options = $.deck('getOptions');
176
+
177
+ if (!$container.hasClass(options.classes.menu)) {
178
+ return;
179
+ }
180
+
181
+ $container.removeClass(options.classes.menu);
182
+ $container.addClass(options.classes.loading);
183
+
184
+ /* Restore old style value */
185
+ if (Modernizr.csstransforms) {
186
+ $.each(rootSlides, function(i, $slide) {
187
+ var oldStyle = $slide.data('oldStyle');
188
+ $slide.attr('style', oldStyle ? oldStyle : '');
189
+ });
190
+ }
191
+
192
+ window.setTimeout(function() {
193
+ $container.removeClass(options.classes.loading);
194
+ $container.scrollTop(0);
195
+ }, 0);
196
+ });
197
+
198
+ /*
199
+ jQuery.deck('toggleMenu')
200
+
201
+ Toggles between showing and hiding the slide menu.
202
+ */
203
+ $.deck('extend', 'toggleMenu', function() {
204
+ $.deck('getContainer').hasClass($.deck('getOptions').classes.menu) ?
205
+ $.deck('hideMenu') : $.deck('showMenu');
206
+ });
207
+
208
+ $document.bind('deck.init', function() {
209
+ populateRootSlidesArray();
210
+ bindKeyEvents();
211
+ bindTouchEvents();
212
+ setupMenuSlideSelection();
213
+ });
214
+
215
+ $document.bind('deck.change', function(event, from, to) {
216
+ var $container = $.deck('getContainer');
217
+ var containerScroll, slideTop;
218
+
219
+ if ($container.hasClass($.deck('getOptions').classes.menu)) {
220
+ containerScroll = $container.scrollTop();
221
+ slideTop = $.deck('getSlide', to).position().top;
222
+ $container.scrollTop(containerScroll + slideTop);
223
+ }
224
+ });
225
+ })(jQuery);
@@ -0,0 +1,55 @@
1
+ .deck-menu {
2
+ overflow:auto;
3
+
4
+ .slide {
5
+ background:#eee;
6
+ position:relative;
7
+ left:0;
8
+ top:0;
9
+ visibility:visible;
10
+ cursor:pointer;
11
+ }
12
+
13
+ > .slide {
14
+ .no-csstransforms & {
15
+ float:left;
16
+ width:22%;
17
+ height:22%;
18
+ min-height:0;
19
+ margin:1%;
20
+ font-size:0.22em;
21
+ overflow:hidden;
22
+ padding:0 0.5%;
23
+ }
24
+
25
+ .csstransforms & {
26
+ -webkit-transform:scale(.22) !important;
27
+ -ms-transform:scale(.22) !important;
28
+ transform:scale(.22) !important;
29
+ -webkit-transform-origin:0 0;
30
+ -ms-transform-origin:0 0;
31
+ transform-origin:0 0;
32
+ -moz-box-sizing: border-box;
33
+ box-sizing: border-box;
34
+ width:100%;
35
+ height:100%;
36
+ overflow:hidden;
37
+ padding:0 48px;
38
+ margin:12px;
39
+ }
40
+ }
41
+
42
+ iframe, img, video {
43
+ max-width:100%;
44
+ }
45
+
46
+ .deck-current, .no-touch & .slide:hover {
47
+ background:#ddf;
48
+ }
49
+
50
+ &.deck-container:hover {
51
+ .deck-prev-link, .deck-next-link {
52
+ display:none;
53
+ }
54
+ }
55
+ }
@@ -0,0 +1,42 @@
1
+ .deck-prev-link, .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
+ border-radius: 16px;
18
+ }
19
+ .deck-prev-link:hover, .deck-prev-link:focus, .deck-prev-link:active, .deck-prev-link:visited, .deck-next-link:hover, .deck-next-link:focus, .deck-next-link:active, .deck-next-link:visited {
20
+ color: #fff;
21
+ }
22
+
23
+ .deck-prev-link {
24
+ left: 8px;
25
+ }
26
+
27
+ .deck-next-link {
28
+ right: 8px;
29
+ }
30
+
31
+ .deck-container:hover .deck-prev-link, .deck-container:hover .deck-next-link {
32
+ display: block;
33
+ }
34
+ .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 {
35
+ display: none;
36
+ }
37
+
38
+ @media print {
39
+ .deck-prev-link, .deck-next-link {
40
+ display: none !important;
41
+ }
42
+ }
@@ -0,0 +1,5 @@
1
+ <!-- Place the following snippet at the bottom of the deck container. -->
2
+ <div aria-role="navigation">
3
+ <a href="#" class="deck-prev-link" title="Previous">&#8592;</a>
4
+ <a href="#" class="deck-next-link" title="Next">&#8594;</a>
5
+ </div>
@@ -0,0 +1,94 @@
1
+ /*!
2
+ Deck JS - deck.navigation
3
+ Copyright (c) 2011-2014 Caleb Troughton
4
+ Dual licensed under the MIT license.
5
+ https://github.com/imakewebthings/deck.js/blob/master/MIT-license.txt
6
+ */
7
+
8
+ /*
9
+ This module adds clickable previous and next links to the deck.
10
+ */
11
+ (function($, undefined) {
12
+ var $document = $(document);
13
+
14
+ /* Updates link hrefs, and disabled states if last/first slide */
15
+ var updateButtons = function(event, from, to) {
16
+ var options = $.deck('getOptions');
17
+ var lastIndex = $.deck('getSlides').length - 1;
18
+ var $prevSlide = $.deck('getSlide', to - 1);
19
+ var $nextSlide = $.deck('getSlide', to + 1);
20
+ var hrefBase = window.location.href.replace(/#.*/, '');
21
+ var prevId = $prevSlide ? $prevSlide.attr('id') : undefined;
22
+ var nextId = $nextSlide ? $nextSlide.attr('id') : undefined;
23
+ var $prevButton = $(options.selectors.previousLink);
24
+ var $nextButton = $(options.selectors.nextLink);
25
+
26
+ $prevButton.toggleClass(options.classes.navDisabled, to === 0);
27
+ $prevButton.attr('aria-disabled', to === 0);
28
+ $prevButton.attr('href', hrefBase + '#' + (prevId ? prevId : ''));
29
+ $nextButton.toggleClass(options.classes.navDisabled, to === lastIndex);
30
+ $nextButton.attr('aria-disabled', to === lastIndex);
31
+ $nextButton.attr('href', hrefBase + '#' + (nextId ? nextId : ''));
32
+ };
33
+
34
+ /*
35
+ Extends defaults/options.
36
+
37
+ options.classes.navDisabled
38
+ This class is added to a navigation link when that action is disabled.
39
+ It is added to the previous link when on the first slide, and to the
40
+ next link when on the last slide.
41
+
42
+ options.selectors.nextLink
43
+ The elements that match this selector will move the deck to the next
44
+ slide when clicked.
45
+
46
+ options.selectors.previousLink
47
+ The elements that match this selector will move to deck to the previous
48
+ slide when clicked.
49
+ */
50
+ $.extend(true, $.deck.defaults, {
51
+ classes: {
52
+ navDisabled: 'deck-nav-disabled'
53
+ },
54
+
55
+ selectors: {
56
+ nextLink: '.deck-next-link',
57
+ previousLink: '.deck-prev-link'
58
+ }
59
+ });
60
+
61
+ $document.bind('deck.init', function() {
62
+ var options = $.deck('getOptions');
63
+ var slides = $.deck('getSlides');
64
+ var $current = $.deck('getSlide');
65
+ var $prevButton = $(options.selectors.previousLink);
66
+ var $nextButton = $(options.selectors.nextLink);
67
+ var index;
68
+
69
+ // Setup prev/next link events
70
+ $prevButton.unbind('click.decknavigation');
71
+ $prevButton.bind('click.decknavigation', function(event) {
72
+ $.deck('prev');
73
+ event.preventDefault();
74
+ });
75
+
76
+ $nextButton.unbind('click.decknavigation');
77
+ $nextButton.bind('click.decknavigation', function(event) {
78
+ $.deck('next');
79
+ event.preventDefault();
80
+ });
81
+
82
+ // Find where we started in the deck and set initial states
83
+ $.each(slides, function(i, $slide) {
84
+ if ($slide === $current) {
85
+ index = i;
86
+ return false;
87
+ }
88
+ });
89
+ updateButtons(null, index, index);
90
+ });
91
+
92
+ $document.bind('deck.change', updateButtons);
93
+ })(jQuery);
94
+