dungbanguyen / adminlte-rails

The AdminLTE Rails gem integrates AdminLTE theme with the Rails asset pipeline
https://github.com/shine60vn/adminlte-rails
MIT License
129 stars 73 forks source link

How to use this if I am already using bootstrap-sass separately? #17

Closed vicovictor closed 8 years ago

vicovictor commented 8 years ago

Using Rails 4. I have been using https://github.com/twbs/bootstrap-sass, and now want to integrate Admin LTE for a different dashboard, but would not want to modify my existing code for Bootstrap. I notice that this gem includes Bootstrap in itself by default.

How can I integrate this Admin LTE cleanly into my existing app?

dungbanguyen commented 8 years ago

@victorngkp You could use tag v2.3.2 for Admin LTE latest version and do not require bootstrap in your manifest files, just require what you need: adminlte, plugins...

vicovictor commented 8 years ago

Just to confirm, my existing setup:

gem 'bootstrap-sass', '~> 3.3.6'
gem 'sass-rails', '>= 3.2'

@import "bootstrap-sprockets";
@import "bootstrap";
# the rest of other custom imports

//= require jquery
//= require bootstrap-sprockets

So with the branch v2.3.2 of adminlte-rails, I don't have to remove my current setup, but require things that I need from adminlte-rails only?

vicovictor commented 8 years ago

Also, it looks like your v2.3.2 is same as Master. Actually I tried your Master branch, but it is not working as expected. The layout and everything is off. I will send you a screenshot few hours later (am working now).

dungbanguyen commented 8 years ago

v2.3.3 is same as master branch but I have not released new version of this gem yet. Updating README is still in progress. You could try this

gem 'adminlte-rails', git: 'https://github.com/shine60vn/adminlte-rails'
//= require bootstrap
//= require adminlte/adminlte
@import "bootstrap-sprockets";
@import "bootstrap.min.css";
@import "adminlte/adminlte.css";
@import "adminlte/skins/_all-skins.css";
@import "adminlte/plugins/iCheck/flat/blue.css";
vicovictor commented 8 years ago

Works like charm. I also installed Font Awesome from here - https://github.com/bokmann/font-awesome-rails

My full code:

# Gemfile
gem "adminlte-rails", git: "https://github.com/shine60vn/adminlte-rails"
gem "bootstrap-sass", "~> 3.3.6"
gem "font-awesome-rails"
# application.scss
@import "bootstrap-sprockets";
@import "bootstrap";
@import "ie10-viewport-bug-workaround";
@import "font-awesome";
@import "adminlte/adminlte.css";
@import "adminlte/skins/_all-skins.css";
@import "adminlte/plugins/iCheck/flat/blue.css";
# application.js
//= require jquery
//= require bootstrap-sprockets
//= require adminlte/adminlte
//= require jquery_ujs
//= require turbolinks
//= require_tree .
dungbanguyen commented 8 years ago

cool! :+1: