# Bootstrap + FontAwesome for Rails v3.1 & v4 Asset Pipeline [![Bower version](https://badge.fury.io/bo/bootstrap.svg)](http://badge.fury.io/bo/bootstrap) [![Gem Version](https://badge.fury.io/rb/railsstrap.svg)](http://badge.fury.io/rb/railsstrap) [![Build Status](https://travis-ci.org/toadkicker/railsstrap.svg?branch=v3.2.0.1)](https://travis-ci.org/toadkicker/railsstrap) [![Coverage Status](https://img.shields.io/coveralls/toadkicker/railsstrap.svg)](https://coveralls.io/r/toadkicker/railsstrap?branch=develop) railsstrap integrates Bootstrap and FontAwesome for Rails Asset Pipeline (Rails 4, 3.1, 3.2 are supported). It was born and extended from twitter-bootstrap-rails. ## Why is your gem different? Railsstrap is more than just another gem providing bootstrap and fontawesome for Rails apps. It includes Bootstrap additions that include exotic placements, animations, and other component enhancements not included in the official bootstrap release. It also includes many HTML helpers and additional javascript components. All of this is exposed to UI developers to customize to their liking using either LESS and Coffeescript, or plain CSS and Javascript. ##Bootstrap additions ###Custom Components (in development) * Asides - A modal that slides in from the left or right. Used often in mobile apps for off-screen sidebars or overlays. * Callouts - Similar to an alert, it is used for drawing attention to content. - New in 3.3.0! * Date & Time picker - A styled HTML5 datepicker. - New in 3.3.1! * Modal enhancements - animations and real centering placement. * Popover enhancements - animations and custom placements for popover arrows and locations. * Tooltip - animations and custom placements for tooltip arrows and locations. ###Animations Railsstrap comes with over 75 CSS animations. See the wiki or the [vendor/assets/stylesheets/animate](https://github.com/toadkicker/railsstrap/tree/develop/vendor/assets/stylesheets/animate) folder for more info. Also the wiki has detailed instructions on using them. ## Example Application An example application is available at [toadkicker/teststrap](https://github.com/toadkicker/teststrap). You can view it running on heroku [here.](http://teststrap.herokuapp.com/) Contributions welcome. ## Quick install Open your Gemfile, and add the gem to your list of dependencies. ```gem railsstrap``` Then run the installer ``` bundle install bundle exec rails g railsstrap:install ``` This will insert the appropriate entries into your application.js and application.css files. It will also provide you with the ability to customize Bootstrap and FontAwesome to your liking. ####Hotfix note for v3.2.0.2 and lower: You will need to precompile your assets for FontAwesome support. To do this add this line: This is verbose: ``` Rails.application.config.assets.precompile += %w( fontawesome/fonts/fontawesome-webfont.eot fontawesome/fonts/fontawesome-webfont.woff fontawesome/fonts/fontawesome-webfont.ttf fontawesome/fonts/fontawesome-webfont.svg ) ``` This is all you really need: ``` Rails.application.config.assets.precompile += %w(.svg .eot .woff .ttf) ``` For Rails 3 applications, add it to ```config/environments/production.rb```. For Rails 4, add it to ```config/initializers/assets.rb```. Most of the info you'll need is in the wiki, and if it isn't please contribute! ##Building the gem The gem is organized by ruby specific tasks, and front-end specific tasks. `bundle exec rake` will attempt to run the suite of build commands, but you need a few dependencies that are outside of bundler/rubygems's domain. For compiling stylesheets and javascripts, the gem uses Gruntjs. You'll need node/npm installed to compile them manually. *You do not need to use grunt if you are just referencing specific less/js/coffee files in your rails app* ## Many thanks to the twitter-bootstrap-rails contributors, who made this fork possible: ## About Me [toadkicker.com](http://toadkicker.com) ## Thanks Bootstrap, FontAwesome, and all railsstrap contributors http://twbs.github.io/bootstrap ## License Copyright (c) 2014 Todd Baur Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.