bulmacomp 1.0.4 → 1.1.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/bulmacomp/navbar_component.rb +9 -3
- data/lib/bulmacomp/version.rb +1 -1
- metadata +5 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 84abe7dafc270bb1f56f9e56ac6133afe6fc883e70946136c8cb993c3a769b1c
|
4
|
+
data.tar.gz: d9156756074bf21ddc844aad6db23e4f2e1c414d1cbe5e1686d84c0c9b7a4897
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e4d57ddff50edf58bfb7d20efe8956b5a03348e5e318a08f47fce10231d3d516c8d90ff63ffdc7f2c27e250d64eeca89f5a69ac1d01bf0d51a31ee5502d1422
|
7
|
+
data.tar.gz: 4a2bf5955d500aa01cda839c0b08e86cc9ab75c689d5c7b9147fc7ad60ee8e8782418c4a5b1b9d52be2a4c60a3e53bba409dc70febaa708f67b06d786b25ce21
|
@@ -40,13 +40,19 @@ module Bulmacomp
|
|
40
40
|
# to generate content
|
41
41
|
# @option opts [String] :brand
|
42
42
|
# navbar brand content
|
43
|
+
# @option opts [String] :navbar_start
|
44
|
+
# optionally navbar-start content
|
45
|
+
# @option opts [String] :navbar_end
|
46
|
+
# optionally navbar-end content
|
43
47
|
# @option opts [String] :*
|
44
48
|
# each other key going as tag option, default is
|
45
49
|
# class: 'navbar', aria_label: 'main navigation', aria_role: 'navigation'
|
46
50
|
# @yield [optional] navbar content
|
47
|
-
def initialize(brand: nil, **opts)
|
51
|
+
def initialize(brand: nil, navbar_start: nil, navbar_end: nil, **opts)
|
48
52
|
super
|
49
53
|
@brand = brand
|
54
|
+
@navbar_start = tag.div navbar_start, class: 'navbar-start' if navbar_start.present?
|
55
|
+
@navbar_end = tag.div navbar_end, class: 'navbar-end' if navbar_end.present?
|
50
56
|
@opts = { class: 'navbar', aria: { role: 'navigation', label: 'main navigation' } }.merge(opts)
|
51
57
|
end
|
52
58
|
|
@@ -65,10 +71,10 @@ module Bulmacomp
|
|
65
71
|
|
66
72
|
# @return [String] html_safe navbar-menu tag
|
67
73
|
def navbar_menu
|
68
|
-
tag.div(content, class: 'navbar-menu', data: {target: 'page-menu'})
|
74
|
+
tag.div(safe_join([@navbar_start, content, @navbar_end]), class: 'navbar-menu', data: { target: 'page-menu' })
|
69
75
|
end
|
70
76
|
|
71
|
-
# return [String] html_safe navbar-burger link
|
77
|
+
# @return [String] html_safe navbar-burger link
|
72
78
|
def navbar_burger
|
73
79
|
tag.a tag.span(aria_hidden: true) * 3, class: 'navbar-burger', aria_label: 'menu', aria_expanded: 'false',
|
74
80
|
data_action: 'page#toggleMenu'
|
data/lib/bulmacomp/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bulmacomp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- MDreW
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: 3.9.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: 3.9.0
|
41
41
|
description: Collection of view components for bulma css framework
|
42
42
|
email:
|
43
43
|
- andrea.ranaldi@gmail.com
|
@@ -85,7 +85,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
85
85
|
- !ruby/object:Gem::Version
|
86
86
|
version: '0'
|
87
87
|
requirements: []
|
88
|
-
rubygems_version: 3.
|
88
|
+
rubygems_version: 3.5.3
|
89
89
|
signing_key:
|
90
90
|
specification_version: 4
|
91
91
|
summary: Rails 'View Components' for Bulma
|