zen_breadcrumbs 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +63 -0
- data/lib/zen_breadcrumbs/version.rb +1 -1
- metadata +7 -22
- data/lib/tasks/zen_breadcrumbs_tasks.rake +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5c2d9920e48ea2ffb731b295ceeaa937bde1fd56
|
4
|
+
data.tar.gz: 6d778f01cb1a8b330142029f6b488f6ee5def721
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3a826589b4da48e07b689efb51bd149c489b5e2d514bdc5f6a7701ef6a8a3a8582cc15625fc36ae095769fa41a56f00f4029d70cc25892cddbd2d63ad2091928
|
7
|
+
data.tar.gz: 958ab48b2eb90d41fdcb0916a4bf18aab0c68e1c46fe7b98bd317b730865915f0fcef8066ff08b33df50587b4170321d6b83dc00b1ba233b835d8673e9a13ac1
|
data/README.md
CHANGED
@@ -1,2 +1,65 @@
|
|
1
1
|
zen_breadcrumbs
|
2
2
|
===============
|
3
|
+
|
4
|
+
```zen_breadcrumbs``` is a Ruby on Rails plugin for creating a breadcrumbs navigation. This is characterized by simplicity. You just have to write one method in one line to render a breadcrumbs navigation.
|
5
|
+
|
6
|
+
|
7
|
+
## Instration
|
8
|
+
|
9
|
+
Put this line in your Gemfile:
|
10
|
+
|
11
|
+
```
|
12
|
+
gem 'zen_breadcrumbs'
|
13
|
+
```
|
14
|
+
|
15
|
+
Then run the bundle command to install it.
|
16
|
+
|
17
|
+
|
18
|
+
## Usage
|
19
|
+
|
20
|
+
In your view, call ```breadcrumbs``` helper method to render a breadcrumbs navigation.
|
21
|
+
```breadcrumbs``` requires two parameters: the array of breadcrumbs names and the array of the target paths.
|
22
|
+
|
23
|
+
```
|
24
|
+
<%= breadcrumbs %w(Home Mypage Favorite), [root_path, mypage_path] %>
|
25
|
+
```
|
26
|
+
|
27
|
+
|
28
|
+
```breadcrumbs``` generates html sentence as below.
|
29
|
+
|
30
|
+
```html
|
31
|
+
<ol class="breadcrumbs-box">
|
32
|
+
<li class="breadcrumbs-list">
|
33
|
+
<a class="breadcrumbs-link" href="/">Home</a>
|
34
|
+
</li>
|
35
|
+
<span class="breadcrumbs-separator">></span>
|
36
|
+
<li class="breadcrumbs-list">
|
37
|
+
<a class="breadcrumbs-link" href="/">Mypage</a>
|
38
|
+
</li>
|
39
|
+
<span class="breadcrumbs-separator">></span>
|
40
|
+
<li class="breadcrumbs-list">Favorite</li>
|
41
|
+
</ol>
|
42
|
+
```
|
43
|
+
|
44
|
+
The third parameter is a hash of options to customize the breadcrumbs navigation.
|
45
|
+
|
46
|
+
Possible options are:
|
47
|
+
* ```:separator``` - default value is '>'
|
48
|
+
* ```:css_prefix``` - default value is 'breadcrumbs'
|
49
|
+
|
50
|
+
The example of using options is here.
|
51
|
+
|
52
|
+
```
|
53
|
+
<%= breadcrumbs %w(Home Mypage), [root_path], separator: '|', css_prefix: 'mobile-crumbs' %>
|
54
|
+
```
|
55
|
+
|
56
|
+
HTML:
|
57
|
+
```html
|
58
|
+
<ol class="mobile-crumbs-box">
|
59
|
+
<li class="mobile-crumbs-list">
|
60
|
+
<a class="mobile-crumbs-link" href="/">Home</a>
|
61
|
+
</li>
|
62
|
+
<span class="mobile-crumbs-separator">|</span>
|
63
|
+
<li class="mobile-crumbs-list">Mypage</li>
|
64
|
+
</ol>
|
65
|
+
```
|
metadata
CHANGED
@@ -1,44 +1,30 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: zen_breadcrumbs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Genki Sato
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 4.1.6
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: 4.1.6
|
27
|
-
- !ruby/object:Gem::Dependency
|
28
|
-
name: sqlite3
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
30
16
|
requirements:
|
31
17
|
- - ">="
|
32
18
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0'
|
34
|
-
type: :
|
19
|
+
version: '3.0'
|
20
|
+
type: :runtime
|
35
21
|
prerelease: false
|
36
22
|
version_requirements: !ruby/object:Gem::Requirement
|
37
23
|
requirements:
|
38
24
|
- - ">="
|
39
25
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0'
|
41
|
-
description:
|
26
|
+
version: '3.0'
|
27
|
+
description: This gem provides a helper method to create a breadcrumbs navigation.
|
42
28
|
email:
|
43
29
|
- satogenki1115@gmail.com
|
44
30
|
executables: []
|
@@ -48,7 +34,6 @@ files:
|
|
48
34
|
- LICENSE
|
49
35
|
- README.md
|
50
36
|
- Rakefile
|
51
|
-
- lib/tasks/zen_breadcrumbs_tasks.rake
|
52
37
|
- lib/zen_breadcrumbs.rb
|
53
38
|
- lib/zen_breadcrumbs/breadcrumbs.rb
|
54
39
|
- lib/zen_breadcrumbs/railtie.rb
|
@@ -111,7 +96,7 @@ rubyforge_project:
|
|
111
96
|
rubygems_version: 2.2.2
|
112
97
|
signing_key:
|
113
98
|
specification_version: 4
|
114
|
-
summary:
|
99
|
+
summary: Ruby on Rails plugin for creating a breadcrumb navigation
|
115
100
|
test_files:
|
116
101
|
- test/dummy/app/assets/javascripts/application.js
|
117
102
|
- test/dummy/app/assets/stylesheets/application.css
|