assets - Multiple themes in rails 4.x? -


what best way have multiple themes in rails project. have cms , website. , vendor looks this

vendor  |-- images/  |    |-- <images>  |-- javascripts/  |    |-- <javascripts>  |-- stylesheets/  |    |-- <css>  |   

i want this:

vendor  |-- cms --images/  |         |-- <images>  |       --javascripts/  |         |-- <javascripts>  |       -- stylesheets/  |         |-- <css>  |  |-- web --images/  |         |-- <images>  |       --javascripts/  |         |-- <javascripts>  |       --stylesheets/  |         |-- <css> 

if this.. how "require" them in application.css?

make 2 application.css.
example application.cms.css , application.web.css, same application.css

require cms css files in application.cms.css. require web css files in application.web.css.

and add precompile path,

# config/application.rb or initializers/assets.rb <- depend on rails version rails.application.config.assets.precompile += ['application.cms.css', 'application.web.css'] 

and include application.cms.css or application.web.css in layout html file depend on condition.


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

css - Make div keyboard-scrollable in jQuery Mobile? -

ruby on rails - Seeing duplicate requests handled with Unicorn -