Integrate a theme into rails

0

Nice to meet you. I do not know if this topic qualifies but I have a question. I'm new to rails. I bought a theme that I liked in Themeforest and I want to put it in my app rails. It has all .JS and .CSS (It does not come in scss). I would like to know how to integrate it. I have tried with Vendor / assets / I call them in the application.scss with the @import each of the css @import "style"; with the JS // = require jquery.easing for example. It does not work for me, the styles are running, will the bootstrap version it brings be different? ..

Any other safer way to do it?

    
asked by Miguel Abdon Hollstein 10.05.2017 в 16:20
source

1 answer

0

The only problem that exists when implementing a template in rails, is the path of the images or of some external file (e.j. images, PDFs, etc.). With the other files (html, css, js) there is no problem, you just have to put them in the assets, each one has a folder created respectively, you do not need to import them since in the application.js or application.css you import the tree that includes all the files in that folder, therefore you should only copy your files there.

You may have problems with the order in which the files are loaded, so I recommend that the names, so that they are in the same order that are included in the template, this for the JS and CSS files.

Then it's up to you to change the regular HTML tags like IMG and use the native tag of rails (<% = image_tag 'name.extent'% >), because this optimizes the use of the framework, and has certain advantages .

    
answered by 10.05.2017 / 17:56
source