README.md in navigator-2.2.0 vs README.md in navigator-2.3.0
- old
+ new
@@ -2,42 +2,42 @@
[](http://badge.fury.io/rb/navigator)
[](https://codeclimate.com/github/bkuhlmann/navigator)
[](https://codeclimate.com/github/bkuhlmann/navigator)
[](https://gemnasium.com/bkuhlmann/navigator)
-[](https://travis-ci.org/bkuhlmann/navigator)
+[](https://circleci.com/gh/bkuhlmann/navigator)
[](https://www.patreon.com/bkuhlmann)
Enhances Rails with a DSL for menu navigation.
<!-- Tocer[start]: Auto-generated, don't remove. -->
-# Table of Contents
+## Table of Contents
-- [Features](#features)
-- [Requirements](#requirements)
-- [Setup](#setup)
-- [Usage](#usage)
- - [Unordered List (simple)](#unordered-list-simple)
- - [Unordered List (with attributes)](#unordered-list-with-attributes)
- - [Unordered List (with multiple data attributes)](#unordered-list-with-multiple-data-attributes)
- - [Nav (with links)](#nav-with-links)
- - [Foundation Menu](#foundation-menu)
- - [Bootstrap Dropdown](#bootstrap-dropdown)
- - [Menu Helpers](#menu-helpers)
-- [Customization](#customization)
-- [Tests](#tests)
-- [Versioning](#versioning)
-- [Code of Conduct](#code-of-conduct)
-- [Contributions](#contributions)
-- [License](#license)
-- [History](#history)
-- [Credits](#credits)
+ - [Features](#features)
+ - [Requirements](#requirements)
+ - [Setup](#setup)
+ - [Usage](#usage)
+ - [Unordered List (simple)](#unordered-list-simple)
+ - [Unordered List (with attributes)](#unordered-list-with-attributes)
+ - [Unordered List (with multiple data attributes)](#unordered-list-with-multiple-data-attributes)
+ - [Nav (with links)](#nav-with-links)
+ - [Foundation Menu](#foundation-menu)
+ - [Bootstrap Dropdown](#bootstrap-dropdown)
+ - [Menu Helpers](#menu-helpers)
+ - [Customization](#customization)
+ - [Tests](#tests)
+ - [Versioning](#versioning)
+ - [Code of Conduct](#code-of-conduct)
+ - [Contributions](#contributions)
+ - [License](#license)
+ - [History](#history)
+ - [Credits](#credits)
<!-- Tocer[finish]: Auto-generated, don't remove. -->
-# Features
+## Features
- Provides a DSL for building navigation menus.
- Supports auto-detection/highlighting of active menu items based on current path (customizable for
non-path usage too).
- Supports sub-menus, nested tags, HTML attributes, etc.
@@ -66,16 +66,16 @@
- input
- button
- Provides `link`, `image`, and `item` convenience methods for succinct ways to build commonly used
menu elements.
-# Requirements
+## Requirements
0. [Ruby 2.4.x](https://www.ruby-lang.org).
0. [Ruby on Rails 5.x.x](http://rubyonrails.org).
-# Setup
+## Setup
For a secure install, type the following from the command line (recommended):
gem cert --add <(curl --location --silent https://www.alchemists.io/gem-public.pem)
gem install navigator --trust-policy MediumSecurity
@@ -90,15 +90,15 @@
Add the following to your Gemfile:
gem "navigator"
-# Usage
+## Usage
The following are examples using the navigation view helper:
-## Unordered List (simple)
+### Unordered List (simple)
Code:
navigation do
item "Dashboard", "/dashboard"
@@ -110,11 +110,11 @@
<ul>
<li><a href="/dashboard">Dashboard</a></li>
<li><a href="/posts">Posts</a></li>
</ul>
-## Unordered List (with attributes)
+### Unordered List (with attributes)
Code:
navigation "ul", attributes: {class: "nav"} do
item "Dashboard", "/dashboard", item_attributes: {class: "active"}
@@ -126,11 +126,11 @@
<ul class="nav">
<li class="active"><a href="/dashboard">Dashboard</a></li>
<li><a href="/posts">Posts</a></li>
</ul>
-## Unordered List (with multiple data attributes)
+### Unordered List (with multiple data attributes)
Code:
navigation do
item "Home", "/home", item_attributes: {data: {id: 1, type: "public"}}
@@ -143,11 +143,11 @@
</ul>
*TIP: Nested data-- attributes can be applied to any menu item in the same manner as Rails view
helpers.*
-## Nav (with links)
+### Nav (with links)
Code:
navigation "nav" do
a "Dashboard", attributes: {href: "/dashboard"}
@@ -159,11 +159,11 @@
<nav>
<a href="/dashboard">Dashboard</a>
<a href="/posts">Posts</a>
</nav>
-## Foundation Menu
+### Foundation Menu
Code:
navigation "nav", attributes: {class: "top-bar", "data-topbar" => nil} do
ul attributes: {class: "title-area"} do
@@ -213,11 +213,11 @@
<li><a class="button tiny round" href="/login">Login</a></li>
</ul>
</section>
</nav>
-## Bootstrap Dropdown
+### Bootstrap Dropdown
Code:
navigation "nav" do
item "Dashboard", admin_dashboard_path
@@ -246,11 +246,11 @@
<li><a href="/admin/users">Users</a></li>
</ul>
</li>
</ul>
-## Menu Helpers
+### Menu Helpers
There are several convenience methods, in addition to the standard HTML tags, that can make for
shorter lines of code. The following describes each:
When building links, the default is:
@@ -292,11 +292,11 @@
end
These are just a few, simple, examples of what can be achieved. See the specs for additional usage
and customization.
-# Customization
+## Customization
The `navigation` view helper can accept an optional `Navigator::TagActivator` instance. Example:
# Code
activator = Navigator::TagActivator.new search_value: request.env["PATH_INFO"]
@@ -380,47 +380,47 @@
Assuming either the `Addresses` or `Emails` menu item was clicked, the `Profile` menu item would be
active due to the regular expression (i.e. `/^profile.+/`) matching one of the the `profile/*`
paths.
-# Tests
+## Tests
To test, run:
bundle exec rake
To test the dummy application, run:
cd spec/dummy
bin/rails server
-# Versioning
+## Versioning
Read [Semantic Versioning](http://semver.org) for details. Briefly, it means:
-- Patch (x.y.Z) - Incremented for small, backwards compatible, bug fixes.
-- Minor (x.Y.z) - Incremented for new, backwards compatible, public API enhancements/fixes.
- Major (X.y.z) - Incremented for any backwards incompatible public API changes.
+- Minor (x.Y.z) - Incremented for new, backwards compatible, public API enhancements/fixes.
+- Patch (x.y.Z) - Incremented for small, backwards compatible, bug fixes.
-# Code of Conduct
+## Code of Conduct
Please note that this project is released with a [CODE OF CONDUCT](CODE_OF_CONDUCT.md). By
participating in this project you agree to abide by its terms.
-# Contributions
+## Contributions
Read [CONTRIBUTING](CONTRIBUTING.md) for details.
-# License
+## License
Copyright (c) 2012 [Alchemists](https://www.alchemists.io).
Read [LICENSE](LICENSE.md) for details.
-# History
+## History
Read [CHANGES](CHANGES.md) for details.
Built with [Gemsmith](https://github.com/bkuhlmann/gemsmith).
-# Credits
+## Credits
Developed by [Brooke Kuhlmann](https://www.alchemists.io) at
[Alchemists](https://www.alchemists.io).