twitter-bootstrap-components-rails 0.3.0 → 0.4.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/v3/navbar_brand.rb +31 -0
- data/app/helpers/twitter/bootstrap/components/rails/v3/components_helper.rb +4 -0
- data/app/views/twitter/bootstrap/components/v3/_navbar_brand.html.haml +2 -0
- data/lib/twitter/bootstrap/components/rails/version.rb +1 -1
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46098131ab29c47f00ea1b0f98044c2aa91efcce
|
4
|
+
data.tar.gz: 4e25a9121cf6c9da81a5f1589a611a301a7ad6cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b92d0d1b719d83c8a13f8d038b72fde663dafe3b1dea3e33ff454daa240a662bddd1e64fe22c9840041235c00fa1de54f70bd87656ad8d8384f2dfd16e74e82
|
7
|
+
data.tar.gz: e0b1bed7ab3eb05c6fde91378a8e9e01816afba737a407e3c1e4cb52919e42760a325a20a64b0d274db6bf5c32343733ef702fb68c011738367e1c293cf72405
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Twitter
|
2
|
+
module Bootstrap
|
3
|
+
module Components
|
4
|
+
module V3
|
5
|
+
class NavbarBrand < Base
|
6
|
+
private
|
7
|
+
|
8
|
+
def view_locals
|
9
|
+
{
|
10
|
+
block_output: @block_output,
|
11
|
+
link_options: link_options,
|
12
|
+
default_brand_name: default_brand_name
|
13
|
+
}
|
14
|
+
end
|
15
|
+
|
16
|
+
def link_options
|
17
|
+
(@options[:link_options] || {}).reverse_merge!(href: default_link_target)
|
18
|
+
end
|
19
|
+
|
20
|
+
def default_brand_name
|
21
|
+
::Rails.application.class.name.deconstantize.titleize
|
22
|
+
end
|
23
|
+
|
24
|
+
def default_link_target
|
25
|
+
@view.main_app.root_path
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -40,6 +40,10 @@ module Twitter
|
|
40
40
|
def bootstrap_form_for(object, *args, &block)
|
41
41
|
simple_form_for(object, *args, &block)
|
42
42
|
end
|
43
|
+
|
44
|
+
def bootstrap_navbar_brand(options = {}, &block)
|
45
|
+
Twitter::Bootstrap::Components::V3::NavbarBrand.new(self, options, &block).perform
|
46
|
+
end
|
43
47
|
end
|
44
48
|
end
|
45
49
|
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.4.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:
|
11
|
+
date: 2018-01-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -143,6 +143,7 @@ files:
|
|
143
143
|
- app/components/twitter/bootstrap/components/v3/button.rb
|
144
144
|
- app/components/twitter/bootstrap/components/v3/button_group.rb
|
145
145
|
- app/components/twitter/bootstrap/components/v3/media_object.rb
|
146
|
+
- app/components/twitter/bootstrap/components/v3/navbar_brand.rb
|
146
147
|
- app/components/twitter/bootstrap/components/v3/responsive_embed.rb
|
147
148
|
- app/components/twitter/bootstrap/components/v3/responsive_media_object.rb
|
148
149
|
- app/components/twitter/bootstrap/components/v3/thumbnail.rb
|
@@ -170,6 +171,7 @@ files:
|
|
170
171
|
- app/views/twitter/bootstrap/components/v3/_button.haml
|
171
172
|
- app/views/twitter/bootstrap/components/v3/_button_group.html.haml
|
172
173
|
- app/views/twitter/bootstrap/components/v3/_media_object.html.haml
|
174
|
+
- app/views/twitter/bootstrap/components/v3/_navbar_brand.html.haml
|
173
175
|
- app/views/twitter/bootstrap/components/v3/_responsive_embed.html.haml
|
174
176
|
- app/views/twitter/bootstrap/components/v3/_responsive_media_object.html.haml
|
175
177
|
- app/views/twitter/bootstrap/components/v3/_thumbnail.html.haml
|
@@ -213,7 +215,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
213
215
|
version: '0'
|
214
216
|
requirements: []
|
215
217
|
rubyforge_project:
|
216
|
-
rubygems_version: 2.
|
218
|
+
rubygems_version: 2.5.1
|
217
219
|
signing_key:
|
218
220
|
specification_version: 4
|
219
221
|
summary: Twitter Bootstrap Components for Rails.
|