theme_images.rb 529 B

123456789101112131415161718
  1. module SenchaTouch
  2. module SassExtensions
  3. module Functions
  4. module ThemeImages
  5. def theme_image(theme, path, mime_type = nil)
  6. path = path.value
  7. images_path = File.join(File.dirname(__FILE__), "..", "images", theme.value)
  8. real_path = File.join(images_path, path)
  9. inline_image_string(data(real_path), compute_mime_type(path, mime_type))
  10. end
  11. end
  12. end
  13. end
  14. end
  15. module Sass::Script::Functions
  16. include SenchaTouch::SassExtensions::Functions::ThemeImages
  17. end