slide-em-up 0.3.0 → 0.3.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.
- data/README.md +20 -0
- data/lib/slide-em-up/presentation.rb +6 -1
- data/lib/slide-em-up/version.rb +1 -1
- data/themes/CSSS/css/slideshow.css +20 -2
- data/themes/CSSS/css/theme.css +22 -0
- data/themes/CSSS/index.erb +1 -1
- data/themes/CSSS/js/classList.js +0 -0
- data/themes/CSSS/js/prefixfree.min.js +5 -13
- data/themes/CSSS/js/slideshow.js +181 -137
- 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 +23 -16
data/README.md
CHANGED
@@ -46,6 +46,14 @@ Several themes are available: `io2012`, `shower`, `3d_slideshow`, `reveal`,
|
|
46
46
|
presentation, edit the `presentation.json` file and change the `"theme"`
|
47
47
|
element.
|
48
48
|
|
49
|
+
You can also create your own theme, for example, by copying the template:
|
50
|
+
|
51
|
+
```sh
|
52
|
+
mkdir -p ~/.slide-em-up
|
53
|
+
cp -r themes/template ~/.slide-em-up/my-theme
|
54
|
+
$EDITOR ~/.slide-em-up/my-theme/README
|
55
|
+
```
|
56
|
+
|
49
57
|
|
50
58
|
Markup for the slides
|
51
59
|
---------------------
|
@@ -112,6 +120,18 @@ setting the `APIKEY` environment variable:
|
|
112
120
|
APIKEY=foobar slide-em-up
|
113
121
|
|
114
122
|
|
123
|
+
Examples
|
124
|
+
--------
|
125
|
+
|
126
|
+
I'm using slide-em-up for my own presentations, so you can find some real
|
127
|
+
slides powered by slide-em-up on https://github.com/nono/Presentations.
|
128
|
+
|
129
|
+
For example, you can try the presentation "Welcome to the nice world of Golang"
|
130
|
+
on http://blog.menfin.info/Presentations/20120709_Golang_introduction/ and
|
131
|
+
see the sources of it on
|
132
|
+
https://github.com/nono/Presentations/tree/master/20120709_Golang_introduction.
|
133
|
+
|
134
|
+
|
115
135
|
Issues or Suggestions
|
116
136
|
---------------------
|
117
137
|
|
@@ -71,8 +71,13 @@ module SlideEmUp
|
|
71
71
|
|
72
72
|
def build_theme(title)
|
73
73
|
Theme.new.tap do |t|
|
74
|
+
dir = File.expand_path("~/.slide-em-up/#{title}")
|
75
|
+
if File.exists?(dir)
|
76
|
+
t.dir = dir
|
77
|
+
else
|
78
|
+
t.dir = File.expand_path("../../../themes/#{title}", __FILE__)
|
79
|
+
end
|
74
80
|
t.title = title
|
75
|
-
t.dir = File.expand_path("../../../themes/#{title}", __FILE__)
|
76
81
|
Dir.chdir(t.dir) do
|
77
82
|
t.css = Dir["**/*.css"]
|
78
83
|
t.js = Dir["**/*.js"]
|
data/lib/slide-em-up/version.rb
CHANGED
@@ -43,13 +43,14 @@
|
|
43
43
|
.slide:target,
|
44
44
|
.slide.next {
|
45
45
|
display: block;
|
46
|
-
|
46
|
+
visibility: hidden;
|
47
47
|
overflow:hidden;
|
48
48
|
}
|
49
49
|
|
50
50
|
.slide:target {
|
51
51
|
z-index:100;
|
52
52
|
opacity:1;
|
53
|
+
visibility: visible;
|
53
54
|
overflow: visible;
|
54
55
|
}
|
55
56
|
|
@@ -100,6 +101,23 @@
|
|
100
101
|
opacity: 1;
|
101
102
|
}
|
102
103
|
|
104
|
+
/**
|
105
|
+
On-screen navigation
|
106
|
+
*/
|
107
|
+
|
108
|
+
button.onscreen-nav {
|
109
|
+
position: absolute;
|
110
|
+
bottom: 1em;
|
111
|
+
right: 1em;
|
112
|
+
padding: .2em .4em;
|
113
|
+
border: 0;
|
114
|
+
border-radius: .3em;
|
115
|
+
background: rgba(0,0,0,.5);
|
116
|
+
color: white;
|
117
|
+
text-shadow: 0 -.05em .05em black;
|
118
|
+
text-transform: uppercase;
|
119
|
+
}
|
120
|
+
|
103
121
|
/**
|
104
122
|
iframe slides
|
105
123
|
*/
|
@@ -283,4 +301,4 @@
|
|
283
301
|
|
284
302
|
.presenter .slide:target > .presenter-notes {
|
285
303
|
display: block;
|
286
|
-
}
|
304
|
+
}
|
data/themes/CSSS/css/theme.css
CHANGED
@@ -226,3 +226,25 @@ section > header.slide {
|
|
226
226
|
content: ' (' attr(href) ')';
|
227
227
|
}
|
228
228
|
|
229
|
+
/* Syntax highlighting */
|
230
|
+
|
231
|
+
.comment {
|
232
|
+
color: #999;
|
233
|
+
}
|
234
|
+
|
235
|
+
.string {
|
236
|
+
color: yellow;
|
237
|
+
}
|
238
|
+
|
239
|
+
.keyword {
|
240
|
+
font-weight: bold;
|
241
|
+
color: deeppink;
|
242
|
+
}
|
243
|
+
|
244
|
+
.number, .boolean {
|
245
|
+
color: #0cf;
|
246
|
+
}
|
247
|
+
|
248
|
+
.regex {
|
249
|
+
color: orange;
|
250
|
+
}
|
data/themes/CSSS/index.erb
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
<link rel="stylesheet" href="<%= css%>">
|
9
9
|
<% end %>
|
10
10
|
<link rel="stylesheet" href="css/pygments/native.css">
|
11
|
-
<script src="
|
11
|
+
<script src="js/prefixfree.min.js"></script>
|
12
12
|
</head>
|
13
13
|
<body data-duration="<%= meta.duration %>">
|
14
14
|
<section>
|
data/themes/CSSS/js/classList.js
CHANGED
File without changes
|
@@ -1,13 +1,5 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
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);
|
1
|
+
/**
|
2
|
+
* StyleFix 1.0.3 & PrefixFree 1.0.7
|
3
|
+
* @author Lea Verou
|
4
|
+
* MIT license
|
5
|
+
*/(function(){function t(e,t){return[].slice.call((t||document).querySelectorAll(e))}if(!window.addEventListener)return;var e=window.StyleFix={link:function(t){try{if(t.rel!=="stylesheet"||t.hasAttribute("data-noprefix"))return}catch(n){return}var r=t.href||t.getAttribute("data-href"),i=r.replace(/[^\/]+$/,""),s=t.parentNode,o=new XMLHttpRequest,u;o.onreadystatechange=function(){o.readyState===4&&u()};u=function(){var n=o.responseText;if(n&&t.parentNode&&(!o.status||o.status<400||o.status>600)){n=e.fix(n,!0,t);if(i){n=n.replace(/url\(\s*?((?:"|')?)(.+?)\1\s*?\)/gi,function(e,t,n){return/^([a-z]{3,10}:|\/|#)/i.test(n)?e:'url("'+i+n+'")'});var r=i.replace(/([\\\^\$*+[\]?{}.=!:(|)])/g,"\\$1");n=n.replace(RegExp("\\b(behavior:\\s*?url\\('?\"?)"+r,"gi"),"$1")}var u=document.createElement("style");u.textContent=n;u.media=t.media;u.disabled=t.disabled;u.setAttribute("data-href",t.getAttribute("href"));s.insertBefore(u,t);s.removeChild(t);u.media=t.media}};try{o.open("GET",r);o.send(null)}catch(n){if(typeof XDomainRequest!="undefined"){o=new XDomainRequest;o.onerror=o.onprogress=function(){};o.onload=u;o.open("GET",r);o.send(null)}}t.setAttribute("data-inprogress","")},styleElement:function(t){if(t.hasAttribute("data-noprefix"))return;var n=t.disabled;t.textContent=e.fix(t.textContent,!0,t);t.disabled=n},styleAttribute:function(t){var n=t.getAttribute("style");n=e.fix(n,!1,t);t.setAttribute("style",n)},process:function(){t('link[rel="stylesheet"]:not([data-inprogress])').forEach(StyleFix.link);t("style").forEach(StyleFix.styleElement);t("[style]").forEach(StyleFix.styleAttribute)},register:function(t,n){(e.fixers=e.fixers||[]).splice(n===undefined?e.fixers.length:n,0,t)},fix:function(t,n,r){for(var i=0;i<e.fixers.length;i++)t=e.fixers[i](t,n,r)||t;return t},camelCase:function(e){return e.replace(/-([a-z])/g,function(e,t){return t.toUpperCase()}).replace("-","")},deCamelCase:function(e){return e.replace(/[A-Z]/g,function(e){return"-"+e.toLowerCase()})}};(function(){setTimeout(function(){t('link[rel="stylesheet"]').forEach(StyleFix.link)},10);document.addEventListener("DOMContentLoaded",StyleFix.process,!1)})()})();(function(e){function t(e,t,r,i,s){e=n[e];if(e.length){var o=RegExp(t+"("+e.join("|")+")"+r,"gi");s=s.replace(o,i)}return s}if(!window.StyleFix||!window.getComputedStyle)return;var n=window.PrefixFree={prefixCSS:function(e,r,i){var s=n.prefix;n.functions.indexOf("linear-gradient")>-1&&(e=e.replace(/(\s|:|,)(repeating-)?linear-gradient\(\s*(-?\d*\.?\d*)deg/ig,function(e,t,n,r){r=Math.abs(r-450)%360;return t+(n||"")+"linear-gradient("+r+"deg"}));e=t("functions","(\\s|:|,)","\\s*\\(","$1"+s+"$2(",e);e=t("keywords","(\\s|:)","(\\s|;|\\}|$)","$1"+s+"$2$3",e);e=t("properties","(^|\\{|\\s|;)","\\s*:","$1"+s+"$2:",e);if(n.properties.length){var o=RegExp("\\b("+n.properties.join("|")+")(?!:)","gi");e=t("valueProperties","\\b",":(.+?);",function(e){return e.replace(o,s+"$1")},e)}if(r){e=t("selectors","","\\b",n.prefixSelector,e);e=t("atrules","@","\\b","@"+s+"$1",e)}e=e.replace(RegExp("-"+s,"g"),"-");e=e.replace(/-\*-(?=[a-z]+)/gi,n.prefix);return e},property:function(e){return(n.properties.indexOf(e)?n.prefix:"")+e},value:function(e,r){e=t("functions","(^|\\s|,)","\\s*\\(","$1"+n.prefix+"$2(",e);e=t("keywords","(^|\\s)","(\\s|$)","$1"+n.prefix+"$2$3",e);return e},prefixSelector:function(e){return e.replace(/^:{1,2}/,function(e){return e+n.prefix})},prefixProperty:function(e,t){var r=n.prefix+e;return t?StyleFix.camelCase(r):r}};(function(){var e={},t=[],r={},i=getComputedStyle(document.documentElement,null),s=document.createElement("div").style,o=function(n){if(n.charAt(0)==="-"){t.push(n);var r=n.split("-"),i=r[1];e[i]=++e[i]||1;while(r.length>3){r.pop();var s=r.join("-");u(s)&&t.indexOf(s)===-1&&t.push(s)}}},u=function(e){return StyleFix.camelCase(e)in s};if(i.length>0)for(var a=0;a<i.length;a++)o(i[a]);else for(var f in i)o(StyleFix.deCamelCase(f));var l={uses:0};for(var c in e){var h=e[c];l.uses<h&&(l={prefix:c,uses:h})}n.prefix="-"+l.prefix+"-";n.Prefix=StyleFix.camelCase(n.prefix);n.properties=[];for(var a=0;a<t.length;a++){var f=t[a];if(f.indexOf(n.prefix)===0){var p=f.slice(n.prefix.length);u(p)||n.properties.push(p)}}n.Prefix=="Ms"&&!("transform"in s)&&!("MsTransform"in s)&&"msTransform"in s&&n.properties.push("transform","transform-origin");n.properties.sort()})();(function(){function i(e,t){r[t]="";r[t]=e;return!!r[t]}var e={"linear-gradient":{property:"backgroundImage",params:"red, teal"},calc:{property:"width",params:"1px + 5%"},element:{property:"backgroundImage",params:"#foo"},"cross-fade":{property:"backgroundImage",params:"url(a.png), url(b.png), 50%"}};e["repeating-linear-gradient"]=e["repeating-radial-gradient"]=e["radial-gradient"]=e["linear-gradient"];var t={initial:"color","zoom-in":"cursor","zoom-out":"cursor",box:"display",flexbox:"display","inline-flexbox":"display",flex:"display","inline-flex":"display"};n.functions=[];n.keywords=[];var r=document.createElement("div").style;for(var s in e){var o=e[s],u=o.property,a=s+"("+o.params+")";!i(a,u)&&i(n.prefix+a,u)&&n.functions.push(s)}for(var f in t){var u=t[f];!i(f,u)&&i(n.prefix+f,u)&&n.keywords.push(f)}})();(function(){function s(e){i.textContent=e+"{}";return!!i.sheet.cssRules.length}var t={":read-only":null,":read-write":null,":any-link":null,"::selection":null},r={keyframes:"name",viewport:null,document:'regexp(".")'};n.selectors=[];n.atrules=[];var i=e.appendChild(document.createElement("style"));for(var o in t){var u=o+(t[o]?"("+t[o]+")":"");!s(u)&&s(n.prefixSelector(u))&&n.selectors.push(o)}for(var a in r){var u=a+" "+(r[a]||"");!s("@"+u)&&s("@"+n.prefix+u)&&n.atrules.push(a)}e.removeChild(i)})();n.valueProperties=["transition","transition-property"];e.className+=" "+n.prefix;StyleFix.register(n.prefixCSS)})(document.documentElement);
|
data/themes/CSSS/js/slideshow.js
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
* @author Lea Verou (http://leaverou.me)
|
4
4
|
* @version 2.0
|
5
5
|
*/
|
6
|
-
|
6
|
+
|
7
7
|
/**
|
8
8
|
* Make the environment a bit friendlier
|
9
9
|
*/
|
@@ -25,28 +25,28 @@ var documentTitle = document.title + '';
|
|
25
25
|
|
26
26
|
var self = window.SlideShow = function(slide) {
|
27
27
|
var me = this;
|
28
|
-
|
28
|
+
|
29
29
|
// Set instance
|
30
30
|
if(!window.slideshow) {
|
31
31
|
window.slideshow = this;
|
32
32
|
}
|
33
|
-
|
33
|
+
|
34
34
|
// Current slide
|
35
35
|
this.index = this.slide = slide || 0;
|
36
|
-
|
36
|
+
|
37
37
|
// Current .delayed item in the slide
|
38
38
|
this.item = 0;
|
39
|
-
|
39
|
+
|
40
40
|
// Create timer, if needed
|
41
41
|
this.duration = body.getAttribute('data-duration');
|
42
|
-
|
42
|
+
|
43
43
|
if(this.duration > 0) {
|
44
44
|
var timer = document.createElement('div');
|
45
|
-
|
45
|
+
|
46
46
|
timer.id = 'timer';
|
47
47
|
timer.setAttribute('style', PrefixFree.prefixCSS('transition-duration: ' + this.duration * 60 + 's;'));
|
48
48
|
body.appendChild(timer);
|
49
|
-
|
49
|
+
|
50
50
|
addEventListener('load', function() {
|
51
51
|
timer.className = 'end';
|
52
52
|
|
@@ -55,32 +55,65 @@ var self = window.SlideShow = function(slide) {
|
|
55
55
|
}, me.duration * 60000);
|
56
56
|
});
|
57
57
|
}
|
58
|
-
|
58
|
+
|
59
59
|
// Create slide indicator
|
60
60
|
this.indicator = document.createElement('div');
|
61
|
-
|
61
|
+
|
62
62
|
this.indicator.id = 'indicator';
|
63
63
|
body.appendChild(this.indicator);
|
64
|
-
|
64
|
+
|
65
65
|
// Get the slide elements into an array
|
66
66
|
this.slides = $$('.slide', body);
|
67
|
-
|
67
|
+
|
68
|
+
// Get the overview
|
69
|
+
this.overview = function(evt) {
|
70
|
+
if(body.classList.contains('show-thumbnails')) {
|
71
|
+
body.classList.remove('show-thumbnails');
|
72
|
+
body.classList.remove('headers-only');
|
73
|
+
}
|
74
|
+
else {
|
75
|
+
body.classList.add('show-thumbnails');
|
76
|
+
|
77
|
+
if(evt && (!evt.shiftKey || !evt.ctrlKey)) {
|
78
|
+
body.classList.add('headers-only');
|
79
|
+
}
|
80
|
+
|
81
|
+
body.addEventListener('click', function(evt) {
|
82
|
+
var slide = evt.target;
|
83
|
+
|
84
|
+
while(slide && !slide.classList.contains('slide')) {
|
85
|
+
slide = slide.parentNode;
|
86
|
+
}
|
87
|
+
|
88
|
+
if(slide) {
|
89
|
+
me.goto(slide.id);
|
90
|
+
setTimeout(function() { me.adjustFontSize(); }, 1000); // for Opera
|
91
|
+
}
|
92
|
+
|
93
|
+
body.classList.remove('show-thumbnails');
|
94
|
+
body.classList.remove('headers-only');
|
95
|
+
|
96
|
+
body.removeEventListener('click', arguments.callee);
|
97
|
+
}, false);
|
98
|
+
}
|
99
|
+
};
|
100
|
+
|
68
101
|
// Order of the slides
|
69
102
|
this.order = [];
|
70
|
-
|
103
|
+
|
71
104
|
for(var i=0; i<this.slides.length; i++) {
|
72
105
|
var slide = this.slides[i]; // to speed up references
|
73
|
-
|
106
|
+
|
74
107
|
// Asign ids to slides that don't have one
|
75
108
|
if(!slide.id) {
|
76
109
|
slide.id = 'slide' + (i+1);
|
77
110
|
}
|
78
|
-
|
111
|
+
|
79
112
|
// Set data-title attribute to the title of the slide
|
80
113
|
if(!slide.title) {
|
81
114
|
// no title attribute, fetch title from heading(s)
|
82
115
|
var heading = $('hgroup', slide) || $('h1,h2,h3,h4,h5,h6', slide);
|
83
|
-
|
116
|
+
|
84
117
|
if(heading && heading.textContent.trim()) {
|
85
118
|
slide.setAttribute('data-title', heading.textContent);
|
86
119
|
}
|
@@ -90,73 +123,91 @@ var self = window.SlideShow = function(slide) {
|
|
90
123
|
slide.setAttribute('data-title', slide.title);
|
91
124
|
slide.removeAttribute('title');
|
92
125
|
}
|
93
|
-
|
126
|
+
|
94
127
|
slide.setAttribute('data-index', i);
|
95
|
-
|
128
|
+
|
96
129
|
var imp = slide.getAttribute('data-import'),
|
97
130
|
imported = imp? this.getSlideById(imp) : null;
|
98
|
-
|
131
|
+
|
99
132
|
this.order.push(imported? +imported.getAttribute('data-index') : i);
|
100
133
|
}
|
101
|
-
|
134
|
+
|
102
135
|
if(window.name === 'projector' && window.opener && opener.slideshow) {
|
103
136
|
body.classList.add('projector');
|
104
137
|
this.presenter = opener.slideshow;
|
105
138
|
this.presenter.projector = this;
|
106
139
|
}
|
107
|
-
|
140
|
+
|
108
141
|
// Adjust the font-size when the window is resized
|
109
142
|
addEventListener('resize', this, false);
|
110
|
-
|
143
|
+
|
111
144
|
// In some browsers DOMContentLoaded is too early, so try again onload
|
112
145
|
addEventListener('load', this, false);
|
113
|
-
|
146
|
+
|
114
147
|
addEventListener('hashchange', this, false);
|
115
|
-
|
148
|
+
|
116
149
|
// If there's already a hash, update current slide number...
|
117
150
|
this.handleEvent({type: 'hashchange'});
|
118
|
-
|
151
|
+
|
119
152
|
document.addEventListener('keyup', this, false);
|
120
153
|
document.addEventListener('keydown', this, false);
|
121
|
-
|
154
|
+
|
155
|
+
document.addEventListener('touchstart', this, false);
|
156
|
+
document.addEventListener('touchmove', this, false);
|
157
|
+
document.addEventListener('touchend', this, false);
|
158
|
+
document.addEventListener('touchcancel', this, false);
|
159
|
+
|
122
160
|
this.startEventSourceHandler('/remote/sub/events');
|
123
161
|
|
124
162
|
// Process iframe slides
|
125
163
|
$$('.slide[data-src]:empty').forEach(function(slide) {
|
126
164
|
var iframe = document.createElement('iframe');
|
127
|
-
|
165
|
+
|
128
166
|
iframe.setAttribute('data-src', slide.getAttribute('data-src'));
|
129
167
|
slide.removeAttribute('data-src');
|
130
|
-
|
168
|
+
|
131
169
|
slide.appendChild(iframe);
|
132
170
|
});
|
133
|
-
|
171
|
+
|
134
172
|
$$('.slide > iframe:only-child').forEach(function(iframe) {
|
135
173
|
var slide = iframe.parentNode,
|
136
174
|
src = iframe.src || iframe.getAttribute('data-src');
|
137
|
-
|
175
|
+
|
138
176
|
slide.classList.add('iframe');
|
139
|
-
|
177
|
+
|
140
178
|
if(!slide.classList.contains('notitle')) {
|
141
179
|
var h = document.createElement('h1'),
|
142
180
|
a = document.createElement('a'),
|
143
181
|
title = iframe.title || slide.title || slide.getAttribute('data-title') || src.replace(/\/#?$/, '')
|
144
182
|
.replace(/^\w+:\/\/w{0,3}\.?/, '');
|
145
|
-
|
183
|
+
|
146
184
|
a.href = src;
|
147
185
|
a.target = '_blank';
|
148
186
|
a.textContent = title;
|
149
187
|
h.appendChild(a);
|
150
|
-
|
188
|
+
|
151
189
|
slide.appendChild(h);
|
152
190
|
}
|
191
|
+
else {
|
192
|
+
var b = document.createElement('button');
|
193
|
+
b.className = 'onscreen-nav next';
|
194
|
+
b.textContent = 'Next ▶';
|
195
|
+
b.type = 'button';
|
196
|
+
b.onclick = function() { me.next(); };
|
197
|
+
|
198
|
+
slide.appendChild(b);
|
199
|
+
}
|
153
200
|
});
|
154
201
|
};
|
155
202
|
|
203
|
+
var horizontalDistanceThreshold = 30, // Swipe horizontal displacement must be more than this.
|
204
|
+
verticalDistanceThreshold = 75, // Swipe vertical displacement must be less than this.
|
205
|
+
startTouch,
|
206
|
+
stopTouch;
|
207
|
+
|
156
208
|
self.prototype = {
|
157
209
|
handleEvent: function(evt) {
|
158
|
-
|
159
|
-
|
210
|
+
|
160
211
|
switch(evt.type) {
|
161
212
|
/**
|
162
213
|
Keyboard navigation
|
@@ -166,42 +217,14 @@ self.prototype = {
|
|
166
217
|
(Shift instead of Ctrl works too)
|
167
218
|
*/
|
168
219
|
case 'keyup':
|
169
|
-
if((evt.ctrlKey || evt.shiftKey) && !evt.altKey) {
|
220
|
+
if((evt.ctrlKey || evt.shiftKey) && !evt.altKey && !/^(?:input|textarea)$/i.test(document.activeElement.nodeName)) {
|
170
221
|
switch(evt.keyCode) {
|
171
222
|
case 71: // G
|
172
223
|
var slide = prompt('Which slide?');
|
173
|
-
|
224
|
+
this.goto(+slide? slide - 1 : slide);
|
174
225
|
break;
|
175
226
|
case 72: // H
|
176
|
-
|
177
|
-
body.classList.remove('show-thumbnails');
|
178
|
-
body.classList.remove('headers-only');
|
179
|
-
}
|
180
|
-
else {
|
181
|
-
body.classList.add('show-thumbnails');
|
182
|
-
|
183
|
-
if(!evt.shiftKey || !evt.ctrlKey) {
|
184
|
-
body.classList.add('headers-only');
|
185
|
-
}
|
186
|
-
|
187
|
-
body.addEventListener('click', function(evt) {
|
188
|
-
var slide = evt.target;
|
189
|
-
|
190
|
-
while(slide && !slide.classList.contains('slide')) {
|
191
|
-
slide = slide.parentNode;
|
192
|
-
}
|
193
|
-
|
194
|
-
if(slide) {
|
195
|
-
me.goto(slide.id);
|
196
|
-
setTimeout(function() { me.adjustFontSize(); }, 1000); // for Opera
|
197
|
-
}
|
198
|
-
|
199
|
-
body.classList.remove('show-thumbnails');
|
200
|
-
body.classList.remove('headers-only');
|
201
|
-
|
202
|
-
body.removeEventListener('click', arguments.callee);
|
203
|
-
}, false);
|
204
|
-
}
|
227
|
+
this.overview(evt);
|
205
228
|
break;
|
206
229
|
case 74: // J
|
207
230
|
if(body.classList.contains('hide-elements')) {
|
@@ -214,10 +237,10 @@ self.prototype = {
|
|
214
237
|
case 80: // P
|
215
238
|
// Open new window for attendee view
|
216
239
|
this.projector = open(location, 'projector');
|
217
|
-
|
240
|
+
|
218
241
|
// Get the focus back
|
219
242
|
window.focus();
|
220
|
-
|
243
|
+
|
221
244
|
// Switch this one to presenter view
|
222
245
|
body.classList.add('presenter');
|
223
246
|
}
|
@@ -231,14 +254,14 @@ self.prototype = {
|
|
231
254
|
Space/Up/Right arrow : Next item/slide
|
232
255
|
Ctrl + Space/Up/Right arrow : Next slide
|
233
256
|
Down/Left arrow : Previous item/slide
|
234
|
-
Ctrl + Down/Left arrow : Previous slide
|
257
|
+
Ctrl + Down/Left arrow : Previous slide
|
235
258
|
(Shift instead of Ctrl works too)
|
236
259
|
*/
|
237
260
|
if((evt.target === body || evt.target === body.parentNode) && !evt.altKey) {
|
238
261
|
if(evt.keyCode >= 32 && evt.keyCode <= 40) {
|
239
262
|
evt.preventDefault();
|
240
263
|
}
|
241
|
-
|
264
|
+
|
242
265
|
switch(evt.keyCode) {
|
243
266
|
case 33: //page up
|
244
267
|
this.previous();
|
@@ -264,6 +287,29 @@ self.prototype = {
|
|
264
287
|
}
|
265
288
|
}
|
266
289
|
break;
|
290
|
+
case 'touchstart':
|
291
|
+
evt.preventDefault(); // prevent image drag
|
292
|
+
data = event.touches ? event.touches[0] : event;
|
293
|
+
startTouch = { X: data.pageX, Y: data.pageY };
|
294
|
+
break;
|
295
|
+
case 'touchmove':
|
296
|
+
data = event.touches ? event.touches[0] : event;
|
297
|
+
stopTouch = { X: data.pageX, Y: data.pageY };
|
298
|
+
break;
|
299
|
+
case 'touchend':
|
300
|
+
if (!startTouch || !stopTouch) break;
|
301
|
+
if (Math.abs(startTouch.X - stopTouch.X) < horizontalDistanceThreshold) break;
|
302
|
+
if (Math.abs(startTouch.Y - stopTouch.Y) > verticalDistanceThreshold) break;
|
303
|
+
if (startTouch.X > stopTouch.X) {
|
304
|
+
this.previous();
|
305
|
+
} else {
|
306
|
+
this.next();
|
307
|
+
}
|
308
|
+
startTouch = stopTouch = null;
|
309
|
+
break;
|
310
|
+
case 'touchcancel':
|
311
|
+
startTouch = stopTouch = null;
|
312
|
+
break;
|
267
313
|
case 'load':
|
268
314
|
case 'resize':
|
269
315
|
this.adjustFontSize();
|
@@ -272,30 +318,30 @@ self.prototype = {
|
|
272
318
|
this.goto(location.hash.substr(1) || 0);
|
273
319
|
}
|
274
320
|
},
|
275
|
-
|
321
|
+
|
276
322
|
start: function() {
|
277
323
|
this.goto(0);
|
278
324
|
},
|
279
|
-
|
325
|
+
|
280
326
|
end: function() {
|
281
327
|
this.goto(this.slides.length - 1);
|
282
328
|
},
|
283
|
-
|
329
|
+
|
284
330
|
/**
|
285
|
-
@param hard {Boolean} Whether to advance to the next slide (true) or
|
331
|
+
@param hard {Boolean} Whether to advance to the next slide (true) or
|
286
332
|
just the next step (which could very well be showing a list item)
|
287
333
|
*/
|
288
334
|
next: function(hard) {
|
289
335
|
if(!hard && this.items.length) {
|
290
336
|
this.nextItem();
|
291
337
|
}
|
292
|
-
else {
|
338
|
+
else {
|
293
339
|
this.goto(this.index + 1);
|
294
|
-
|
340
|
+
|
295
341
|
this.item = 0;
|
296
|
-
|
342
|
+
|
297
343
|
// Mark all items as not displayed, if there are any
|
298
|
-
if(this.items.length) {
|
344
|
+
if(this.items.length) {
|
299
345
|
for (var i=0; i<this.items.length; i++) {
|
300
346
|
if(this.items[i].classList) {
|
301
347
|
this.items[i].classList.remove('displayed');
|
@@ -305,7 +351,7 @@ self.prototype = {
|
|
305
351
|
}
|
306
352
|
}
|
307
353
|
},
|
308
|
-
|
354
|
+
|
309
355
|
nextItem: function() {
|
310
356
|
if(this.item < this.items.length) {
|
311
357
|
this.gotoItem(++this.item);
|
@@ -315,78 +361,76 @@ self.prototype = {
|
|
315
361
|
this.next(true);
|
316
362
|
}
|
317
363
|
},
|
318
|
-
|
364
|
+
|
319
365
|
previous: function(hard) {
|
320
366
|
if(!hard && this.item > 0) {
|
321
367
|
this.previousItem();
|
322
368
|
}
|
323
|
-
else {
|
369
|
+
else {
|
324
370
|
this.goto(this.index - 1);
|
325
|
-
|
371
|
+
|
326
372
|
this.item = this.items.length;
|
327
373
|
|
328
374
|
// Mark all items as displayed, if there are any
|
329
|
-
if(this.items.length) {
|
375
|
+
if(this.items.length) {
|
330
376
|
for (var i=0; i<this.items.length; i++) {
|
331
377
|
if(this.items[i].classList) {
|
332
378
|
this.items[i].classList.add('displayed');
|
333
379
|
}
|
334
380
|
}
|
335
|
-
|
381
|
+
|
336
382
|
// Mark the last one as current
|
337
383
|
var lastItem = this.items[this.items.length - 1];
|
338
|
-
|
384
|
+
|
339
385
|
lastItem.classList.remove('displayed');
|
340
386
|
lastItem.classList.add('current');
|
341
387
|
}
|
342
388
|
}
|
343
389
|
},
|
344
|
-
|
390
|
+
|
345
391
|
previousItem: function() {
|
346
392
|
this.gotoItem(--this.item);
|
347
393
|
},
|
348
|
-
|
394
|
+
|
349
395
|
getSlideById: function(id) {
|
350
396
|
return $('.slide#' + id);
|
351
397
|
},
|
352
|
-
|
398
|
+
|
353
399
|
/**
|
354
400
|
Go to an aribtary slide
|
355
401
|
@param which {String|Integer} Which slide (identifier or slide number)
|
356
402
|
*/
|
357
403
|
goto: function(which) {
|
358
404
|
var slide;
|
359
|
-
|
405
|
+
|
360
406
|
// We have to remove it to prevent multiple calls to goto messing up
|
361
407
|
// our current item (and there's no point either, so we save on performance)
|
362
408
|
window.removeEventListener('hashchange', this, false);
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
if(which + 0 === which && which in this.slides) {
|
409
|
+
|
410
|
+
if(which + 0 === which && which in this.slides) {
|
367
411
|
// Argument is a valid slide number
|
368
412
|
this.index = which;
|
369
|
-
this.slide = this.order[which]
|
370
|
-
|
413
|
+
this.slide = this.order[which];
|
414
|
+
|
371
415
|
slide = this.slides[this.slide];
|
372
|
-
|
416
|
+
|
373
417
|
location.hash = '#' + slide.id;
|
374
418
|
}
|
375
419
|
else if(which + '' === which) { // Argument is a slide id
|
376
420
|
slide = this.getSlideById(which);
|
377
|
-
|
421
|
+
|
378
422
|
if(slide) {
|
379
423
|
this.slide = this.index = +slide.getAttribute('data-index');
|
380
|
-
location.hash = '#' + which;
|
424
|
+
location.hash = '#' + which;
|
381
425
|
}
|
382
426
|
}
|
383
|
-
|
427
|
+
|
384
428
|
if(slide) { // Slide actually changed, perform any other tasks needed
|
385
429
|
document.title = slide.getAttribute('data-title') || documentTitle;
|
386
|
-
|
430
|
+
|
387
431
|
if(slide.classList.contains('iframe')) {
|
388
432
|
var iframe = $('iframe', slide), src;
|
389
|
-
|
433
|
+
|
390
434
|
if(!iframe.hasAttribute('src') && (src = iframe.getAttribute('data-src'))) {
|
391
435
|
iframe.setAttribute('src', src);
|
392
436
|
}
|
@@ -394,31 +438,31 @@ self.prototype = {
|
|
394
438
|
else {
|
395
439
|
this.adjustFontSize();
|
396
440
|
}
|
397
|
-
|
441
|
+
|
398
442
|
this.indicator.textContent = this.index + 1;
|
399
|
-
|
443
|
+
|
400
444
|
// Update items collection
|
401
445
|
this.items = $$('.delayed, .delayed-children > *', this.slides[this.slide]);
|
402
446
|
this.items.sort(function(a, b){
|
403
|
-
return (a.getAttribute('data-index') || 0) - (b.getAttribute('data-index') || 0)
|
447
|
+
return (a.getAttribute('data-index') || 0) - (b.getAttribute('data-index') || 0);
|
404
448
|
});
|
405
449
|
this.item = 0;
|
406
|
-
|
450
|
+
|
407
451
|
this.projector && this.projector.goto(which);
|
408
|
-
|
452
|
+
|
409
453
|
// Update next/previous
|
410
454
|
for (var i=this.slides.length; i--;) {
|
411
455
|
this.slides[i].classList.remove('previous');
|
412
456
|
this.slides[i].classList.remove('next');
|
413
457
|
}
|
414
|
-
|
458
|
+
|
415
459
|
this.slides.previous = this.slides[this.order[this.index - 1]];
|
416
460
|
this.slides.next = this.slides[this.order[this.index + 1]];
|
417
|
-
|
461
|
+
|
418
462
|
this.slides.previous && this.slides.previous.classList.add('previous');
|
419
463
|
this.slides.next && this.slides.next.classList.add('next');
|
420
464
|
}
|
421
|
-
|
465
|
+
|
422
466
|
// If you attach the listener immediately again then it will catch the event
|
423
467
|
// We have to do it asynchronously
|
424
468
|
var me = this;
|
@@ -426,30 +470,30 @@ self.prototype = {
|
|
426
470
|
addEventListener('hashchange', me, false);
|
427
471
|
}, 1000);
|
428
472
|
},
|
429
|
-
|
473
|
+
|
430
474
|
gotoItem: function(which) {
|
431
475
|
this.item = which;
|
432
|
-
|
476
|
+
|
433
477
|
var items = this.items, classes;
|
434
|
-
|
478
|
+
|
435
479
|
for(var i=items.length; i-- > 0;) {
|
436
480
|
classes = this.items[i].classList;
|
437
|
-
|
481
|
+
|
438
482
|
classes.remove('current');
|
439
483
|
classes.remove('displayed');
|
440
484
|
}
|
441
|
-
|
485
|
+
|
442
486
|
for(var i=this.item - 1; i-- > 0;) {
|
443
487
|
this.items[i].classList.add('displayed');
|
444
488
|
}
|
445
|
-
|
489
|
+
|
446
490
|
if(this.item > 0) {
|
447
491
|
this.items[this.item - 1].classList.add('current');
|
448
492
|
}
|
449
|
-
|
493
|
+
|
450
494
|
this.projector && this.projector.gotoItem(which);
|
451
495
|
},
|
452
|
-
|
496
|
+
|
453
497
|
adjustFontSize: function() {
|
454
498
|
// Cache long lookup chains, for performance
|
455
499
|
var htmlStyle = html.style,
|
@@ -457,38 +501,38 @@ self.prototype = {
|
|
457
501
|
innerHeight = window.innerHeight,
|
458
502
|
innerWidth = window.innerWidth,
|
459
503
|
slide = this.slides[this.slide];
|
460
|
-
|
504
|
+
|
461
505
|
// Clear previous styles
|
462
506
|
htmlStyle.fontSize = '';
|
463
|
-
|
464
|
-
if(body.classList.contains('show-thumbnails')
|
507
|
+
|
508
|
+
if(body.classList.contains('show-thumbnails')
|
465
509
|
|| slide.classList.contains('dont-resize')) {
|
466
510
|
return;
|
467
511
|
}
|
468
512
|
|
469
513
|
for(
|
470
|
-
var percent = 100;
|
514
|
+
var percent = 100;
|
471
515
|
(scrollRoot.scrollHeight > innerHeight || scrollRoot.scrollWidth > innerWidth) && percent >= 35;
|
472
516
|
percent-=5
|
473
517
|
) {
|
474
518
|
htmlStyle.fontSize = percent + '%';
|
475
519
|
}
|
476
|
-
|
520
|
+
|
477
521
|
// Individual slide
|
478
522
|
|
479
523
|
if(slide.clientHeight && slide.clientWidth) {
|
480
524
|
// Strange FF bug: scrollHeight doesn't work properly with overflow:hidden
|
481
525
|
var previousStyle = slide.getAttribute('style');
|
482
526
|
slide.style.overflow = 'auto';
|
483
|
-
|
527
|
+
|
484
528
|
for(
|
485
|
-
;
|
529
|
+
;
|
486
530
|
(slide.scrollHeight > slide.clientHeight || slide.scrollWidth > slide.clientWidth) && percent >= 35;
|
487
531
|
percent--
|
488
532
|
) {
|
489
533
|
htmlStyle.fontSize = percent + '%';
|
490
534
|
}
|
491
|
-
|
535
|
+
|
492
536
|
slide.setAttribute('style', previousStyle);
|
493
537
|
}
|
494
538
|
|
@@ -497,15 +541,15 @@ self.prototype = {
|
|
497
541
|
htmlStyle.fontSize = '';
|
498
542
|
}
|
499
543
|
},
|
500
|
-
|
544
|
+
|
501
545
|
// Is the element on the current slide?
|
502
546
|
onCurrent: function(element) {
|
503
547
|
var slide = self.getSlide(element);
|
504
|
-
|
548
|
+
|
505
549
|
if(slide) {
|
506
550
|
return '#' + slide.id === location.hash;
|
507
551
|
}
|
508
|
-
|
552
|
+
|
509
553
|
return false;
|
510
554
|
},
|
511
555
|
|
@@ -538,19 +582,19 @@ self.prototype = {
|
|
538
582
|
};
|
539
583
|
|
540
584
|
/**********************************************
|
541
|
-
* Static methods
|
585
|
+
* Static methods
|
542
586
|
**********************************************/
|
543
|
-
|
587
|
+
|
544
588
|
// Helper method for plugins
|
545
589
|
self.getSlide = function(element) {
|
546
590
|
var slide = element;
|
547
|
-
|
591
|
+
|
548
592
|
while (slide && slide.classList && !slide.classList.contains('slide')) {
|
549
593
|
slide = slide.parentNode;
|
550
594
|
}
|
551
|
-
|
595
|
+
|
552
596
|
return slide;
|
553
|
-
}
|
597
|
+
};
|
554
598
|
|
555
599
|
})(document.head || document.getElementsByTagName('head')[0], document.body, document.documentElement);
|
556
600
|
|
@@ -562,14 +606,14 @@ addEventListener('load', function(){ // no idea why the timeout is needed
|
|
562
606
|
|
563
607
|
for(var j=rulez.length; j--;) {
|
564
608
|
var selector = rulez[j].selectorText.replace(/^|,/g, function($0) {
|
565
|
-
return '#' + parentid + ' ' + $0
|
609
|
+
return '#' + parentid + ' ' + $0;
|
566
610
|
});
|
567
|
-
|
611
|
+
|
568
612
|
var cssText = rulez[j].cssText.replace(/^.+?{/, selector + '{');
|
569
|
-
|
613
|
+
|
570
614
|
style.sheet.deleteRule(j);
|
571
615
|
style.sheet.insertRule(cssText, j);
|
572
616
|
}
|
573
|
-
|
617
|
+
|
574
618
|
});
|
575
619
|
});
|
@@ -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);
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slide-em-up
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,22 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: goliath
|
16
|
-
requirement: &
|
16
|
+
requirement: &83664580 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.0
|
21
|
+
version: '1.0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *83664580
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: redcarpet
|
27
|
-
requirement: &
|
27
|
+
requirement: &83664170 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '2.1'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *83664170
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: erubis
|
38
|
-
requirement: &
|
38
|
+
requirement: &83733670 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '2.7'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *83733670
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: yajl-ruby
|
49
|
-
requirement: &
|
49
|
+
requirement: &83732800 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '1.1'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *83732800
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: albino
|
60
|
-
requirement: &
|
60
|
+
requirement: &83732260 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '1.3'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *83732260
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: minitest
|
71
|
-
requirement: &
|
71
|
+
requirement: &83731910 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,7 +76,7 @@ dependencies:
|
|
76
76
|
version: '2.3'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *83731910
|
80
80
|
description: Slide'em up is a presentation tool that displays markdown-formatted slides
|
81
81
|
email: bruno.michel@af83.com
|
82
82
|
executables:
|
@@ -171,6 +171,10 @@ files:
|
|
171
171
|
- themes/common/css/pygments/colorful.css
|
172
172
|
- themes/common/css/pygments/native.css
|
173
173
|
- themes/common/css/pygments/solarized.css
|
174
|
+
- themes/template/index.erb
|
175
|
+
- themes/template/js/prefixfree.min.js
|
176
|
+
- themes/template/css/reset.css
|
177
|
+
- themes/template/README
|
174
178
|
- themes/reveal/index.erb
|
175
179
|
- themes/reveal/js/head.min.js
|
176
180
|
- themes/reveal/js/classList.js
|
@@ -228,5 +232,8 @@ rubyforge_project:
|
|
228
232
|
rubygems_version: 1.8.12
|
229
233
|
signing_key:
|
230
234
|
specification_version: 3
|
231
|
-
summary: Slide'em up is a presentation tool
|
235
|
+
summary: Slide'em up is a presentation tool. You write some slides in markdown, choose
|
236
|
+
a style and it displays it in HTML5. With a browser in full-screen, you can make
|
237
|
+
amazing presentations!
|
232
238
|
test_files: []
|
239
|
+
has_rdoc:
|