railsui 3.2.3 → 3.2.5

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.
Files changed (19) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/app/views/railsui/themes/corgie/components/modal/_settings.html.erb +5 -1
  4. data/app/views/railsui/themes/corgie/components/modal/_with_form.html.erb +46 -0
  5. data/lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/search_controller.js +14 -12
  6. data/lib/generators/railsui/install/templates/themes/corgie/views/layouts/rui/railsui.html.erb +4 -0
  7. data/lib/generators/railsui/install/templates/themes/corgie/views/layouts/rui/railsui_admin.html.erb +4 -0
  8. data/lib/generators/railsui/install/templates/themes/corgie/views/layouts/rui/railsui_auth.html.erb +4 -0
  9. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/pages/chat_show.html.erb +2 -2
  10. data/lib/generators/railsui/install/templates/themes/corgie/views/rui/shared/chat/_message.html.erb +2 -3
  11. data/lib/generators/railsui/install/templates/themes/hound/views/layouts/rui/railsui.html.erb +4 -0
  12. data/lib/generators/railsui/install/templates/themes/hound/views/layouts/rui/railsui_admin.html.erb +4 -0
  13. data/lib/generators/railsui/install/templates/themes/shepherd/views/layouts/rui/railsui.html.erb +4 -0
  14. data/lib/generators/railsui/install/templates/themes/shepherd/views/layouts/rui/railsui_admin.html.erb +4 -0
  15. data/lib/railsui/theme_setup.rb +3 -1
  16. data/lib/railsui/version.rb +1 -1
  17. metadata +2 -4
  18. data/app/assets/stylesheets/railsui/code.css +0 -137
  19. data/lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/highlight_controller.js +0 -13
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 65c8f8fddc779bebbaf3f7b9a5dc11ace2c285964c8306d18c6c60e7696fb400
4
- data.tar.gz: f98fb4101382bf441cab02f2755802aca10b03809d4ec69ebb1710188285d256
3
+ metadata.gz: e1a22e08555c7d6ded2d6358611329e1d6041c6ab2d53b8c4cfcbbe4a793e848
4
+ data.tar.gz: a63ed34c353fadd3fae3d7c1e05b9be39a52915ea7f6bac5486ead6adb74e2b4
5
5
  SHA512:
6
- metadata.gz: 6bbcb99405b65d34131567531fc8e6508fa91a11c5c2cd6f987fc7e9c3cab3d9e732d9a4cefceb6dd18734617a029d3cd34210f1c000a7240704066f2e3c8a19
7
- data.tar.gz: cbfb85ad4795f7b4666c1113524f3def71fac6ec4c173f693da681cf863d8a6a12de99428a838fd33f2c284586c2f3a1b02a32cc56cdaf74f3d9a4141eac1694
6
+ metadata.gz: 1a25a93a81cae08248aecbeb8451d42f3ad4fe4934977b1db44610d1fb2bf7a31224264654ecf8c5bd56a34e535a1d9dda5b41b7773c184573681f65c6aef2f5
7
+ data.tar.gz: cfaf43a8e71e093067ef5b7a1804003a426445b6c75dd666fde854109d2468c3dd65012fda254380307c8789155019123e3e8520e0c3680b607c98756aec8d23
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- railsui (3.2.3)
4
+ railsui (3.2.5)
5
5
  meta-tags
6
6
  psych
7
7
  rails (>= 7.0)
@@ -188,6 +188,10 @@
188
188
  </div>
189
189
  <% end %>
190
190
 
191
+ <% content_for :html, flush: true do %>
192
+
193
+ <% end %>
194
+
191
195
  <% content_for :js, flush: true do %>
192
196
  import { RailsuiModal, RailsuiTabs } from 'railsui-stimulus'
193
197
 
@@ -195,7 +199,7 @@ application.register('railsui-modal', RailsuiModal)
195
199
  application.register('railsui-tabls', RailsuiTabs)
196
200
  <% end %>
197
201
 
198
- <%= render_snippet(js_filename: "index.js") %>") %>
202
+ <%= render_snippet(js_filename: "index.js", active_tab: :erb) %>
199
203
  <% end %>
200
204
  <% end %>
201
205
  </div>
@@ -135,6 +135,52 @@ class="hidden rounded-2xl shadow-xl max-w-lg bg-white m-1 p-8 origin-bottom mx-a
135
135
  </div>
