slippery 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/assets/deck.js/core/deck.core.css +60 -0
- data/assets/deck.js/core/deck.core.js +728 -0
- data/assets/deck.js/core/deck.core.scss +65 -0
- data/assets/deck.js/core/print.css +25 -0
- data/assets/deck.js/core/print.scss +14 -0
- data/assets/deck.js/css/common.css +216 -0
- data/assets/deck.js/css/common.scss +233 -0
- data/assets/deck.js/css/home.css +790 -0
- data/assets/deck.js/css/home.scss +892 -0
- data/assets/deck.js/extensions/goto/deck.goto.css +36 -0
- data/assets/deck.js/extensions/goto/deck.goto.html +7 -0
- data/assets/deck.js/extensions/goto/deck.goto.js +190 -0
- data/assets/deck.js/extensions/goto/deck.goto.scss +39 -0
- data/assets/deck.js/extensions/hash/deck.hash.css +13 -0
- data/assets/deck.js/extensions/hash/deck.hash.html +2 -0
- data/assets/deck.js/extensions/hash/deck.hash.js +145 -0
- data/assets/deck.js/extensions/hash/deck.hash.scss +13 -0
- data/assets/deck.js/extensions/menu/deck.menu.css +45 -0
- data/assets/deck.js/extensions/menu/deck.menu.js +225 -0
- data/assets/deck.js/extensions/menu/deck.menu.scss +55 -0
- data/assets/deck.js/extensions/navigation/deck.navigation.css +42 -0
- data/assets/deck.js/extensions/navigation/deck.navigation.html +5 -0
- data/assets/deck.js/extensions/navigation/deck.navigation.js +94 -0
- data/assets/deck.js/extensions/navigation/deck.navigation.scss +44 -0
- data/assets/deck.js/extensions/scale/deck.scale.css +20 -0
- data/assets/deck.js/extensions/scale/deck.scale.js +190 -0
- data/assets/deck.js/extensions/scale/deck.scale.scss +22 -0
- data/assets/deck.js/extensions/status/deck.status.css +18 -0
- data/assets/deck.js/extensions/status/deck.status.html +6 -0
- data/assets/deck.js/extensions/status/deck.status.js +108 -0
- data/assets/deck.js/extensions/status/deck.status.scss +18 -0
- data/assets/deck.js/modernizr.custom.js +4 -0
- data/assets/deck.js/themes/style/_reset.scss +300 -0
- data/assets/deck.js/themes/style/neon.css +421 -0
- data/assets/deck.js/themes/style/neon.scss +148 -0
- data/assets/deck.js/themes/style/swiss.css +389 -0
- data/assets/deck.js/themes/style/swiss.scss +109 -0
- data/assets/deck.js/themes/style/web-2.0.css +500 -0
- data/assets/deck.js/themes/style/web-2.0.scss +228 -0
- data/assets/deck.js/themes/transition/fade.css +35 -0
- data/assets/deck.js/themes/transition/fade.scss +59 -0
- data/assets/deck.js/themes/transition/horizontal-slide.css +53 -0
- data/assets/deck.js/themes/transition/horizontal-slide.scss +72 -0
- data/assets/deck.js/themes/transition/vertical-slide.css +67 -0
- data/assets/deck.js/themes/transition/vertical-slide.scss +92 -0
- data/assets/highlight.js/CHANGES.md +953 -0
- data/assets/highlight.js/LICENSE +24 -0
- data/assets/highlight.js/README.md +101 -0
- data/assets/highlight.js/README.ru.md +101 -0
- data/assets/highlight.js/highlight-0.8.default.min.css +1 -0
- data/assets/highlight.js/highlight-0.8.min.js +1 -0
- data/assets/highlight.js/highlight.pack.js +1 -0
- data/assets/highlight.js/styles/arta.css +141 -0
- data/assets/highlight.js/styles/ascetic.css +53 -0
- data/assets/highlight.js/styles/atelier-dune.dark.css +95 -0
- data/assets/highlight.js/styles/atelier-dune.light.css +95 -0
- data/assets/highlight.js/styles/atelier-forest.dark.css +95 -0
- data/assets/highlight.js/styles/atelier-forest.light.css +95 -0
- data/assets/highlight.js/styles/atelier-heath.dark.css +95 -0
- data/assets/highlight.js/styles/atelier-heath.light.css +95 -0
- data/assets/highlight.js/styles/atelier-lakeside.dark.css +95 -0
- data/assets/highlight.js/styles/atelier-lakeside.light.css +95 -0
- data/assets/highlight.js/styles/atelier-seaside.dark.css +95 -0
- data/assets/highlight.js/styles/atelier-seaside.light.css +95 -0
- data/assets/highlight.js/styles/brown_paper.css +105 -0
- data/assets/highlight.js/styles/brown_papersq.png +0 -0
- data/assets/highlight.js/styles/codepen-embed.css +108 -0
- data/assets/highlight.js/styles/color-brewer.css +169 -0
- data/assets/highlight.js/styles/dark.css +105 -0
- data/assets/highlight.js/styles/default.css +153 -0
- data/assets/highlight.js/styles/docco.css +136 -0
- data/assets/highlight.js/styles/far.css +112 -0
- data/assets/highlight.js/styles/foundation.css +136 -0
- data/assets/highlight.js/styles/github.css +127 -0
- data/assets/highlight.js/styles/googlecode.css +148 -0
- data/assets/highlight.js/styles/hybrid.css +171 -0
- data/assets/highlight.js/styles/idea.css +126 -0
- data/assets/highlight.js/styles/ir_black.css +110 -0
- data/assets/highlight.js/styles/kimbie.dark.css +96 -0
- data/assets/highlight.js/styles/kimbie.light.css +96 -0
- data/assets/highlight.js/styles/magula.css +122 -0
- data/assets/highlight.js/styles/mono-blue.css +70 -0
- data/assets/highlight.js/styles/monokai.css +127 -0
- data/assets/highlight.js/styles/monokai_sublime.css +148 -0
- data/assets/highlight.js/styles/obsidian.css +154 -0
- data/assets/highlight.js/styles/paraiso.dark.css +95 -0
- data/assets/highlight.js/styles/paraiso.light.css +95 -0
- data/assets/highlight.js/styles/pojoaque.css +108 -0
- data/assets/highlight.js/styles/pojoaque.jpg +0 -0
- data/assets/highlight.js/styles/railscasts.css +185 -0
- data/assets/highlight.js/styles/rainbow.css +109 -0
- data/assets/highlight.js/styles/school_book.css +113 -0
- data/assets/highlight.js/styles/school_book.png +0 -0
- data/assets/highlight.js/styles/solarized_dark.css +109 -0
- data/assets/highlight.js/styles/solarized_light.css +109 -0
- data/assets/highlight.js/styles/sunburst.css +165 -0
- data/assets/highlight.js/styles/tomorrow-night-blue.css +95 -0
- data/assets/highlight.js/styles/tomorrow-night-bright.css +94 -0
- data/assets/highlight.js/styles/tomorrow-night-eighties.css +94 -0
- data/assets/highlight.js/styles/tomorrow-night.css +95 -0
- data/assets/highlight.js/styles/tomorrow.css +92 -0
- data/assets/highlight.js/styles/vs.css +94 -0
- data/assets/highlight.js/styles/xcode.css +159 -0
- data/assets/highlight.js/styles/zenburn.css +119 -0
- data/assets/jquery/jquery-2.1.0.min.js +4 -0
- data/assets/reveal.js/css/print/paper.css +1 -1
- data/assets/reveal.js/css/print/pdf.css +2 -2
- data/assets/reveal.js/css/reveal.css +372 -108
- data/assets/reveal.js/css/reveal.min.css +2 -2
- data/assets/reveal.js/css/theme/README.md +3 -1
- data/assets/reveal.js/css/theme/beige.css +7 -1
- data/assets/reveal.js/css/theme/blood.css +175 -0
- data/assets/reveal.js/css/theme/default.css +7 -1
- data/assets/reveal.js/css/theme/moon.css +7 -1
- data/assets/reveal.js/css/theme/night.css +7 -1
- data/assets/reveal.js/css/theme/serif.css +7 -1
- data/assets/reveal.js/css/theme/simple.css +7 -1
- data/assets/reveal.js/css/theme/sky.css +7 -1
- data/assets/reveal.js/css/theme/solarized.css +7 -1
- data/assets/reveal.js/css/theme/source/blood.scss +91 -0
- data/assets/reveal.js/css/theme/template/settings.scss +1 -0
- data/assets/reveal.js/css/theme/template/theme.scss +9 -2
- data/assets/reveal.js/js/reveal.js +1238 -433
- data/assets/reveal.js/js/reveal.min.js +4 -3
- data/assets/reveal.js/lib/css/zenburn.css +16 -17
- data/assets/reveal.js/plugin/highlight/highlight.js +3 -2
- data/assets/reveal.js/plugin/leap/leap.js +3 -0
- data/assets/reveal.js/plugin/markdown/example.html +37 -5
- data/assets/reveal.js/plugin/markdown/example.md +2 -0
- data/assets/reveal.js/plugin/markdown/markdown.js +373 -171
- data/assets/reveal.js/plugin/math/math.js +64 -0
- data/assets/reveal.js/plugin/multiplex/master.js +2 -1
- data/assets/reveal.js/plugin/notes/notes.html +33 -19
- data/assets/reveal.js/plugin/notes/notes.js +25 -47
- data/assets/reveal.js/plugin/remotes/remotes.js +4 -4
- data/assets/reveal.js/plugin/zoom-js/zoom.js +3 -1
- data/assets/reveal.old/css/print/paper.css +176 -0
- data/assets/reveal.old/css/print/pdf.css +190 -0
- data/assets/reveal.old/css/reveal.css +1616 -0
- data/assets/reveal.old/css/reveal.min.css +7 -0
- data/assets/reveal.old/css/theme/README.md +23 -0
- data/assets/reveal.old/css/theme/beige.css +142 -0
- data/assets/reveal.old/css/theme/default.css +142 -0
- data/assets/reveal.old/css/theme/moon.css +142 -0
- data/assets/reveal.old/css/theme/night.css +130 -0
- data/assets/reveal.old/css/theme/serif.css +132 -0
- data/assets/reveal.old/css/theme/simple.css +132 -0
- data/assets/reveal.old/css/theme/sky.css +139 -0
- data/assets/reveal.old/css/theme/solarized.css +142 -0
- data/assets/reveal.old/css/theme/source/beige.scss +50 -0
- data/assets/reveal.old/css/theme/source/default.scss +42 -0
- data/assets/reveal.old/css/theme/source/moon.scss +68 -0
- data/assets/reveal.old/css/theme/source/night.scss +35 -0
- data/assets/reveal.old/css/theme/source/serif.scss +35 -0
- data/assets/reveal.old/css/theme/source/simple.scss +38 -0
- data/assets/reveal.old/css/theme/source/sky.scss +46 -0
- data/assets/reveal.old/css/theme/source/solarized.scss +74 -0
- data/assets/reveal.old/css/theme/template/mixins.scss +29 -0
- data/assets/reveal.old/css/theme/template/settings.scss +33 -0
- data/assets/reveal.old/css/theme/template/theme.scss +163 -0
- data/assets/{reveal.js → reveal.old}/js/head.min.js +0 -0
- data/assets/reveal.old/js/reveal.js +2577 -0
- data/assets/reveal.old/js/reveal.min.js +8 -0
- data/assets/reveal.old/lib/css/zenburn.css +115 -0
- data/assets/reveal.old/lib/font/league_gothic-webfont.eot +0 -0
- data/assets/reveal.old/lib/font/league_gothic-webfont.svg +230 -0
- data/assets/reveal.old/lib/font/league_gothic-webfont.ttf +0 -0
- data/assets/reveal.old/lib/font/league_gothic-webfont.woff +0 -0
- data/assets/reveal.old/lib/font/league_gothic_license +2 -0
- data/assets/reveal.old/lib/js/classList.js +2 -0
- data/assets/reveal.old/lib/js/head.min.js +8 -0
- data/assets/reveal.old/lib/js/html5shiv.js +7 -0
- data/assets/reveal.old/plugin/highlight/highlight.js +31 -0
- data/assets/reveal.old/plugin/leap/leap.js +154 -0
- data/assets/reveal.old/plugin/markdown/example.html +97 -0
- data/assets/reveal.old/plugin/markdown/example.md +29 -0
- data/assets/reveal.old/plugin/markdown/markdown.js +190 -0
- data/assets/reveal.old/plugin/markdown/marked.js +37 -0
- data/assets/reveal.old/plugin/multiplex/client.js +13 -0
- data/assets/reveal.old/plugin/multiplex/index.js +56 -0
- data/assets/reveal.old/plugin/multiplex/master.js +50 -0
- data/assets/reveal.old/plugin/notes-server/client.js +57 -0
- data/assets/reveal.old/plugin/notes-server/index.js +59 -0
- data/assets/reveal.old/plugin/notes-server/notes.html +142 -0
- data/assets/reveal.old/plugin/notes/notes.html +253 -0
- data/assets/reveal.old/plugin/notes/notes.js +100 -0
- data/assets/reveal.old/plugin/postmessage/example.html +39 -0
- data/assets/reveal.old/plugin/postmessage/postmessage.js +42 -0
- data/assets/reveal.old/plugin/print-pdf/print-pdf.js +44 -0
- data/assets/reveal.old/plugin/remotes/remotes.js +39 -0
- data/assets/reveal.old/plugin/search/search.js +196 -0
- data/assets/reveal.old/plugin/zoom-js/zoom.js +256 -0
- data/bin/slippery +1 -0
- data/code_of_conduct.md +32 -0
- data/lib/slippery.rb +5 -3
- data/lib/slippery/document.rb +2 -2
- data/lib/slippery/presentation.rb +10 -1
- data/lib/slippery/processor.rb +18 -0
- data/lib/slippery/processor_helpers.rb +16 -2
- data/lib/slippery/processors/add_highlight.rb +9 -2
- data/lib/slippery/processors/deck_js.rb +81 -0
- data/lib/slippery/processors/fathom_js.rb +31 -0
- data/lib/slippery/processors/impress_js/add_impress_js.rb +2 -2
- data/lib/slippery/processors/jquery.rb +12 -0
- data/lib/slippery/processors/reveal_js/add_reveal_js.rb +12 -9
- data/lib/slippery/rake_tasks.rb +59 -31
- data/lib/slippery/version.rb +1 -1
- data/slippery.gemspec +5 -4
- metadata +215 -33
- 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,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
|
+
|