|
1 | 1 | <section class="mx-auto w-full max-w-screen-lg px-5 pt-32"> |
2 | | - <div class="isolate grid place-items-center"> |
| 2 | + <div |
| 3 | + x-init=" |
| 4 | + () => { |
| 5 | + if (reducedMotion) return |
| 6 | + const timeline = gsap |
| 7 | + .timeline({ |
| 8 | + paused: true, |
| 9 | + }) |
| 10 | + .fromTo( |
| 11 | + $el, |
| 12 | + { |
| 13 | + autoAlpha: 0, |
| 14 | + y: -20, |
| 15 | + }, |
| 16 | + { |
| 17 | + autoAlpha: 1, |
| 18 | + y: 0, |
| 19 | + duration: 0.7, |
| 20 | + ease: 'power2.out', |
| 21 | + }, |
| 22 | + ) |
| 23 | + motion.inView( |
| 24 | + $el, |
| 25 | + (element) => { |
| 26 | + timeline.play() |
| 27 | + }, |
| 28 | + { |
| 29 | + amount: 1, |
| 30 | + }, |
| 31 | + ) |
| 32 | + } |
| 33 | + " |
| 34 | + class="isolate grid place-items-center" |
| 35 | + > |
3 | 36 | <div class="grid self-center justify-self-center [grid-area:1/-1]"> |
4 | 37 | <h2 |
5 | 38 | class="self-center justify-self-center font-afacad text-6xl font-bold text-slate-800 [grid-area:1/-1]" |
@@ -114,15 +147,78 @@ class="relative -z-50 w-[22rem] self-center justify-self-center [grid-area:1/-1] |
114 | 147 | /> |
115 | 148 | </div> |
116 | 149 | <h3 |
| 150 | + x-init=" |
| 151 | + () => { |
| 152 | + if (reducedMotion) return |
| 153 | + const timeline = gsap |
| 154 | + .timeline({ |
| 155 | + paused: true, |
| 156 | + }) |
| 157 | + .fromTo( |
| 158 | + $el, |
| 159 | + { |
| 160 | + autoAlpha: 0, |
| 161 | + y: 20, |
| 162 | + }, |
| 163 | + { |
| 164 | + autoAlpha: 1, |
| 165 | + y: 0, |
| 166 | + duration: 0.7, |
| 167 | + ease: 'power2.out', |
| 168 | + }, |
| 169 | + ) |
| 170 | + motion.inView( |
| 171 | + $el, |
| 172 | + (element) => { |
| 173 | + timeline.play() |
| 174 | + }, |
| 175 | + { |
| 176 | + amount: 1, |
| 177 | + }, |
| 178 | + ) |
| 179 | + } |
| 180 | + " |
117 | 181 | class="mx-auto max-w-3xl pt-3 text-center font-afacad text-2xl leading-normal text-gray-500" |
118 | 182 | > |
119 | 183 | Discover the enhancements and features in Filament V3, designed to |
120 | 184 | elevate your development experience. |
121 | 185 | </h3> |
122 | 186 | <div |
| 187 | + x-init=" |
| 188 | + () => { |
| 189 | + if (reducedMotion) return |
| 190 | + const timeline = gsap |
| 191 | + .timeline({ |
| 192 | + paused: true, |
| 193 | + }) |
| 194 | + .fromTo( |
| 195 | + $refAll('slide-in-left'), |
| 196 | + { |
| 197 | + autoAlpha: 0, |
| 198 | + x: -20, |
| 199 | + }, |
| 200 | + { |
| 201 | + autoAlpha: 1, |
| 202 | + x: 0, |
| 203 | + duration: 0.7, |
| 204 | + stagger: 0.1, |
| 205 | + ease: 'power2.out', |
| 206 | + }, |
| 207 | + ) |
| 208 | + motion.inView( |
| 209 | + $el, |
| 210 | + (element) => { |
| 211 | + timeline.play() |
| 212 | + }, |
| 213 | + { |
| 214 | + amount: 0.25, |
| 215 | + }, |
| 216 | + ) |
| 217 | + } |
| 218 | + " |
123 | 219 | class="grid grid-cols-[repeat(auto-fill,minmax(20rem,1fr))] items-center gap-5 pt-10 *:flex *:items-center *:gap-5 *:rounded-2xl *:bg-white *:px-5 *:py-7 *:ring-1 *:ring-black/5" |
124 | 220 | > |
125 | | - <div> |
| 221 | + <div x-ref="slide-in-left"> |
126 | 222 | {{-- Icon --}} |
127 | 223 | <svg |
128 | 224 | xmlns="http://www.w3.org/2000/svg" |
@@ -164,7 +260,7 @@ class="size-12 shrink-0" |
164 | 260 | </p> |
165 | 261 | </div> |
166 | 262 | </div> |
167 | | - <div> |
| 263 | + <div x-ref="slide-in-left"> |
168 | 264 | {{-- Icon --}} |
169 | 265 | <svg |
170 | 266 | xmlns="http://www.w3.org/2000/svg" |
@@ -247,7 +343,7 @@ class="size-12 shrink-0" |
247 | 343 | </p> |
248 | 344 | </div> |
249 | 345 | </div> |
250 | | - <div> |
| 346 | + <div x-ref="slide-in-left"> |
251 | 347 | {{-- Icon --}} |
252 | 348 | <svg |
253 | 349 | xmlns="http://www.w3.org/2000/svg" |
@@ -302,7 +398,7 @@ class="size-12 shrink-0" |
302 | 398 | </p> |
303 | 399 | </div> |
304 | 400 | </div> |
305 | | - <div> |
| 401 | + <div x-ref="slide-in-left"> |
306 | 402 | {{-- Icon --}} |
307 | 403 | <svg |
308 | 404 | xmlns="http://www.w3.org/2000/svg" |
@@ -403,7 +499,7 @@ class="size-12 shrink-0" |
403 | 499 | </p> |
404 | 500 | </div> |
405 | 501 | </div> |
406 | | - <div> |
| 502 | + <div x-ref="slide-in-left"> |
407 | 503 | {{-- Icon --}} |
408 | 504 | <svg |
409 | 505 | xmlns="http://www.w3.org/2000/svg" |
@@ -437,7 +533,7 @@ class="size-12 shrink-0" |
437 | 533 | </p> |
438 | 534 | </div> |
439 | 535 | </div> |
440 | | - <div> |
| 536 | + <div x-ref="slide-in-left"> |
441 | 537 | {{-- Icon --}} |
442 | 538 | <svg |
443 | 539 | xmlns="http://www.w3.org/2000/svg" |
|
0 commit comments