136
136
  <% end %>
137
137
 
138
+ <% content_for :erb, flush: true do %>
139
+ <div data-controller="railsui-modal">
140
+ <button type="button" data-action="click->railsui-modal#open" class="btn btn-primary" tabindex="0">
141
+ Open modal with form
142
+ </button>
143
+
144
+ <div aria-labelledby="modal-with-form" aria-modal="true" data-railsui-modal-target="container" data-action="keyup@window->railsui-modal#closeWithEsc" class="hidden fixed inset-0 z-50 overflow-y-auto" role="dialog">
145
+ <div class="h-screen w-full relative flex items-center justify-center">
146
+ <div data-railsui-modal-target="content"
147
+ data-transition-enter-active="transition ease-out duration-300"
148
+ data-transition-enter-from="transform opacity-0 scale-95"
149
+ data-transition-enter-to="transform opacity-100 scale-100"
150
+ data-transition-leave-active="transition ease-in duration-300"
151
+ data-transition-leave-from="transform opacity-100 scale-100"
152
+ data-transition-leave-to="transform opacity-0 scale-95"
153
+ class="hidden rounded-2xl shadow-xl max-w-lg bg-white m-1 p-8 origin-bottom mx-auto dark:bg-neutral-700 dark:text-neutral-200 relative">
154
+ <button type="button" class="absolute top-2 right-2 w-8 h-8 bg-transparent hover:bg-neutral-50 flex items-center justify-center rounded-full group dark:hover:bg-neutral-50/50" data-action="click->railsui-modal#close">
155
+ <%%= icon "x-mark", class: "text-neutral-400 size-6 group-hover:text-neutral-500 pointer-events-none dark:group-hover:text-neutral-800 dark:text-neutral-400" %>
156
+ </button>
157
+
158
+ <h3 id="modal-with-form" class="h3">Subscribe</h3>
159
+
160
+ <div class="prose prose-neutral dark:prose-invert mt-2 mb-6">
161
+ <p>Join our community to get early access to new features, exclusive content, and connect with other developers.</p>
162
+ </div>
163
+
164
+ <%%= form_with model: @subcriber, builder: Railsui::FormBuilder do |f| %>
165
+ <%%= f.form_group do %>
166
+ <%%= f.email_field :email, placeholder: "saasquatch@railsui.com", label: "E-mail" %>
167
+ <%% end %>
168
+
169
+ <%%= f.form_group do %>
170
+ <%%= f.text_area :reason, placeholder: "In a couple sentences let us know your reason for joining the Rails UI community", label: "Reason for joining" %>
171
+ <%% end %>
172
+
173
+ <div class="mt-8 flex justify-start items-center flex-wrap bg-neutral-50 px-8 py-4 -mx-8 -mb-8 border-t border-neutral-300 rounded-b-2xl shadow-inner space-x-4 dark:bg-neutral-700 dark:text-neutral-200 dark:border-neutral-600/70">
174
+ <%%= f.submit "Subscribe" %>
175
+ <%%= link_to "Cancel", "#", class: "btn btn-white", data: { action: "click->railsui-modal#close" } %>
176
+ </div>
177
+ <%% end %>
178
+ </div>
179
+ </div>
180
+ </div>
181
+ </div>
182
+ <% end %>
183
+
138
184
 
139
185
  <% content_for :js, flush: true do %>
140
186
  import { RailsuiModal } from 'railsui-stimulus'
