-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
414 lines (385 loc) · 16.8 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="description" content="A Stimulus controller that add a mouse-tracing glow effect." />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Stimulus Glow</title>
<script type="module" defer>
import './src/app.css'
import { Application } from '@hotwired/stimulus'
import Glow from './src/index'
const application = Application.start()
application.register('glow', Glow)
</script>
</head>
<body>
<!-- This example requires Tailwind CSS v2.0+ -->
<div class="relative bg-gray-50 overflow-hidden">
<div class="hidden sm:block sm:absolute sm:inset-y-0 sm:h-full sm:w-full" aria-hidden="true">
<div class="relative h-full max-w-7xl mx-auto">
<svg
class="absolute right-full transform translate-y-1/4 translate-x-1/4 lg:translate-x-1/2"
width="404"
height="784"
fill="none"
viewBox="0 0 404 784"
>
<defs>
<pattern
id="f210dbf6-a58d-4871-961e-36d5016a0f49"
x="0"
y="0"
width="20"
height="20"
patternUnits="userSpaceOnUse"
>
<rect x="0" y="0" width="4" height="4" class="text-gray-200" fill="currentColor" />
</pattern>
</defs>
<rect width="404" height="784" fill="url(#f210dbf6-a58d-4871-961e-36d5016a0f49)" />
</svg>
<svg
class="
absolute
left-full
transform
-translate-y-3/4 -translate-x-1/4
md:-translate-y-1/2
lg:-translate-x-1/2
"
width="404"
height="784"
fill="none"
viewBox="0 0 404 784"
>
<defs>
<pattern
id="5d0dd344-b041-4d26-bec4-8d33ea57ec9b"
x="0"
y="0"
width="20"
height="20"
patternUnits="userSpaceOnUse"
>
<rect x="0" y="0" width="4" height="4" class="text-gray-200" fill="currentColor" />
</pattern>
</defs>
<rect width="404" height="784" fill="url(#5d0dd344-b041-4d26-bec4-8d33ea57ec9b)" />
</svg>
</div>
</div>
<div class="relative pt-6 pb-16 sm:pb-24">
<main class="mt-16 mx-auto max-w-7xl px-4 sm:mt-24">
<div class="text-center">
<h1 class="text-4xl tracking-tight font-extrabold text-gray-900 sm:text-5xl md:text-6xl">
<span class="block xl:inline">Stimulus</span>
<span class="block bg-gradient-to-r from-yellow-500 to-orange-500 xl:inline bg-clip-text text-transparent"
>Glow</span
>
</h1>
<p class="mt-3 max-w-md mx-auto text-base text-gray-500 sm:text-lg md:mt-5 md:text-xl md:max-w-3xl">
A Stimulus controller that add a mouse-tracing glow effect.
</p>
<p class="text-center mt-3">
<img class="inline-block" src="https://img.shields.io/npm/dt/stimulus-glow.svg" />
<img class="inline-block" src="https://img.shields.io/npm/v/stimulus-glow.svg" />
<img
class="inline-block"
src="https://github.com/stimulus-components/stimulus-glow/workflows/Lint/badge.svg"
/>
<img
class="inline-block"
src="https://img.shields.io/github/license/stimulus-components/stimulus-glow.svg"
/>
</p>
<div class="mt-5 max-w-md mx-auto sm:flex sm:justify-center md:mt-8">
<div class="rounded-md shadow">
<a
href="https://www.stimulus-components.com/docs/stimulus-glow/"
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
"
>
Documentation →
</a>
</div>
<div class="mt-3 rounded-md shadow sm:mt-0 sm:ml-3">
<a
href="https://github.com/stimulus-components/stimulus-glow"
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
"
>
<svg fill="currentColor" viewBox="0 0 24 24" aria-hidden="true" class="h-6 w-6">
<path
fill-rule="evenodd"
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"
clip-rule="evenodd"
></path>
</svg>
GitHub
</a>
</div>
</div>
</div>
</main>
</div>
</div>
<div class="h-full max-w-5xl mx-auto px-4">
<section class="mt-16 space-y-12">
<div data-controller="glow" class="relative glow-capture">
<div
data-glow-target="child"
class="
glow glow:ring-1 glow:border-glow glow:ring-glow glow:bg-glow/[.15]
border-4 border-gray-400
rounded-lg
bg-gray-900
"
>
<div class="grid grid-cols-6 gap-2 place-items-center">
<div class="col-span-3 p-8">
<h2 class="font-bold text-2xl mb-4 text-gray-200 glow:text-glow/[.8]">Chicken Shawarma & Veggies</h2>
<p class="text-sm text-gray-300 glow:text-glow">Vitae ducimus harum earum ratione autem esse ea!</p>
<button
class="
flex
gap-3
items-center
px-10
py-3
mt-10
mb-5
text-gray-200
whitespace-nowrap
bg-gray-800
rounded-xl
border
transition-colors
border-border
hover:text-text-primary
glow:text-glow glow:border-glow glow:ring glow:ring-glow
"
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-6 h-6"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M15.75 10.5V6a3.75 3.75 0 1 0-7.5 0v4.5m11.356-1.993 1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 0 1-1.12-1.243l1.264-12A1.125 1.125 0 0 1 5.513 7.5h12.974c.576 0 1.059.435 1.119 1.007ZM8.625 10.5a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm7.5 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"
></path></svg
><span>Add to cart</span>
</button>
</div>
<div class="col-span-3 -mt-5 -mb-10">
<img class="h-[350px] object-cover object-left" src="/assets/bowl.png" lazy="loading" />
</div>
</div>
</div>
<div data-glow-target="overlay" class="glow-overlay" style="--glow-color: #f97316"></div>
</div>
<div data-controller="glow" class="relative glow-capture">
<div
data-glow-target="child"
class="
glow glow:ring-1 glow:border-glow glow:ring-glow glow:bg-glow/[.15]
border-4 border-gray-400
rounded-lg
bg-gray-900
"
>
<div class="grid grid-cols-6 gap-2 place-items-center">
<div class="col-span-3 p-8">
<h2 class="font-bold text-2xl mb-4 text-gray-200 glow:text-glow/[.8]">
Bourbon Teriyaki Salmon Rice Bowl
</h2>
<p class="text-sm text-gray-300 glow:text-glow">Vitae ducimus harum earum ratione autem esse ea!</p>
<button
class="
flex
gap-3
items-center
px-10
py-3
mt-10
mb-5
text-gray-200
whitespace-nowrap
bg-gray-800
rounded-xl
border
transition-colors
border-border
hover:text-text-primary
glow:text-glow glow:border-glow glow:ring glow:ring-glow
"
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-6 h-6"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M15.75 10.5V6a3.75 3.75 0 1 0-7.5 0v4.5m11.356-1.993 1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 0 1-1.12-1.243l1.264-12A1.125 1.125 0 0 1 5.513 7.5h12.974c.576 0 1.059.435 1.119 1.007ZM8.625 10.5a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm7.5 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"
></path></svg
><span>Add to cart</span>
</button>
</div>
<div class="col-span-3 -mt-5 -mb-10">
<img class="h-[350px] object-cover object-left" src="/assets/bowl.png" lazy="loading" />
</div>
</div>
</div>
<div data-glow-target="overlay" class="glow-overlay" style="--glow-color: #10b981"></div>
</div>
<div data-controller="glow" class="relative glow-capture">
<div
data-glow-target="child"
class="
glow glow:ring-1 glow:border-glow glow:ring-glow glow:bg-glow/[.15]
border-4 border-gray-400
rounded-lg
bg-gray-900
"
>
<div class="grid grid-cols-6 gap-2 place-items-center">
<div class="col-span-3 p-8">
<h2 class="font-bold text-2xl mb-4 text-gray-200 glow:text-glow/[.8]">Vermicelli Noodle Bowl</h2>
<p class="text-sm text-gray-300 glow:text-glow">Vitae ducimus harum earum ratione autem esse ea!</p>
<button
class="
flex
gap-3
items-center
px-10
py-3
mt-10
mb-5
text-gray-200
whitespace-nowrap
bg-gray-800
rounded-xl
border
transition-colors
border-border
hover:text-text-primary
glow:text-glow glow:border-glow glow:ring glow:ring-glow
"
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke-width="1.5"
stroke="currentColor"
class="w-6 h-6"
>
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M15.75 10.5V6a3.75 3.75 0 1 0-7.5 0v4.5m11.356-1.993 1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 0 1-1.12-1.243l1.264-12A1.125 1.125 0 0 1 5.513 7.5h12.974c.576 0 1.059.435 1.119 1.007ZM8.625 10.5a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm7.5 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"
></path></svg
><span>Add to cart</span>
</button>
</div>
<div class="col-span-3 -mt-5 -mb-10">
<img class="h-[350px] object-cover object-left" src="/assets/bowl.png" lazy="loading" />
</div>
</div>
</div>
<div data-glow-target="overlay" class="glow-overlay" style="--glow-color: #3b82f6"></div>
</div>
</section>
</div>
<!-- This example requires Tailwind CSS v2.0+ -->
<footer class="bg-white">
<div class="max-w-7xl mx-auto py-12 px-4 overflow-hidden sm:px-6 lg:px-8">
<div class="-mx-5 -my-2 flex flex-wrap justify-center" aria-label="Footer">
<div class="px-5 py-2">
<p class="text-base text-gray-500">
stimulus-glow is a package from the
<a href="https://github.com/stimulus-components/stimulus-components" class="hover:text-gray-900 underline"
>stimulus-components</a
>
project.
</p>
</div>
</div>
<div class="mt-8 flex justify-center space-x-6">
<a
href="https://twitter.com/guillaumebriday"
target="_blank"
rel="noopener"
class="text-gray-400 hover:text-gray-500"
>
<span class="sr-only">Twitter</span>
<svg class="h-6 w-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path
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"
/>
</svg>
</a>
<a
href="https://github.com/stimulus-components/stimulus-glow"
target="_blank"
rel="noopener"
class="text-gray-400 hover:text-gray-500"
>
<span class="sr-only">GitHub</span>
<svg class="h-6 w-6" fill="currentColor" viewBox="0 0 24 24" aria-hidden="true">
<path
fill-rule="evenodd"
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"
clip-rule="evenodd"
/>
</svg>
</a>
</div>
<p class="mt-8 text-center text-base text-gray-400">
This project is released under the
<a href="https://opensource.org/licenses/MIT" class="hover:text-gray-900 underline">MIT</a>
license.
</p>
</div>
</footer>
</body>
</html>