|
1 | 1 | <section class="mx-auto w-full max-w-screen-lg px-5 pt-20"> |
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 |
4 | 37 | class="isolate grid self-center justify-self-center [grid-area:1/-1]" |
5 | 38 | > |
@@ -136,16 +169,79 @@ class="relative -z-50 -my-14 -ml-10 w-[28rem] self-center justify-self-center [g |
136 | 169 | /> |
137 | 170 | </div> |
138 | 171 | <h3 |
| 172 | + x-init=" |
| 173 | + () => { |
| 174 | + if (reducedMotion) return |
| 175 | + const timeline = gsap |
| 176 | + .timeline({ |
| 177 | + paused: true, |
| 178 | + }) |
| 179 | + .fromTo( |
| 180 | + $el, |
| 181 | + { |
| 182 | + autoAlpha: 0, |
| 183 | + y: 20, |
| 184 | + }, |
| 185 | + { |
| 186 | + autoAlpha: 1, |
| 187 | + y: 0, |
| 188 | + duration: 0.7, |
| 189 | + ease: 'power2.out', |
| 190 | + }, |
| 191 | + ) |
| 192 | + motion.inView( |
| 193 | + $el, |
| 194 | + (element) => { |
| 195 | + timeline.play() |
| 196 | + }, |
| 197 | + { |
| 198 | + amount: 1, |
| 199 | + }, |
| 200 | + ) |
| 201 | + } |
| 202 | + " |
139 | 203 | class="mx-auto max-w-3xl pt-3 text-center font-afacad text-2xl leading-normal text-gray-500" |
140 | 204 | > |
141 | 205 | Filament 4 brings powerful new tools and flexibility, simplifying |
142 | 206 | development and enabling more dynamic, efficient, and customizable web |
143 | 207 | applications. |
144 | 208 | </h3> |
145 | 209 | <div |
| 210 | + x-init=" |
| 211 | + () => { |
| 212 | + if (reducedMotion) return |
| 213 | + const timeline = gsap |
| 214 | + .timeline({ |
| 215 | + paused: true, |
| 216 | + }) |
| 217 | + .fromTo( |
| 218 | + $refAll('slide-in-left'), |
| 219 | + { |
| 220 | + autoAlpha: 0, |
| 221 | + x: -20, |
| 222 | + }, |
| 223 | + { |
| 224 | + autoAlpha: 1, |
| 225 | + x: 0, |
| 226 | + duration: 0.7, |
| 227 | + stagger: 0.1, |
| 228 | + ease: 'power2.out', |
| 229 | + }, |
| 230 | + ) |
| 231 | + motion.inView( |
| 232 | + $el, |
| 233 | + (element) => { |
| 234 | + timeline.play() |
| 235 | + }, |
| 236 | + { |
| 237 | + amount: 0.25, |
| 238 | + }, |
| 239 | + ) |
| 240 | + } |
| 241 | + " |
146 | 242 | 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" |
147 | 243 | > |
148 | | - <div> |
| 244 | + <div x-ref="slide-in-left"> |
149 | 245 | {{-- Icon --}} |
150 | 246 | <svg |
151 | 247 | xmlns="http://www.w3.org/2000/svg" |
@@ -240,13 +336,14 @@ class="size-12 shrink-0" |
240 | 336 | Nested resources |
241 | 337 | </h4> |
242 | 338 | {{-- Description --}} |
| 339 | + |
243 | 340 | <p class="font-afacad text-lg leading-snug text-gray-500"> |
244 | 341 | Open modals and slide-overs from any button, even nest them |
245 | 342 | with full state preservation. |
246 | 343 | </p> |
247 | 344 | </div> |
248 | 345 | </div> |
249 | | - <div> |
| 346 | + <div x-ref="slide-in-left"> |
250 | 347 | {{-- Icon --}} |
251 | 348 | <svg |
252 | 349 | xmlns="http://www.w3.org/2000/svg" |
@@ -375,7 +472,7 @@ class="size-12 shrink-0" |
375 | 472 | </p> |
376 | 473 | </div> |
377 | 474 | </div> |
378 | | - <div> |
| 475 | + <div x-ref="slide-in-left"> |
379 | 476 | {{-- Icon --}} |
380 | 477 | <svg |
381 | 478 | xmlns="http://www.w3.org/2000/svg" |
@@ -569,7 +666,7 @@ interface when changes occur. |
569 | 666 | </p> |
570 | 667 | </div> |
571 | 668 | </div> |
572 | | - <div> |
| 669 | + <div x-ref="slide-in-left"> |
573 | 670 | {{-- Icon --}} |
574 | 671 | <svg |
575 | 672 | xmlns="http://www.w3.org/2000/svg" |
@@ -637,7 +734,7 @@ class="size-12 shrink-0" |
637 | 734 | </p> |
638 | 735 | </div> |
639 | 736 | </div> |
640 | | - <div> |
| 737 | + <div x-ref="slide-in-left"> |
641 | 738 | {{-- Icon --}} |
642 | 739 | <svg |
643 | 740 | xmlns="http://www.w3.org/2000/svg" |
@@ -745,7 +842,7 @@ class="size-12 shrink-0" |
745 | 842 | </p> |
746 | 843 | </div> |
747 | 844 | </div> |
748 | | - <div> |
| 845 | + <div x-ref="slide-in-left"> |
749 | 846 | {{-- Icon --}} |
750 | 847 | <svg |
751 | 848 | xmlns="http://www.w3.org/2000/svg" |
|
0 commit comments