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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 90ac907a906962e9f5592805f756b00f7ed29b744d02f0f304ce4bc05b6ddcf0
4
- data.tar.gz: 2b3d60097667b76189b821b1905a8c73eda2141bcf91795dc61819522b19229a
3
+ metadata.gz: c978dff0fe5ce4904d77b3a0e0fdbc28724a4028ecb932370a080bc67494dd9a
4
+ data.tar.gz: ada3f70963dc47089200c22e6727a630cd605b9879f73417595d0d3a7ad6bc54
5
5
  SHA512:
6
- metadata.gz: 5b19c8d84daf69fc3c133b3db8037ca113472750ac5b60a84c3def570932b9feb8b019661db560b7c626ea4e8e09b131ebb56b6b36104f67fca587d09daedbe7
7
- data.tar.gz: 76dbb79fa63af99bce55d1d78c2f0590c6e5c7f3d15d81c0fde22c124f82764753a7eaed7678fa0533625fbfceda662503892104ff1689cd3dd2206ddd5f8fe1
6
+ metadata.gz: b53d783aef57ce460eaf5d3c533bc26b6ffcdbcaeae0e37ca343fab16896dd2afc653122233cbbe10664fe7cc890763e71befa9bbc45b6fe3e9e75101f6ff515
7
+ data.tar.gz: 8ace5c590abc77860d259b5a58538bc2cdab9dd3de3969a7ee92868a4bf0ae29288cab3b3499950b0967f153ee2fbb9e9777c39f1eba9a6b2b6c8a817e5de689
data/README.md CHANGED
@@ -1,10 +1,16 @@
1
- # SimpleNavbar
2
- Short description and motivation.
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
- Contribution directions go here.
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).
@@ -24,7 +24,7 @@
24
24
  position: fixed;
25
25
  background-color: var(--bg-color);
26
26
  color: var(--text-color);
27
- padding: 16px;
27
+ padding: 28px;
28
28
  z-index: 100;
29
29
  width: 100%;
30
30
  box-shadow: 0 4px 6px -1px var(--shadow);
@@ -1,3 +1,3 @@
1
1
  module SimpleNavbar
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simple_navbar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rômulo Oliveira