twitter-bootstrap-components-rails 0.4.0 → 0.5.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 46098131ab29c47f00ea1b0f98044c2aa91efcce
4
- data.tar.gz: 4e25a9121cf6c9da81a5f1589a611a301a7ad6cb
3
+ metadata.gz: 3ea038186dc06575a5769eb0b10e056677163dad
4
+ data.tar.gz: ae01212d3ca2988ff4c38981d7cc32f71f19cca3
5
5
  SHA512:
6
- metadata.gz: 3b92d0d1b719d83c8a13f8d038b72fde663dafe3b1dea3e33ff454daa240a662bddd1e64fe22c9840041235c00fa1de54f70bd87656ad8d8384f2dfd16e74e82
7
- data.tar.gz: e0b1bed7ab3eb05c6fde91378a8e9e01816afba737a407e3c1e4cb52919e42760a325a20a64b0d274db6bf5c32343733ef702fb68c011738367e1c293cf72405
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
@@ -0,0 +1,2 @@
1
+ %ul{ class: ul_classes.join(" ") }
2
+ = block_output
@@ -0,0 +1,2 @@
1
+ %li{ class: li_classes.join(" ") }
2
+ = block_output
@@ -2,7 +2,7 @@ module Twitter
2
2
  module Bootstrap
3
3
  module Components
4
4
  module Rails
5
- VERSION = '0.4.0'
5
+ VERSION = '0.5.0'
6
6
  end
7
7
  end
8
8
  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.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-02 00:00:00.000000000 Z
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.5.1
222
+ rubygems_version: 2.6.8
219
223
  signing_key:
220
224
  specification_version: 4
221
225
  summary: Twitter Bootstrap Components for Rails.