slideshow 0.5 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/slideshow.rb CHANGED
@@ -58,13 +58,17 @@ def Slideshow.create_slideshow( fn )
58
58
  headerdoc = load_template( 's5/header.html.erb' )
59
59
  footerdoc = load_template( 's5/footer.html.erb' )
60
60
  styledoc = load_template( 's5/style.css.erb' )
61
- else
61
+ elsif get_boolean_option( 'fuller', false ) || get_boolean_option( 'fullerscreen', false ) # use fullerscreen templates
62
62
  headerdoc = load_template( 'header.html.erb' )
63
63
  footerdoc = load_template( 'footer.html.erb' )
64
- styledoc = load_template( 'style.css.erb' )
64
+ styledoc = load_template( 'style.css.erb' )
65
+ else # use default s6 templates
66
+ headerdoc = load_template( 's6/header.html.erb' )
67
+ footerdoc = load_template( 's6/footer.html.erb' )
68
+ styledoc = load_template( 's6/style.css.erb' )
65
69
  end
66
70
 
67
- # background theming shared between s5/s9
71
+ # background theming shared between s5/s6/fullerscreen
68
72
  gradientdoc = load_template( 'gradient.svg.erb' )
69
73
 
70
74
  basename = File.basename( fn, '.*' )
@@ -236,9 +240,9 @@ def Slideshow.create_slideshow( fn )
236
240
  out.flush
237
241
  out.close
238
242
 
239
- # copy s5 machinery to s5 folder
240
243
 
241
244
  if get_boolean_option( 's5', false )
245
+ # copy s5 machinery to s5 folder
242
246
  # todo/fix: is there a better way to check if the dir exists?
243
247
  Dir.mkdir( 's5' ) unless File.directory?( 's5' )
244
248
 
@@ -250,6 +254,20 @@ def Slideshow.create_slideshow( fn )
250
254
  logger.debug "copying '#{source} ' to '#{dest}'"
251
255
  File.copy( source, dest )
252
256
  end
257
+ elsif get_boolean_option( 'fuller', false ) || get_boolean_option( 'fullerscreen', false )
258
+ # do nothing; slideshow machinery built into plugin (requires install!)
259
+ else
260
+ # copy s6 machinery to s6 folder
261
+ Dir.mkdir( 's6' ) unless File.directory?( 's6' )
262
+
263
+ [ 'outline.css', 'print.css', 'slides.css', 'slides.js', 'jquery.js' ].each do |name|
264
+
265
+ source = "#{File.dirname(__FILE__)}/templates/s6/#{name}"
266
+ dest = "s6/#{name}"
267
+
268
+ logger.debug "copying '#{source} ' to '#{dest}'"
269
+ File.copy( source, dest )
270
+ end
253
271
  end
254
272
 
255
273
  puts "Done."
@@ -334,6 +352,7 @@ def Slideshow.main
334
352
  #todo/fix: use -s5 option without optional hack? possible with OptionParser package/lib?
335
353
  # use -5 switch instead?
336
354
  opts.on( '-s[OPTIONAL]', '--s5', 'S5 Compatible Slide Show' ) { $options[ 's5' ] = true; }
355
+ opts.on( '-f[OPTIONAL]', '--fullerscreen', 'FullerScreen Compatible Slide Show' ) { $options[ 'fuller' ] = true; }
337
356
  # opts.on( "-s", "--style STYLE", "Select Stylesheet" ) { |s| $options[:style]=s }
338
357
  # opts.on( "-v", "--version", "Show version" ) {}
339
358
  opts.on( "-t", "--trace", "Show debug trace" ) {
@@ -359,7 +378,7 @@ def Slideshow.main
359
378
 
360
379
  opt.parse!
361
380
 
362
- puts "Slide Show (S9) Version: 0.5 on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"
381
+ puts "Slide Show (S9) Version: 0.5.1 on Ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"
363
382
 
364
383
  ARGV.each { |fn| Slideshow.create_slideshow( fn ) }
365
384
  end
@@ -0,0 +1,4 @@
1
+
2
+ </div> <!-- presentation -->
3
+ </body>
4
+ </html>
@@ -0,0 +1,55 @@
1
+ <html>
2
+
3
+ <head>
4
+
5
+ <title><%= @headers['title'] %></title>
6
+
7
+ <!-- configuration parameters -->
8
+ <meta name="defaultView" content="slideshow" />
9
+ <!-- style sheet links -->
10
+ <link rel="stylesheet" href="<%= @cssname %>" type="text/css" media="projection" id="slideProj" />
11
+ <link rel="stylesheet" href="s6/outline.css" type="text/css" media="screen" id="outlineStyle" />
12
+ <link rel="stylesheet" href="s6/print.css" type="text/css" media="print" id="slidePrint" />
13
+
14
+ <!-- S6 JS -->
15
+ <script src="s6/jquery.js" type="text/javascript"></script>
16
+ <script src="s6/slides.js" type="text/javascript"></script>
17
+
18
+
19
+ </head>
20
+ <body>
21
+
22
+ <div class="layout">
23
+
24
+ <div class="background">
25
+ <object data="<%= @svgname %>" width="100%" height="100%">
26
+ </div>
27
+
28
+ <div id="controls"><!-- DO NOT EDIT --></div>
29
+ <div id="currentSlide"><!-- DO NOT EDIT --></div>
30
+ <div id="header"></div>
31
+ <div id="footer">
32
+ <h1><%= @headers['footer'] %></h1>
33
+ <h2><%= @headers['subfooter'] %></h2>
34
+ </div>
35
+
36
+ <div id='microsoft'>
37
+ <p>
38
+ Microsoft's Internet Explorer browser
39
+ has no built-in vector graphics machinery
40
+ required for "loss-free" gradient background themes.
41
+ </p>
42
+ <p>
43
+ Please upgrade to a better browser
44
+ such as <a href='http://getfirefox.com'>Firefox</a>, <a href='http://www.opera.com/download'>Opera</a>,
45
+ <a href='http://apple.com/safari/download'>Safari</a> or others
46
+ with built-in vector graphics machinery and much more.
47
+
48
+ (Learn more or post questions or comments
49
+ at the <a href='http://slideshow.rubyforge.org'>Slide Show (S9)</a>
50
+ project site. Thanks!)
51
+ </p>
52
+ </div>
53
+ </div>
54
+
55
+ <div class="presentation">