@@ -29,8 +29,8 @@ import { TwImage } from "@/components/Image"
29
29
import MainArticle from "@/components/MainArticle"
30
30
import PageMetadata from "@/components/PageMetadata"
31
31
import { StandaloneQuizWidget } from "@/components/Quiz/QuizWidget"
32
- import Slider , { EmblaSlide } from "@/components/Slider"
33
32
import StatErrorMessage from "@/components/StatErrorMessage"
33
+ import Swiper from "@/components/Swiper"
34
34
import Tabs from "@/components/Tabs"
35
35
import Tooltip from "@/components/Tooltip"
36
36
import Translation from "@/components/Translation"
@@ -114,8 +114,11 @@ const Section = ({ className, ...rest }: HTMLAttributes<HTMLDivElement>) => (
114
114
< section className = { cn ( "w-full px-8 py-12" , className ) } { ...rest } />
115
115
)
116
116
117
- export const Width60 = ( props : ChildOnlyProp ) => (
118
- < div className = "w-full flex-[3]" { ...props } />
117
+ export const Width60 = ( {
118
+ className,
119
+ children,
120
+ } : React . HTMLAttributes < HTMLDivElement > ) => (
121
+ < div className = { cn ( "w-full flex-[3]" , className ) } > { children } </ div >
119
122
)
120
123
121
124
export const Width40 = ( props : ChildOnlyProp ) => (
@@ -164,6 +167,12 @@ const Image400 = ({ src }: Pick<ImageProps, "src">) => (
164
167
< TwImage src = { src } alt = "" width = { 400 } />
165
168
)
166
169
170
+ const Slide = ( { children } : ChildOnlyProp ) => (
171
+ < div className = "[&_h2,&_h3]:mt-0 relative min-w-full" >
172
+ < Stack className = "space-x-8 space-y-8" > { children } </ Stack >
173
+ </ div >
174
+ )
175
+
167
176
const cachedFetchTxCount = runOnlyOnce ( fetchGrowThePie )
168
177
169
178
type Props = BasePageProps & {
@@ -393,57 +402,60 @@ const WhatIsEthereumPage = ({
393
402
394
403
< Section >
395
404
< TwoColumnContent >
396
- < Width60 >
405
+ < Width60 className = "lg:max-w-[60%]" >
397
406
< H2 >
398
407
{ t ( "page-what-is-ethereum-why-would-i-use-ethereum-title" ) }
399
408
</ H2 >
400
- < Stack className = "gap-6" >
409
+ < Stack className = "max-w-full gap-6" >
401
410
< p > { t ( "page-what-is-ethereum-why-would-i-use-ethereum-1" ) } </ p >
402
411
< p > { t ( "page-what-is-ethereum-why-would-i-use-ethereum-2" ) } </ p >
403
412
404
- < Slider
405
- onSlideChange = { ( index ) => {
406
- trackCustomEvent ( {
407
- eventCategory : `What is Ethereum - Slider` ,
408
- eventAction : `Clicked` ,
409
- eventName : slides [ index ] . eventName ,
410
- } )
411
- } }
412
- >
413
- < EmblaSlide >
414
- < H3 > { t ( "page-what-is-ethereum-slide-1-title" ) } </ H3 >
415
- < Stack className = "mb-4 gap-6" >
416
- < p >
417
- < Translation id = "page-what-is-ethereum:page-what-is-ethereum-slide-1-desc-1" />
418
- </ p >
419
- < p > { t ( "page-what-is-ethereum-slide-1-desc-2" ) } </ p >
420
- </ Stack >
421
- </ EmblaSlide >
422
- < EmblaSlide >
423
- < H3 > { t ( "page-what-is-ethereum-slide-2-title" ) } </ H3 >
424
- < Stack className = "mb-4 gap-6" >
425
- < p > { t ( "page-what-is-ethereum-slide-2-desc-1" ) } </ p >
426
- < p >
427
- < Translation id = "page-what-is-ethereum:page-what-is-ethereum-slide-2-desc-2" />
428
- </ p >
429
- </ Stack >
430
- </ EmblaSlide >
431
- < EmblaSlide >
432
- < H3 > { t ( "page-what-is-ethereum-slide-3-title" ) } </ H3 >
433
- < Stack className = "mb-4 gap-6" >
434
- < p >
435
- < Translation id = "page-what-is-ethereum:page-what-is-ethereum-slide-3-desc-1" />
436
- </ p >
437
- </ Stack >
438
- </ EmblaSlide >
439
- < EmblaSlide >
440
- < H3 > { t ( "page-what-is-ethereum-slide-4-title" ) } </ H3 >
441
- < Stack className = "mb-4 gap-6" >
442
- < p > { t ( "page-what-is-ethereum-slide-4-desc-1" ) } </ p >
443
- < p > { t ( "page-what-is-ethereum-slide-4-desc-2" ) } </ p >
444
- </ Stack >
445
- </ EmblaSlide >
446
- </ Slider >
413
+ < div className = "max-w-full" >
414
+ < Swiper
415
+ containerClassName = "p-8 border rounded"
416
+ onSlideChange = { ( { activeIndex } ) => {
417
+ trackCustomEvent ( {
418
+ eventCategory : `What is Ethereum - Slider` ,
419
+ eventAction : `Clicked` ,
420
+ eventName : slides [ activeIndex ] . eventName ,
421
+ } )
422
+ } }
423
+ >
424
+ < Slide >
425
+ < H3 > { t ( "page-what-is-ethereum-slide-1-title" ) } </ H3 >
426
+ < Stack className = "mb-4 gap-6" >
427
+ < p >
428
+ < Translation id = "page-what-is-ethereum:page-what-is-ethereum-slide-1-desc-1" />
429
+ </ p >
430
+ < p > { t ( "page-what-is-ethereum-slide-1-desc-2" ) } </ p >
431
+ </ Stack >
432
+ </ Slide >
433
+ < Slide >
434
+ < H3 > { t ( "page-what-is-ethereum-slide-2-title" ) } </ H3 >
435
+ < Stack className = "mb-4 gap-6" >
436
+ < p > { t ( "page-what-is-ethereum-slide-2-desc-1" ) } </ p >
437
+ < p >
438
+ < Translation id = "page-what-is-ethereum:page-what-is-ethereum-slide-2-desc-2" />
439
+ </ p >
440
+ </ Stack >
441
+ </ Slide >
442
+ < Slide >
443
+ < H3 > { t ( "page-what-is-ethereum-slide-3-title" ) } </ H3 >
444
+ < Stack className = "mb-4 gap-6" >
445
+ < p >
446
+ < Translation id = "page-what-is-ethereum:page-what-is-ethereum-slide-3-desc-1" />
447
+ </ p >
448
+ </ Stack >
449
+ </ Slide >
450
+ < Slide >
451
+ < H3 > { t ( "page-what-is-ethereum-slide-4-title" ) } </ H3 >
452
+ < Stack className = "mb-4 gap-6" >
453
+ < p > { t ( "page-what-is-ethereum-slide-4-desc-1" ) } </ p >
454
+ < p > { t ( "page-what-is-ethereum-slide-4-desc-2" ) } </ p >
455
+ </ Stack >
456
+ </ Slide >
457
+ </ Swiper >
458
+ </ div >
447
459
</ Stack >
448
460
</ Width60 >
449
461
< Width40 >
0 commit comments