tramway 3.1.2.3 → 3.1.2.4
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 +5 -5
- data/app/components/tramway/form/builder.rb +1 -1
- data/app/components/tramway/nav/item_component.rb +2 -2
- data/app/components/tramway/navbar_component.html.haml +15 -12
- data/app/components/tramway/navbar_component.rb +2 -2
- data/app/views/tramway/entities/_form.html.haml +1 -1
- data/config/tailwind.config.js +6 -0
- data/lib/tramway/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: f525c9fd76a1edc7050318ead14629ddf7c4be7d9d53dcc14b61ee04b5563d18
|
|
4
|
+
data.tar.gz: 486e418f27e02dae869e2ef625167998e737e0f9ff2a49fa47caa46fe1fc9d74
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 04111aad9852f77817a6f01f2b9e96f20ed6ffa24ba70f0a9bd9c12f08060aee26d9deba7fedd437fcedae1b7cb27782df2e82da5c629a090993443a05bb5f47
|
|
7
|
+
data.tar.gz: 53117c53d931e58338947378b8c0de7cbb8b92d9b66ee7c918e56bea5a3c7d4dff7e62ebb310f1b1b57013a820f3a81dfc046fa89f39fffbe2553e9ccc042aa0
|
data/README.md
CHANGED
|
@@ -12,7 +12,7 @@ Codex instruction that points agents to the Tramway skill for Tramway-native cod
|
|
|
12
12
|
* [Installation](https://github.com/Purple-Magic/tramway#installation)
|
|
13
13
|
* [Getting Started](https://github.com/Purple-Magic/tramway?tab=readme-ov-file#getting-started)
|
|
14
14
|
* [Usage](https://github.com/Purple-Magic/tramway#usage)
|
|
15
|
-
* [Tramway
|
|
15
|
+
* [Tramway CRUD](https://github.com/Purple-Magic/tramway#tramway-crud)
|
|
16
16
|
* [Tramway Decorators](https://github.com/Purple-Magic/tramway#tramway-decorators)
|
|
17
17
|
* [Tramway Form](https://github.com/Purple-Magic/tramway#tramway-form)
|
|
18
18
|
* [Tramway Navbar](https://github.com/Purple-Magic/tramway#tramway-navbar)
|
|
@@ -132,7 +132,7 @@ Open [http://localhost:3000/users](http://localhost:3000/users)
|
|
|
132
132
|
## Usage
|
|
133
133
|
|
|
134
134
|
|
|
135
|
-
### Tramway
|
|
135
|
+
### Tramway CRUD
|
|
136
136
|
|
|
137
137
|
Tramway is an entity-based framework. **Entity** is the class on whose objects actions be applied: _index, show, create, update, and destroy_. Tramway will support numerous classes as entities. For now, Entity could be only **ActiveRecord::Base** class.
|
|
138
138
|
|
|
@@ -145,7 +145,7 @@ Tramway.configure do |config|
|
|
|
145
145
|
end
|
|
146
146
|
```
|
|
147
147
|
|
|
148
|
-
By default, links to the Tramway
|
|
148
|
+
By default, links to the Tramway CRUD index page are rendered in [Tramway Navbar](https://github.com/Purple-Magic/tramway#tramway-navbar).
|
|
149
149
|
|
|
150
150
|
#### Define entities with options
|
|
151
151
|
|
|
@@ -819,10 +819,10 @@ title_link: Link on Tramway Navbar title. Default: '/'
|
|
|
819
819
|
background:
|
|
820
820
|
color: Css-color. Supports all named CSS colors and HEX colors
|
|
821
821
|
intensity: Color intensity. Range: **100..950**. Used by Tailwind. Not supported in case of using HEX color in the background.color
|
|
822
|
-
with_entities: Show Tramway
|
|
822
|
+
with_entities: Show Tramway CRUD index page links to navbar. Default: true
|
|
823
823
|
```
|
|
824
824
|
|
|
825
|
-
**NOTE:** `tramway_navbar` method called without arguments and block of code will render only [Tramway
|
|
825
|
+
**NOTE:** `tramway_navbar` method called without arguments and block of code will render only [Tramway CRUD](https://github.com/Purple-Magic/tramway#tramway-crud) links on the left.
|
|
826
826
|
|
|
827
827
|
In case you want to hide entity links you can pass `with_entities: false`.
|
|
828
828
|
|
|
@@ -6,8 +6,8 @@ module Tramway
|
|
|
6
6
|
#
|
|
7
7
|
class ItemComponent < TailwindComponent
|
|
8
8
|
def style
|
|
9
|
-
@style ||= 'inline-flex items-center rounded-md px-
|
|
10
|
-
'transition-colors hover:bg-zinc-800 hover:text-zinc-50'
|
|
9
|
+
@style ||= 'inline-flex items-center rounded-md px-4 py-3 text-base font-medium text-zinc-100 ' \
|
|
10
|
+
'transition-colors hover:bg-zinc-800 hover:text-zinc-50 sm:px-3 sm:py-2 sm:text-sm'
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
end
|
|
@@ -21,18 +21,21 @@
|
|
|
21
21
|
= item
|
|
22
22
|
|
|
23
23
|
#mobile-menu{ class: mobile_menu_classes }
|
|
24
|
-
-
|
|
25
|
-
|
|
26
|
-
- @left_items.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
- @right_items.
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
24
|
+
.flex.flex-1.flex-col
|
|
25
|
+
.flex-1
|
|
26
|
+
- if @left_items.present?
|
|
27
|
+
%ul.flex.flex-col.space-y-1.pt-4
|
|
28
|
+
- @left_items.each do |item|
|
|
29
|
+
= item
|
|
30
|
+
|
|
31
|
+
- if @right_items.present?
|
|
32
|
+
%ul.flex.flex-col.space-y-1.pt-4
|
|
33
|
+
- @right_items.each do |item|
|
|
34
|
+
= item
|
|
35
|
+
|
|
36
|
+
.pt-6
|
|
37
|
+
%button.w-full.inline-flex.items-center.justify-center.rounded-md.border.border-zinc-700.bg-zinc-900.px-4.py-3.text-sm.font-semibold.text-zinc-50.transition-colors.hover:bg-zinc-800.hover:text-zinc-50.focus:outline-none.focus-visible:ring-2.focus-visible:ring-zinc-400.focus-visible:ring-offset-2.focus-visible:ring-offset-zinc-950#mobile-menu-close-button{ role: :button }
|
|
38
|
+
Close
|
|
36
39
|
|
|
37
40
|
:javascript
|
|
38
41
|
(() => {
|
|
@@ -14,8 +14,8 @@ module Tramway
|
|
|
14
14
|
].freeze
|
|
15
15
|
|
|
16
16
|
MOBILE_MENU_CLASSES = %w[
|
|
17
|
-
fixed inset-0 z-50 hidden h-screen w-screen flex-col border-r border-zinc-800 bg-zinc-950 px-4 py-6 shadow-lg
|
|
18
|
-
transition-transform transform -translate-x-full duration-300 ease-in-out pt-16
|
|
17
|
+
fixed inset-0 z-50 hidden h-screen w-screen flex flex-col border-r border-zinc-800 bg-zinc-950 px-4 py-6 shadow-lg
|
|
18
|
+
transition-transform transform -translate-x-full duration-300 ease-in-out pt-16 justify-between
|
|
19
19
|
].freeze
|
|
20
20
|
|
|
21
21
|
def initialize(**options)
|
data/config/tailwind.config.js
CHANGED
|
@@ -57,6 +57,7 @@ module.exports = {
|
|
|
57
57
|
'w-fit',
|
|
58
58
|
'text-base',
|
|
59
59
|
'text-sm',
|
|
60
|
+
'text-lg',
|
|
60
61
|
'rounded-md',
|
|
61
62
|
'rounded-sm',
|
|
62
63
|
'border-b',
|
|
@@ -69,7 +70,9 @@ module.exports = {
|
|
|
69
70
|
'grid-cols-1',
|
|
70
71
|
'grid',
|
|
71
72
|
'px-4',
|
|
73
|
+
'px-3',
|
|
72
74
|
'py-3',
|
|
75
|
+
'py-2',
|
|
73
76
|
'py-4',
|
|
74
77
|
'py-6',
|
|
75
78
|
'p-2',
|
|
@@ -167,6 +170,9 @@ module.exports = {
|
|
|
167
170
|
'md:p-4',
|
|
168
171
|
'md:p-6',
|
|
169
172
|
'p-2',
|
|
173
|
+
'sm:px-3',
|
|
174
|
+
'sm:py-2',
|
|
175
|
+
'sm:text-sm',
|
|
170
176
|
'md:gap-1',
|
|
171
177
|
'md:space-y-4',
|
|
172
178
|
'space-y-2',
|
data/lib/tramway/version.rb
CHANGED