trek 0.1.21 → 0.1.22
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/.npmignore +3 -0
- data/Gemfile.lock +76 -74
- data/README.md +8 -0
- data/app/assets/stylesheets/trek/_colors.css +181 -0
- data/app/components/trek/button_component.rb +9 -3
- data/app/components/trek/form/actions_component/actions_component.css +6 -0
- data/app/components/trek/form/image_field_component/image_field_component.css +1 -1
- data/app/components/trek/form/switch_box_component.rb +1 -0
- data/app/components/trek/tabs_component/tabs_component.css +1 -0
- data/app/controllers/concerns/trek/model.rb +4 -1
- data/config/locales/trek.en.yml +2 -0
- data/docs/.vitepress/config.mjs +133 -0
- data/docs/.vitepress/theme/index.js +17 -0
- data/docs/.vitepress/theme/style.css +139 -0
- data/docs/customize.md +63 -7
- data/docs/getting-started.md +160 -0
- data/docs/index.md +39 -0
- data/docs/public/logo.svg +1 -0
- data/docs/reference/components.md +40 -0
- data/docs/reference/concerns/contentable.md +28 -0
- data/docs/reference/concerns/formattable.md +24 -0
- data/docs/reference/concerns/fragmentable.md +33 -0
- data/docs/reference/concerns/keyable.md +18 -0
- data/docs/reference/concerns/orderable.md +26 -0
- data/docs/reference/concerns/pageable.md +35 -0
- data/docs/reference/concerns/pathable.md +28 -0
- data/docs/reference/concerns/phonable.md +28 -0
- data/docs/reference/concerns/search-engine-optimizable.md +19 -0
- data/docs/reference/concerns/searchable.md +22 -0
- data/docs/reference/concerns/sectionable.md +24 -0
- data/docs/reference/concerns/sluggable.md +21 -0
- data/docs/reference/concerns/taggable.md +20 -0
- data/docs/reference/concerns/translatable.md +35 -0
- data/docs/reference/concerns/versionable.md +27 -0
- data/docs/reference/controllers.md +23 -0
- data/docs/reference/environment-variables.md +9 -0
- data/docs/reference/formatters.md +30 -0
- data/docs/reference/forms.md +21 -0
- data/docs/reference/generators/admin-user.md +17 -0
- data/docs/reference/generators/install.md +42 -0
- data/docs/reference/generators/scaffold.md +37 -0
- data/docs/reference/generators/taxonomies.md +21 -0
- data/docs/reference/icons.md +11 -0
- data/docs/reference/index.md +47 -0
- data/docs/reference/models/current.md +11 -0
- data/docs/reference/models/external-link.md +16 -0
- data/docs/reference/models/fragment.md +28 -0
- data/docs/reference/models/menu-node.md +30 -0
- data/docs/reference/models/page-path.md +19 -0
- data/docs/reference/models/page-version.md +30 -0
- data/docs/reference/models/page.md +48 -0
- data/docs/reference/models/tag.md +41 -0
- data/docs/reference/models/user.md +65 -0
- data/docs/reference/policies.md +30 -0
- data/docs/reference/uploaders.md +19 -0
- data/docs/what-is-trek.md +37 -0
- data/esbuild.config.js +10 -7
- data/lib/trek/version.rb +1 -1
- data/netlify.toml +4 -0
- data/package.json +10 -5
- data/renovate.json +4 -0
- data/yarn.lock +2015 -235
- metadata +48 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bb5c6af64a8d5934859280f654a6c835a44af7d87125da7f76246abc0c77e974
|
|
4
|
+
data.tar.gz: 72f797bee0d73262a8636b0a2e08b753c275c4529b9fca26a9a2dac8fd61bd30
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: abdfd7fd9b23d6a1d7ea200df36cf61dc339f00be775dc3de25d982841e280a7ec1adc32613ff96c2c004c06773b888436ab54977ee1f75656f6a7b7b867cdec
|
|
7
|
+
data.tar.gz: 54835b0a50cdcd83003b162a6ee061c161d7fa2c29293f421c9a11a300516131f30ca538091b3a99c793fb3fe88ac9f220fbf14bad661f9b89ed7da80b294271
|
data/.npmignore
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
trek (0.1.
|
|
4
|
+
trek (0.1.22)
|
|
5
5
|
action_policy (~> 0.6)
|
|
6
6
|
actioncable
|
|
7
7
|
acts_as_list (~> 1.1)
|
|
@@ -37,31 +37,31 @@ GEM
|
|
|
37
37
|
specs:
|
|
38
38
|
action_policy (0.7.5)
|
|
39
39
|
ruby-next-core (>= 1.0)
|
|
40
|
-
action_text-trix (2.1.
|
|
40
|
+
action_text-trix (2.1.18)
|
|
41
41
|
railties
|
|
42
|
-
actioncable (8.1.
|
|
43
|
-
actionpack (= 8.1.
|
|
44
|
-
activesupport (= 8.1.
|
|
42
|
+
actioncable (8.1.3)
|
|
43
|
+
actionpack (= 8.1.3)
|
|
44
|
+
activesupport (= 8.1.3)
|
|
45
45
|
nio4r (~> 2.0)
|
|
46
46
|
websocket-driver (>= 0.6.1)
|
|
47
47
|
zeitwerk (~> 2.6)
|
|
48
|
-
actionmailbox (8.1.
|
|
49
|
-
actionpack (= 8.1.
|
|
50
|
-
activejob (= 8.1.
|
|
51
|
-
activerecord (= 8.1.
|
|
52
|
-
activestorage (= 8.1.
|
|
53
|
-
activesupport (= 8.1.
|
|
48
|
+
actionmailbox (8.1.3)
|
|
49
|
+
actionpack (= 8.1.3)
|
|
50
|
+
activejob (= 8.1.3)
|
|
51
|
+
activerecord (= 8.1.3)
|
|
52
|
+
activestorage (= 8.1.3)
|
|
53
|
+
activesupport (= 8.1.3)
|
|
54
54
|
mail (>= 2.8.0)
|
|
55
|
-
actionmailer (8.1.
|
|
56
|
-
actionpack (= 8.1.
|
|
57
|
-
actionview (= 8.1.
|
|
58
|
-
activejob (= 8.1.
|
|
59
|
-
activesupport (= 8.1.
|
|
55
|
+
actionmailer (8.1.3)
|
|
56
|
+
actionpack (= 8.1.3)
|
|
57
|
+
actionview (= 8.1.3)
|
|
58
|
+
activejob (= 8.1.3)
|
|
59
|
+
activesupport (= 8.1.3)
|
|
60
60
|
mail (>= 2.8.0)
|
|
61
61
|
rails-dom-testing (~> 2.2)
|
|
62
|
-
actionpack (8.1.
|
|
63
|
-
actionview (= 8.1.
|
|
64
|
-
activesupport (= 8.1.
|
|
62
|
+
actionpack (8.1.3)
|
|
63
|
+
actionview (= 8.1.3)
|
|
64
|
+
activesupport (= 8.1.3)
|
|
65
65
|
nokogiri (>= 1.8.5)
|
|
66
66
|
rack (>= 2.2.4)
|
|
67
67
|
rack-session (>= 1.0.1)
|
|
@@ -69,36 +69,36 @@ GEM
|
|
|
69
69
|
rails-dom-testing (~> 2.2)
|
|
70
70
|
rails-html-sanitizer (~> 1.6)
|
|
71
71
|
useragent (~> 0.16)
|
|
72
|
-
actiontext (8.1.
|
|
72
|
+
actiontext (8.1.3)
|
|
73
73
|
action_text-trix (~> 2.1.15)
|
|
74
|
-
actionpack (= 8.1.
|
|
75
|
-
activerecord (= 8.1.
|
|
76
|
-
activestorage (= 8.1.
|
|
77
|
-
activesupport (= 8.1.
|
|
74
|
+
actionpack (= 8.1.3)
|
|
75
|
+
activerecord (= 8.1.3)
|
|
76
|
+
activestorage (= 8.1.3)
|
|
77
|
+
activesupport (= 8.1.3)
|
|
78
78
|
globalid (>= 0.6.0)
|
|
79
79
|
nokogiri (>= 1.8.5)
|
|
80
|
-
actionview (8.1.
|
|
81
|
-
activesupport (= 8.1.
|
|
80
|
+
actionview (8.1.3)
|
|
81
|
+
activesupport (= 8.1.3)
|
|
82
82
|
builder (~> 3.1)
|
|
83
83
|
erubi (~> 1.11)
|
|
84
84
|
rails-dom-testing (~> 2.2)
|
|
85
85
|
rails-html-sanitizer (~> 1.6)
|
|
86
|
-
activejob (8.1.
|
|
87
|
-
activesupport (= 8.1.
|
|
86
|
+
activejob (8.1.3)
|
|
87
|
+
activesupport (= 8.1.3)
|
|
88
88
|
globalid (>= 0.3.6)
|
|
89
|
-
activemodel (8.1.
|
|
90
|
-
activesupport (= 8.1.
|
|
91
|
-
activerecord (8.1.
|
|
92
|
-
activemodel (= 8.1.
|
|
93
|
-
activesupport (= 8.1.
|
|
89
|
+
activemodel (8.1.3)
|
|
90
|
+
activesupport (= 8.1.3)
|
|
91
|
+
activerecord (8.1.3)
|
|
92
|
+
activemodel (= 8.1.3)
|
|
93
|
+
activesupport (= 8.1.3)
|
|
94
94
|
timeout (>= 0.4.0)
|
|
95
|
-
activestorage (8.1.
|
|
96
|
-
actionpack (= 8.1.
|
|
97
|
-
activejob (= 8.1.
|
|
98
|
-
activerecord (= 8.1.
|
|
99
|
-
activesupport (= 8.1.
|
|
95
|
+
activestorage (8.1.3)
|
|
96
|
+
actionpack (= 8.1.3)
|
|
97
|
+
activejob (= 8.1.3)
|
|
98
|
+
activerecord (= 8.1.3)
|
|
99
|
+
activesupport (= 8.1.3)
|
|
100
100
|
marcel (~> 1.0)
|
|
101
|
-
activesupport (8.1.
|
|
101
|
+
activesupport (8.1.3)
|
|
102
102
|
base64
|
|
103
103
|
bigdecimal
|
|
104
104
|
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
@@ -114,7 +114,7 @@ GEM
|
|
|
114
114
|
acts_as_list (1.2.6)
|
|
115
115
|
activerecord (>= 6.1)
|
|
116
116
|
activesupport (>= 6.1)
|
|
117
|
-
addressable (2.
|
|
117
|
+
addressable (2.9.0)
|
|
118
118
|
public_suffix (>= 2.0.2, < 8.0)
|
|
119
119
|
ast (2.4.3)
|
|
120
120
|
aws-eventstream (1.4.0)
|
|
@@ -137,7 +137,7 @@ GEM
|
|
|
137
137
|
aws-sigv4 (1.12.1)
|
|
138
138
|
aws-eventstream (~> 1, >= 1.0.2)
|
|
139
139
|
base64 (0.3.0)
|
|
140
|
-
bigdecimal (
|
|
140
|
+
bigdecimal (4.1.2)
|
|
141
141
|
blurhash (0.1.8)
|
|
142
142
|
brakeman (7.1.2)
|
|
143
143
|
racc
|
|
@@ -162,8 +162,9 @@ GEM
|
|
|
162
162
|
connection_pool (3.0.2)
|
|
163
163
|
content_disposition (1.0.0)
|
|
164
164
|
crass (1.0.6)
|
|
165
|
-
css_parser (
|
|
165
|
+
css_parser (3.0.0)
|
|
166
166
|
addressable
|
|
167
|
+
ssrf_filter (~> 1.5)
|
|
167
168
|
date (3.5.1)
|
|
168
169
|
deepl-rb (3.6.1)
|
|
169
170
|
diff-lcs (1.6.2)
|
|
@@ -193,14 +194,14 @@ GEM
|
|
|
193
194
|
dry-logic (~> 1.5)
|
|
194
195
|
dry-types (~> 1.8)
|
|
195
196
|
zeitwerk (~> 2.6)
|
|
196
|
-
dry-types (1.
|
|
197
|
-
bigdecimal (
|
|
197
|
+
dry-types (1.9.1)
|
|
198
|
+
bigdecimal (>= 3.0)
|
|
198
199
|
concurrent-ruby (~> 1.0)
|
|
199
200
|
dry-core (~> 1.0)
|
|
200
201
|
dry-inflector (~> 1.0)
|
|
201
202
|
dry-logic (~> 1.4)
|
|
202
203
|
zeitwerk (~> 2.6)
|
|
203
|
-
erb (6.0.
|
|
204
|
+
erb (6.0.4)
|
|
204
205
|
erubi (1.13.1)
|
|
205
206
|
fastimage (2.4.0)
|
|
206
207
|
ffi (1.17.3-arm64-darwin)
|
|
@@ -236,7 +237,7 @@ GEM
|
|
|
236
237
|
rdoc (>= 4.0.0)
|
|
237
238
|
reline (>= 0.4.2)
|
|
238
239
|
jmespath (1.6.2)
|
|
239
|
-
json (2.19.
|
|
240
|
+
json (2.19.5)
|
|
240
241
|
kaminari (1.2.2)
|
|
241
242
|
activesupport (>= 4.1.0)
|
|
242
243
|
kaminari-actionview (= 1.2.2)
|
|
@@ -281,13 +282,13 @@ GEM
|
|
|
281
282
|
mini_magick (5.3.1)
|
|
282
283
|
logger
|
|
283
284
|
mini_mime (1.1.5)
|
|
284
|
-
minitest (6.0.
|
|
285
|
+
minitest (6.0.6)
|
|
285
286
|
drb (~> 2.0)
|
|
286
287
|
prism (~> 1.5)
|
|
287
288
|
mobility (1.3.2)
|
|
288
289
|
i18n (>= 0.6.10, < 2)
|
|
289
290
|
request_store (~> 1.0)
|
|
290
|
-
net-imap (0.6.
|
|
291
|
+
net-imap (0.6.4)
|
|
291
292
|
date
|
|
292
293
|
net-protocol
|
|
293
294
|
net-pop (0.1.2)
|
|
@@ -297,9 +298,9 @@ GEM
|
|
|
297
298
|
net-smtp (0.5.1)
|
|
298
299
|
net-protocol
|
|
299
300
|
nio4r (2.7.5)
|
|
300
|
-
nokogiri (1.19.
|
|
301
|
+
nokogiri (1.19.3-arm64-darwin)
|
|
301
302
|
racc (~> 1.4)
|
|
302
|
-
nokogiri (1.19.
|
|
303
|
+
nokogiri (1.19.3-x86_64-darwin)
|
|
303
304
|
racc (~> 1.4)
|
|
304
305
|
parallel (1.27.0)
|
|
305
306
|
parser (3.3.10.0)
|
|
@@ -320,30 +321,30 @@ GEM
|
|
|
320
321
|
psych (5.3.1)
|
|
321
322
|
date
|
|
322
323
|
stringio
|
|
323
|
-
public_suffix (7.0.
|
|
324
|
+
public_suffix (7.0.5)
|
|
324
325
|
racc (1.8.1)
|
|
325
|
-
rack (3.2.
|
|
326
|
-
rack-session (2.1.
|
|
326
|
+
rack (3.2.6)
|
|
327
|
+
rack-session (2.1.2)
|
|
327
328
|
base64 (>= 0.1.0)
|
|
328
329
|
rack (>= 3.0.0)
|
|
329
330
|
rack-test (2.2.0)
|
|
330
331
|
rack (>= 1.3)
|
|
331
332
|
rackup (2.3.1)
|
|
332
333
|
rack (>= 3)
|
|
333
|
-
rails (8.1.
|
|
334
|
-
actioncable (= 8.1.
|
|
335
|
-
actionmailbox (= 8.1.
|
|
336
|
-
actionmailer (= 8.1.
|
|
337
|
-
actionpack (= 8.1.
|
|
338
|
-
actiontext (= 8.1.
|
|
339
|
-
actionview (= 8.1.
|
|
340
|
-
activejob (= 8.1.
|
|
341
|
-
activemodel (= 8.1.
|
|
342
|
-
activerecord (= 8.1.
|
|
343
|
-
activestorage (= 8.1.
|
|
344
|
-
activesupport (= 8.1.
|
|
334
|
+
rails (8.1.3)
|
|
335
|
+
actioncable (= 8.1.3)
|
|
336
|
+
actionmailbox (= 8.1.3)
|
|
337
|
+
actionmailer (= 8.1.3)
|
|
338
|
+
actionpack (= 8.1.3)
|
|
339
|
+
actiontext (= 8.1.3)
|
|
340
|
+
actionview (= 8.1.3)
|
|
341
|
+
activejob (= 8.1.3)
|
|
342
|
+
activemodel (= 8.1.3)
|
|
343
|
+
activerecord (= 8.1.3)
|
|
344
|
+
activestorage (= 8.1.3)
|
|
345
|
+
activesupport (= 8.1.3)
|
|
345
346
|
bundler (>= 1.15.0)
|
|
346
|
-
railties (= 8.1.
|
|
347
|
+
railties (= 8.1.3)
|
|
347
348
|
rails-dom-testing (2.3.0)
|
|
348
349
|
activesupport (>= 5.0.0)
|
|
349
350
|
minitest
|
|
@@ -357,9 +358,9 @@ GEM
|
|
|
357
358
|
rails-i18n (8.1.0)
|
|
358
359
|
i18n (>= 0.7, < 2)
|
|
359
360
|
railties (>= 8.0.0, < 9)
|
|
360
|
-
railties (8.1.
|
|
361
|
-
actionpack (= 8.1.
|
|
362
|
-
activesupport (= 8.1.
|
|
361
|
+
railties (8.1.3)
|
|
362
|
+
actionpack (= 8.1.3)
|
|
363
|
+
activesupport (= 8.1.3)
|
|
363
364
|
irb (~> 1.13)
|
|
364
365
|
rackup (>= 1.0.0)
|
|
365
366
|
rake (>= 12.2)
|
|
@@ -479,6 +480,7 @@ GEM
|
|
|
479
480
|
rexml (~> 3.2)
|
|
480
481
|
rubocop (>= 1.0, < 2.0)
|
|
481
482
|
slim (>= 3.0, < 6.0)
|
|
483
|
+
ssrf_filter (1.5.0)
|
|
482
484
|
stringio (3.2.0)
|
|
483
485
|
strip_attributes (2.0.1)
|
|
484
486
|
activemodel (>= 3.0, < 9.0)
|
|
@@ -487,7 +489,7 @@ GEM
|
|
|
487
489
|
unicode-display_width (>= 1.1.1, < 4)
|
|
488
490
|
thor (1.5.0)
|
|
489
491
|
tilt (2.6.1)
|
|
490
|
-
timeout (0.6.
|
|
492
|
+
timeout (0.6.1)
|
|
491
493
|
tsort (0.2.0)
|
|
492
494
|
tzinfo (2.0.6)
|
|
493
495
|
concurrent-ruby (~> 1.0)
|
|
@@ -496,9 +498,9 @@ GEM
|
|
|
496
498
|
unicode-emoji (4.2.0)
|
|
497
499
|
uri (1.1.1)
|
|
498
500
|
useragent (0.16.11)
|
|
499
|
-
view_component (4.
|
|
500
|
-
actionview (>= 7.1.0
|
|
501
|
-
activesupport (>= 7.1.0
|
|
501
|
+
view_component (4.10.0)
|
|
502
|
+
actionview (>= 7.1.0)
|
|
503
|
+
activesupport (>= 7.1.0)
|
|
502
504
|
concurrent-ruby (~> 1)
|
|
503
505
|
view_component-form (0.3.0)
|
|
504
506
|
actionview (>= 7.2.0, < 8.2)
|
|
@@ -514,7 +516,7 @@ GEM
|
|
|
514
516
|
zeitwerk (>= 2.7)
|
|
515
517
|
xpath (3.2.0)
|
|
516
518
|
nokogiri (~> 1.8)
|
|
517
|
-
yard (0.9.
|
|
519
|
+
yard (0.9.43)
|
|
518
520
|
zeitwerk (2.7.5)
|
|
519
521
|
|
|
520
522
|
PLATFORMS
|
data/README.md
CHANGED
|
@@ -210,6 +210,14 @@ When you're done, disable the local package:
|
|
|
210
210
|
|
|
211
211
|
yarn unlink ~/projects/trek
|
|
212
212
|
|
|
213
|
+
### Working on documentation
|
|
214
|
+
|
|
215
|
+
The docs, based on [VitePress](https://vitepress.dev), are embedded in the `/docs` folder.
|
|
216
|
+
|
|
217
|
+
- Launch dev mode: `yarn docs:dev`
|
|
218
|
+
- Build the docs: `yarn docs:build`
|
|
219
|
+
- Open the built docs: `yarn docs:preview`
|
|
220
|
+
|
|
213
221
|
### Publishing a new version
|
|
214
222
|
|
|
215
223
|
make release
|
|
@@ -41,3 +41,184 @@
|
|
|
41
41
|
--accent-11: var(--cyan-11);
|
|
42
42
|
--accent-12: var(--cyan-12);
|
|
43
43
|
}
|
|
44
|
+
|
|
45
|
+
/* Define the accent color overrides */
|
|
46
|
+
[data-accent-color="amber"] {
|
|
47
|
+
--accent-1: var(--amber-1);
|
|
48
|
+
--accent-2: var(--amber-2);
|
|
49
|
+
--accent-3: var(--amber-3);
|
|
50
|
+
--accent-4: var(--amber-4);
|
|
51
|
+
--accent-5: var(--amber-5);
|
|
52
|
+
--accent-6: var(--amber-6);
|
|
53
|
+
--accent-7: var(--amber-7);
|
|
54
|
+
--accent-8: var(--amber-8);
|
|
55
|
+
--accent-9: var(--amber-9);
|
|
56
|
+
--accent-10: var(--amber-10);
|
|
57
|
+
--accent-11: var(--amber-11);
|
|
58
|
+
--accent-12: var(--amber-12);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
[data-accent-color="blue"] {
|
|
62
|
+
--accent-1: var(--blue-1);
|
|
63
|
+
--accent-2: var(--blue-2);
|
|
64
|
+
--accent-3: var(--blue-3);
|
|
65
|
+
--accent-4: var(--blue-4);
|
|
66
|
+
--accent-5: var(--blue-5);
|
|
67
|
+
--accent-6: var(--blue-6);
|
|
68
|
+
--accent-7: var(--blue-7);
|
|
69
|
+
--accent-8: var(--blue-8);
|
|
70
|
+
--accent-9: var(--blue-9);
|
|
71
|
+
--accent-10: var(--blue-10);
|
|
72
|
+
--accent-11: var(--blue-11);
|
|
73
|
+
--accent-12: var(--blue-12);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
[data-accent-color="cyan"] {
|
|
77
|
+
--accent-1: var(--cyan-1);
|
|
78
|
+
--accent-2: var(--cyan-2);
|
|
79
|
+
--accent-3: var(--cyan-3);
|
|
80
|
+
--accent-4: var(--cyan-4);
|
|
81
|
+
--accent-5: var(--cyan-5);
|
|
82
|
+
--accent-6: var(--cyan-6);
|
|
83
|
+
--accent-7: var(--cyan-7);
|
|
84
|
+
--accent-8: var(--cyan-8);
|
|
85
|
+
--accent-9: var(--cyan-9);
|
|
86
|
+
--accent-10: var(--cyan-10);
|
|
87
|
+
--accent-11: var(--cyan-11);
|
|
88
|
+
--accent-12: var(--cyan-12);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
[data-accent-color="grass"] {
|
|
92
|
+
--accent-1: var(--grass-1);
|
|
93
|
+
--accent-2: var(--grass-2);
|
|
94
|
+
--accent-3: var(--grass-3);
|
|
95
|
+
--accent-4: var(--grass-4);
|
|
96
|
+
--accent-5: var(--grass-5);
|
|
97
|
+
--accent-6: var(--grass-6);
|
|
98
|
+
--accent-7: var(--grass-7);
|
|
99
|
+
--accent-8: var(--grass-8);
|
|
100
|
+
--accent-9: var(--grass-9);
|
|
101
|
+
--accent-10: var(--grass-10);
|
|
102
|
+
--accent-11: var(--grass-11);
|
|
103
|
+
--accent-12: var(--grass-12);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
[data-accent-color="lime"] {
|
|
107
|
+
--accent-1: var(--lime-1);
|
|
108
|
+
--accent-2: var(--lime-2);
|
|
109
|
+
--accent-3: var(--lime-3);
|
|
110
|
+
--accent-4: var(--lime-4);
|
|
111
|
+
--accent-5: var(--lime-5);
|
|
112
|
+
--accent-6: var(--lime-6);
|
|
113
|
+
--accent-7: var(--lime-7);
|
|
114
|
+
--accent-8: var(--lime-8);
|
|
115
|
+
--accent-9: var(--lime-9);
|
|
116
|
+
--accent-10: var(--lime-10);
|
|
117
|
+
--accent-11: var(--lime-11);
|
|
118
|
+
--accent-12: var(--lime-12);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
[data-accent-color="mint"] {
|
|
122
|
+
--accent-1: var(--mint-1);
|
|
123
|
+
--accent-2: var(--mint-2);
|
|
124
|
+
--accent-3: var(--mint-3);
|
|
125
|
+
--accent-4: var(--mint-4);
|
|
126
|
+
--accent-5: var(--mint-5);
|
|
127
|
+
--accent-6: var(--mint-6);
|
|
128
|
+
--accent-7: var(--mint-7);
|
|
129
|
+
--accent-8: var(--mint-8);
|
|
130
|
+
--accent-9: var(--mint-9);
|
|
131
|
+
--accent-10: var(--mint-10);
|
|
132
|
+
--accent-11: var(--mint-11);
|
|
133
|
+
--accent-12: var(--mint-12);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
[data-accent-color="purple"] {
|
|
137
|
+
--accent-1: var(--purple-1);
|
|
138
|
+
--accent-2: var(--purple-2);
|
|
139
|
+
--accent-3: var(--purple-3);
|
|
140
|
+
--accent-4: var(--purple-4);
|
|
141
|
+
--accent-5: var(--purple-5);
|
|
142
|
+
--accent-6: var(--purple-6);
|
|
143
|
+
--accent-7: var(--purple-7);
|
|
144
|
+
--accent-8: var(--purple-8);
|
|
145
|
+
--accent-9: var(--purple-9);
|
|
146
|
+
--accent-10: var(--purple-10);
|
|
147
|
+
--accent-11: var(--purple-11);
|
|
148
|
+
--accent-12: var(--purple-12);
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
[data-accent-color="sky"] {
|
|
152
|
+
--accent-1: var(--sky-1);
|
|
153
|
+
--accent-2: var(--sky-2);
|
|
154
|
+
--accent-3: var(--sky-3);
|
|
155
|
+
--accent-4: var(--sky-4);
|
|
156
|
+
--accent-5: var(--sky-5);
|
|
157
|
+
--accent-6: var(--sky-6);
|
|
158
|
+
--accent-7: var(--sky-7);
|
|
159
|
+
--accent-8: var(--sky-8);
|
|
160
|
+
--accent-9: var(--sky-9);
|
|
161
|
+
--accent-10: var(--sky-10);
|
|
162
|
+
--accent-11: var(--sky-11);
|
|
163
|
+
--accent-12: var(--sky-12);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
[data-accent-color="slate"] {
|
|
167
|
+
--accent-1: var(--slate-1);
|
|
168
|
+
--accent-2: var(--slate-2);
|
|
169
|
+
--accent-3: var(--slate-3);
|
|
170
|
+
--accent-4: var(--slate-4);
|
|
171
|
+
--accent-5: var(--slate-5);
|
|
172
|
+
--accent-6: var(--slate-6);
|
|
173
|
+
--accent-7: var(--slate-7);
|
|
174
|
+
--accent-8: var(--slate-8);
|
|
175
|
+
--accent-9: var(--slate-9);
|
|
176
|
+
--accent-10: var(--slate-10);
|
|
177
|
+
--accent-11: var(--slate-11);
|
|
178
|
+
--accent-12: var(--slate-12);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
[data-accent-color="teal"] {
|
|
182
|
+
--accent-1: var(--teal-1);
|
|
183
|
+
--accent-2: var(--teal-2);
|
|
184
|
+
--accent-3: var(--teal-3);
|
|
185
|
+
--accent-4: var(--teal-4);
|
|
186
|
+
--accent-5: var(--teal-5);
|
|
187
|
+
--accent-6: var(--teal-6);
|
|
188
|
+
--accent-7: var(--teal-7);
|
|
189
|
+
--accent-8: var(--teal-8);
|
|
190
|
+
--accent-9: var(--teal-9);
|
|
191
|
+
--accent-10: var(--teal-10);
|
|
192
|
+
--accent-11: var(--teal-11);
|
|
193
|
+
--accent-12: var(--teal-12);
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
[data-accent-color="tomato"] {
|
|
197
|
+
--accent-1: var(--tomato-1);
|
|
198
|
+
--accent-2: var(--tomato-2);
|
|
199
|
+
--accent-3: var(--tomato-3);
|
|
200
|
+
--accent-4: var(--tomato-4);
|
|
201
|
+
--accent-5: var(--tomato-5);
|
|
202
|
+
--accent-6: var(--tomato-6);
|
|
203
|
+
--accent-7: var(--tomato-7);
|
|
204
|
+
--accent-8: var(--tomato-8);
|
|
205
|
+
--accent-9: var(--tomato-9);
|
|
206
|
+
--accent-10: var(--tomato-10);
|
|
207
|
+
--accent-11: var(--tomato-11);
|
|
208
|
+
--accent-12: var(--tomato-12);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
[data-accent-color="violet"] {
|
|
212
|
+
--accent-1: var(--violet-1);
|
|
213
|
+
--accent-2: var(--violet-2);
|
|
214
|
+
--accent-3: var(--violet-3);
|
|
215
|
+
--accent-4: var(--violet-4);
|
|
216
|
+
--accent-5: var(--violet-5);
|
|
217
|
+
--accent-6: var(--violet-6);
|
|
218
|
+
--accent-7: var(--violet-7);
|
|
219
|
+
--accent-8: var(--violet-8);
|
|
220
|
+
--accent-9: var(--violet-9);
|
|
221
|
+
--accent-10: var(--violet-10);
|
|
222
|
+
--accent-11: var(--violet-11);
|
|
223
|
+
--accent-12: var(--violet-12);
|
|
224
|
+
}
|
|
@@ -35,6 +35,12 @@ module Trek
|
|
|
35
35
|
)
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
+
def data_attributes
|
|
39
|
+
attributes = {}
|
|
40
|
+
attributes["accent-color"] = color if color
|
|
41
|
+
attributes.merge(data)
|
|
42
|
+
end
|
|
43
|
+
|
|
38
44
|
def rendered_content
|
|
39
45
|
safe_join([
|
|
40
46
|
icon,
|
|
@@ -48,7 +54,7 @@ module Trek
|
|
|
48
54
|
link_to rendered_content,
|
|
49
55
|
href,
|
|
50
56
|
class: classes,
|
|
51
|
-
data:
|
|
57
|
+
data: data_attributes,
|
|
52
58
|
rel: rel,
|
|
53
59
|
target: target,
|
|
54
60
|
title: title
|
|
@@ -57,7 +63,7 @@ module Trek
|
|
|
57
63
|
link_to rendered_content,
|
|
58
64
|
to,
|
|
59
65
|
class: classes,
|
|
60
|
-
data:
|
|
66
|
+
data: data_attributes.merge(turbo_method: method),
|
|
61
67
|
form: form,
|
|
62
68
|
form_class: form_class,
|
|
63
69
|
params: params
|
|
@@ -65,7 +71,7 @@ module Trek
|
|
|
65
71
|
content_tag tag,
|
|
66
72
|
rendered_content,
|
|
67
73
|
class: classes,
|
|
68
|
-
data
|
|
74
|
+
data: data_attributes,
|
|
69
75
|
form:,
|
|
70
76
|
type:,
|
|
71
77
|
value:
|
|
@@ -9,11 +9,11 @@
|
|
|
9
9
|
|
|
10
10
|
align-items: center;
|
|
11
11
|
background-color: var(--slate-4);
|
|
12
|
-
flex-shrink: 0;
|
|
13
12
|
border: 1px solid var(--slate-a6);
|
|
14
13
|
border-radius: 0.2rem;
|
|
15
14
|
color: var(--slate-8);
|
|
16
15
|
display: flex;
|
|
16
|
+
flex-shrink: 0;
|
|
17
17
|
height: 11.5rem;
|
|
18
18
|
justify-content: center;
|
|
19
19
|
margin-right: 2rem;
|
|
@@ -34,8 +34,11 @@ module Trek
|
|
|
34
34
|
# Returns model element as an array of symbols for route building.
|
|
35
35
|
# For namespaced models like Missive::List, returns [:missive, :list].
|
|
36
36
|
# For non-namespaced models like Page, returns [:page].
|
|
37
|
+
# Derived from collection (which preserves namespace) rather than element
|
|
38
|
+
# (which demodulizes).
|
|
37
39
|
def model_element_route
|
|
38
|
-
model_name.
|
|
40
|
+
parts = model_name.collection.split("/")
|
|
41
|
+
(parts[0...-1] + [parts.last.singularize]).map(&:to_sym)
|
|
39
42
|
end
|
|
40
43
|
|
|
41
44
|
def model_intro(action: nil)
|
data/config/locales/trek.en.yml
CHANGED
|
@@ -216,10 +216,12 @@ en:
|
|
|
216
216
|
h4: 4th-level title
|
|
217
217
|
hard_break: Line break
|
|
218
218
|
horizontal_rule: Horizontal line
|
|
219
|
+
image: Image
|
|
219
220
|
italic: Italic
|
|
220
221
|
link: Link
|
|
221
222
|
paragraph: Paragraph
|
|
222
223
|
placeholder: Write something…
|
|
224
|
+
prompt: Action
|
|
223
225
|
redo: Redo the last operation
|
|
224
226
|
undo: Undo the last operation
|
|
225
227
|
list:
|