twitter-bootstrap-components-rails 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/components/twitter/bootstrap/components/v4/nav.rb +31 -0
- data/app/components/twitter/bootstrap/components/v4/nav_item.rb +31 -0
- data/app/helpers/twitter/bootstrap/components/rails/v4/components_helper.rb +10 -6
- data/app/views/twitter/bootstrap/components/v4/_nav.html.haml +2 -0
- data/app/views/twitter/bootstrap/components/v4/_nav_item.html.haml +2 -0
- data/lib/twitter/bootstrap/components/rails/version.rb +1 -1
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3ea038186dc06575a5769eb0b10e056677163dad
|
4
|
+
data.tar.gz: ae01212d3ca2988ff4c38981d7cc32f71f19cca3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3e701fb2cf63223a6cf20b8de91db395e46cd78b3f9f2a42d96d441b04c8939d68d93e4790014144c583aee2bdab2efbaba119e55f863b09e49a6c92a752b93e
|
7
|
+
data.tar.gz: 336d8163236713147434989b228abb87577ef9c37d0287d8e2ffbab5c6f55341f6928b4c2c5ad8f487782658618fdac5bab2edb7019bb7e273102b24f817ae0b
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Twitter
|
2
|
+
module Bootstrap
|
3
|
+
module Components
|
4
|
+
module V4
|
5
|
+
class Nav < Base
|
6
|
+
|
7
|
+
private
|
8
|
+
|
9
|
+
def view_locals
|
10
|
+
{
|
11
|
+
block_output: @block_output,
|
12
|
+
ul_classes: ul_classes
|
13
|
+
}
|
14
|
+
end
|
15
|
+
|
16
|
+
def ul_classes
|
17
|
+
default_ul_classes + additional_ul_classes
|
18
|
+
end
|
19
|
+
|
20
|
+
def default_ul_classes
|
21
|
+
%w(nav)
|
22
|
+
end
|
23
|
+
|
24
|
+
def additional_ul_classes
|
25
|
+
@options[:additional_ul_classes] || []
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Twitter
|
2
|
+
module Bootstrap
|
3
|
+
module Components
|
4
|
+
module V4
|
5
|
+
class NavItem < Base
|
6
|
+
|
7
|
+
private
|
8
|
+
|
9
|
+
def view_locals
|
10
|
+
{
|
11
|
+
block_output: @block_output,
|
12
|
+
li_classes: li_classes
|
13
|
+
}
|
14
|
+
end
|
15
|
+
|
16
|
+
def li_classes
|
17
|
+
default_li_classes + additional_li_classes
|
18
|
+
end
|
19
|
+
|
20
|
+
def default_li_classes
|
21
|
+
%w(nav-item)
|
22
|
+
end
|
23
|
+
|
24
|
+
def additional_li_classes
|
25
|
+
@options[:additional_li_classes] || []
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -71,8 +71,12 @@ module Twitter
|
|
71
71
|
Twitter::Bootstrap::Components::V4::Modal.new(options).perform
|
72
72
|
end
|
73
73
|
|
74
|
-
def bootstrap_nav(options)
|
75
|
-
Twitter::Bootstrap::Components::V4::Nav.new(options).perform
|
74
|
+
def bootstrap_nav(options = {}, &block)
|
75
|
+
Twitter::Bootstrap::Components::V4::Nav.new(self, options, &block).perform
|
76
|
+
end
|
77
|
+
|
78
|
+
def bootstrap_nav_item(options = {}, &block)
|
79
|
+
Twitter::Bootstrap::Components::V4::NavItem.new(self, options, &block).perform
|
76
80
|
end
|
77
81
|
|
78
82
|
def bootstrap_navbar(options)
|
@@ -104,15 +108,15 @@ module Twitter
|
|
104
108
|
end
|
105
109
|
|
106
110
|
# subhelpers
|
107
|
-
|
111
|
+
|
108
112
|
def card_block(options = {}, &block)
|
109
113
|
Twitter::Bootstrap::Components::V4::Card::Block.new(self, options, &block).perform
|
110
114
|
end
|
111
|
-
|
115
|
+
|
112
116
|
def card_header(options = {}, &block)
|
113
117
|
Twitter::Bootstrap::Components::V4::Card::Header.new(self, options, &block).perform
|
114
118
|
end
|
115
|
-
|
119
|
+
|
116
120
|
def card_blockquote(options = {}, &block)
|
117
121
|
Twitter::Bootstrap::Components::V4::Card::Blockquote.new(self, options, &block).perform
|
118
122
|
end
|
@@ -125,4 +129,4 @@ module Twitter
|
|
125
129
|
end
|
126
130
|
end
|
127
131
|
end
|
128
|
-
end
|
132
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: twitter-bootstrap-components-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Vasquez Angel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -158,6 +158,8 @@ files:
|
|
158
158
|
- app/components/twitter/bootstrap/components/v4/card/footer.rb
|
159
159
|
- app/components/twitter/bootstrap/components/v4/card/header.rb
|
160
160
|
- app/components/twitter/bootstrap/components/v4/flash.rb
|
161
|
+
- app/components/twitter/bootstrap/components/v4/nav.rb
|
162
|
+
- app/components/twitter/bootstrap/components/v4/nav_item.rb
|
161
163
|
- app/components/twitter/bootstrap/components/v4/navbar_brand.rb
|
162
164
|
- app/controllers/twitter/bootstrap/components/rails/application_controller.rb
|
163
165
|
- app/form_builders/twitter/bootstrap/components/rails/v4/default_form_builder.rb
|
@@ -183,6 +185,8 @@ files:
|
|
183
185
|
- app/views/twitter/bootstrap/components/v4/_card_kitchen_sink.html.haml
|
184
186
|
- app/views/twitter/bootstrap/components/v4/_card_list_group.html.haml
|
185
187
|
- app/views/twitter/bootstrap/components/v4/_flash.html.haml
|
188
|
+
- app/views/twitter/bootstrap/components/v4/_nav.html.haml
|
189
|
+
- app/views/twitter/bootstrap/components/v4/_nav_item.html.haml
|
186
190
|
- app/views/twitter/bootstrap/components/v4/_navbar_brand.html.haml
|
187
191
|
- app/views/twitter/bootstrap/components/v4/card/_block.html.haml
|
188
192
|
- app/views/twitter/bootstrap/components/v4/card/_blockquote.html.haml
|
@@ -215,7 +219,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
215
219
|
version: '0'
|
216
220
|
requirements: []
|
217
221
|
rubyforge_project:
|
218
|
-
rubygems_version: 2.
|
222
|
+
rubygems_version: 2.6.8
|
219
223
|
signing_key:
|
220
224
|
specification_version: 4
|
221
225
|
summary: Twitter Bootstrap Components for Rails.
|