slideshow 0.9.10 → 0.9.11

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -12,8 +12,8 @@ Hoe.spec 'slideshow' do
12
12
  self.email = 'webslideshow@googlegroups.com'
13
13
 
14
14
  self.extra_deps = [
15
- ['RedCloth','>= 4.0.0'],
16
- ['kramdown','>= 0.9.0']
15
+ ['RedCloth','>= 4.2.9'],
16
+ ['kramdown','>= 0.13.5']
17
17
  ]
18
18
 
19
19
  self.remote_rdoc_dir = 'doc'
data/lib/slideshow.rb CHANGED
@@ -55,7 +55,7 @@ require 'slideshow/filters/slide_filter'
55
55
 
56
56
  module Slideshow
57
57
 
58
- VERSION = '0.9.10'
58
+ VERSION = '0.9.11'
59
59
 
60
60
  # version string for generator meta tag (includes ruby version)
61
61
  def Slideshow.generator
@@ -9,17 +9,43 @@ def gradient_from_headers( *args )
9
9
  # to define gradient (see http://slideshow.rubyforge.org/themes.html for predefined themes)
10
10
 
11
11
  theme = headers[ :gradient_theme ]
12
- colors = headers[ :gradient_colors ].split( ' ' ) # colors as space separated all-in-one string
12
+ colors = headers[ :gradient_colors ].split(' ') # colors as space separated all-in-one string
13
13
 
14
- # fix: first version - ignore theme for now
15
- # todo: add support for theme
16
-
17
- buf = "linear-gradient( #{colors.join(',') } )"
18
-
14
+ buf = ""
15
+
16
+ if theme == 'diagonal'
17
+ buf << "linear-gradient( top left, #{colors.join(', ')} )"
18
+ elsif theme == 'top-bottom'
19
+ buf << "linear-gradient( top, #{colors.join(', ')} )"
20
+ elsif theme == 'left-right'
21
+ buf << "linear-gradient( left, #{colors.join(', ')} )"
22
+ elsif theme == 'repeat'
23
+ buf << "repeating-linear-gradient( -60deg, "
24
+ # quick and dirty hack - for now repeat colors 10 times
25
+ 9.times { buf << "#{colors.join(', ')}, " }
26
+ buf << "#{colors.join(', ')} )"
27
+ elsif theme == 'radial'
28
+ buf << "radial-gradient( #{colors.join(', ')} )"
29
+ elsif theme == 'radial-off-center'
30
+ buf << "radial-gradient( 70% 70%, ellipse, #{colors.join(', ')} )"
31
+ elsif theme == 'radial-repeat'
32
+ buf << "repeating-radial-gradient( 60% 60%, ellipse, "
33
+ # quick and dirty hack - for now repeat colors 10 times
34
+ 9.times { buf << "#{colors.join(', ')}, " }
35
+ buf << "#{colors.join(', ')} )"
36
+ else
37
+ buf << "linear-gradient( #{colors.join(', ')} )"
38
+ puts "warning: unknown gradient themes #{theme} - falling back to default"
39
+ end
19
40
 
20
41
  # todo: add value for headers to puts
21
42
  puts " Adding CSS for gradient background style rule using headers..."
22
43
  content_for( :css, <<-EOS )
44
+ /****
45
+ * generated by gradient_from_headers helper
46
+ * gradient-theme: #{theme}
47
+ * gradient-colors: #{colors.join(' ')}
48
+ */
23
49
  .slide { background-image: -webkit-#{buf};
24
50
  background-image: -mozilla-#{buf};
25
51
  background-image: -ms-#{buf};
@@ -8,7 +8,7 @@ module Slideshow
8
8
 
9
9
  def sh_worker( code, opts )
10
10
 
11
- lang = opts.fetch( :lang, SH_LANG )
11
+ lang = opts.fetch( :lang, headers.get( 'code-language', SH_LANG ))
12
12
  line_numbers_value = opts.fetch( :line_numbers, headers.get( 'code-line-numbers', SH_LINE_NUMBERS ))
13
13
  line_numbers = (line_numbers_value =~ /true|yes|on/i) ? true : false
14
14
 
@@ -101,7 +101,7 @@ class Opts
101
101
  :footer => '',
102
102
  :subfooter => '',
103
103
  :gradient_theme => 'diagonal',
104
- :gradient_colors => 'red black',
104
+ :gradient_colors => 'red orange',
105
105
 
106
106
  :code_engine => 'sh', # SyntaxHighligher (sh) | ultraviolet (uv) | coderay (cr)
107
107
  :code_txmt => 'false', # Text Mate Hyperlink for Source?
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: 47
4
+ hash: 45
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 9
9
- - 10
10
- version: 0.9.10
9
+ - 11
10
+ version: 0.9.11
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: 2012-02-19 00:00:00 +01:00
18
+ date: 2012-02-21 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -26,12 +26,12 @@ dependencies:
26
26
  requirements:
27
27
  - - ">="
28
28
  - !ruby/object:Gem::Version
29
- hash: 63
29
+ hash: 37
30
30
  segments:
31
31
  - 4
32
- - 0
33
- - 0
34
- version: 4.0.0
32
+ - 2
33
+ - 9
34
+ version: 4.2.9
35
35
  type: :runtime
36
36
  version_requirements: *id001
37
37
  - !ruby/object:Gem::Dependency
@@ -42,12 +42,12 @@ dependencies:
42
42
  requirements:
43
43
  - - ">="
44
44
  - !ruby/object:Gem::Version
45
- hash: 59
45
+ hash: 33
46
46
  segments:
47
47
  - 0
48
- - 9
49
- - 0
50
- version: 0.9.0
48
+ - 13
49
+ - 5
50
+ version: 0.13.5
51
51
  type: :runtime
52
52
  version_requirements: *id002
53
53
  - !ruby/object:Gem::Dependency