Skip to content

Commit a425955

Browse files
committed
Migrate Translatathon/TranslatathonInANutshell.tsx to shadcs/tailwind
1 parent 2e0e0ed commit a425955

File tree

1 file changed

+36
-70
lines changed

1 file changed

+36
-70
lines changed

src/components/Translatathon/TranslatathonInANutshell.tsx

Lines changed: 36 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,49 @@
1-
import { Flex, Heading, Text } from "@chakra-ui/react"
2-
3-
import { ButtonLink } from "@/components/Buttons"
4-
import { Image } from "@/components/Image"
5-
6-
import Link from "../Link"
1+
import { TwImage } from "@/components/Image"
2+
import { ButtonLink } from "@/components/ui/buttons/Button"
3+
import { Flex } from "@/components/ui/flex"
4+
import Link from "@/components/ui/Link"
75

86
import dogeImage from "@/public/images/doge-computer.png"
97
import futureImage from "@/public/images/future_transparent.png"
108
import settlementImage from "@/public/images/translatathon/settlement.png"
119

1210
export const TranslatathonInANutshell = () => {
1311
return (
14-
<Flex
15-
direction="column"
16-
py={16}
17-
px={8}
18-
bgGradient="linear-gradient(
19-
49.21deg,
20-
rgba(127, 127, 213, 0.2) 19.87%,
21-
rgba(134, 168, 231, 0.2) 58.46%,
22-
rgba(145, 234, 228, 0.2) 97.05%
23-
)"
24-
>
25-
<Flex m="auto">
26-
<Heading as="h2" fontSize="3xl" mb={8}>
27-
Translatathon essentials
28-
</Heading>
12+
<Flex className="flex-col bg-gradient-to-r from-[#7f7fd5]/20 via-[#86a8e7]/20 to-[#91eae4]/20 px-8 py-16">
13+
<Flex className="m-auto">
14+
<h2 className="mb-8 text-3xl">Translatathon essentials</h2>
2915
</Flex>
30-
<Flex
31-
w="full"
32-
direction={{ base: "column", md: "row" }}
33-
align="flex-start"
34-
p={8}
35-
gap={8}
36-
>
37-
<Flex w="full" direction="column" gap={2} alignSelf="center">
38-
<Heading as="h3" fontSize="2xl">
39-
Earn points
40-
</Heading>
41-
<Text>
16+
17+
<Flex className="w-full flex-col items-start gap-8 p-8 md:flex-row">
18+
<Flex className="w-full flex-col justify-center gap-2">
19+
<h3 className="text-2xl">Earn points</h3>
20+
<p>
4221
Translate ethereum.org and ecosystem content to earn points and
4322
compete with other participants. 1 translated word = 1 point
44-
</Text>
23+
</p>
4524
</Flex>
46-
<Flex w="full" justifyContent="center">
47-
<Image
25+
<Flex className="w-full justify-center">
26+
<TwImage
4827
src={settlementImage}
4928
alt=""
50-
w="327"
29+
width={327}
5130
style={{ objectFit: "contain" }}
5231
/>
5332
</Flex>
5433
</Flex>
55-
<Flex
56-
w="full"
57-
direction={{ base: "column-reverse", md: "row" }}
58-
align="flex-start"
59-
p={8}
60-
gap={8}
61-
>
62-
<Flex w="full" justifyContent="center">
63-
<Image
34+
35+
<Flex className="w-full flex-col-reverse items-start gap-8 p-8 md:flex-row">
36+
<Flex className="w-full justify-center">
37+
<TwImage
6438
src={futureImage}
6539
alt=""
66-
w="327"
40+
width={327}
6741
style={{ objectFit: "contain" }}
6842
/>
6943
</Flex>
70-
<Flex w="full" direction="column" gap={2} alignSelf="center">
71-
<Heading as="h3" fontSize="2xl">
72-
Human translations only
73-
</Heading>
74-
<Text>
44+
<Flex className="w-full flex-col justify-center gap-2">
45+
<h3 className="text-2xl">Human translations only</h3>
46+
<p>
7547
Using machine translation is forbidden! All translations will be
7648
reviewed and evaluated, and participants using machine translation
7749
will be automatically disqualified and not be eligible to claim
@@ -80,36 +52,30 @@ export const TranslatathonInANutshell = () => {
8052
terms and conditions
8153
</Link>
8254
)
83-
</Text>
55+
</p>
8456
</Flex>
8557
</Flex>
86-
<Flex
87-
w="full"
88-
direction={{ base: "column", md: "row" }}
89-
align="flex-start"
90-
p={8}
91-
gap={8}
92-
>
93-
<Flex w="full" direction="column" gap={2} alignSelf="center">
94-
<Heading as="h3" fontSize="2xl">
95-
Focus on untranslated lines only
96-
</Heading>
97-
<Text>
58+
59+
<Flex className="w-full flex-col items-start gap-8 p-8 md:flex-row">
60+
<Flex className="w-full flex-col justify-center gap-2">
61+
<h3 className="text-2xl">Focus on untranslated lines only</h3>
62+
<p>
9863
Translate strings that do not have any suggested translations yet.
9964
Do not translate strings that have already been translated and
10065
approved
101-
</Text>
66+
</p>
10267
</Flex>
103-
<Flex w="full" justifyContent="center">
104-
<Image
68+
<Flex className="w-full justify-center">
69+
<TwImage
10570
src={dogeImage}
10671
alt=""
107-
w="327"
72+
width={327}
10873
style={{ objectFit: "contain" }}
10974
/>
11075
</Flex>
11176
</Flex>
112-
<Flex width="full" justifyContent="center">
77+
78+
<Flex className="w-full justify-center">
11379
<ButtonLink href="/contributing/translation-program/translatathon/details">
11480
Details and rules
11581
</ButtonLink>

0 commit comments

Comments
 (0)