markdown_presenter 0.4.1 → 0.4.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/markdown_presenter +3 -1
- data/presenter.html.haml +78 -77
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56c29260da2e4ef0af511f36044e1d5e07b0071f
|
4
|
+
data.tar.gz: 39545651df211ad2e1c53e08c9fb0cff5ee67e16
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b53affa518546b92cd1d3eea1782f4e77723b75f866d771b1875efc12aee9a149b97e95c32e8e958befabe5219af1f01ce82c3bd28e1add3274f9b6de495dba
|
7
|
+
data.tar.gz: 7ce59b2e81371200136cf45e8c528219517e9d178ad2248f4c13858e4936afeba974f3793053d3d1548719a40c42975840778d6333a60617b241f1755950fa42
|
data/bin/markdown_presenter
CHANGED
data/presenter.html.haml
CHANGED
@@ -1,96 +1,97 @@
|
|
1
1
|
!!!
|
2
|
-
%
|
3
|
-
%
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
2
|
+
%html
|
3
|
+
%head
|
4
|
+
%title= title
|
5
|
+
%script{type:'text/javascript'}= yield 'js/jquery-1.10.2.min.js'
|
6
|
+
%style= yield 'css/uikit.almost-flat.min.css'
|
7
|
+
%script{type:'text/javascript'}= yield 'js/uikit.min.js'
|
8
|
+
%meta{name:"viewport", content:"width=device-width, user-scalable=no"}
|
8
9
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
10
|
+
:css
|
11
|
+
* { margin: 0; font-family: Ubuntu, Sans-serif;}
|
12
|
+
html, body { height: 100%; }
|
13
|
+
.topbar {height: 4em; text-align:right;}
|
14
|
+
.slide {display:none; position:relative; padding:5px; margin-top:3em; font-size:140%; line-height:1.5em;}
|
15
|
+
.progress-indicator {display:inline-block; margin: 10px 10px 10px auto; padding:10px; background-color:#ccc; border-radius:6px; font-size:150%;}
|
16
|
+
.progress-indicator a {font-weight:bold; font-size:110%; padding:0 10px;}
|
17
|
+
.page-status {display:inline;}
|
17
18
|
|
18
|
-
%body
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
19
|
+
%body
|
20
|
+
.topbar
|
21
|
+
.progress-indicator
|
22
|
+
%a{href: "#previous", onclick:'P.previous(); return false;'}
|
23
|
+
←
|
24
|
+
.page-status
|
25
|
+
%span.current-slide-number= 1
|
26
|
+
of
|
27
|
+
= slides.size
|
28
|
+
%a{href: "#next", onclick:'P.next(); return false;'}
|
29
|
+
→
|
29
30
|
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
31
|
+
.uk-grid
|
32
|
+
.uk-width-large-1-4
|
33
|
+
 
|
34
|
+
.uk-width-large-2-4
|
35
|
+
- slides.each do |s|
|
36
|
+
.slide= s
|
37
|
+
.uk-width-large-1-4
|
38
|
+
 
|
38
39
|
|
39
|
-
|
40
|
-
|
41
|
-
|
40
|
+
:javascript
|
41
|
+
$(document).ready(function(){
|
42
|
+
var slides = $(".slide");
|
42
43
|
|
43
|
-
|
44
|
-
|
44
|
+
var match = location.href.match(/#(.*)$/);
|
45
|
+
var current_slide_index = (match && (parseInt(match[1], 10) - 1)) || 0;
|
45
46
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
47
|
+
var previous = function(){
|
48
|
+
if (current_slide_index === 0) return false;
|
49
|
+
show(--current_slide_index, function(slide){
|
50
|
+
slide.css('left', -100);
|
51
|
+
slide.animate({
|
52
|
+
left: parseInt(slide.css('left'), 10) == 0 ? -slide.outerWidth() : 0
|
53
|
+
});
|
52
54
|
});
|
53
|
-
}
|
54
|
-
};
|
55
|
+
};
|
55
56
|
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
57
|
+
var next = function(){
|
58
|
+
if (current_slide_index === (slides.length - 1)) return false;
|
59
|
+
show(++current_slide_index, function(slide){
|
60
|
+
slide.css('left', 100);
|
61
|
+
slide.animate({
|
62
|
+
left: parseInt(slide.css('left'), 10) == 0 ? +slide.outerWidth() : 0
|
63
|
+
});
|
62
64
|
});
|
63
|
-
}
|
64
|
-
};
|
65
|
+
};
|
65
66
|
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
67
|
+
var show = function(index, animation){
|
68
|
+
slides.hide();
|
69
|
+
var slide = slides.eq(index);
|
70
|
+
slide.show();
|
70
71
|
|
71
|
-
|
72
|
-
|
72
|
+
$(".current-slide-number").text(index + 1);
|
73
|
+
location.href = location.href.replace(/#.*|$/, '#' + (index + 1));
|
73
74
|
|
74
|
-
|
75
|
-
|
75
|
+
if (animation) animation(slide);
|
76
|
+
};
|
76
77
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
78
|
+
$(document).keydown(function(e){
|
79
|
+
if (e.keyCode == 37) { previous(); return false;}
|
80
|
+
else if (e.keyCode == 39){ next(); return false;}
|
81
|
+
return true;
|
82
|
+
});
|
83
|
+
|
84
|
+
show(current_slide_index);
|
84
85
|
|
85
|
-
|
86
|
+
P = {previous:previous, next:next};
|
86
87
|
|
87
|
-
|
88
|
-
|
88
|
+
var progress_indicator = $(".progress-indicator");
|
89
|
+
progress_indicator.css({ 'opacity' : 0.6 });
|
89
90
|
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
91
|
+
progress_indicator.hover(function(){
|
92
|
+
$(this).css({'opacity' : 1});
|
93
|
+
}, function(){
|
94
|
+
$(this).css({'opacity' : 0.6});
|
95
|
+
});
|
94
96
|
});
|
95
|
-
});
|
96
97
|
|