1
- import { Box , Flex , Grid , Text } from "@chakra-ui/react"
2
-
3
1
import type { ChildOnlyProp } from "@/lib/types"
4
2
import type { MdPageContent , SharedFrontmatter } from "@/lib/interfaces"
5
3
6
4
import { List as ButtonDropdownList } from "@/components/ButtonDropdown"
7
5
import Card from "@/components/Card"
8
6
import { ContentHero , ContentHeroProps } from "@/components/Hero"
9
- import { Image } from "@/components/Image"
7
+ import { TwImage as Image } from "@/components/Image"
10
8
import { ApplyNow } from "@/components/Translatathon/ApplyNow"
11
9
import { APPLICATION_URL } from "@/components/Translatathon/constants"
12
10
import { DatesAndTimeline } from "@/components/Translatathon/DatesAndTimeline"
@@ -16,6 +14,7 @@ import { TranslatathonCalendar } from "@/components/Translatathon/TranslatathonC
16
14
import { TranslatathonInANutshell } from "@/components/Translatathon/TranslatathonInANutshell"
17
15
import TranslatathonPrizes from "@/components/Translatathon/TranslatathonPrizes"
18
16
import { TranslationHubCallout } from "@/components/Translatathon/TranslationHubCallout"
17
+ import { Flex } from "@/components/ui/flex"
19
18
20
19
import { ContentLayout } from "../ContentLayout"
21
20
@@ -25,80 +24,50 @@ import robotImage from "@/public/images/wallet.png"
25
24
26
25
const ContentSplit = ( { children } ) => {
27
26
return (
28
- < Flex w = " full" direction = { { base : "column" , md : " row" } } >
29
- < Box > { children } </ Box >
30
- < Flex maxHeight = " 300px">
31
- < Image src = { robotImage } alt = "robot" style = { { objectFit : " contain" } } />
27
+ < Flex className = "w- full flex-col md:flex- row">
28
+ < div > { children } </ div >
29
+ < Flex className = "max-h-[ 300px] ">
30
+ < Image src = { robotImage } alt = "robot" className = "object- contain" />
32
31
</ Flex >
33
32
</ Flex >
34
33
)
35
34
}
36
35
37
36
const TwoColumnContent = ( props : ChildOnlyProp ) => (
38
37
< Flex
39
- w = "full"
40
- direction = { { base : "column" , md : "row" } }
41
- align = "stretch"
42
- me = { { lg : 8 } }
43
- mt = { 8 }
44
- gap = { 8 }
38
+ className = "mt-8 w-full flex-col items-stretch gap-8 md:flex-row lg:me-8"
45
39
{ ...props }
46
40
/>
47
41
)
48
42
49
43
const WhyWeDoItColumn = ( props : ChildOnlyProp ) => (
50
- < Flex
51
- w = "full"
52
- m = { { base : "auto 0" , lg : 0 } }
53
- me = { { lg : 8 } }
54
- direction = "column"
55
- >
56
- < Box mx = "auto" height = "272" >
57
- < Image src = { WhyWeDoItImage } alt = "" height = "272" />
58
- </ Box >
59
- < Box > { props . children } </ Box >
44
+ < Flex className = "my-auto w-full flex-col lg:m-0 lg:me-8" >
45
+ < div className = "mx-auto h-[272px]" >
46
+ < Image src = { WhyWeDoItImage } alt = "" className = "h-[272px]" />
47
+ </ div >
48
+ < div > { props . children } </ div >
60
49
</ Flex >
61
50
)
62
51
63
52
const HowDoesItWorkColumn = ( props : ChildOnlyProp ) => (
64
- < Flex
65
- w = "full"
66
- m = { { base : "auto 0" , lg : 0 } }
67
- ms = { { lg : 8 } }
68
- direction = "column"
69
- >
70
- < Box mx = "auto" height = "272" >
71
- < Image src = { HowDoesItWorkImage } alt = "" maxHeight = "272" />
72
- </ Box >
73
- < Box > { props . children } </ Box >
53
+ < Flex className = "my-auto w-full flex-col lg:m-0 lg:ms-8" >
54
+ < div className = "mx-auto h-[272px]" >
55
+ < Image src = { HowDoesItWorkImage } alt = "" className = "h-[272px]" />
56
+ </ div >
57
+ < div > { props . children } </ div >
74
58
</ Flex >
75
59
)
76
60
77
61
const CardContent = ( props : ChildOnlyProp ) => (
78
- < Flex
79
- w = "full"
80
- m = { { base : "auto 0" , lg : 0 } }
81
- borderRadius = { 4 }
82
- border = "1px solid"
83
- borderColor = "body.light"
84
- direction = "column"
85
- px = { 8 }
86
- pb = { 8 }
87
- flex = "1"
88
- >
62
+ < Flex className = "my-auto w-full flex-1 flex-col rounded border border-body-light px-8 pb-8 lg:m-0" >
89
63
{ props . children }
90
64
</ Flex >
91
65
)
92
66
93
67
const CardContainer = ( props : ChildOnlyProp ) => (
94
- < Grid
95
- templateColumns = "repeat(auto-fill, minmax(min(100%, 280px), 1fr))"
96
- gap = { 8 }
97
- mb = { 20 }
98
- mt = { { base : 8 , lg : 0 } }
99
- >
68
+ < div className = "mb-20 mt-8 grid grid-cols-[repeat(auto-fill,_minmax(100%,_280px),_1fr)] gap-8 lg:mt-0" >
100
69
{ props . children }
101
- </ Grid >
70
+ </ div >
102
71
)
103
72
104
73
const EmojiCard = ( { emoji, title, description } ) => (
@@ -192,12 +161,12 @@ export const TranslatathonLayout = ({
192
161
blurDataURL : "" ,
193
162
description : (
194
163
< >
195
- < Text > Welcome to the ethereum.org Translatathon!</ Text >
196
- < Text >
164
+ < p > Welcome to the ethereum.org Translatathon!</ p >
165
+ < p >
197
166
The translatathon is a competitive hackathon-style event where you can
198
167
compete for prizes by translating ethereum.org content into different
199
168
languages.
200
- </ Text >
169
+ </ p >
201
170
</ >
202
171
) ,
203
172
buttons : [
0 commit comments