GithubHelp home page GithubHelp logo

isabella232 / rails-bootstrap-navbar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bootstrap-ruby/rails-bootstrap-navbar

0.0 0.0 0.0 80 KB

Easily generate a Bootstrap navbar in your Rails app

Home Page: http://bootstrap-ruby.github.io/rails-bootstrap-navbar

License: MIT License

Ruby 100.00%

rails-bootstrap-navbar's Introduction

Rails Bootstrap Navbar

Gem Version Build Status Code Climate

Easily generate a Bootstrap navbar in your Rails app

Installation

Add this line to your application's Gemfile:

gem 'rails_bootstrap_navbar'

And then execute:

$ bundle

Or install it yourself as:

$ gem install rails_bootstrap_navbar

Requirements

The necessary files from Bootstrap >= 2.0 have to be included separately, they are not part of this gem.

At least the CSS files for the navbar are required, and the JS files for dropdowns and responsive features, if you want to use those in the navbar.

Usage

Set Bootstrap version

This gem needs to know which Bootstrap version you are using, because the navbar HTML looks different in different Bootstrap versions.

If you're using either the bootstrap-sass or bootstrap gem, you're all set because the Boostrap version will be sniffed automatically from those gems' versions. Make sure to include the bootstrap-sass or bootstrap gem before rails_bootstrap_navbar in your Gemfile though.

If you include the Bootstrap CSS and JS some other way, you need to set the Bootstrap version explicitly in an initializer:

# config/initializers/rails-bootstrap-navbar.rb

BootstrapNavbar.configure do |config|
  config.bootstrap_version = '4.0.0'
end

Output HTML

The gem bootstrap-navbar is used to generate the HTML. Please refer to the gem's README and the following Wiki entries for detailed instructions on how to generate the navbar:

Usage with Bootstrap 2

Usage with Bootstrap 3

Usage with Bootstrap 4

Acknowledgements

Thanks to Jules Copeland for the initial version of this gem!

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Support

If you like this project, consider buying me a coffee! :)

rails-bootstrap-navbar's People

Contributors

4ware avatar julescopeland avatar manuelmeurer avatar neilang avatar ruianderson 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.