@@ -5,18 +5,20 @@ export default class extends Controller {
5
5
  static targets = ["modal", "input", "results"]
6
6
 
7
7
  connect() {
8
- useTransition(this, {
9
- element: this.modalTarget,
10
- enterActive: "transition ease-out duration-200",
11
- enterFrom: "opacity-0 scale-95",
12
- enterTo: "opacity-100 scale-100",
13
- leaveActive: "transition ease-in duration-150",
14
- leaveFrom: "opacity-100 scale-100",
15
- leaveTo: "opacity-0 scale-95",
16
- })
17
- this.isOpen = false
18
- this.activeIndex = -1
19
- this.currentResults = []
8
+ if (this.hasModalTarget) {
9
+ useTransition(this, {
10
+ element: this.modalTarget,
11
+ enterActive: "transition ease-out duration-200",
12
+ enterFrom: "opacity-0 scale-95",
13
+ enterTo: "opacity-100 scale-100",
14
+ leaveActive: "transition ease-in duration-150",
15
+ leaveFrom: "opacity-100 scale-100",
16
+ leaveTo: "opacity-0 scale-95",
17
+ })
18
+ this.isOpen = false
19
+ this.activeIndex = -1
20
+ this.currentResults = []
21
+ }
20
22
  }
21
23
 
22
24
  open() {
@@ -7,12 +7,16 @@
7
7
  <meta charset="UTF-8" />
8
8
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
9
  <meta name="apple-mobile-web-app-capable" content="yes">
10
+ <meta name="mobile-web-app-capable" content="yes">
10
11
 
11
12
  <%= csrf_meta_tags %>
12
13
  <%= csp_meta_tag %>
13
14
 
14
15
  <%= yield :head %>
15
16
 
17
+ <%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %>
18
+ <%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>
19
+
16
20
  <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
17
21
  <%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %>
18
22
 
@@ -7,12 +7,16 @@
7
7
  <meta charset="UTF-8" />
8
8
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
9
  <meta name="apple-mobile-web-app-capable" content="yes">
10
+ <meta name="mobile-web-app-capable" content="yes">
10
11
 
11
12
  <%= csrf_meta_tags %>
12
13
  <%= csp_meta_tag %>
13
14
 
14
15
  <%= yield :head %>
15
16
 
17
+ <%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %>
18
+ <%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>
19
+
16
20
  <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
17
21
  <%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %>
18
22
 
@@ -7,12 +7,16 @@
7
7
  <meta charset="UTF-8" />
8
8
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
9
  <meta name="apple-mobile-web-app-capable" content="yes">
10
+ <meta name="mobile-web-app-capable" content="yes">
10
11
 
11
12
  <%= csrf_meta_tags %>
12
13
  <%= csp_meta_tag %>
13
14
 
14
15
  <%= yield :head %>
15
16
 
17
+ <%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %>
18
+ <%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>
19
+
16
20
  <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
17
21
  <%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %>
18
22
 
@@ -126,8 +126,8 @@
126
126
  <% end %>
127
127
 
128
128
  <%= render "rui/shared/chat/message", user: true do %>
129
- <p>How do I approach front end more easily?</p>
130
- <% end %>>
129
+ How do I approach front end more easily?
130
+ <% end %>
131
131
 
132
132
  <%= render "rui/shared/chat/message" do %>
133
133
  Front-end technologies like HTML, CSS, and JavaScript are essential for building the user interface of a web
@@ -4,7 +4,7 @@
4
4
  <article class="relative group">
5
5
  <div class="flex justify-end mb-1">
6
6
  <div class="chat">
7
- <div class="prose prose-neutral dark:prose-invert" data-controller="markdown hightlight code-block" data-markdown-target="content">
7
+ <div class="prose prose-neutral dark:prose-invert border-neutral-300/80 dark:border-neutral-700/80 prose-pre:border dark:prose-pre:border-neutral-700/80" data-controller="markdown code-block" data-markdown-target="content">
8
8
  <%= yield %>
9
9
  </div>
10
10
  </div>
@@ -22,7 +22,6 @@
22
22
  </button>
23
23
  </div>
24
24
  </article>
25
-
26
25
  <% else %>
27
26
  <article class="relative w-full group">
28
27
  <div class="absolute top-0 flex flex-col transition-opacity duration-300 opacity-0 -left-10 group-hover:opacity-100">
@@ -32,7 +31,7 @@
32
31
  <span class="sr-only">Copy</span>
33
32
  </button>
34
33
  </div>
35
- <div class="max-w-full pb-2 mb-2 prose prose-neutral dark:prose-invert border-neutral-300/80 dark:border-neutral-700/80 prose-pre:p-0 prose-pre:bg-transparent prose-pre:border dark:prose-pre:border-neutral-700/80" data-controller="markdown highlight code-block" data-markdown-target="content" data-highlight-target="code">
34
+ <div class="max-w-full pb-2 mb-2 prose prose-neutral dark:prose-invert border-neutral-300/80 dark:border-neutral-700/80 prose-pre:border dark:prose-pre:border-neutral-700/80" data-controller="markdown code-block" data-markdown-target="content">
36
35
  <%= yield %>
37
36
  </div>
38
37
 
@@ -7,11 +7,15 @@
7
7
  <meta charset="UTF-8" />
8
8
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
9
  <meta name="apple-mobile-web-app-capable" content="yes">
10
+ <meta name="mobile-web-app-capable" content="yes">
10
11
  <%= csrf_meta_tags %>
11
12
  <%= csp_meta_tag %>
12
13
 
13
14
  <%= yield :head %>
14
15
 
16
+ <%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %>
17
+ <%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>
18
+
15
19
  <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
16
20
  <%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %>
17
21
 
@@ -7,11 +7,15 @@
7
7
  <meta charset="UTF-8" />
8
8
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
9
  <meta name="apple-mobile-web-app-capable" content="yes">
10
+ <meta name="mobile-web-app-capable" content="yes">
10
11
  <%= csrf_meta_tags %>
11
12
  <%= csp_meta_tag %>
12
13
 
13
14
  <%= yield :head %>
14
15
 
16
+ <%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %>
17
+ <%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>
18
+
15
19
  <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
16
20
  <%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %>
17
21
 
@@ -7,11 +7,15 @@
7
7
  <meta charset="UTF-8" />
8
8
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
9
  <meta name="apple-mobile-web-app-capable" content="yes">
10
+ <meta name="mobile-web-app-capable" content="yes">
10
11
  <%= csrf_meta_tags %>
11
12
  <%= csp_meta_tag %>
12
13
 
13
14
  <%= yield :head %>
14
15
 
16
+ <%# Enable PWA manifest for installable apps (make sure to enable in config/routes.r b too!) %>
17
+ <%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>
18
+
15
19
  <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
16
20
  <%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %>
17
21
 
@@ -7,11 +7,15 @@
7
7
  <meta charset="UTF-8" />
8
8
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
9
  <meta name="apple-mobile-web-app-capable" content="yes">
10
+ <meta name="mobile-web-app-capable" content="yes">
10
11
  <%= csrf_meta_tags %>
11
12
  <%= csp_meta_tag %>
12
13
 
13
14
  <%= yield :head %>
14
15
 
16
+ <%# Enable PWA manifest for installable apps (make sure to enable in config/routes.r b too!) %>
17
+ <%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>
18
+
15
19
  <%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
16
20
  <%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %>
17
21
 
@@ -101,7 +101,7 @@ module Railsui
101
101
 
102
102
  # Generate import statements for stylesheets
103
103
  import_statements = stylesheet_files.map do |file|
104
- "@import \"../stylesheets/railsui/#{File.basename(file, ".css")}\";"
104
+ "@import \"./railsui/#{File.basename(file, ".css")}\";"
105
105
  end.join("\n")
106
106
 
107
107
  # Read the existing application.tailwind.css content
@@ -111,6 +111,8 @@ module Railsui
111
111
  cleaned_css_content = application_css_content
112
112
  cleaned_css_content = cleaned_css_content.gsub(/@import "tailwindcss";\n*/, "")
113
113
  cleaned_css_content = cleaned_css_content.gsub(%r{@import "\.\./stylesheets/railsui/.*";\n*}, "")
114
+ cleaned_css_content = cleaned_css_content.gsub(%r{@import "railsui/.*";\n*}, "")
115
+ cleaned_css_content = cleaned_css_content.gsub(%r{@import "\./railsui/.*";\n*}, "")
114
116
 
115
117
  # Add the new import statements in the correct order
116
118
  new_application_css_content = [
@@ -1,3 +1,3 @@
1
1
  module Railsui
2
- VERSION = "3.2.3"
2
+ VERSION = "3.2.5"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: railsui
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.2.3
4
+ version: 3.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Leverenz
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2025-08-23 00:00:00.000000000 Z
10
+ date: 2025-09-08 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: rails
@@ -739,7 +739,6 @@ files:
739
739
  - app/assets/images/users.svg
740
740
  - app/assets/images/warning.svg
741
741
  - app/assets/javascripts/railsui.js
742
- - app/assets/stylesheets/railsui/code.css
743
742
  - app/assets/stylesheets/railsui/config.css
744
743
  - app/assets/stylesheets/railsui/docs.css
745
744
  - app/assets/stylesheets/railsui/forms.css
@@ -1405,7 +1404,6 @@ files:
1405
1404
  - lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/character_count_controller.js
1406
1405
  - lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/chat_controller.js
1407
1406
  - lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/help_search_controller.js
1408
- - lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/highlight_controller.js
1409
1407
  - lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/markdown_controller.js
1410
1408
  - lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/search_controller.js
1411
1409
  - lib/generators/railsui/install/templates/themes/corgie/javascript/controllers/railsui/sidebar_controller.js
@@ -1,137 +0,0 @@
1
- pre code.hljs {
2
- display: block;
3
- overflow: auto !important;
4
- padding: 1em;
5
- font-family: theme("fontFamily.mono");
6
- font-size: 15px !important;
7
-
8
- @apply scrollbar-track-neutral-950 scrollbar-thumb-neutral-500;
9
- }
10
-
11
- code.hljs {
12
- padding: 3px 5px;
13
- }
14
-
15
- .hljs {
16
- color: theme("colors.neutral.100");
17
- }
18
- .hljs-attr,
19
- .hljs-tag {
20
- color: theme("colors.neutral.100");
21
- }
22
-
23
- .hljs-keyword {
24
- color: #c792ea;
25
- font-style: italic;
26
- }
27
- .hljs-built_in {
28
- color: #addb67;
29
- font-style: italic;
30
- }
31
- .hljs-type {
32
- color: #82aaff;
33
- }
34
- .hljs-literal {
35
- color: #ff5874;
36
- }
37
- .hljs-number {
38
- color: #f78c6c;
39
- }
40
- .hljs-regexp {
41
- color: #5ca7e4;
42
- }
43
- .hljs-string {
44
- color: theme("colors.sky.300");
45
- }
46
- .hljs-class {
47
- color: #ffcb8b;
48
- }
49
- .hljs-function {
50
- color: #82aaff;
51
- }
52
- .hljs-title {
53
- color: #dcdcaa;
54
- font-style: italic;
55
- }
56
- .hljs-params {
57
- color: #7fdbca;
58
- }
59
- .hljs-comment {
60
- color: #637777;
61
- font-style: italic;
62
- }
63
- .hljs-doctag {
64
- color: #7fdbca;
65
- }
66
- .hljs-meta,
67
- .hljs-meta .hljs-keyword {
68
- color: #82aaff;
69
- }
70
- .hljs-meta .hljs-string {
71
- color: #ecc48d;
72
- }
73
- .hljs-section {
74
- color: #82b1ff;
75
- }
76
- .hljs-selector-tag,
77
- .hljs-symbol,
78
- .hljs-subst,
79
- .hljs-name {
80
- color: theme("colors.pink.400");
81
- }
82
- .hljs-attribute {
83
- color: #80cbc4;
84
- }
85
- .hljs-variable {
86
- color: theme("colors.teal.400");
87
- }
88
- .hljs-bullet {
89
- color: #d9f5dd;
90
- }
91
- .hljs-code {
92
- color: #80cbc4;
93
- }
94
- .hljs-emphasis {
95
- color: #c792ea;
96
- font-style: italic;
97
- }
98
- .hljs-strong {
99
- color: #addb67;
100
- font-weight: 700;
101
- }
102
- .hljs-formula {
103
- color: #c792ea;
104
- }
105
- .hljs-link {
106
- color: #ff869a;
107
- }
108
- .hljs-quote {
109
- color: #697098;
110
- font-style: italic;
111
- }
112
- .hljs-selector-id {
113
- color: #fad430;
114
- }
115
- .hljs-selector-class {
116
- color: theme("colors.sky.400");
117
- font-style: italic;
118
- }
119
- .hljs-selector-attr,
120
- .hljs-selector-pseudo {
121
- color: #c792ea;
122
- font-style: italic;
123
- }
124
- .hljs-template-tag {
125
- color: #c792ea;
126
- }
127
- .hljs-template-variable {
128
- color: theme("colors.teal.400");
129
- }
130
- .hljs-addition {
131
- color: #addb67ff;
132
- font-style: italic;
133
- }
134
- .hljs-deletion {
135
- color: #ef535090;
136
- font-style: italic;
137
- }
@@ -1,13 +0,0 @@
1
- import { Controller } from "@hotwired/stimulus"
2
- import hljs from "highlight.js"
3
-
4
- export default class extends Controller {
5
- static targets = ["code"]
6
- connect() {
7
- this.codeTargets.forEach((target) => {
8
- target.querySelectorAll("pre code").forEach((c) => {
9
- hljs.highlightElement(c)
10
- })
11
- })
12
- }
13
- }