Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Helpers to generate a Twitter Bootstrap navbar
Ruby

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec
.travis.yml
Gemfile
Guardfile
LICENSE.txt
README.md
Rakefile
bootstrap_navbar.gemspec

README.md

BootstrapNavbar

Gem Version Build Status Dependency Status Code Climate

Helpers to generate a Twitter Bootstrap style navbar

Installation

Add this line to your application's Gemfile:

gem 'bootstrap_navbar'

And then execute:

$ bundle

Or install it yourself as:

$ gem install bootstrap_navbar

Usage

Set current_url_method

BootstrapNavbar has to be able to query for the current URL, e.g. to determine if a menu item is active or not. Since the way the current URL is determined varies depending on whether you use Rails, Sinatra etc., this has to be set beforehand in some kind of initializer:

# For Rails
BootstrapNavbar.current_url_method = -> { '' }

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
Something went wrong with that request. Please try again.