README.md in simple_navigation_bootstrap-1.0.1 vs README.md in simple_navigation_bootstrap-1.1.0
- old
+ new
@@ -1,25 +1,28 @@
## SimpleNavigation Bootstrap
[![GitHub license](https://img.shields.io/github/license/jbox-web/simple_navigation_bootstrap.svg)](https://github.com/jbox-web/simple_navigation_bootstrap/blob/master/LICENSE)
[![GitHub release](https://img.shields.io/github/release/jbox-web/simple_navigation_bootstrap.svg)](https://github.com/jbox-web/simple_navigation_bootstrap/releases/latest)
+[![Gem](https://img.shields.io/gem/v/simple_navigation_bootstrap.svg)](https://rubygems.org/gems/simple_navigation_bootstrap/versions/1.0.1)
+[![Gem](https://img.shields.io/gem/dtv/simple_navigation_bootstrap.svg)](https://rubygems.org/gems/simple_navigation_bootstrap/versions/1.0.1)
[![Build Status](https://travis-ci.org/jbox-web/simple_navigation_bootstrap.svg?branch=master)](https://travis-ci.org/jbox-web/simple_navigation_bootstrap)
[![Code Climate](https://codeclimate.com/github/jbox-web/simple_navigation_bootstrap/badges/gpa.svg)](https://codeclimate.com/github/jbox-web/simple_navigation_bootstrap)
[![Test Coverage](https://codeclimate.com/github/jbox-web/simple_navigation_bootstrap/badges/coverage.svg)](https://codeclimate.com/github/jbox-web/simple_navigation_bootstrap/coverage)
-[![Dependency Status](https://gemnasium.com/badges/github.com/jbox-web/simple_navigation_bootstrap.svg)](https://gemnasium.com/github.com/jbox-web/simple_navigation_bootstrap)
-This gem adds Bootstrap renderers for Simple Navigation. For now, it is include renderers for:
+This gem adds Bootstrap renderers for [Simple Navigation](https://github.com/codeplant/simple-navigation). For now, it is include renderers for:
* [Bootstrap 2 navigation](http://getbootstrap.com/2.3.2/components.html#navbar)
* [Bootstrap 3 navigation](http://getbootstrap.com/components/#navbar)
With these renderers you will be able create **any Bootstrap navigation elements**, such as: **submenu**, **navbar-text**, **divider**, **header**.
As well as add **icons** to menu elements, such as: Glyphicons, Font Awesome icons, even custom icons. Also you have **split** option for main menu containing submenu.
-*This gem is fork of [ShPakvel/simple\_navigation\_renderers](https://github.com/ShPakvel/simple_navigation_renderers).*
+*This gem is a fork of [ShPakvel/simple\_navigation\_renderers](https://github.com/ShPakvel/simple_navigation_renderers).*
*After a year of waiting for [PR merge](https://github.com/ShPakvel/simple_navigation_renderers/pull/14) without any news from the author, I decided to fork it.*
+**This gem is compatible with SimpleNavigation 4.x.**
+
## Installation
Add this line to your application's Gemfile:
```ruby
@@ -73,11 +76,11 @@
In addition to standard options you can use ones specific for Bootstrap renderers.
Lets look at the example:
```ruby
SimpleNavigation::Configuration.run do |navigation|
- navigation.renderer = SimpleNavigationRenderers::Bootstrap3
+ navigation.renderer = SimpleNavigationBootstrap::Bootstrap3
navigation.items do |primary|
primary.item :news, { icon: 'fa fa-fw fa-bullhorn', text: 'News' }, news_index_path
primary.item :concerts, 'Concerts', concerts_path
primary.item :video, 'Video', videos_path
@@ -101,16 +104,16 @@
## Features
Specific options used in the example:
- Option | Description
----------------|--------------
-`:split` | Use it to split first level item link with caret. If you add `split: true` option to item, then caret itself will toggle first level submenu and link will have standard behaviour, instead of toggle submenu. You can use `:split` only with first level items, for the rest it will not do anything.
-`:navbar_text` | Use it as `navbar_text: true` to add Bootstrap `navbar-text`.
-`:divider` | Use it to add Bootstrap menu divider. if you add `divider: true` option to first level item, then it will create li-tag with `divider-vertical` Bootstrap 2 class. (You can add `divider-vertical` class to Bootstrap 3 - see below). For the second level item and deeper it will create `li` tag with class `divider` (which exists in both, Bootstrap 2 and 3).
-`:header` | Use it as `header: true` to add Bootstrap menu header. You can use `:header` only with submenus, for the first level items it will not do anything.
-`:name hash` | Use it in place of `:name` if you want. Hash can have three keys: `:text`, `:icon` and `:title`, which is only recognized. You can use it together or separatly, but at least one of `:text` and `:icon` parameters should be provided.
+| Option | Description
+|---------------|--------------
+|`:split` | Use it to split first level item link with caret. If you add `split: true` option to item, then caret itself will toggle first level submenu and link will have standard behaviour, instead of toggle submenu. You can use `:split` only with first level items, for the rest it will not do anything.
+|`:navbar_text` | Use it as `navbar_text: true` to add Bootstrap `navbar-text`.
+|`:divider` | Use it to add Bootstrap menu divider. if you add `divider: true` option to first level item, then it will create li-tag with `divider-vertical` Bootstrap 2 class. (You can add `divider-vertical` class to Bootstrap 3 - see below). For the second level item and deeper it will create `li` tag with class `divider` (which exists in both, Bootstrap 2 and 3).
+|`:header` | Use it as `header: true` to add Bootstrap menu header. You can use `:header` only with submenus, for the first level items it will not do anything.
+|`:name hash` | Use it in place of `:name` if you want. Hash can have three keys: `:text`, `:icon` and `:title`, which is only recognized. You can use it together or separately, but at least one of `:text` and `:icon` parameters should be provided.
Example for `:name hash`:
* `{ text: 'News', icon: 'fa fa-fw fa-bullhorn' }` will create Font Awesome icon and add text after it (name of the item)
* `{ icon: 'glyphicon glyphicon-book', title: 'Info' }` will create Bootstrap icon with title without any text after it