1
- <!DOCTYPE html>
1
+ <!doctype html>
2
2
< html lang ="en ">
3
3
< head >
4
4
< meta charset ="UTF-8 " />
11
11
< title > Stimulus Rails Nested Form</ title >
12
12
13
13
< script type ="module " defer >
14
- import ' ./src/app.css'
15
- import { Application } from ' @hotwired/stimulus'
16
- import NestedForm from ' ./src/index'
14
+ import " ./src/app.css"
15
+ import { Application } from " @hotwired/stimulus"
16
+ import RailsNestedForm from " ./src/index"
17
17
18
18
const application = Application . start ( )
19
- application . register ( ' nested-form' , NestedForm )
19
+ application . register ( " nested-form" , RailsNestedForm )
20
20
</ script >
21
21
</ head >
22
22
23
23
< body >
24
- <!-- This example requires Tailwind CSS v2.0+ -->
25
- < div class ="relative bg-gray-50 overflow-hidden ">
26
- < div class ="hidden sm:block sm:absolute sm:inset-y-0 sm:h-full sm:w-full " aria-hidden ="true ">
27
- < div class ="relative h-full max-w-7xl mx-auto ">
28
- < svg
29
- class ="absolute right-full transform translate-y-1/4 translate-x-1/4 lg:translate-x-1/2 "
30
- width ="404 "
31
- height ="784 "
32
- fill ="none "
33
- viewBox ="0 0 404 784 "
34
- >
35
- < defs >
36
- < pattern
37
- id ="f210dbf6-a58d-4871-961e-36d5016a0f49 "
38
- x ="0 "
39
- y ="0 "
40
- width ="20 "
41
- height ="20 "
42
- patternUnits ="userSpaceOnUse "
43
- >
44
- < rect x ="0 " y ="0 " width ="4 " height ="4 " class ="text-gray-200 " fill ="currentColor " />
45
- </ pattern >
46
- </ defs >
47
- < rect width ="404 " height ="784 " fill ="url(#f210dbf6-a58d-4871-961e-36d5016a0f49) " />
48
- </ svg >
49
- < svg
50
- class ="absolute left-full transform -translate-y-3/4 -translate-x-1/4 md:-translate-y-1/2 lg:-translate-x-1/2 "
51
- width ="404 "
52
- height ="784 "
53
- fill ="none "
54
- viewBox ="0 0 404 784 "
55
- >
56
- < defs >
57
- < pattern
58
- id ="5d0dd344-b041-4d26-bec4-8d33ea57ec9b "
59
- x ="0 "
60
- y ="0 "
61
- width ="20 "
62
- height ="20 "
63
- patternUnits ="userSpaceOnUse "
64
- >
65
- < rect x ="0 " y ="0 " width ="4 " height ="4 " class ="text-gray-200 " fill ="currentColor " />
66
- </ pattern >
67
- </ defs >
68
- < rect width ="404 " height ="784 " fill ="url(#5d0dd344-b041-4d26-bec4-8d33ea57ec9b) " />
69
- </ svg >
24
+ < div class ="relative bg-white overflow-hidden ">
25
+ < div class ="relative isolate pt-14 ">
26
+ < div
27
+ class ="absolute inset-x-0 top-[calc(100%-13rem)] -z-10 transform-gpu overflow-hidden blur-3xl sm:top-[calc(100%-30rem)] "
28
+ aria-hidden ="true "
29
+ >
30
+ < div
31
+ class ="relative left-[calc(50%+3rem)] aspect-[1155/678] w-[36.125rem] -translate-x-1/2 bg-gradient-to-tr from-yellow-500 to-orange-500 opacity-30 sm:left-[calc(50%+36rem)] sm:w-[72.1875rem] "
32
+ style ="
33
+ clip-path: polygon(
34
+ 74.1% 44.1%,
35
+ 100% 61.6%,
36
+ 97.5% 26.9%,
37
+ 85.5% 0.1%,
38
+ 80.7% 2%,
39
+ 72.5% 32.5%,
40
+ 60.2% 62.4%,
41
+ 52.4% 68.1%,
42
+ 47.5% 58.3%,
43
+ 45.2% 34.5%,
44
+ 27.5% 76.7%,
45
+ 0.1% 64.9%,
46
+ 17.9% 100%,
47
+ 27.6% 76.8%,
48
+ 76.1% 97.7%,
49
+ 74.1% 44.1%
50
+ );
51
+ "
52
+ > </ div >
70
53
</ div >
71
54
</ div >
72
55
@@ -85,8 +68,11 @@ <h1 class="text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:t
85
68
</ p >
86
69
87
70
< p class ="text-center mt-3 ">
88
- < img class ="inline-block " src ="https://img.shields.io/npm/dt/stimulus-rails-nested-form.svg " />
89
- < img class ="inline-block " src ="https://img.shields.io/npm/v/stimulus-rails-nested-form.svg " />
71
+ < img
72
+ class ="inline-block "
73
+ src ="https://img.shields.io/npm/dt/@stimulus-components/rails-nested-form.svg "
74
+ />
75
+ < img class ="inline-block " src ="https://img.shields.io/npm/v/@stimulus-components/rails-nested-form.svg " />
90
76
91
77
< img
92
78
class ="inline-block "
@@ -107,7 +93,7 @@ <h1 class="text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:t
107
93
< div class ="mt-5 max-w-md mx-auto sm:flex sm:justify-center md:mt-8 ">
108
94
< div class ="rounded-md shadow ">
109
95
< a
110
- href ="https://www.stimulus-components.com/docs/stimulus-rails-nested-form "
96
+ href ="https://www.stimulus-components.com/docs/stimulus-rails-nested-form/ "
111
97
class ="w-full flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-md text-white bg-gradient-to-r from-yellow-500 to-orange-500 md:py-4 md:text-lg md:px-10 "
112
98
>
113
99
Documentation →
@@ -118,7 +104,7 @@ <h1 class="text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:t
118
104
href ="https://github.com/stimulus-components/stimulus-rails-nested-form "
119
105
class ="w-full flex items-center justify-center gap-1 px-8 py-3 border border-transparent text-base font-medium rounded-md bg-white hover:bg-gray-50 md:py-4 md:text-lg md:px-10 "
120
106
>
121
- < svg fill ="currentColor " viewBox ="0 0 24 24 " aria-hidden ="true " class ="h-6 w -6 ">
107
+ < svg fill ="currentColor " viewBox ="0 0 24 24 " aria-hidden ="true " class ="size -6 ">
122
108
< path
123
109
fill-rule ="evenodd "
124
110
d ="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z "
@@ -198,15 +184,14 @@ <h1 class="text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:t
198
184
199
185
< button
200
186
type ="submit "
201
- class ="mt-4 bg-indigo -600 hover:bg-indigo-400 text-white font-semibold py-2 px-4 border rounded shadow "
187
+ class ="mt-4 bg-blue -600 hover:bg-blue-500 text-white font-semibold py-2 px-4 border rounded shadow "
202
188
>
203
189
Save todos
204
190
</ button >
205
191
</ form >
206
192
</ section >
207
193
</ div >
208
194
209
- <!-- This example requires Tailwind CSS v2.0+ -->
210
195
< footer class ="bg-white ">
211
196
< div class ="max-w-7xl mx-auto py-12 px-4 overflow-hidden sm:px-6 lg:px-8 ">
212
197
< div class ="-mx-5 -my-2 flex flex-wrap justify-center " aria-label ="Footer ">
@@ -229,9 +214,11 @@ <h1 class="text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:t
229
214
class ="text-gray-400 hover:text-gray-500 "
230
215
>
231
216
< span class ="sr-only "> Twitter</ span >
232
- < svg class ="h-6 w-6 " fill ="currentColor " viewBox ="0 0 24 24 " aria-hidden =" true ">
217
+ < svg class ="size-6 " fill ="currentColor " viewBox ="0 0 512 512 ">
233
218
< path
234
- d ="M8.29 20.251c7.547 0 11.675-6.253 11.675-11.675 0-.178 0-.355-.012-.53A8.348 8.348 0 0022 5.92a8.19 8.19 0 01-2.357.646 4.118 4.118 0 001.804-2.27 8.224 8.224 0 01-2.605.996 4.107 4.107 0 00-6.993 3.743 11.65 11.65 0 01-8.457-4.287 4.106 4.106 0 001.27 5.477A4.072 4.072 0 012.8 9.713v.052a4.105 4.105 0 003.292 4.022 4.095 4.095 0 01-1.853.07 4.108 4.108 0 003.834 2.85A8.233 8.233 0 012 18.407a11.616 11.616 0 006.29 1.84 "
219
+ fill-rule ="evenodd "
220
+ d ="M389.2 48h70.6L305.6 224.2 487 464H345L233.7 318.6 106.5 464H35.8L200.7 275.5 26.8 48H172.4L272.9 180.9 389.2 48zM364.4 421.8h39.1L151.1 88h-42L364.4 421.8z "
221
+ clip-rule ="evenodd "
235
222
/>
236
223
</ svg >
237
224
</ a >
@@ -243,7 +230,7 @@ <h1 class="text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:t
243
230
class ="text-gray-400 hover:text-gray-500 "
244
231
>
245
232
< span class ="sr-only "> GitHub</ span >
246
- < svg class ="h-6 w -6 " fill ="currentColor " viewBox ="0 0 24 24 " aria-hidden ="true ">
233
+ < svg class ="size -6 " fill ="currentColor " viewBox ="0 0 24 24 " aria-hidden ="true ">
247
234
< path
248
235
fill-rule ="evenodd "
249
236
d ="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z "
0 commit comments