GithubHelp home page GithubHelp logo

redoc123 / gentelella-rails Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mwlang/gentelella-rails

0.0 1.0 0.0 2.84 MB

Injects the gentelella theme and javascript files into Rails assets pipeline

License: MIT License

Ruby 0.14% JavaScript 99.08% CoffeeScript 0.06% CSS 0.70% HTML 0.02%

gentelella-rails's Introduction

Gentelella Rails

This is mostly an experimental effort to inject the Gentelella theme into Rails assets pipeline.

My goal in building this gem was to learn:

  • how to automate bower updates
  • package up only the files needed for the gem to function in production
  • load everything up with just one or two requires in the Rails app that uses it

Beware that this gem furnishes a fairly comprehensive theme and pulls in many other libraries such as:

  • jquery and jquery_ujs
  • bootstrap-sass and font-awesome-sass
  • icheck
  • nprogress
  • moment JS
  • bootstrap date range picker
  • fastclick
  • ChartJS
  • jquery Flot
  • DateJS
  • Switchery
  • Select2
  • Parsley JS

Where possible, I utilized well-maintained Rails gems for the above. However, if the gems were out of date, I utilized the Bower supplied version.

You may also find the demo Rails 5.x project on github

Theme Demo

Gentelella Bootstrap Admin Template

Template Demo

Installation

Add the following to your Rails application's Gemfile and bundle install:

gem 'gentelella-rails'

Then perform the following:

bundle install
rails g gentelella:install

NOTE: If the generator fails to work, then make sure you stop Spring: spring stop and then try again.

Add the following to your assets/javascripts/application.js

//= require gentelella
//= require gentelella-custom

If you're working with jquery.vmap, then your application.js will look something like this:

//= require gentelella
//= require jqvmap/maps/jquery.vmap.world
//= require jqvmap/maps/jquery.vmap.usa
//= require jquery.vmap.sampledata
//= require gentelella-custom

There is no need to include bootstrap-sprockets, font-awesome, jquery, etc. as these are all included via the gem when you "require gentelella"

NOTE: gentella-custom is meant to be edited! If you find things breaking from include/import lines of this file, comment out the offending lines. gentella-custom is where you can place all project-specific scripts.

Finally, add the stylesheet directives to your assets/stylesheets/application.scss

@import "gentelella";
@import "gentelella-custom";

This will pull in all necessary stylesheets including bootstrap, font-awesome, etc., which the theme uses.

gem 'gentelella-rails'

Contributing

I don't have any personal plans to utilize this theme in my projects, so if this project is of interest, fork and send pull requests and I will publish!

The gem should be fairly easy to update to latest JS libraries as they come available. If the JS or CSS libraries are via a rubygem, then:

bundle update GEMNAME

If the libraries are supplied by bower then:

rake bower:update
rake bower:vendor

Credits

The original theme was developed by Colorlib and released under MIT license.

License

The gem is available as open source under the terms of the MIT License.

gentelella-rails's People

Contributors

mwlang avatar redoc123 avatar oivoodoo avatar ravensnowbird avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.