slideshow 0.9.1 → 0.9.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.
Files changed (37) hide show
  1. data/History.rdoc +9 -0
  2. data/Manifest.txt +11 -9
  3. data/config/slideshow.builtin.yml +11 -3
  4. data/config/slideshow.yml +6 -0
  5. data/lib/slideshow.rb +11 -3
  6. data/lib/slideshow/config.rb +19 -4
  7. data/lib/slideshow/filters/debug_filter.rb +44 -0
  8. data/lib/slideshow/filters/headers_filter.rb +4 -3
  9. data/lib/slideshow/filters/text_filter.rb +218 -43
  10. data/lib/slideshow/gen.rb +35 -25
  11. data/lib/slideshow/helpers/analytics_helper.rb +7 -4
  12. data/lib/slideshow/helpers/background_helper.rb +91 -0
  13. data/lib/slideshow/helpers/capture_helper.rb +4 -2
  14. data/lib/slideshow/helpers/directive_helper.rb +42 -0
  15. data/lib/slideshow/helpers/markdown_helper.rb +18 -0
  16. data/lib/slideshow/helpers/source_helper.rb +39 -0
  17. data/lib/slideshow/helpers/step_helper.rb +6 -4
  18. data/lib/slideshow/helpers/{coderay_helper.rb → syntax/coderay_helper.rb} +9 -3
  19. data/lib/slideshow/helpers/syntax/sh_helper.rb +48 -0
  20. data/lib/slideshow/helpers/{uv_helper.rb → syntax/uv_helper.rb} +9 -4
  21. data/lib/slideshow/helpers/table_helper.rb +8 -6
  22. data/lib/slideshow/helpers/text_helper.rb +7 -5
  23. data/lib/slideshow/markdown.rb +4 -2
  24. data/lib/slideshow/opts.rb +1 -1
  25. data/lib/slideshow/textile.rb +5 -4
  26. data/templates/s6.txt +15 -5
  27. data/templates/s6.txt.gen +6 -5
  28. data/templates/s6/slides.css +0 -3
  29. data/templates/{s6/header.html.erb → slides.html.erb} +33 -23
  30. data/templates/{s6/header.pdf.html.erb → slides.pdf.html.erb} +10 -1
  31. data/templates/style.css.erb +35 -0
  32. metadata +15 -13
  33. data/templates/gradient.svg.erb +0 -59
  34. data/templates/s6.txt.sample +0 -16
  35. data/templates/s6/footer.html.erb +0 -4
  36. data/templates/s6/footer.pdf.html.erb +0 -3
  37. data/templates/s6/style.css.erb +0 -33
@@ -1,4 +1,5 @@
1
- module TableHelper
1
+ module Slideshow
2
+ module TableHelper
2
3
 
3
4
  # todo: add center, plus generic col helper
4
5
 
@@ -20,9 +21,9 @@ def left( opts={}, &blk )
20
21
  after << "<!-- end left -->\n"
21
22
 
22
23
  html = ""
23
- html << guard_text( before )
24
+ html << guard_block( before )
24
25
  html << text
25
- html << guard_text( after )
26
+ html << guard_block( after )
26
27
 
27
28
  concat_erb( html, blk.binding )
28
29
  return
@@ -45,9 +46,9 @@ def right( opts={}, &blk )
45
46
  after << "<!-- end right -->\n"
46
47
 
47
48
  html = ""
48
- html << guard_text( before )
49
+ html << guard_block( before )
49
50
  html << text
50
- html << guard_text( after )
51
+ html << guard_block( after )
51
52
 
52
53
  concat_erb( html, blk.binding )
53
54
  return
@@ -55,7 +56,8 @@ end
55
56
 
56
57
 
57
58
  end # module TableHelper
59
+ end # module Slideshow
58
60
 
59
61
  class Slideshow::Gen
60
- include TableHelper
62
+ include Slideshow::TableHelper
61
63
  end
@@ -1,6 +1,7 @@
1
- module TextHelper
1
+ module Slideshow
2
+ module TextHelper
2
3
 
3
- def __include__( name, opts = {} )
4
+ def s9_include( name, opts = {} )
4
5
  puts " Including '#{name}'..."
5
6
  content = File.read( name )
6
7
  end
