parade 0.10.1 → 0.10.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +6 -14
  2. data/README.md +187 -120
  3. data/lib/parade/commands/html_output.rb +1 -1
  4. data/lib/parade/parsers/dsl.rb +29 -0
  5. data/lib/parade/parsers/presentation_file_parser.rb +3 -9
  6. data/lib/parade/renderers/columns_renderer.rb +29 -11
  7. data/lib/parade/renderers/content_with_caption_renderer.rb +87 -0
  8. data/lib/parade/section.rb +9 -0
  9. data/lib/parade/server.rb +5 -1
  10. data/lib/parade/slide.rb +6 -1
  11. data/lib/parade/slide_post_renderers.rb +3 -0
  12. data/lib/parade/version.rb +1 -1
  13. data/lib/public/css/themes/default.css +0 -1
  14. data/lib/public/css/themes/hayfield.css +58 -0
  15. data/lib/public/css/themes/minimal.css +144 -0
  16. data/lib/public/js/parade-command-input.js +3 -0
  17. data/lib/public/js/parade-keyboard-input.js +0 -4
  18. data/lib/public/js/parade.js +0 -12
  19. data/lib/views/footer.erb +0 -1
  20. data/lib/views/help.erb +0 -1
  21. data/lib/views/not_found.erb +21 -0
  22. data/lib/views/print.erb +5 -0
  23. metadata +51 -50
  24. data/lib/parade/parsers/json_file_parser.rb +0 -67
  25. data/lib/public/css/jquery-ui/images/ui-bg_diagonals-small_100_f0efea_40x40.png +0 -0
  26. data/lib/public/css/jquery-ui/images/ui-bg_flat_35_f0f0f0_40x100.png +0 -0
  27. data/lib/public/css/jquery-ui/images/ui-bg_glass_55_fcf0ba_1x400.png +0 -0
  28. data/lib/public/css/jquery-ui/images/ui-bg_glow-ball_25_2e2e28_600x600.png +0 -0
  29. data/lib/public/css/jquery-ui/images/ui-bg_highlight-soft_100_f0efea_1x100.png +0 -0
  30. data/lib/public/css/jquery-ui/images/ui-bg_highlight-soft_25_327E04_1x100.png +0 -0
  31. data/lib/public/css/jquery-ui/images/ui-bg_highlight-soft_25_5A9D1A_1x100.png +0 -0
  32. data/lib/public/css/jquery-ui/images/ui-bg_highlight-soft_95_ffedad_1x100.png +0 -0
  33. data/lib/public/css/jquery-ui/images/ui-bg_inset-soft_22_3b3b35_1x100.png +0 -0
  34. data/lib/public/css/jquery-ui/images/ui-icons_808080_256x240.png +0 -0
  35. data/lib/public/css/jquery-ui/images/ui-icons_8DC262_256x240.png +0 -0
  36. data/lib/public/css/jquery-ui/images/ui-icons_cd0a0a_256x240.png +0 -0
  37. data/lib/public/css/jquery-ui/images/ui-icons_e7e6e4_256x240.png +0 -0
  38. data/lib/public/css/jquery-ui/images/ui-icons_eeeeee_256x240.png +0 -0
  39. data/lib/public/css/jquery-ui/images/ui-icons_ffffff_256x240.png +0 -0
  40. data/lib/public/css/spinner_bar.gif +0 -0
@@ -22,6 +22,9 @@ $(document).ready(function() {
22
22
  }
23
23
 
24
24
  $.publish('presentation:slide:location:change',gotoSlideNumber);
25
+ },
26
+ print: function() {
27
+ window.location.href = "/print"
25
28
  }
26
29
  };
27
30
 
@@ -34,10 +34,6 @@ $(document).ready(function() {
34
34
  $.publish("debug:toggle");
35
35
  });
36
36
 
37
- MainKeyboard.on('n', function(){
38
- $.publish("presentation:speaker:notes:toggle");
39
- });
40
-
41
37
  MainKeyboard.on('shift + p', function(){
42
38
  $.publish("presentation:pause:toggle");
43
39
  });
