Sha256: 991d0af90ae81dd11ccd290cdd1dd5bc950bc749c46356bfbf2ff19758cbc3bd

Contents?: true

Size: 589 Bytes

Versions: 17

Compression:

Stored size: 589 Bytes

Contents

module Ramaze::Helper
  module XHTML
    def css(name, media = 'screen', options = {})
      if options.empty?
        "<link rel='stylesheet' href='/css/#{name}.css' type='text/css' media='#{media}' />"
      elsif options[:only] == 'IE'
        "<!--[if IE]>#{css(name, media)}<![endif]-->"
      end
    end

    def css_for(*names)
      names.flatten.map{|name| css(name) }.join("\n")
    end

    def js(name)
      "<script src='/js/#{name}.js' type='text/javascript'></script>"
    end

    def js_for(*names)
      names.flatten.map{|name| js(name) }.join("\n")
    end
  end
end

Version data entries

17 entries across 17 versions & 4 rubygems

Version Path
Pistos-ramaze-2008.09 lib/ramaze/helper/xhtml.rb
Pistos-ramaze-2008.12 lib/ramaze/helper/xhtml.rb
Pistos-ramaze-2009.01 lib/ramaze/helper/xhtml.rb
Pistos-ramaze-2009.02 lib/ramaze/helper/xhtml.rb
manveru-ramaze-2008.07 lib/ramaze/helper/xhtml.rb
manveru-ramaze-2008.08 lib/ramaze/helper/xhtml.rb
manveru-ramaze-2008.09 lib/ramaze/helper/xhtml.rb
manveru-ramaze-2008.10 lib/ramaze/helper/xhtml.rb
manveru-ramaze-2008.12 lib/ramaze/helper/xhtml.rb
manveru-ramaze-2009.01 lib/ramaze/helper/xhtml.rb
ptomato-ramaze-2009.02.1 lib/ramaze/helper/xhtml.rb
ptomato-ramaze-2009.02 lib/ramaze/helper/xhtml.rb
ramaze-2009.01 lib/ramaze/helper/xhtml.rb
ramaze-2008.11 lib/ramaze/helper/xhtml.rb
ramaze-2008.06 lib/ramaze/helper/xhtml.rb
ramaze-2009.02 lib/ramaze/helper/xhtml.rb
ramaze-2009.03 lib/ramaze/helper/xhtml.rb