@@ -24,7 +25,7 @@ EOS
24
25
  <!-- end help -->
25
26
  EOS
26
27
 
27
- guard_text( html )
28
+ guard_block( html )
28
29
  end
29
30
 
30
31
 
@@ -141,10 +142,11 @@ def format_code( code, opts )
141
142
  out << code_highlighted
142
143
  out << %{<!-- end code -->\n}
143
144
 
144
- wrap_markup( out ) # saveguard with notextile wrapper etc./no further processing needed
145
+ guard_block( out ) # saveguard with notextile wrapper etc./no further processing needed
145
146
  end
146
147
 
147
148
 
148
149
  end # module TextHelper
150
+ end # module Slideshow
149
151
 
150
- Slideshow::Gen.__send__( :include, TextHelper )
152
+ Slideshow::Gen.__send__( :include, Slideshow::TextHelper )
@@ -1,4 +1,5 @@
1
- module MarkdownEngines
1
+ module Slideshow
2
+ module MarkdownEngines
2
3
 
3
4
  def rdiscount_to_html( content )
4
5
  RDiscount.new( content ).to_html
@@ -21,7 +22,8 @@ module MarkdownEngines
21
22
  end
22
23
 
23
24
  end # module MarkdownEngines
25
+ end # module Slideshow
24
26
 
25
27
  class Slideshow::Gen
26
- include MarkdownEngines
28
+ include Slideshow::MarkdownEngines
27
29
  end
@@ -101,7 +101,7 @@ class Opts
101
101
  :gradient_color1 => 'red',
102
102
  :gradient_color2 => 'black',
103
103
 
104
- :code_engine => 'uv', # ultraviolet (uv) | coderay (cr)
104
+ :code_engine => 'sh', # SyntaxHighligher (sh) | ultraviolet (uv) | coderay (cr)
105
105
  :code_txmt => 'false', # Text Mate Hyperlink for Source?
106
106
  }
107
107
 
@@ -1,4 +1,5 @@
1
- module TextileEngines
1
+ module Slideshow
2
+ module TextileEngines
2
3
 
3
4
  def redcloth_java_fix_escape_nonascii( txt )
4
5
  txt.chars.map{ |x| x.size > 1 ? "&##{x.unpack("U*")};" : x }.join
@@ -42,9 +43,9 @@ module TextileEngines
42
43
  content = red.to_html
43
44
  end
44
45
 
45
- end # module TextileEngines
46
-
46
+ end # module TextileEngines
47
+ end # module Slideshow
47
48
 
48
49
  class Slideshow::Gen
49
- include TextileEngines
50
+ include Slideshow::TextileEngines
50
51
  end
data/templates/s6.txt CHANGED
@@ -1,11 +1,21 @@
1
- # builtin S6 template package manifest
1
+ # S6 blank template package manifest
2
+ # Change as desired/needed
3
+ #
4
+ # Questions? Comments?
5
+ # Send them along to the Free Web Slide Show Alternatives (S5, S6, S9 And Friends) Forum/Mailing List.
6
+ # http://groups.google.com/group/webslideshow
7
+
8
+ __file__.html slides.html.erb
9
+ __file__.css style.css.erb
10
+
11
+ # styles
2
12
 
3
- __file__.svg gradient.svg.erb
4
- __file__.html s6/header.html.erb + s6/footer.html.erb
5
- __file__.css s6/style.css.erb
6
13
  s6/outline.css
7
14
  s6/print.css
8
15
  s6/slides.css
16
+
17
+ # javascript machinery
18
+
9
19
  s6/jquery.js
10
20
  s6/slides.js
11
21
  s6/slides.core.js
@@ -14,4 +24,4 @@ s6/slides.core.js
14
24
  # -- use html-to-pdf tool (such as wkhtmltopdf, prince, etc) to generate pdf
15
25
  # -- from javascript free web page
16
26
 
17
- __file__.pdf.html s6/header.pdf.html.erb + s6/footer.pdf.html.erb
27
+ __file__.pdf.html slides.pdf.html.erb
data/templates/s6.txt.gen CHANGED
@@ -1,10 +1,11 @@
1
1
  # S6 manifest to generate sample template package from builtin templates
2
2
 
