slide-em-up 0.2.1 → 0.2.2

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 CHANGED
@@ -11,8 +11,8 @@ How to do your first presentation with Slide'em up?
11
11
 
12
12
  1. Install slide-em-up: `gem install slide-em-up`
13
13
  2. Create a directory for your presentation: `mkdir foobar && cd foobar`
14
- 3. Create a section for your slides: `mkdir main_section`
15
- 4. Write some slides: `vim main_section/slides.md`
14
+ 3. Create a section for your slides: `mkdir main`
15
+ 4. Write some slides: `vim main/slides.md`
16
16
 
17
17
  !SLIDE
18
18
  # My First slide #
@@ -26,8 +26,10 @@ How to do your first presentation with Slide'em up?
26
26
 
27
27
  {
28
28
  "title": "My first presentation",
29
- "theme": "shower",
30
- "sections": ["main_section"]
29
+ "theme": "CSSS",
30
+ "sections": {
31
+ "main": "Title of my main section"
32
+ }
31
33
  }
32
34
 
33
35
  6. Launch the tool: `slide-em-up`
@@ -114,6 +116,8 @@ TODO
114
116
  * Same command line stuff than showoff
115
117
  * Add a showoff theme for compatibility
116
118
  * Many more themes and features
119
+ * Favicon
120
+ * Optimize process_code (pygments.rb?)
117
121
 
118
122
 
119
123
  Issues or Suggestions
@@ -9,10 +9,10 @@ module SlideEmUp
9
9
  class Presentation
10
10
  Meta = Struct.new(:title, :dir, :css, :js)
11
11
  Theme = Struct.new(:title, :dir, :css, :js)
12
- Section = Struct.new(:number, :title, :slides)
12
+ Section = Struct.new(:number, :title, :dir, :slides)
13
13
  Slide = Struct.new(:number, :classes, :markdown, :html)
14
14
 
15
- attr_accessor :meta, :theme, :common, :titles
15
+ attr_accessor :meta, :theme, :common, :parts
16
16
 
17
17
  def initialize(dir)
18
18
  infos = extract_normal_infos(dir) || extract_infos_from_showoff(dir) || {}
@@ -20,7 +20,8 @@ module SlideEmUp
20
20
  @meta = build_meta(infos["title"], dir)
21
21
  @theme = build_theme(infos["theme"])
22
22
  @common = build_theme("common")
23
- @titles = infos["sections"]
23
+ @parts = infos["sections"]
24
+ @parts = Hash[@parts.zip @parts] if Array === @parts
24
25
  end
25
26
 
26
27
  def html
@@ -74,8 +75,8 @@ module SlideEmUp
74
75
  end
75
76
 
76
77
  def sections
77
- @titles.map.with_index do |title,i|
78
- raw = Dir["#{meta.dir}/#{title}/**/*.md"].sort.map { |f| File.read(f) }.join("\n\n")
78
+ @parts.map.with_index do |(dir,title),i|
79
+ raw = Dir["#{meta.dir}/#{dir}/**/*.md"].sort.map { |f| File.read(f) }.join("\n\n")
79
80
  parts = raw.split(/!SLIDE */)
80
81
  parts.delete('')
81
82
  slides = parts.map.with_index do |slide,j|
@@ -86,7 +87,7 @@ module SlideEmUp
86
87
  html = process_code(html)
87
88
  Slide.new(j, classes, md, html)
88
89
  end
89
- Section.new(i, title, slides)
90
+ Section.new(i, title, dir, slides)
90
91
  end
91
92
  end
92
93
 
@@ -1,3 +1,3 @@
1
1
  module SlideEmUp
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
@@ -9,6 +9,7 @@
9
9
  * Variables
10
10
  */
11
11
  .slide h2,
12
+ section.slide h1,
12
13
  section > header.slide > h1 {
13
14
  font-family: 'Helvetica Neue', Helvetica, sans-serif;
14
15
  font-weight: 100;
@@ -111,10 +112,16 @@ strong, b {
111
112
  text-shadow: .03em .03em .1em white;
112
113
  }
113
114
 
115
+ section.slide h1 {
116
+ font-family: 'Helvetica Neue', Helvetica, sans-serif;
117
+ font-weight: 100;
118
+ font-size: 1.1in;
119
+ }
120
+
114
121
  .slide h2 {
115
122
  font-family: 'Helvetica Neue', Helvetica, sans-serif;
116
123
  font-weight: 100;
117
- font-size: 1.2in;
124
+ font-size: 0.8in;
118
125
  }
119
126
 
120
127
  .slide p,
@@ -218,25 +218,27 @@ var self = window.SlideShow = function(container, slide) {
218
218
  }, false);
219
219
 
