2010-09-28 22:08:11 +00:00
|
|
|
module Locomotive
|
|
|
|
module Liquid
|
|
|
|
module Drops
|
|
|
|
module ThemeAssets
|
|
|
|
|
|
|
|
class Base < ::Liquid::Drop
|
|
|
|
|
|
|
|
def before_method(meth)
|
|
|
|
content_type = self.class.name.demodulize.underscore.singularize
|
|
|
|
|
|
|
|
asset = ThemeAsset.new(:site => @context.registers[:site], :content_type => content_type)
|
2010-10-07 00:45:41 +00:00
|
|
|
'/' + ThemeAssetUploader.new(asset).store_path(meth.gsub('__', '.'))
|
2010-09-28 22:08:11 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
class Images < Base; end
|
|
|
|
|
|
|
|
class Javascripts < Base; end
|
|
|
|
|
|
|
|
class Stylesheets < Base; end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|