3
- s6.txt s6.txt.sample
4
- gradient.svg.erb
5
- header.html.erb s6/header.html.erb
6
- footer.html.erb s6/footer.html.erb
7
- style.css.erb s6/style.css.erb
3
+ s6.txt
4
+
5
+ slides.html.erb
6
+ slides.pdf.html.erb
7
+ style.css.erb
8
+
8
9
  s6/outline.css
9
10
  s6/print.css
10
11
  s6/slides.css
@@ -46,9 +46,6 @@
46
46
 
47
47
  /* .step { visibility: hidden; } */
48
48
 
49
- /* enable svg backgrounds for gradient themes */
50
- div.background { position: fixed; left: 0px; right: 0px; top: 0px; bottom: 0px; z-index: -1; }
51
- body { opacity: .99; }
52
49
 
53
50
  html, body { margin: 0; padding: 0; }
54
51
 
@@ -1,13 +1,16 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
1
+ <!DOCTYPE html>
2
2
  <html>
3
3
  <head>
4
- <%= content_for :head %>
4
+ <meta http-equiv="content-type" content="text/html;charset=utf-8">
5
+ <title><%= @headers['title'] %></title>
5
6
 
6
- <title><%= @headers['title'] %></title>
7
+ <meta name="generator" content="<%= @headers['generator'] %>">
8
+ <meta name="author" content="<%= @headers['author']%>" >
7
9
 
8
- <!-- configuration parameters -->
10
+ <!-- S6 configuration parameters -->
9
11
  <meta name="defaultView" content="slideshow">
10
- <!-- style sheet links -->
12
+
13
+ <!-- S6 style sheet links -->
11
14
  <link rel="stylesheet" href="<%= "#{@name}.css" %>" type="text/css" media="projection" id="slideProj">
12
15
  <link rel="stylesheet" href="s6/outline.css" type="text/css" media="screen" id="outlineStyle">
13
16
  <link rel="stylesheet" href="s6/print.css" type="text/css" media="print" id="slidePrint">
@@ -16,27 +19,26 @@
16
19
  <script src="s6/jquery.js" type="text/javascript"></script>
17
20
  <script src="s6/slides.js" type="text/javascript"></script>
18
21
 
22
+
23
+ <script type="text/javascript">
19
24
  <%= content_for :js %>
25
+ </script>
26
+
27
+ <%= content_for :head %>
20
28
 
21
29
  </head>
22
30
  <body>
23
31
 
24
- <div class="layout">
25
-
26
- <div class="background">
27
- <object data="<%= "#{@name}.svg" %>" width="100%" height="100%">
28
- </object>
29
- </div>
30
-
31
- <div id="controls"><!-- DO NOT EDIT --></div>
32
- <div id="currentSlide"><!-- DO NOT EDIT --></div>
33
- <div id="header"></div>
34
- <div id="footer">
35
- <h1><%= @headers['footer'] %></h1>
36
- <h2><%= @headers['subfooter'] %></h2>
37
- </div>
38
-
39
- <div id='microsoft'>
32
+ <div class="layout">
33
+ <div id="controls"><!-- DO NOT EDIT --></div>
34
+ <div id="currentSlide"><!-- DO NOT EDIT --></div>
35
+ <div id="header"></div>
36
+ <div id="footer">
37
+ <h1><%= @headers['footer'] %></h1>
38
+ <h2><%= @headers['subfooter'] %></h2>
39
+ </div>
40
+
41
+ <div id='microsoft'>
40
42
  <p>
41
43
  Microsoft's Internet Explorer browser
42
44
  has no built-in vector graphics machinery
@@ -52,7 +54,15 @@
52
54
  at the <a href='http://slideshow.rubyforge.org'>Slide Show (S9)</a>
53
55
  project site. Thanks!)
54
56
  </p>
55
- </div>
56
- </div>
57
+ </div>
58
+ </div><!-- layout -->
57
59
 
58
60
  <div class="presentation">
61
+
62
+ <%= @content %>
63
+
64
+ </div><!-- presentation -->
65
+ </body>
66
+ </html>
67
+
68
+
@@ -16,9 +16,10 @@ a:link, a:visited { color: black; }
16
16
  h1 { font-size: 30pt; }
17
17
  h2 { font-size: 28pt; }
18
18
  h3 { font-size: 25pt; }