@@ -51,17 +51,6 @@ $(document).ready(function() {
51
51
 
52
52
  window.PauseScreen = ToggleView.sub();
53
53
 
54
- window.SpeakerNotes = ToggleView.sub({
55
- init: function() {
56
- this.constructor.__super__.init.apply(this, arguments)
57
-
58
- $.subscribe("presentation:slide:didChange",$.proxy(this.updateNotes,this));
59
- },
60
- updateNotes: function(event,slide) {
61
- // Update the text from the slide's notes
62
- }
63
- });
64
-
65
54
  window.DebugView = ToggleView.sub({
66
55
  log: function(text) {
67
56
  this.element.text(text);
@@ -303,7 +292,6 @@ $(document).ready(function() {
303
292
  footer: new Footer("#footer","presentation:footer"),
304
293
  helpMenu: new HelpMenu("#help","help"),
305
294
  pauseScreen: new PauseScreen("#pauseScreen","presentation:pause"),
306
- speakerNotes: new SpeakerNotes("#notesInfo","presentation:speaker:notes"),
307
295
  debugView: new DebugView("#debugInfo","debug"),
308
296
  navigationMenu: new NavigationMenu("#navmenu","presentation:navigation"),
309
297
 
@@ -1,5 +1,4 @@
1
1
  <div id="footer">
2
2
  <span id="slideInfo"></span>
3
3
  <span id="debugInfo"></span>
4
- <span id="notesInfo"></span>
5
4
  </div>
@@ -8,7 +8,6 @@
8
8
  <tr><td class="key">d</td><td>toggle debug mode</td></tr>
9
9
  <tr><td class="key">c, t</td><td>table of contents (vi)</td></tr>
10
10
  <tr><td class="key">f</td><td>toggle footer</td></tr>
11
- <tr><td class="key">n</td><td>toggle notes</td></tr>
12
11
 
13
12
  <% plugin_commands.each do |command| %>
14
13
  <tr><td class="key"><%= command.input %></td><td><%= command.description %></td></tr>
@@ -0,0 +1,21 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <%= css 'reset.css' %>
7
+ <%= css '960.css' %>
8
+ <%= plugin_css_files %>
9
+ <%= theme_css %>
10
+ <%= custom_css_files %>
11
+ </head>
12
+
13
+ <body>
14
+ <div class="container_12">
15
+ <img src="deckfailcat.png" />
16
+ <h2 style="color: white;">
17
+ Did you mean to visit "/" or "/print"?
18
+ </h2>
19
+ </div>
20
+ </body>
21
+ </html>
@@ -11,6 +11,11 @@
11
11
  <%= plugin_css_files %>
12
12
  <%= theme_css %>
13
13
  <%= custom_css_files %>
14
+
15
+ <!-- Even though this is the print representation, this is required if any
16
+ slides have custom JavaScript -->
17
+
18
+ <%= js 'jquery-1.4.2.js' %>
14
19
  </head>
15
20
 
16
21
  <body>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parade
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.10.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Scott Chacon
@@ -29,42 +29,42 @@ dependencies:
29
29
  name: redcarpet
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ! '>='
32
+ - - '>='
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ! '>='
39
+ - - '>='
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: nokogiri
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ! '>='
46
+ - - '>='
47
47
  - !ruby/object:Gem::Version
48
48
  version: '0'
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ! '>='
53
+ - - '>='
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: json
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ! '>='
60
+ - - '>='
61
61
  - !ruby/object:Gem::Version
62
62
  version: '0'
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ! '>='
67
+ - - '>='
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  - !ruby/object:Gem::Dependency
@@ -127,50 +127,64 @@ dependencies:
127
127
  name: css_parser
128
128
  requirement: !ruby/object:Gem::Requirement
129
129
  requirements:
130
- - - ! '>='
130
+ - - '>='
131
131
  - !ruby/object:Gem::Version
132
132
  version: '0'
133
133
  type: :runtime
134
134
  prerelease: false
135
135
  version_requirements: !ruby/object:Gem::Requirement
136
136
  requirements:
137
- - - ! '>='
137
+ - - '>='
138
138
  - !ruby/object:Gem::Version
139
139
  version: '0'
140
140
  - !ruby/object:Gem::Dependency
141
141
  name: mg
142
142
  requirement: !ruby/object:Gem::Requirement
143
143
  requirements:
144
- - - ! '>='
144
+ - - '>='
145
145
  - !ruby/object:Gem::Version
146
146
  version: '0'
147
147
  type: :development
148
148
  prerelease: false
149
149
  version_requirements: !ruby/object:Gem::Requirement
150
150
  requirements:
151
- - - ! '>='
151
+ - - '>='
152
152
  - !ruby/object:Gem::Version
153
153
  version: '0'
154
- description: ! " Parade is an open source presentation software that consists of
155
- a Sinatra web\napp that serves up markdown files in a presentation format. Parade
156
- can serve a\ndirectory or be configured to run with a simple configuration file.\n\n
157
- \ * Markdown backed data\n\n > This ultimately makes it easier to manage diffs
158
- when making changes,\n using the content in other documents, and quickly re-using
159
- portions of a\n presentation.\n\n * Syntax Highlighting\n\n > Using GitHub
160
- flavored markdown, code fences will automatically be\n syntax highlighted,
161
- making it incredibly easy to integrate code samples.\n\n * Code Execution\n\n >
162
- Slides are able to provide execution and show results for JavaScript\n and
163
- Coffeescript live within the browser. This allows for live\n demonstrations
164
- of code.\n\n * Web\n\n > Slide presentations are basically websites -- they
165
- run in your browser from your desktop. This allows for a wide range of possibilities
166
- for customization and expandability.\n\n * Basic Templating and Color Schemes\n\n
167
- \ > Several templates and color scheme options have been provided to help you
168
- get started. While Parade does not currently provide anything near the variety of
169
- many other presentation packages, it is well-suited for basic presentations.\n\n
170
- \ * Design Flexibility (pros and cons)\n\n > Unless you're skilled in CSS/Animations,
171
- you will likely have a harder\n time creating presentations with as much polish
172
- as other programs provide. However, this approach also makes Parade incredibly flexible
173
- if you do understand CSS/Animations.\n"
154
+ description: |2
155
+ Parade is an open source presentation software that consists of a Sinatra web
156
+ app that serves up markdown files in a presentation format. Parade can serve a
157
+ directory or be configured to run with a simple configuration file.
158
+
159
+ * Markdown backed data
160
+
161
+ > This ultimately makes it easier to manage diffs when making changes,
162
+ using the content in other documents, and quickly re-using portions of a
163
+ presentation.
164
+
165
+ * Syntax Highlighting
166
+
167
+ > Using GitHub flavored markdown, code fences will automatically be
168
+ syntax highlighted, making it incredibly easy to integrate code samples.
169
+
170
+ * Code Execution
171
+
172
+ > Slides are able to provide execution and show results for JavaScript
173
+ and Coffeescript live within the browser. This allows for live
174
+ demonstrations of code.
175
+
176
+ * Web
177
+
178
+ > Slide presentations are basically websites -- they run in your browser from your desktop. This allows for a wide range of possibilities for customization and expandability.
179
+
180
+ * Basic Templating and Color Schemes
181
+
182
+ > Several templates and color scheme options have been provided to help you get started. While Parade does not currently provide anything near the variety of many other presentation packages, it is well-suited for basic presentations.
183
+
184
+ * Design Flexibility (pros and cons)
185
+
186
+ > Unless you're skilled in CSS/Animations, you will likely have a harder
187
+ time creating presentations with as much polish as other programs provide. However, this approach also makes Parade incredibly flexible if you do understand CSS/Animations.
174
188
  email: franklin.webber@gmail.com
175
189
  executables:
176
190
  - parade
@@ -199,7 +213,6 @@ files:
199
213
  - lib/parade/metadata.rb
200
214
  - lib/parade/parsers/dsl.rb
201
215
  - lib/parade/parsers/dsl_file_parser.rb
202
- - lib/parade/parsers/json_file_parser.rb
203
216
  - lib/parade/parsers/markdown_image_paths.rb
204
217
  - lib/parade/parsers/markdown_slide_splitter.rb
205
218
  - lib/parade/parsers/presentation_directory_parser.rb
@@ -208,6 +221,7 @@ files:
208
221
  - lib/parade/parsers/slides_file_content_parser.rb
209
222
  - lib/parade/renderers/columns_renderer.rb
210
223
  - lib/parade/renderers/command_line_renderer.rb
224
+ - lib/parade/renderers/content_with_caption_renderer.rb
211
225
  - lib/parade/renderers/html_with_rouge.rb
212
226
  - lib/parade/renderers/inline_images.rb
213
227
  - lib/parade/renderers/special_paragraph_renderer.rb
@@ -223,21 +237,6 @@ files:
223
237
  - lib/public/css/fg.menu.css
224
238
  - lib/public/css/ghf_marked.css
225
239
  - lib/public/css/jquery-terminal.css
226
- - lib/public/css/jquery-ui/images/ui-bg_diagonals-small_100_f0efea_40x40.png
227
- - lib/public/css/jquery-ui/images/ui-bg_flat_35_f0f0f0_40x100.png
228
- - lib/public/css/jquery-ui/images/ui-bg_glass_55_fcf0ba_1x400.png
229
- - lib/public/css/jquery-ui/images/ui-bg_glow-ball_25_2e2e28_600x600.png
230
- - lib/public/css/jquery-ui/images/ui-bg_highlight-soft_100_f0efea_1x100.png
231
- - lib/public/css/jquery-ui/images/ui-bg_highlight-soft_25_327E04_1x100.png
232
- - lib/public/css/jquery-ui/images/ui-bg_highlight-soft_25_5A9D1A_1x100.png
233
- - lib/public/css/jquery-ui/images/ui-bg_highlight-soft_95_ffedad_1x100.png
234
- - lib/public/css/jquery-ui/images/ui-bg_inset-soft_22_3b3b35_1x100.png
235
- - lib/public/css/jquery-ui/images/ui-icons_808080_256x240.png
236
- - lib/public/css/jquery-ui/images/ui-icons_8DC262_256x240.png
237
- - lib/public/css/jquery-ui/images/ui-icons_cd0a0a_256x240.png
238
- - lib/public/css/jquery-ui/images/ui-icons_e7e6e4_256x240.png
239
- - lib/public/css/jquery-ui/images/ui-icons_eeeeee_256x240.png
240
- - lib/public/css/jquery-ui/images/ui-icons_ffffff_256x240.png
241
240
  - lib/public/css/jquery-ui/ui.accordion.css
242
241
  - lib/public/css/jquery-ui/ui.all.css
243
242
  - lib/public/css/jquery-ui/ui.base.css
@@ -254,11 +253,12 @@ files:
254
253
  - lib/public/css/print.css
255
254
  - lib/public/css/reset.css
256
255
  - lib/public/css/slide_formats.css
257
- - lib/public/css/spinner_bar.gif
258
256
  - lib/public/css/themes/archetect.css
259
257
  - lib/public/css/themes/default.css
260
258
  - lib/public/css/themes/hack.css
259
+ - lib/public/css/themes/hayfield.css
261
260
  - lib/public/css/themes/merlot.css
261
+ - lib/public/css/themes/minimal.css
262
262
  - lib/public/css/themes/slate.css
263
263
  - lib/public/favicon.ico
264
264
  - lib/public/js/coffee-script.js
@@ -289,6 +289,7 @@ files:
289
289
  - lib/views/inline_css.erb
290
290
  - lib/views/inline_js.erb
291
291
  - lib/views/navigation.erb
292
+ - lib/views/not_found.erb
292
293
  - lib/views/pdf.erb
293
294
  - lib/views/print.erb
294
295
  - lib/views/slide.erb
@@ -302,12 +303,12 @@ require_paths:
302
303
  - lib
303
304
  required_ruby_version: !ruby/object:Gem::Requirement
304
305
  requirements:
305
- - - ! '>='
306
+ - - '>='
306
307
  - !ruby/object:Gem::Version
307
308
  version: '0'
308
309
  required_rubygems_version: !ruby/object:Gem::Requirement
309
310
  requirements:
310
- - - ! '>='
311
+ - - '>='
311
312
  - !ruby/object:Gem::Version
312
313
  version: '0'
313
314
  requirements: []
@@ -1,67 +0,0 @@
1
- module Parade
2
- module Parsers
3
-
4
- #
5
- # Load the JSON format of a presentation, convert it to the DSL format,
6
- # and then send it to the DSL parser. This parser is to provide backwards
7
- # compatabiliy to the previously defined JSON format of a Parade presentation.
8
- #
9
- # @example parade.json format
10
- #
11
- # {
12
- # "name": "Something",
13
- # "description": "Example Presentation",
14
- # "templates" : { "default" : "custom.tpl" },
15
- # "sections": [
16
- # {"section":"one"},
17
- # {"section":"two"},
18
- # {"section":"three"}
19
- # ]
20
- # }
21
- #
22
- class JsonFileParser
23
-
24
- def self.parse(filepath,options = {})
25
- parade_json = JSON.parse File.read(filepath)
26
-
27
- dsl_content = convert_to_parade_dsl parade_json
28
- Dsl.parse dsl_content, options
29
- end
30
-
31
- private
32
-
33
- def self.convert_to_parade_dsl(content)
34
-
35
- dsl_content = ""
36
-
37
- dsl_content << "title '#{content['name']}'\n" if content['name']
38
- dsl_content << "description %{#{content['description']}}\n" if content['description']
39
- dsl_content << "pause_message %{#{content['pause_msg']}}" if content['pause_msg']
40
-
41
- templates = content['templates'] || {}
42
-
43
- templates.each do |template_name,template_file|
44
- dsl_content << "template '#{template_name}', '#{template_file}'\n"
45
- end
46
-
47
- Array(content['sections']).each do |section|
48
-
49
- if section.is_a?(Hash)
50
- filename_or_folder = section['section']
51
- else
52
- filename_or_folder = section
53
- end
54
-
55
- Array(filename_or_folder).each do |file_or_folder|
56
- dsl_content << "slides '#{file_or_folder}'\n"
57
- end
58
- end
59
-
60
- dsl_content
61
-
62
- end
63
-
64
- end
65
-
66
- end
67
- end