leather 0.2.2 → 0.2.3
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.
@@ -1,9 +1,5 @@
|
|
1
1
|
- id = Time.now.to_f
|
2
|
-
|
3
|
-
- css_class = 'active'
|
4
|
-
- else
|
5
|
-
- css_class = ''
|
6
|
-
%li{:class => 'dropdown ' + css_class}
|
2
|
+
%li{ class: "#{active_class(href, options)} dropdown" }
|
7
3
|
%a.dropdown-toggle{:id => id, :href=>href, :data => {:target => '#', :toggle => 'dropdown'}}
|
8
4
|
= text
|
9
5
|
%b.caret
|
@@ -1,2 +1,2 @@
|
|
1
|
-
%li{ class:
|
1
|
+
%li{ class: active_class(href, options) }
|
2
2
|
=link_to text, href, options
|
@@ -1,6 +1,6 @@
|
|
1
1
|
module Leather
|
2
2
|
module LeatherHelpers
|
3
|
-
def modal_toggle(text, id, html_options = {})
|
3
|
+
def modal_toggle(text, id = 'modal', html_options = {})
|
4
4
|
link_to text, "##{id}", data: { toggle: "modal" }, class: html_options[:class]
|
5
5
|
end
|
6
6
|
|
@@ -20,14 +20,6 @@ module Leather
|
|
20
20
|
render partial: 'leather/modal_footer', locals: { close_text: close_text }
|
21
21
|
end
|
22
22
|
|
23
|
-
def nav_item(text, href, options = {})
|
24
|
-
render partial: 'leather/nav_item', locals: { text: text, href: href, options: options }
|
25
|
-
end
|
26
|
-
|
27
|
-
def nav_list(html_options = {}, &block)
|
28
|
-
render partial: 'leather/nav_list', locals: { block: capture(&block), html_options: html_options }
|
29
|
-
end
|
30
|
-
|
31
23
|
def navbar(title, brand_link, html_options = {}, &block)
|
32
24
|
html_options = { class: "navbar-default" }.merge(html_options)
|
33
25
|
render partial: 'leather/navbar', locals: { title: title, brand_link: brand_link, block: capture(&block), html_options: html_options }
|
@@ -43,8 +35,16 @@ module Leather
|
|
43
35
|
navbar(html_options, &block)
|
44
36
|
end
|
45
37
|
|
46
|
-
def
|
47
|
-
render partial: 'leather/
|
38
|
+
def nav_list(html_options = {}, &block)
|
39
|
+
render partial: 'leather/nav_list', locals: { block: capture(&block), html_options: html_options }
|
40
|
+
end
|
41
|
+
|
42
|
+
def nav_item(text, href, options = {})
|
43
|
+
render partial: 'leather/nav_item', locals: { text: text, href: href, options: options }
|
44
|
+
end
|
45
|
+
|
46
|
+
def dropdown_nav_item(text, href, options = {}, &block)
|
47
|
+
render partial: 'leather/dropdown_nav_item', locals: { block: capture(&block), text: text, href: href, options: options }
|
48
48
|
end
|
49
49
|
end
|
50
50
|
end
|
data/lib/leather/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: leather
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-07-
|
12
|
+
date: 2014-07-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -149,6 +149,7 @@ files:
|
|
149
149
|
- app/assets/stylesheets/bootstrap_variables.css.scss
|
150
150
|
- app/assets/stylesheets/devise.css.scss
|
151
151
|
- app/config/initializers/high_voltage.rb
|
152
|
+
- app/helpers/navigation_helper.rb
|
152
153
|
- app/views/devise/passwords/edit.html.erb
|
153
154
|
- app/views/devise/passwords/new.html.erb
|
154
155
|
- app/views/devise/registrations/new.html.erb
|
@@ -188,7 +189,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
188
189
|
version: '0'
|
189
190
|
segments:
|
190
191
|
- 0
|
191
|
-
hash:
|
192
|
+
hash: -3058274935175038772
|
192
193
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
193
194
|
none: false
|
194
195
|
requirements:
|
@@ -197,7 +198,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
197
198
|
version: '0'
|
198
199
|
segments:
|
199
200
|
- 0
|
200
|
-
hash:
|
201
|
+
hash: -3058274935175038772
|
201
202
|
requirements: []
|
202
203
|
rubyforge_project:
|
203
204
|
rubygems_version: 1.8.24
|