19
- p, li, td, th { font-size: 18pt; }
19
+ p, li, dt, dd, td, th { font-size: 18pt; }
20
20
 
21
21
  pre { font-size: 14pt; }
22
+ pre.small { font-size: 11pt; }
22
23
 
23
24
  pre.code {
24
25
  background-color: azure;
@@ -26,6 +27,8 @@ pre.code {
26
27
  }
27
28
 
28
29
  ul { list-style-type: square; }
30
+
31
+ .center { text-align: center; }
29
32
 
30
33
  .slide { page-break-after: always;
31
34
  min-height: 100mm;
@@ -51,3 +54,9 @@ for princexml (CSS3 paged media support)
51
54
 
52
55
  <div class="presentation">
53
56
 
57
+ <%= @content %>
58
+
59
+ </div> <!-- presentation -->
60
+ </body>
61
+ </html>
62
+
@@ -0,0 +1,35 @@
1
+ @import url(s6/slides.css); /* required to make the slide show run at all */
2
+
3
+ html, body { font-family: Verdana, Geneva, Arial, Helvetica, sans-serif; }
4
+
5
+ a:link, a:visited { color: black; }
6
+
7
+ h1 { font-size: 30pt; }
8
+ h2 { font-size: 28pt; }
9
+ h3 { font-size: 25pt; }
10
+ p, li, dt, dd, td, th { font-size: 18pt; }
11
+
12
+ pre { font-size: 16pt; }
13
+ pre.small { font-size: 12pt; }
14
+
15
+ pre.code {
16
+ background-color: azure;
17
+ padding: 5px;
18
+ }
19
+
20
+ div.code {
21
+ background-color: azure;
22
+ padding: 5px;
23
+ }
24
+
25
+ ul { list-style-type: square; }
26
+
27
+ .center { text-align: center; }
28
+
29
+ /*** style rules for steps ****/
30
+
31
+ .stepcurrent { color: black; }
32
+ .step { color: silver; }
33
+ /* or hide next steps e.g. .step { visibility: hidden; } */
34
+
35
+ <%= content_for :css %>
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: slideshow
3
3
  version: !ruby/object:Gem::Version
4
- hash: 57
4
+ hash: 63
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 1
10
- version: 0.9.1
9
+ - 2
10
+ version: 0.9.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Gerald Bauer
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-07-05 00:00:00 +02:00
18
+ date: 2010-07-11 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -105,35 +105,37 @@ files:
105
105
  - config/slideshow.yml
106
106
  - lib/slideshow.rb
107
107
  - lib/slideshow/config.rb
108
+ - lib/slideshow/filters/debug_filter.rb
108
109
  - lib/slideshow/filters/headers_filter.rb
109
110
  - lib/slideshow/filters/text_filter.rb
110
111
  - lib/slideshow/gen.rb
111
112
  - lib/slideshow/helpers/analytics_helper.rb
113
+ - lib/slideshow/helpers/background_helper.rb
112
114
  - lib/slideshow/helpers/capture_helper.rb
113
- - lib/slideshow/helpers/coderay_helper.rb
115
+ - lib/slideshow/helpers/directive_helper.rb
116
+ - lib/slideshow/helpers/markdown_helper.rb
117
+ - lib/slideshow/helpers/source_helper.rb
114
118
  - lib/slideshow/helpers/step_helper.rb
119
+ - lib/slideshow/helpers/syntax/coderay_helper.rb
120
+ - lib/slideshow/helpers/syntax/sh_helper.rb
121
+ - lib/slideshow/helpers/syntax/uv_helper.rb
115
122
  - lib/slideshow/helpers/table_helper.rb
116
123
  - lib/slideshow/helpers/text_helper.rb
117
- - lib/slideshow/helpers/uv_helper.rb
118
124
  - lib/slideshow/markdown.rb
119
125
  - lib/slideshow/opts.rb
120
126
  - lib/slideshow/slide.rb
121
127
  - lib/slideshow/textile.rb
122
- - templates/gradient.svg.erb
123
128
  - templates/s6.txt
124
129
  - templates/s6.txt.gen
125
- - templates/s6.txt.sample
126
- - templates/s6/footer.html.erb
127
- - templates/s6/footer.pdf.html.erb
128
- - templates/s6/header.html.erb
129
- - templates/s6/header.pdf.html.erb
130
130
  - templates/s6/jquery.js
131
131
  - templates/s6/outline.css
132
132
  - templates/s6/print.css
133
133
  - templates/s6/slides.core.js
134
134
  - templates/s6/slides.css
135
135
  - templates/s6/slides.js
136
- - templates/s6/style.css.erb
136
+ - templates/slides.html.erb
137
+ - templates/slides.pdf.html.erb
138
+ - templates/style.css.erb
137
139
  has_rdoc: true
138
140
  homepage: http://slideshow.rubyforge.org
139
141
  licenses: []
@@ -1,59 +0,0 @@
1
- <svg xmlns="http://www.w3.org/2000/svg">
2
-
3
- <defs>
4
- <linearGradient id="dark" x1="0" y1="0" x2="1" y2="1">
5
- <stop offset="0" style="stop-color: <%= @headers['gradient-color1'] %>"/>
6
- <stop offset="1" style="stop-color: <%= @headers['gradient-color2'] %>"/>
7
- </linearGradient>
8
-
9
- <linearGradient id="dark_reverse" x1="0" y1="0" x2="1" y2="1">
10
- <stop offset="0" style="stop-color: <%= @headers['gradient-color2'] %>"/>
11
- <stop offset="1" style="stop-color: <%= @headers['gradient-color1'] %>"/>
12
- </linearGradient>
13
-
14
- <linearGradient id="light" x1="0" y1="0" x2="1" y2="1">
15
- <stop offset="0" style="stop-color: <%= @headers['gradient-color1'] %>"/>
16
- <stop offset="1" style="stop-color: <%= @headers['gradient-color2'] %>"/>
17
- </linearGradient>
18
-
19
- <linearGradient id="top_bottom" x1="0" y1="0" x2="0" y2="1">
20
- <stop offset="0%" style="stop-color: <%= @headers['gradient-color1'] %>" />
21
- <stop offset="100%" style="stop-color: <%= @headers['gradient-color2'] %>" />
22
- </linearGradient>
23
-
24
- <linearGradient id="left_right" x1="0" y1="0" x2="1" y2="0">
25
- <stop offset="0%" style="stop-color: <%= @headers['gradient-color1'] %>" />
26
- <stop offset="100%" style="stop-color: <%= @headers['gradient-color2'] %>" />
27
- </linearGradient>
28
-
29
- <linearGradient id="repeat" x1="0.4" y1="0.4" x2="0.5" y2="0.5"
30
- spreadMethod="repeat">
31
- <stop offset="0%" style="stop-color: <%= @headers['gradient-color1'] %>" />
32
- <stop offset="50%" style="stop-color: <%= @headers['gradient-color2'] %>" />
33
- <stop offset="100%" style="stop-color: <%= @headers['gradient-color1'] %>" />
34
- </linearGradient>
35
-
36
- <radialGradient id="radial">
37
- <stop offset="0%" style="stop-color: <%= @headers['gradient-color2'] %>" />
38
- <stop offset="100%" style="stop-color: <%= @headers['gradient-color1'] %>" />
39
- </radialGradient>
40
-
41
-
42
- <radialGradient id="radial_off_center" fx="0.7" fy="0.7" cx="0.5" cy="0.5" r="0.4">
43
- <stop offset="0%" style="stop-color: <%= @headers['gradient-color2'] %>" />
44
- <stop offset="100%" style="stop-color: <%= @headers['gradient-color1'] %>" />
45
- </radialGradient>
46
-
47
- <radialGradient id="radial_repeat" fx="0.5" fy="0.5" cx="0.6" cy="0.6" r="0.2"
48
- spreadMethod="repeat">
49
- <stop offset="0%" style="stop-color: <%= @headers['gradient-color1'] %>" />
50
- <stop offset="50%" style="stop-color: <%= @headers['gradient-color2'] %>" />
51
- <stop offset="100%" style="stop-color: <%= @headers['gradient-color1'] %>" />
52
- </radialGradient>
53
-
54
- </defs>
55
-
56
- <rect width="100%" height="100%"
57
- style="fill: url(#<%= @headers['gradient-theme'] %>) "/>
58
-
59
- </svg>