I'm new to Ruby on Rails and wanted to install a free template called AdminLTE. It allows you to easily create App (front-end).
I wanted to integrate it into Rails but I didn't know how and I couldn't find a solution anywhere.
If anyone can help me that would be awesome.
this is the template's website: https://almsaeedstudio.com/AdminLTE
Don't need to copy 'skin-blue.css' into
Paste the following to app/assets/stylesheets/application.css
Got this implemented just last night. Here's how I did it.
Paste this into your
Gemfile :
Paste the following to
app/assets/javascripts/application.js
Paste the following to
app/assets/stylesheets/application.css
Create a new file
app/assets/stylesheets/custom.css.scss
and paste in the following:From the source code of AdminLTE that is downloaded separately which you may get from the link you mentioned in your question, browse to
and copy the file
skin-blue.css
and paste it intovendor/assets/stylesheets/
in your rails projectThen open the
starter.html
in the source code of AdminLTE and paste the content within the<body> ......... </body>
and paste it within the<body> ................ </body>
inapp/views/layouts/application.html.erb
. Modify the body tag to to<body class="skin-blue sidebar-mini">
Install the included gems by running
bundle install
and then restart rails server by runningrails s
and you should see the the beautiful template that is AdminLTENOTE 1: Maybe there exist other, more efficient ways of doing it. I am not aware though and if anyone knows, I'd be more than glad to learn how it's done. Until then, this works perfectly for me and I hope it saves you some precious time.
NOTE 2: You may of course change the skin to your liking accordingly by changing the stylesheet file you include in the
vendor/assets/stylesheets
and making the necessary modifications to yourapp/assets/stylesheets/application.css
file. Don't forget to change the class of the<body > .......</body>
in yourapp/views/layouts/application.html.erb
file