87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
# File 'lib/slideshow/helpers/background_helper.rb', line 87
def background( *args )
opts = args.last.kind_of?(Hash) ? args.pop : {}
code = args.last.kind_of?(String) ? args.pop : ''
clazz = opts[:class] || ( 's9'+code.strip.gsub( /[(), ]/, '_' ).gsub( /_{2,}/, '_').gsub( /[^-\w]/, '' ) )
unless code.empty?
puts " Adding CSS for background style rule..."
content_for( :css, " .\#{clazz} { background: \#{code}; }\n EOS\n end\n \n # 2) add processing instruction to get style class added to slide \n\n puts \" Adding HTML PI for background style class '\#{clazz}'...\" \n \"<!-- _S9STYLE_ \#{clazz} -->\\n\"\nend\n" )
|