slideoff 0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/Gemfile +3 -0
- data/MIT-LICENSE +20 -0
- data/README.md +218 -0
- data/bin/slideoff +127 -0
- data/lib/slideoff/config_builder.rb +60 -0
- data/lib/slideoff/flickr_api.rb +50 -0
- data/lib/slideoff/flickr_image.rb +92 -0
- data/lib/slideoff/markdown.rb +145 -0
- data/lib/slideoff/presentation.rb +90 -0
- data/lib/slideoff/remote_api.rb +53 -0
- data/lib/slideoff/routes.rb +20 -0
- data/lib/slideoff/server.rb +50 -0
- data/lib/slideoff/slides_api.rb +59 -0
- data/lib/slideoff/utils.rb +453 -0
- data/lib/slideoff.rb +15 -0
- data/themes/3d_slideshow/README +2 -0
- data/themes/3d_slideshow/css/main.css +232 -0
- data/themes/3d_slideshow/css/reset.css +57 -0
- data/themes/3d_slideshow/index.erb +31 -0
- data/themes/3d_slideshow/js/slideshow.js +288 -0
- data/themes/CSSS/README +2 -0
- data/themes/CSSS/css/slideshow.css +304 -0
- data/themes/CSSS/css/theme.css +250 -0
- data/themes/CSSS/images/rainbow-wood.jpg +0 -0
- data/themes/CSSS/index.erb +36 -0
- data/themes/CSSS/js/classList.js +116 -0
- data/themes/CSSS/js/prefixfree.min.js +5 -0
- data/themes/CSSS/js/slideshow.js +621 -0
- data/themes/common/css/pygments/colorful.css +62 -0
- data/themes/common/css/pygments/manni.css +61 -0
- data/themes/common/css/pygments/native.css +70 -0
- data/themes/common/css/pygments/solarized.css +66 -0
- data/themes/common/fonts/DroidSansMono.svg +626 -0
- data/themes/common/fonts/DroidSansMono.ttf +0 -0
- data/themes/common/fonts/Lato-BoldItalic.woff +0 -0
- data/themes/common/fonts/Lato-Italic.woff +0 -0
- data/themes/common/fonts/Lato-bold.woff +0 -0
- data/themes/common/fonts/Lato.woff +0 -0
- data/themes/common/fonts/OpenSans-Bold.woff +0 -0
- data/themes/common/fonts/OpenSans-BoldItalic.woff +0 -0
- data/themes/common/fonts/OpenSans-Italic.woff +0 -0
- data/themes/common/fonts/OpenSans.woff +0 -0
- data/themes/common/fonts/PTMono.woff +0 -0
- data/themes/common/fonts/PTSans.Bold.Italic.woff +0 -0
- data/themes/common/fonts/PTSans.Bold.woff +0 -0
- data/themes/common/fonts/PTSans.Italic.woff +0 -0
- data/themes/common/fonts/PTSans.Narrow.Bold.woff +0 -0
- data/themes/common/fonts/PTSans.Narrow.woff +0 -0
- data/themes/common/fonts/PTSans.woff +0 -0
- data/themes/common/fonts/TargetBlank.otf +0 -0
- data/themes/common/fonts/TargetBlank.svg +14 -0
- data/themes/common/fonts/YanoneKaffeesatz-Bold.woff +0 -0
- data/themes/common/fonts/YanoneKaffeesatz-Regular.woff +0 -0
- data/themes/common/fonts/crimson_text.ttf +0 -0
- data/themes/common/fonts/crimson_text_bold.ttf +0 -0
- data/themes/common/fonts/crimson_text_semibold.ttf +0 -0
- data/themes/common/fonts/league_gothic-webfont.ttf +0 -0
- data/themes/html5rocks/README +2 -0
- data/themes/html5rocks/css/default.css +501 -0
- data/themes/html5rocks/css/moon.css +543 -0
- data/themes/html5rocks/css/sand.css +508 -0
- data/themes/html5rocks/css/sea_wave.css +492 -0
- data/themes/html5rocks/index.erb +64 -0
- data/themes/html5rocks/js/slides.js +464 -0
- data/themes/io2012/README +2 -0
- data/themes/io2012/css/default.css +1481 -0
- data/themes/io2012/css/fonts.css +24 -0
- data/themes/io2012/css/phone.css +27 -0
- data/themes/io2012/images/google_developers_icon_128.png +0 -0
- data/themes/io2012/images/io2012_logo.png +0 -0
- data/themes/io2012/index.erb +73 -0
- data/themes/io2012/js/hammer.js +586 -0
- data/themes/io2012/js/modernizr.custom.45394.js +4 -0
- data/themes/io2012/js/order.js +8 -0
- data/themes/io2012/js/polyfills/classList.min.js +2 -0
- data/themes/io2012/js/polyfills/dataset.min.js +2 -0
- data/themes/io2012/js/polyfills/history.min.js +1 -0
- data/themes/io2012/js/prettify/lang-apollo.js +2 -0
- data/themes/io2012/js/prettify/lang-clj.js +18 -0
- data/themes/io2012/js/prettify/lang-css.js +2 -0
- data/themes/io2012/js/prettify/lang-go.js +1 -0
- data/themes/io2012/js/prettify/lang-hs.js +2 -0
- data/themes/io2012/js/prettify/lang-lisp.js +3 -0
- data/themes/io2012/js/prettify/lang-lua.js +2 -0
- data/themes/io2012/js/prettify/lang-ml.js +2 -0
- data/themes/io2012/js/prettify/lang-n.js +4 -0
- data/themes/io2012/js/prettify/lang-proto.js +1 -0
- data/themes/io2012/js/prettify/lang-scala.js +2 -0
- data/themes/io2012/js/prettify/lang-sql.js +2 -0
- data/themes/io2012/js/prettify/lang-tex.js +1 -0
- data/themes/io2012/js/prettify/lang-vb.js +2 -0
- data/themes/io2012/js/prettify/lang-vhdl.js +3 -0
- data/themes/io2012/js/prettify/lang-wiki.js +2 -0
- data/themes/io2012/js/prettify/lang-xq.js +3 -0
- data/themes/io2012/js/prettify/lang-yaml.js +2 -0
- data/themes/io2012/js/prettify/prettify.css +1 -0
- data/themes/io2012/js/prettify/prettify.js +28 -0
- data/themes/io2012/js/require-1.0.8.min.js +33 -0
- data/themes/io2012/js/slide-controller.js +109 -0
- data/themes/io2012/js/slide-deck.js +768 -0
- data/themes/io2012/js/slides.js +5 -0
- data/themes/memories/README +5 -0
- data/themes/memories/css/fonts.css +25 -0
- data/themes/memories/css/slideshow.css +286 -0
- data/themes/memories/css/theme.css +183 -0
- data/themes/memories/index.erb +37 -0
- data/themes/memories/js/prefixfree.min.js +13 -0
- data/themes/memories/js/slideshow.js +577 -0
- data/themes/modern/LICENSE +20 -0
- data/themes/modern/README.md +52 -0
- data/themes/modern/css/GENERATED_CONTENT +0 -0
- data/themes/modern/css/defaults.css +0 -0
- data/themes/modern/css/fonts.css +166 -0
- data/themes/modern/css/pygments/colorful.css +215 -0
- data/themes/modern/css/pygments/github.css +208 -0
- data/themes/modern/css/pygments/solarized-dark.css +213 -0
- data/themes/modern/css/pygments/solarized-light.css +213 -0
- data/themes/modern/css/reset.css +41 -0
- data/themes/modern/css/screen.css +1183 -0
- data/themes/modern/fonts/Collegiate.woff +0 -0
- data/themes/modern/fonts/GoudyBookletter.1911.woff +0 -0
- data/themes/modern/fonts/Inconsolata.Bold.woff +0 -0
- data/themes/modern/fonts/Inconsolata.woff +0 -0
- data/themes/modern/fonts/Junction.woff +0 -0
- data/themes/modern/fonts/LiberationMono.Bold.woff +0 -0
- data/themes/modern/fonts/LiberationMono.BoldItalic.woff +0 -0
- data/themes/modern/fonts/LiberationMono.Italic.woff +0 -0
- data/themes/modern/fonts/LiberationMono.Regular.woff +0 -0
- data/themes/modern/fonts/OpenSans.Bold.woff +0 -0
- data/themes/modern/fonts/OpenSans.BoldItalic.woff +0 -0
- data/themes/modern/fonts/OpenSans.ExtraBold.woff +0 -0
- data/themes/modern/fonts/OpenSans.ExtraBoldItalic.woff +0 -0
- data/themes/modern/fonts/OpenSans.Italic.woff +0 -0
- data/themes/modern/fonts/OpenSans.Light.woff +0 -0
- data/themes/modern/fonts/OpenSans.LightItalic.woff +0 -0
- data/themes/modern/fonts/OpenSans.Regular.woff +0 -0
- data/themes/modern/fonts/OpenSans.Semibold.woff +0 -0
- data/themes/modern/fonts/OpenSans.SemiboldItalic.woff +0 -0
- data/themes/modern/fonts/PTMono.woff +0 -0
- data/themes/modern/fonts/PTSans.Bold.Italic.woff +0 -0
- data/themes/modern/fonts/PTSans.Bold.woff +0 -0
- data/themes/modern/fonts/PTSans.Italic.woff +0 -0
- data/themes/modern/fonts/PTSans.Narrow.Bold.woff +0 -0
- data/themes/modern/fonts/PTSans.woff +0 -0
- data/themes/modern/fonts/Raleway.Thin.woff +0 -0
- data/themes/modern/fonts/STIXGeneral.Bold.woff +0 -0
- data/themes/modern/fonts/STIXGeneral.BoldItalic.woff +0 -0
- data/themes/modern/fonts/STIXGeneral.Italic.woff +0 -0
- data/themes/modern/fonts/STIXGeneral.Regular.woff +0 -0
- data/themes/modern/fonts/YanoneKaffeesatz.Bold.woff +0 -0
- data/themes/modern/fonts/YanoneKaffeesatz.ExtraLight.woff +0 -0
- data/themes/modern/fonts/YanoneKaffeesatz.Light.woff +0 -0
- data/themes/modern/fonts/YanoneKaffeesatz.Regular.woff +0 -0
- data/themes/modern/images/cc/by.svg +29 -0
- data/themes/modern/images/cc/cc-white.svg +23 -0
- data/themes/modern/images/cc/cc.svg +23 -0
- data/themes/modern/images/cc/nc-eu.svg +21 -0
- data/themes/modern/images/cc/nc-jp.svg +18 -0
- data/themes/modern/images/cc/nc.svg +23 -0
- data/themes/modern/images/cc/nd.svg +20 -0
- data/themes/modern/images/cc/pd.svg +24 -0
- data/themes/modern/images/cc/remix.svg +20 -0
- data/themes/modern/images/cc/sa.svg +22 -0
- data/themes/modern/images/cc/sampling.plus.svg +33 -0
- data/themes/modern/images/cc/sampling.svg +36 -0
- data/themes/modern/images/cc/share.svg +22 -0
- data/themes/modern/images/cc/zero.svg +24 -0
- data/themes/modern/images/flickr.svg +65 -0
- data/themes/modern/images/mesh.png +0 -0
- data/themes/modern/images/mesh@2x.png +0 -0
- data/themes/modern/images/progress-grayDark.svg +55 -0
- data/themes/modern/images/progress.svg +3 -0
- data/themes/modern/index.erb +76 -0
- data/themes/modern/js/highcharts.js +294 -0
- data/themes/modern/js/jquery-2.1.0.min.js +4 -0
- data/themes/modern/js/script.coffee +480 -0
- data/themes/modern/js/script.js +678 -0
- data/themes/modern/styles/_box.scss +89 -0
- data/themes/modern/styles/_figure.scss +81 -0
- data/themes/modern/styles/_full.scss +74 -0
- data/themes/modern/styles/_increment.scss +38 -0
- data/themes/modern/styles/_list.scss +129 -0
- data/themes/modern/styles/_progress.scss +19 -0
- data/themes/modern/styles/defaults.scss +46 -0
- data/themes/modern/styles/fonts.scss +197 -0
- data/themes/modern/styles/pygments/_solarized.scss +82 -0
- data/themes/modern/styles/pygments/colorful.scss +67 -0
- data/themes/modern/styles/pygments/github.scss +67 -0
- data/themes/modern/styles/pygments/solarized-dark.scss +15 -0
- data/themes/modern/styles/pygments/solarized-light.scss +15 -0
- data/themes/modern/styles/reset.scss +46 -0
- data/themes/modern/styles/screen.scss +841 -0
- data/themes/reveal/README +2 -0
- data/themes/reveal/css/main.css +1029 -0
- data/themes/reveal/css/reset.css +57 -0
- data/themes/reveal/index.erb +102 -0
- data/themes/reveal/js/classList.js +2 -0
- data/themes/reveal/js/head.min.js +8 -0
- data/themes/reveal/js/reveal.js +951 -0
- data/themes/shower/README +2 -0
- data/themes/shower/css/fonts.css +50 -0
- data/themes/shower/css/reset.css +42 -0
- data/themes/shower/css/style.css +418 -0
- data/themes/shower/images/grid.png +0 -0
- data/themes/shower/images/linen.png +0 -0
- data/themes/shower/images/ribbon.svg +4 -0
- data/themes/shower/index.erb +35 -0
- data/themes/shower/js/script.js +325 -0
- data/themes/template/README +5 -0
- data/themes/template/css/reset.css +42 -0
- data/themes/template/index.erb +35 -0
- data/themes/template/js/prefixfree.min.js +13 -0
- metadata +343 -0
@@ -0,0 +1,325 @@
|
|
1
|
+
(function () {
|
2
|
+
var url = window.location,
|
3
|
+
body = document.body,
|
4
|
+
slides = document.querySelectorAll('div.slide'),
|
5
|
+
progress = document.querySelector('div.progress div'),
|
6
|
+
slideList = [],
|
7
|
+
l = slides.length, i;
|
8
|
+
|
9
|
+
for (i = 0; i < l; i++) {
|
10
|
+
slideList.push({
|
11
|
+
id: slides[i].id,
|
12
|
+
hasInnerNavigation: null !== slides[i].querySelector('.inner')
|
13
|
+
});
|
14
|
+
}
|
15
|
+
|
16
|
+
function getTransform() {
|
17
|
+
var denominator = Math.max(
|
18
|
+
body.clientWidth / window.innerWidth,
|
19
|
+
body.clientHeight / window.innerHeight
|
20
|
+
);
|
21
|
+
|
22
|
+
return 'scale(' + (1 / denominator) + ')';
|
23
|
+
}
|
24
|
+
|
25
|
+
function applyTransform(transform) {
|
26
|
+
body.style.WebkitTransform = transform;
|
27
|
+
body.style.MozTransform = transform;
|
28
|
+
body.style.msTransform = transform;
|
29
|
+
body.style.OTransform = transform;
|
30
|
+
body.style.transform = transform;
|
31
|
+
}
|
32
|
+
|
33
|
+
function enterSlideMode() {
|
34
|
+
body.className = 'full';
|
35
|
+
applyTransform(getTransform());
|
36
|
+
}
|
37
|
+
|
38
|
+
function enterListMode() {
|
39
|
+
body.className = 'list';
|
40
|
+
applyTransform('none');
|
41
|
+
}
|
42
|
+
|
43
|
+
function getCurrentSlideNumber() {
|
44
|
+
var i, l = slideList.length,
|
45
|
+
currentSlideId = url.hash.substr(1);
|
46
|
+
|
47
|
+
for (i = 0; i < l; ++i) {
|
48
|
+
if (currentSlideId === slideList[i].id) {
|
49
|
+
return i;
|
50
|
+
}
|
51
|
+
}
|
52
|
+
|
53
|
+
return -1;
|
54
|
+
}
|
55
|
+
|
56
|
+
function scrollToSlide(slideNumber) {
|
57
|
+
if (-1 === slideNumber ) { return; }
|
58
|
+
|
59
|
+
var currentSlide = document.getElementById(slideList[slideNumber].id);
|
60
|
+
|
61
|
+
if (null != currentSlide) {
|
62
|
+
window.scrollTo(0, currentSlide.offsetTop);
|
63
|
+
}
|
64
|
+
}
|
65
|
+
|
66
|
+
function isListMode() {
|
67
|
+
return 'full' !== url.search.substr(1);
|
68
|
+
}
|
69
|
+
|
70
|
+
function normalizeSlideNumber(slideNumber) {
|
71
|
+
if (0 > slideNumber) {
|
72
|
+
return slideList.length - 1;
|
73
|
+
} else if (slideList.length <= slideNumber) {
|
74
|
+
return 0;
|
75
|
+
} else {
|
76
|
+
return slideNumber;
|
77
|
+
}
|
78
|
+
}
|
79
|
+
|
80
|
+
function updateProgress(slideNumber) {
|
81
|
+
if (null === progress) { return; }
|
82
|
+
progress.style.width = (100 / (slideList.length - 1) * normalizeSlideNumber(slideNumber)).toFixed(2) + '%';
|
83
|
+
}
|
84
|
+
|
85
|
+
function getSlideHash(slideNumber) {
|
86
|
+
return '#' + slideList[normalizeSlideNumber(slideNumber)].id;
|
87
|
+
}
|
88
|
+
|
89
|
+
function goToSlide(slideNumber) {
|
90
|
+
url.hash = getSlideHash(slideNumber);
|
91
|
+
|
92
|
+
if (!isListMode()) {
|
93
|
+
updateProgress(slideNumber);
|
94
|
+
}
|
95
|
+
}
|
96
|
+
|
97
|
+
function getContainingSlideId(el) {
|
98
|
+
var node = el;
|
99
|
+
while ('BODY' !== node.nodeName && 'HTML' !== node.nodeName) {
|
100
|
+
if (node.classList.contains('slide')) {
|
101
|
+
return node.id;
|
102
|
+
} else {
|
103
|
+
node = node.parentNode;
|
104
|
+
}
|
105
|
+
}
|
106
|
+
|
107
|
+
return '';
|
108
|
+
}
|
109
|
+
|
110
|
+
function dispatchSingleSlideMode(e) {
|
111
|
+
var slideId = getContainingSlideId(e.target);
|
112
|
+
|
113
|
+
if ('' !== slideId && isListMode()) {
|
114
|
+
e.preventDefault();
|
115
|
+
|
116
|
+
// NOTE: we should update hash to get things work properly
|
117
|
+
url.hash = '#' + slideId;
|
118
|
+
history.replaceState(null, null, url.pathname + '?full#' + slideId);
|
119
|
+
enterSlideMode();
|
120
|
+
|
121
|
+
updateProgress(getCurrentSlideNumber());
|
122
|
+
}
|
123
|
+
}
|
124
|
+
|
125
|
+
// Increases inner navigation by adding 'active' class to next inactive inner navigation item
|
126
|
+
function increaseInnerNavigation(slideNumber) {
|
127
|
+
// Shortcut for slides without inner navigation
|
128
|
+
if (true !== slideList[slideNumber].hasInnerNavigation) { return -1; }
|
129
|
+
|
130
|
+
var activeNodes = document.querySelectorAll(getSlideHash(slideNumber) + ' .active'),
|
131
|
+
// NOTE: we assume there is no other elements in inner navigation
|
132
|
+
node = activeNodes[activeNodes.length - 1].nextElementSibling;
|
133
|
+
|
134
|
+
if (null !== node) {
|
135
|
+
node.classList.add('active');
|
136
|
+
return activeNodes.length + 1;
|
137
|
+
} else {
|
138
|
+
return -1;
|
139
|
+
}
|
140
|
+
}
|
141
|
+
|
142
|
+
function startEventSourceHandler (uri) {
|
143
|
+
if (window['EventSource'] == undefined) return ;
|
144
|
+
|
145
|
+
var source = new EventSource(uri);
|
146
|
+
var currentSlideNumber = getCurrentSlideNumber();
|
147
|
+
|
148
|
+
source.onmessage = function(e) {
|
149
|
+
switch(e.data){
|
150
|
+
case 'next':
|
151
|
+
currentSlideNumber++;
|
152
|
+
goToSlide(currentSlideNumber);
|
153
|
+
break;
|
154
|
+
case 'prev':
|
155
|
+
currentSlideNumber--;
|
156
|
+
goToSlide(currentSlideNumber);
|
157
|
+
break;
|
158
|
+
case 'up':
|
159
|
+
if (!isListMode()) {
|
160
|
+
e.preventDefault();
|
161
|
+
|
162
|
+
history.pushState(null, null, url.pathname + getSlideHash(currentSlideNumber));
|
163
|
+
enterListMode();
|
164
|
+
scrollToSlide(currentSlideNumber);
|
165
|
+
}
|
166
|
+
break;
|
167
|
+
case 'down':
|
168
|
+
if (isListMode()) {
|
169
|
+
e.preventDefault();
|
170
|
+
|
171
|
+
history.pushState(null, null, url.pathname + '?full' + getSlideHash(currentSlideNumber));
|
172
|
+
enterSlideMode();
|
173
|
+
|
174
|
+
updateProgress(currentSlideNumber);
|
175
|
+
}
|
176
|
+
break;
|
177
|
+
default:
|
178
|
+
console.log(e);
|
179
|
+
};
|
180
|
+
};
|
181
|
+
}
|
182
|
+
|
183
|
+
// Event handlers
|
184
|
+
|
185
|
+
window.addEventListener('DOMContentLoaded', function () {
|
186
|
+
if (!isListMode()) {
|
187
|
+
// "?full" is present without slide hash, so we should display first slide
|
188
|
+
if (-1 === getCurrentSlideNumber()) {
|
189
|
+
history.replaceState(null, null, url.pathname + '?full' + getSlideHash(0));
|
190
|
+
}
|
191
|
+
|
192
|
+
enterSlideMode();
|
193
|
+
updateProgress(getCurrentSlideNumber());
|
194
|
+
}
|
195
|
+
}, false);
|
196
|
+
|
197
|
+
window.addEventListener('popstate', function (e) {
|
198
|
+
if (isListMode()) {
|
199
|
+
enterListMode();
|
200
|
+
scrollToSlide(getCurrentSlideNumber());
|
201
|
+
} else {
|
202
|
+
enterSlideMode();
|
203
|
+
}
|
204
|
+
}, false);
|
205
|
+
|
206
|
+
window.addEventListener('resize', function (e) {
|
207
|
+
if (!isListMode()) {
|
208
|
+
applyTransform(getTransform());
|
209
|
+
}
|
210
|
+
}, false);
|
211
|
+
|
212
|
+
document.addEventListener('keydown', function (e) {
|
213
|
+
// Shortcut for alt, shift and meta keys
|
214
|
+
if (e.altKey || e.ctrlKey || e.metaKey) { return; }
|
215
|
+
|
216
|
+
var currentSlideNumber = getCurrentSlideNumber();
|
217
|
+
|
218
|
+
switch (e.which) {
|
219
|
+
case 116: // F5
|
220
|
+
case 13: // Enter
|
221
|
+
if (isListMode() && -1 !== currentSlideNumber) {
|
222
|
+
e.preventDefault();
|
223
|
+
|
224
|
+
history.pushState(null, null, url.pathname + '?full' + getSlideHash(currentSlideNumber));
|
225
|
+
enterSlideMode();
|
226
|
+
|
227
|
+
updateProgress(currentSlideNumber);
|
228
|
+
}
|
229
|
+
break;
|
230
|
+
|
231
|
+
case 27: // Esc
|
232
|
+
if (!isListMode()) {
|
233
|
+
e.preventDefault();
|
234
|
+
|
235
|
+
history.pushState(null, null, url.pathname + getSlideHash(currentSlideNumber));
|
236
|
+
enterListMode();
|
237
|
+
scrollToSlide(currentSlideNumber);
|
238
|
+
}
|
239
|
+
break;
|
240
|
+
|
241
|
+
case 33: // PgUp
|
242
|
+
case 38: // Up
|
243
|
+
case 37: // Left
|
244
|
+
case 72: // h
|
245
|
+
case 75: // k
|
246
|
+
e.preventDefault();
|
247
|
+
|
248
|
+
currentSlideNumber--;
|
249
|
+
goToSlide(currentSlideNumber);
|
250
|
+
break;
|
251
|
+
|
252
|
+
case 34: // PgDown
|
253
|
+
case 40: // Down
|
254
|
+
case 39: // Right
|
255
|
+
case 76: // l
|
256
|
+
case 74: // j
|
257
|
+
e.preventDefault();
|
258
|
+
|
259
|
+
// Only go to next slide if current slide have no inner
|
260
|
+
// navigation or inner navigation is fully shown
|
261
|
+
// NOTE: But first of all check if there is no current slide
|
262
|
+
if (
|
263
|
+
-1 === currentSlideNumber ||
|
264
|
+
!slideList[currentSlideNumber].hasInnerNavigation ||
|
265
|
+
-1 === increaseInnerNavigation(currentSlideNumber)
|
266
|
+
) {
|
267
|
+
currentSlideNumber++;
|
268
|
+
goToSlide(currentSlideNumber);
|
269
|
+
}
|
270
|
+
break;
|
271
|
+
|
272
|
+
case 36: // Home
|
273
|
+
e.preventDefault();
|
274
|
+
|
275
|
+
currentSlideNumber = 0;
|
276
|
+
goToSlide(currentSlideNumber);
|
277
|
+
break;
|
278
|
+
|
279
|
+
case 35: // End
|
280
|
+
e.preventDefault();
|
281
|
+
|
282
|
+
currentSlideNumber = slideList.length - 1;
|
283
|
+
goToSlide(currentSlideNumber);
|
284
|
+
break;
|
285
|
+
|
286
|
+
case 9: // Tab = +1; Shift + Tab = -1
|
287
|
+
case 32: // Space = +1; Shift + Space = -1
|
288
|
+
e.preventDefault();
|
289
|
+
|
290
|
+
currentSlideNumber += e.shiftKey ? -1 : 1;
|
291
|
+
goToSlide(currentSlideNumber);
|
292
|
+
break;
|
293
|
+
|
294
|
+
default:
|
295
|
+
// Behave as usual
|
296
|
+
}
|
297
|
+
}, false);
|
298
|
+
|
299
|
+
document.addEventListener('click', dispatchSingleSlideMode, false);
|
300
|
+
document.addEventListener('touchend', dispatchSingleSlideMode, false);
|
301
|
+
|
302
|
+
document.addEventListener('touchstart', function (e) {
|
303
|
+
if (!isListMode()) {
|
304
|
+
var currentSlideNumber = getCurrentSlideNumber(),
|
305
|
+
x = e.touches[0].pageX;
|
306
|
+
if (x > window.innerWidth / 2) {
|
307
|
+
currentSlideNumber++;
|
308
|
+
} else {
|
309
|
+
currentSlideNumber--;
|
310
|
+
}
|
311
|
+
|
312
|
+
goToSlide(currentSlideNumber);
|
313
|
+
}
|
314
|
+
}, false);
|
315
|
+
|
316
|
+
document.addEventListener('touchmove', function (e) {
|
317
|
+
if (!isListMode()) {
|
318
|
+
e.preventDefault();
|
319
|
+
}
|
320
|
+
}, false);
|
321
|
+
|
322
|
+
window.setTimeout(function() {
|
323
|
+
startEventSourceHandler('/remote/sub/events');
|
324
|
+
}, 100);
|
325
|
+
}());
|
@@ -0,0 +1,42 @@
|
|
1
|
+
html, body, div, span, applet, object, iframe,
|
2
|
+
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
|
3
|
+
a, abbr, acronym, address, big, cite, code,
|
4
|
+
del, dfn, em, img, ins, kbd, q, s, samp,
|
5
|
+
small, strike, strong, sub, sup, tt, var,
|
6
|
+
b, u, i, center,
|
7
|
+
dl, dt, dd, ol, ul, li,
|
8
|
+
fieldset, form, label, legend,
|
9
|
+
table, caption, tbody, tfoot, thead, tr, th, td,
|
10
|
+
article, aside, canvas, details, embed,
|
11
|
+
figure, figcaption, footer, header, hgroup,
|
12
|
+
menu, nav, output, ruby, section, summary,
|
13
|
+
time, mark, audio, video {
|
14
|
+
margin:0;
|
15
|
+
padding:0;
|
16
|
+
border:0;
|
17
|
+
font-size:100%;
|
18
|
+
font:inherit;
|
19
|
+
vertical-align:baseline;
|
20
|
+
}
|
21
|
+
article, aside, details, figcaption, figure,
|
22
|
+
footer, header, hgroup, menu, nav, section {
|
23
|
+
display:block;
|
24
|
+
}
|
25
|
+
body {
|
26
|
+
line-height:1;
|
27
|
+
}
|
28
|
+
ol, ul {
|
29
|
+
list-style:none;
|
30
|
+
}
|
31
|
+
blockquote, q {
|
32
|
+
quotes:none;
|
33
|
+
}
|
34
|
+
blockquote:before, blockquote:after,
|
35
|
+
q:before, q:after {
|
36
|
+
content:'';
|
37
|
+
content:none;
|
38
|
+
}
|
39
|
+
table {
|
40
|
+
border-collapse:collapse;
|
41
|
+
border-spacing:0;
|
42
|
+
}
|
@@ -0,0 +1,35 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta charset="utf-8" />
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
|
6
|
+
<title><%= meta.title %></title>
|
7
|
+
<% (theme.css + meta.css).each do |css| %>
|
8
|
+
<link rel="stylesheet" href="<%= css%>">
|
9
|
+
<% end %>
|
10
|
+
<link rel="stylesheet" href="css/pygments/solarized.css">
|
11
|
+
</head>
|
12
|
+
<body data-duration="<%= meta.duration %>">
|
13
|
+
<section>
|
14
|
+
<header class="slide">
|
15
|
+
<h1><%= meta.title %></h1>
|
16
|
+
<h2><%= meta.author %></h2>
|
17
|
+
</header>
|
18
|
+
</section>
|
19
|
+
<% sections.each do |section| %>
|
20
|
+
<section>
|
21
|
+
<header class="slide">
|
22
|
+
<h1><%= section.title %></h1>
|
23
|
+
</header>
|
24
|
+
<% section.slides.each do |slide| %>
|
25
|
+
<section class="slide <%= slide.classes %>">
|
26
|
+
<%= slide.html %>
|
27
|
+
</section>
|
28
|
+
<% end %>
|
29
|
+
</section>
|
30
|
+
<% end %>
|
31
|
+
<% (theme.js + meta.js).each do |js| %>
|
32
|
+
<script src="<%= js %>"></script>
|
33
|
+
<% end %>
|
34
|
+
</body>
|
35
|
+
</html>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
// StyleFix 1.0.2 + PrefixFree 1.0.6 / Lea Verou / MIT license
|
2
|
+
(function(){function h(a,b){return[].slice.call((b||document).querySelectorAll(a))}if(window.addEventListener){var e=window.StyleFix={link:function(a){try{if("stylesheet"!==a.rel||a.hasAttribute("data-noprefix"))return}catch(b){return}var c=a.href||a.getAttribute("data-href"),f=c.replace(/[^\/]+$/,""),i=a.parentNode,d=new XMLHttpRequest,g;d.onreadystatechange=function(){4===d.readyState&&g()};g=function(){var b=d.responseText;if(b&&a.parentNode&&(!d.status||400>d.status||600<d.status)){b=e.fix(b,
|
3
|
+
!0,a);f&&(b=b.replace(/url\(\s*?((?:"|')?)(.+?)\1\s*?\)/gi,function(a,b,c){return!/^([a-z]{3,10}:|\/|#)/i.test(c)?'url("'+f+c+'")':a}),b=b.replace(RegExp("\\b(behavior:\\s*?url\\('?\"?)"+f,"gi"),"$1"));var c=document.createElement("style");c.textContent=b;c.media=a.media;c.disabled=a.disabled;c.setAttribute("data-href",a.getAttribute("href"));i.insertBefore(c,a);i.removeChild(a);c.media=a.media}};try{d.open("GET",c),d.send(null)}catch(k){"undefined"!=typeof XDomainRequest&&(d=new XDomainRequest,d.onerror=
|
4
|
+
d.onprogress=function(){},d.onload=g,d.open("GET",c),d.send(null))}a.setAttribute("data-inprogress","")},styleElement:function(a){if(!a.hasAttribute("data-noprefix")){var b=a.disabled;a.textContent=e.fix(a.textContent,!0,a);a.disabled=b}},styleAttribute:function(a){var b=a.getAttribute("style"),b=e.fix(b,!1,a);a.setAttribute("style",b)},process:function(){h('link[rel="stylesheet"]:not([data-inprogress])').forEach(StyleFix.link);h("style").forEach(StyleFix.styleElement);h("[style]").forEach(StyleFix.styleAttribute)},
|
5
|
+
register:function(a,b){(e.fixers=e.fixers||[]).splice(void 0===b?e.fixers.length:b,0,a)},fix:function(a,b){for(var c=0;c<e.fixers.length;c++)a=e.fixers[c](a,b)||a;return a},camelCase:function(a){return a.replace(/-([a-z])/g,function(a,c){return c.toUpperCase()}).replace("-","")},deCamelCase:function(a){return a.replace(/[A-Z]/g,function(a){return"-"+a.toLowerCase()})}};(function(){setTimeout(function(){h('link[rel="stylesheet"]').forEach(StyleFix.link)},10);document.addEventListener("DOMContentLoaded",
|
6
|
+
StyleFix.process,!1)})()}})();
|
7
|
+
(function(h){function e(b,c,f,i,d){b=a[b];b.length&&(b=RegExp(c+"("+b.join("|")+")"+f,"gi"),d=d.replace(b,i));return d}if(window.StyleFix&&window.getComputedStyle){var a=window.PrefixFree={prefixCSS:function(b,c){var f=a.prefix,b=e("functions","(\\s|:|,)","\\s*\\(","$1"+f+"$2(",b),b=e("keywords","(\\s|:)","(\\s|;|\\}|$)","$1"+f+"$2$3",b),b=e("properties","(^|\\{|\\s|;)","\\s*:","$1"+f+"$2:",b);if(a.properties.length)var i=RegExp("\\b("+a.properties.join("|")+")(?!:)","gi"),b=e("valueProperties","\\b",
|
8
|
+
":(.+?);",function(a){return a.replace(i,f+"$1")},b);c&&(b=e("selectors","","\\b",a.prefixSelector,b),b=e("atrules","@","\\b","@"+f+"$1",b));return b=b.replace(RegExp("-"+f,"g"),"-")},property:function(b){return(a.properties.indexOf(b)?a.prefix:"")+b},value:function(b){b=e("functions","(^|\\s|,)","\\s*\\(","$1"+a.prefix+"$2(",b);return b=e("keywords","(^|\\s)","(\\s|$)","$1"+a.prefix+"$2$3",b)},prefixSelector:function(b){return b.replace(/^:{1,2}/,function(b){return b+a.prefix})},prefixProperty:function(b,
|
9
|
+
c){var f=a.prefix+b;return c?StyleFix.camelCase(f):f}};(function(){var b={},c=[],f=getComputedStyle(document.documentElement,null),i=document.createElement("div").style,d=function(a){if("-"===a.charAt(0)){c.push(a);var a=a.split("-"),d=a[1];for(b[d]=++b[d]||1;3<a.length;)a.pop(),d=a.join("-"),StyleFix.camelCase(d)in i&&-1===c.indexOf(d)&&c.push(d)}};if(0<f.length)for(var g=0;g<f.length;g++)d(f[g]);else for(var e in f)d(StyleFix.deCamelCase(e));var g=0,j,h;for(h in b)f=b[h],g<f&&(j=h,g=f);a.prefix=
|
10
|
+
"-"+j+"-";a.Prefix=StyleFix.camelCase(a.prefix);a.properties=[];for(g=0;g<c.length;g++)e=c[g],0===e.indexOf(a.prefix)&&(j=e.slice(a.prefix.length),StyleFix.camelCase(j)in i||a.properties.push(j));"Ms"==a.Prefix&&(!("transform"in i)&&!("MsTransform"in i)&&"msTransform"in i)&&a.properties.push("transform","transform-origin");a.properties.sort()})();(function(){function b(a,b){e[b]="";e[b]=a;return!!e[b]}var c={"linear-gradient":{property:"backgroundImage",params:"red, teal"},calc:{property:"width",
|
11
|
+
params:"1px + 5%"},element:{property:"backgroundImage",params:"#foo"},"cross-fade":{property:"backgroundImage",params:"url(a.png), url(b.png), 50%"}};c["repeating-linear-gradient"]=c["repeating-radial-gradient"]=c["radial-gradient"]=c["linear-gradient"];var f={initial:"color","zoom-in":"cursor","zoom-out":"cursor",box:"display",flexbox:"display","inline-flexbox":"display",flex:"display","inline-flex":"display"};a.functions=[];a.keywords=[];var e=document.createElement("div").style,d;for(d in c){var g=
|
12
|
+
c[d],h=g.property,g=d+"("+g.params+")";!b(g,h)&&b(a.prefix+g,h)&&a.functions.push(d)}for(var j in f)h=f[j],!b(j,h)&&b(a.prefix+j,h)&&a.keywords.push(j)})();(function(){function b(a){e.textContent=a+"{}";return!!e.sheet.cssRules.length}var c={":read-only":null,":read-write":null,":any-link":null,"::selection":null},f={keyframes:"name",viewport:null,document:'regexp(".")'};a.selectors=[];a.atrules=[];var e=h.appendChild(document.createElement("style")),d;for(d in c){var g=d+(c[d]?"("+c[d]+")":"");!b(g)&&
|
13
|
+
b(a.prefixSelector(g))&&a.selectors.push(d)}for(var k in f)g=k+" "+(f[k]||""),!b("@"+g)&&b("@"+a.prefix+g)&&a.atrules.push(k);h.removeChild(e)})();a.valueProperties=["transition","transition-property"];h.className+=" "+a.prefix;StyleFix.register(a.prefixCSS)}})(document.documentElement);
|