117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
|
# File 'lib/slideshow/helpers/background_helper.rb', line 117
def color( *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 color style rule..."
content_for( :css, " .\#{clazz} { color: \#{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 color style class '\#{clazz}'...\" \n \"<!-- _S9STYLE_ \#{clazz} -->\\n\"\nend\n" )
|