220
220
  if (window['EventSource'] != undefined) {
221
- var source = new EventSource('/remote/sub/events');
222
- source.onmessage = function(e) {
223
- switch(e.data){
224
- case 'next':
225
- me.next();
226
- break;
227
- case 'prev':
228
- me.prev();
229
- break;
230
- case 'up':
231
- me.next(true);
232
- break;
233
- case 'down':
234
- me.prev(true);
235
- break;
236
- default:
237
- console.log(e);
221
+ setTimeout(function() {
222
+ var source = new EventSource('/remote/sub/events');
223
+ source.onmessage = function(e) {
224
+ switch(e.data){
225
+ case 'next':
226
+ me.next();
227
+ break;
228
+ case 'prev':
229
+ me.prev();
230
+ break;
231
+ case 'up':
232
+ me.next(true);
233
+ break;
234
+ case 'down':
235
+ me.prev(true);
236
+ break;
237
+ default:
238
+ console.log(e);
239
+ };
238
240
  };
239
- };
241
+ }, 1000);
240
242
  }
241
243
 
242
244
  // Rudimentary style[scoped] polyfill
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.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-10-12 00:00:00.000000000Z
12
+ date: 2011-10-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: goliath
16
- requirement: &88495470 !ruby/object:Gem::Requirement
16
+ requirement: &79322510 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0.9'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *88495470
24
+ version_requirements: *79322510
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: redcarpet
27
- requirement: &88495220 !ruby/object:Gem::Requirement
27
+ requirement: &79369210 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '1.17'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *88495220
35
+ version_requirements: *79369210
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: erubis
38
- requirement: &88494990 !ruby/object:Gem::Requirement
38
+ requirement: &79368850 !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: *88494990
46
+ version_requirements: *79368850
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: yajl-ruby
49
- requirement: &88494760 !ruby/object:Gem::Requirement
49
+ requirement: &79368530 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0.8'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *88494760
57
+ version_requirements: *79368530
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: albino
60
- requirement: &88494530 !ruby/object:Gem::Requirement
60
+ requirement: &79367970 !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: *88494530
68
+ version_requirements: *79367970
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: minitest
71
- requirement: &88429520 !ruby/object:Gem::Requirement
71
+ requirement: &79367480 !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: *88429520
79
+ version_requirements: *79367480
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:
@@ -89,50 +89,50 @@ files:
89
89
  - README.md
90
90
  - Gemfile
91
91
  - bin/slide-em-up
92
- - lib/slide-em-up.rb
92
+ - lib/slide-em-up/presentation.rb
93
93
  - lib/slide-em-up/slides_api.rb
94
+ - lib/slide-em-up/version.rb
94
95
  - lib/slide-em-up/remote_api.rb
95
96
  - lib/slide-em-up/routes.rb
96
- - lib/slide-em-up/presentation.rb
97
- - lib/slide-em-up/version.rb
98
- - themes/shower/index.erb
99
- - themes/shower/js/script.js
100
- - themes/shower/css/fonts.css
101
- - themes/shower/css/reset.css
102
- - themes/shower/css/style.css
97
+ - lib/slide-em-up.rb
103
98
  - themes/shower/images/ribbon.svg
104
- - themes/shower/images/grid.png
105
99
  - themes/shower/images/linen.png
100
+ - themes/shower/images/grid.png
101
+ - themes/shower/css/style.css
102
+ - themes/shower/css/reset.css
103
+ - themes/shower/css/fonts.css
106
104
  - themes/shower/README
105
+ - themes/shower/index.erb
106
+ - themes/shower/js/script.js
107
+ - themes/html5rocks/css/sea_wave.css
108
+ - themes/html5rocks/css/moon.css
109
+ - themes/html5rocks/css/sand.css
110
+ - themes/html5rocks/css/default.css
111
+ - themes/html5rocks/README
112
+ - themes/html5rocks/index.erb
113
+ - themes/html5rocks/js/slides.js
114
+ - themes/common/css/pygments/colorful.css
115
+ - themes/common/css/pygments/native.css
116
+ - themes/common/fonts/TargetBlank.otf
117
+ - themes/common/fonts/crimson_text_bold.ttf
118
+ - themes/common/fonts/DroidSansMono.ttf
119
+ - themes/common/fonts/crimson_text_semibold.ttf
107
120
  - themes/common/fonts/league_gothic-webfont.ttf
108
121
  - themes/common/fonts/crimson_text.ttf
109
- - themes/common/fonts/DroidSansMono.ttf
110
- - themes/common/fonts/TargetBlank.otf
111
122
  - themes/common/fonts/DroidSansMono.svg
112
123
  - themes/common/fonts/TargetBlank.svg
113
- - themes/common/fonts/crimson_text_bold.ttf
114
- - themes/common/fonts/crimson_text_semibold.ttf
115
- - themes/common/css/pygments/colorful.css
116
- - themes/common/css/pygments/native.css
117
- - themes/3d_slideshow/index.erb
118
- - themes/3d_slideshow/js/slideshow.js
119
- - themes/3d_slideshow/css/main.css
120
- - themes/3d_slideshow/css/reset.css
121
- - themes/3d_slideshow/README
122
- - themes/html5rocks/index.erb
123
- - themes/html5rocks/js/slides.js
124
- - themes/html5rocks/css/sand.css
125
- - themes/html5rocks/css/moon.css
126
- - themes/html5rocks/css/default.css
127
- - themes/html5rocks/css/sea_wave.css
128
- - themes/html5rocks/README
129
- - themes/CSSS/index.erb
130
- - themes/CSSS/js/classList.js
131
- - themes/CSSS/js/slideshow.js
124
+ - themes/CSSS/images/rainbow-wood.jpg
132
125
  - themes/CSSS/css/slideshow.css
133
126
  - themes/CSSS/css/theme.css
134
- - themes/CSSS/images/rainbow-wood.jpg
135
127
  - themes/CSSS/README
128
+ - themes/CSSS/index.erb
129
+ - themes/CSSS/js/slideshow.js
130
+ - themes/CSSS/js/classList.js
131
+ - themes/3d_slideshow/css/reset.css
132
+ - themes/3d_slideshow/css/main.css
133
+ - themes/3d_slideshow/README
134
+ - themes/3d_slideshow/index.erb
135
+ - themes/3d_slideshow/js/slideshow.js
136
136
  homepage: http://github.com/nono/slide-em-up
137
137
  licenses: []
138
138
  post_install_message: