markdown_presenter 0.3.2 → 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/presenter.html.haml +25 -24
- 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: 898079e062332e4063aedad7ddae4381a87c86f4
|
4
|
+
data.tar.gz: ae8da5f7fd1d8c3405bf84cbe5f1a3590e840612
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ca059196abd7422c2cbda7a9cb35e3587e680ae8af14f55d626c6a70040697df123a9b3223fb5255e6077254c25cce1d6d661bf648d3b246bf13ad927ee83b80
|
7
|
+
data.tar.gz: 9a9c59831f983c879fca76a91e4bc8fa4622a59fd1b935c887e2f8ccbadf8ebf1c4248b70ecfb150d080696f9e2bb5350c412dd981bcd519ca4c5a1e26da82f4
|
data/presenter.html.haml
CHANGED
@@ -9,41 +9,39 @@
|
|
9
9
|
:css
|
10
10
|
* { margin: 0; font-family: Ubuntu, Sans-serif;}
|
11
11
|
html, body { height: 100%; }
|
12
|
-
.
|
13
|
-
.progress-indicator {height: 5em;}
|
12
|
+
.topbar {height: 4em; text-align:right;}
|
14
13
|
.slide {display:none; position:relative; padding:2px; margin-top:3em; font-size:150%; line-height:1.5em;}
|
15
|
-
.progress-indicator {display:inline-block;}
|
16
|
-
.
|
17
|
-
.
|
18
|
-
.page-indicator {margin:0 10px; display:inline-block;}
|
14
|
+
.progress-indicator {display:inline-block; margin: 10px 10px 10px auto; padding:10px; background-color:#ccc; border-radius:6px; font-size:150%;}
|
15
|
+
.progress-indicator a {font-weight:bold; font-size:110%; padding:0 10px;}
|
16
|
+
.page-status {display:inline;}
|
19
17
|
|
20
18
|
%body
|
21
|
-
.
|
22
|
-
.
|
23
|
-
.uk-width-large-1-4
|
24
|
-
 
|
25
|
-
.uk-width-large-2-4
|
26
|
-
- slides.each do |s|
|
27
|
-
.slide= s
|
28
|
-
.uk-width-large-1-4
|
29
|
-
 
|
30
|
-
|
31
|
-
.progress-indicator
|
32
|
-
.floating-indicator
|
19
|
+
.topbar
|
20
|
+
.progress-indicator
|
33
21
|
%a{href: "#previous", onclick:'P.previous(); return false;'}
|
34
|
-
|
35
|
-
.page-
|
22
|
+
←
|
23
|
+
.page-status
|
36
24
|
%span.current-slide-number= 1
|
37
25
|
of
|
38
26
|
= slides.size
|
39
27
|
%a{href: "#next", onclick:'P.next(); return false;'}
|
40
|
-
|
28
|
+
→
|
29
|
+
|
30
|
+
.uk-grid
|
31
|
+
.uk-width-large-1-4
|
32
|
+
 
|
33
|
+
.uk-width-large-2-4
|
34
|
+
- slides.each do |s|
|
35
|
+
.slide= s
|
36
|
+
.uk-width-large-1-4
|
37
|
+
 
|
41
38
|
|
42
39
|
:javascript
|
43
40
|
$(document).ready(function(){
|
44
41
|
var slides = $(".slide");
|
45
42
|
|
46
|
-
var
|
43
|
+
var match = location.href.match(/#(.*)$/);
|
44
|
+
var current_slide_index = (match && (parseInt(match[1], 10) - 1)) || 0;
|
47
45
|
|
48
46
|
var previous = function(){
|
49
47
|
if (current_slide_index === 0) return false;
|
@@ -69,8 +67,11 @@
|
|
69
67
|
slides.hide();
|
70
68
|
var slide = slides.eq(index);
|
71
69
|
slide.show();
|
72
|
-
|
70
|
+
|
73
71
|
$(".current-slide-number").text(index + 1);
|
72
|
+
location.href = location.href.replace(/#.*|$/, '#' + (index + 1));
|
73
|
+
|
74
|
+
if (animation) animation(slide);
|
74
75
|
};
|
75
76
|
|
76
77
|
$(document).keydown(function(e){
|
@@ -79,7 +80,7 @@
|
|
79
80
|
return true;
|
80
81
|
});
|
81
82
|
|
82
|
-
show(
|
83
|
+
show(current_slide_index);
|
83
84
|
|
84
85
|
P = {previous:previous, next:next};
|
85
86
|
|