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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4f5031fec7b44cb6945740deb04b5a7dd0f5b6a3
4
- data.tar.gz: 4c411a05ef8f04713ad9ae17ccd4af6622f8851e
3
+ metadata.gz: 56c29260da2e4ef0af511f36044e1d5e07b0071f
4
+ data.tar.gz: 39545651df211ad2e1c53e08c9fb0cff5ee67e16
5
5
  SHA512:
6
- metadata.gz: 074997b5552451848f053eeddba44ab954dabebefb52d13915d677807c398b269c6b531d5390dd903dcaeea5e2f9318a3f62c42b2e61273a40d7eb4532148079
7
- data.tar.gz: 6d1063256e8840a47e24a0c866d883d87b9ea5ad4b26e6abe777922ccb82bd7e522318f6f69771cd66d0362d917481f5f729a9261ef3918c28a6cb7f5d5abfc8
6
+ metadata.gz: 6b53affa518546b92cd1d3eea1782f4e77723b75f866d771b1875efc12aee9a149b97e95c32e8e958befabe5219af1f01ce82c3bd28e1add3274f9b6de495dba
7
+ data.tar.gz: 7ce59b2e81371200136cf45e8c528219517e9d178ad2248f4c13858e4936afeba974f3793053d3d1548719a40c42975840778d6333a60617b241f1755950fa42
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
- require 'simple_presenter'
2
+ require 'markdown_presenter'
3
+
4
+ (puts "You need to specify a filename."; exit 1) if ARGV.empty?
3
5
 
4
6
  process ARGV[0]
data/presenter.html.haml CHANGED
@@ -1,96 +1,97 @@
1
1
  !!!
2
- %head
3
- %title= title
4
- %script{type:'text/javascript'}= yield 'js/jquery-1.10.2.min.js'
5
- %style= yield 'css/uikit.almost-flat.min.css'
6
- %script{type:'text/javascript'}= yield 'js/uikit.min.js'
7
- %meta{name:"viewport", content:"width=device-width, user-scalable=no"}
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
- :css
10
- * { margin: 0; font-family: Ubuntu, Sans-serif;}
11
- html, body { height: 100%; }
12
- .topbar {height: 4em; text-align:right;}
13
- .slide {display:none; position:relative; padding:5px; margin-top:3em; font-size:140%; line-height:1.5em;}
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;}
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
- .topbar
20
- .progress-indicator
21
- %a{href: "#previous", onclick:'P.previous(); return false;'}
22
-
23
- .page-status
24
- %span.current-slide-number= 1
25
- of
26
- = slides.size
27
- %a{href: "#next", onclick:'P.next(); return false;'}
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
- .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
-  
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
- :javascript
40
- $(document).ready(function(){
41
- var slides = $(".slide");
40
+ :javascript
41
+ $(document).ready(function(){
42
+ var slides = $(".slide");
42
43
 
43
- var match = location.href.match(/#(.*)$/);
44
- var current_slide_index = (match && (parseInt(match[1], 10) - 1)) || 0;
44
+ var match = location.href.match(/#(.*)$/);
45
+ var current_slide_index = (match && (parseInt(match[1], 10) - 1)) || 0;
45
46
 
46
- var previous = function(){
47
- if (current_slide_index === 0) return false;
48
- show(--current_slide_index, function(slide){
49
- slide.css('left', -100);
50
- slide.animate({
51
- left: parseInt(slide.css('left'), 10) == 0 ? -slide.outerWidth() : 0
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
- var next = function(){
57
- if (current_slide_index === (slides.length - 1)) return false;
58
- show(++current_slide_index, function(slide){
59
- slide.css('left', 100);
60
- slide.animate({
61
- left: parseInt(slide.css('left'), 10) == 0 ? +slide.outerWidth() : 0
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
- var show = function(index, animation){
67
- slides.hide();
68
- var slide = slides.eq(index);
69
- slide.show();
67
+ var show = function(index, animation){
68
+ slides.hide();
69
+ var slide = slides.eq(index);
70
+ slide.show();
70
71
 
71
- $(".current-slide-number").text(index + 1);
72
- location.href = location.href.replace(/#.*|$/, '#' + (index + 1));
72
+ $(".current-slide-number").text(index + 1);
73
+ location.href = location.href.replace(/#.*|$/, '#' + (index + 1));
73
74
 
74
- if (animation) animation(slide);
75
- };
75
+ if (animation) animation(slide);
76
+ };
76
77
 
77
- $(document).keydown(function(e){
78
- if (e.keyCode == 37) { previous(); return false;}
79
- else if (e.keyCode == 39){ next(); return false;}
80
- return true;
81
- });
82
-
83
- show(current_slide_index);
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
- P = {previous:previous, next:next};
86
+ P = {previous:previous, next:next};
86
87
 
87
- var progress_indicator = $(".progress-indicator");
88
- progress_indicator.css({ 'opacity' : 0.6 });
88
+ var progress_indicator = $(".progress-indicator");
89
+ progress_indicator.css({ 'opacity' : 0.6 });
89
90
 
90
- progress_indicator.hover(function(){
91
- $(this).css({'opacity' : 1});
92
- }, function(){
93
- $(this).css({'opacity' : 0.6});
91
+ progress_indicator.hover(function(){
92
+ $(this).css({'opacity' : 1});
93
+ }, function(){
94
+ $(this).css({'opacity' : 0.6});
95
+ });
94
96
  });
95
- });
96
97
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markdown_presenter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthieu Tanguay-Carel