simple_navbar 0.1.0 → 0.1.1
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 +4 -4
- data/README.md +84 -4
- data/app/assets/stylesheets/simple_navbar.css +1 -1
- data/lib/simple_navbar/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c978dff0fe5ce4904d77b3a0e0fdbc28724a4028ecb932370a080bc67494dd9a
|
4
|
+
data.tar.gz: ada3f70963dc47089200c22e6727a630cd605b9879f73417595d0d3a7ad6bc54
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b53d783aef57ce460eaf5d3c533bc26b6ffcdbcaeae0e37ca343fab16896dd2afc653122233cbbe10664fe7cc890763e71befa9bbc45b6fe3e9e75101f6ff515
|
7
|
+
data.tar.gz: 8ace5c590abc77860d259b5a58538bc2cdab9dd3de3969a7ee92868a4bf0ae29288cab3b3499950b0967f153ee2fbb9e9777c39f1eba9a6b2b6c8a817e5de689
|
data/README.md
CHANGED
@@ -1,10 +1,16 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# Simple Navbar
|
2
|
+
|
3
|
+
<div style="display: flex; gap: 12px; align-items: center;">
|
4
|
+
<img src="./simple_navbar.png" alt="SimpleNavbar Logo" width="80">
|
5
|
+
<strong>
|
6
|
+
SimpleNavbar is a Ruby gem that provides a simple and customizable navigation bar for your web applications.
|
7
|
+
</strong>
|
8
|
+
</div>
|
3
9
|
|
4
10
|
## Usage
|
5
|
-
How to use my plugin.
|
6
11
|
|
7
12
|
## Installation
|
13
|
+
|
8
14
|
Add this line to your application's Gemfile:
|
9
15
|
|
10
16
|
```ruby
|
@@ -12,17 +18,91 @@ gem "simple_navbar"
|
|
12
18
|
```
|
13
19
|
|
14
20
|
And then execute:
|
21
|
+
|
15
22
|
```bash
|
16
23
|
$ bundle
|
17
24
|
```
|
18
25
|
|
19
26
|
Or install it yourself as:
|
27
|
+
|
20
28
|
```bash
|
21
29
|
$ gem install simple_navbar
|
22
30
|
```
|
23
31
|
|
32
|
+
## You need to install and configure the files
|
33
|
+
|
34
|
+
### The gem is compatible with stimulus, or legacy js on assets/javascripts
|
35
|
+
|
36
|
+
with stimulus execute:
|
37
|
+
|
38
|
+
```bash
|
39
|
+
$ rails generate simple_navbar:install --stimulus
|
40
|
+
```
|
41
|
+
|
42
|
+
no stimulus:
|
43
|
+
|
44
|
+
```bash
|
45
|
+
$ rails generate simple_navbar:install
|
46
|
+
```
|
47
|
+
|
48
|
+
os legacy mode with assets/javascripts
|
49
|
+
|
50
|
+
```bash
|
51
|
+
$ rails generate simple_navbar:install --legacy
|
52
|
+
```
|
53
|
+
|
54
|
+
This will generate for you js files, css and include the **helper SimpleNavba** on **ApplicationController.rb** and javascript include tags with no stimulus
|
55
|
+
|
56
|
+
## Usage
|
57
|
+
|
58
|
+
with stimulus use
|
59
|
+
|
60
|
+
```
|
61
|
+
<%= simple_navbar_s( brand: { logo: "/icon.png", url: root_path },
|
62
|
+
links: [
|
63
|
+
{ label: "About", url: about_path },
|
64
|
+
{ label: "Posts", url: posts_path }]) %>
|
65
|
+
```
|
66
|
+
|
67
|
+
no stimulus _simple_navbar_ with no "s"
|
68
|
+
|
69
|
+
```
|
70
|
+
<%= simple_navbar( brand: { logo: "/icon.png", url: root_path },
|
71
|
+
links: [
|
72
|
+
{ label: "About", url: about_path },
|
73
|
+
{ label: "Posts", url: posts_path }]) %>
|
74
|
+
```
|
75
|
+
|
76
|
+
with dropdown menus
|
77
|
+
|
78
|
+
```
|
79
|
+
<%= simple_navbar_s(
|
80
|
+
brand: { logo: "/icon.png", url: root_path },
|
81
|
+
links: [
|
82
|
+
{ label: "About", url: about_path },
|
83
|
+
{ label: "Posts", url: posts_path }
|
84
|
+
{ dropdown: { label: "More", links: [
|
85
|
+
{ label: "Hello", url: root_path },
|
86
|
+
{ label: "World", url: root_path }
|
87
|
+
]
|
88
|
+
}
|
89
|
+
}
|
90
|
+
]) %>
|
91
|
+
```
|
92
|
+
|
93
|
+
you can set a title instead of a logo on the brand
|
94
|
+
|
95
|
+
```
|
96
|
+
<%= simple_navbar( brand: { title: "Fumo", url: root_path },
|
97
|
+
links: [
|
98
|
+
{ label: "About", url: about_path },
|
99
|
+
{ label: "Posts", url: posts_path }]) %>
|
100
|
+
```
|
101
|
+
|
24
102
|
## Contributing
|
25
|
-
|
103
|
+
|
104
|
+
Fell free to open issues and pr to contribute.
|
26
105
|
|
27
106
|
## License
|
107
|
+
|
28
108
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|