Skip to content

Commit 7a343ab

Browse files
authored
Merge pull request #14072 from Sambit03/migrate-Translatathon/TranslatathonInANutshell
Migrate Translatathon/TranslatathonInANutshell.tsx to shadcs/tailwind
2 parents 79dd7b1 + 131342c commit 7a343ab

File tree

1 file changed

+39
-70
lines changed

1 file changed

+39
-70
lines changed

src/components/Translatathon/TranslatathonInANutshell.tsx

Lines changed: 39 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,51 @@
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-center gap-8 p-8 md:flex-row">
18+
<Flex className="w-full flex-col gap-2 self-center">
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}
30+
className="w-[327px]"
5131
style={{ objectFit: "contain" }}
5232
/>
5333
</Flex>
5434
</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
35+
36+
<Flex className="w-full flex-col-reverse items-start gap-8 p-8 md:flex-row">
37+
<Flex className="w-full justify-center">
38+
<TwImage
6439
src={futureImage}
6540
alt=""
66-
w="327"
41+
width={327}
42+
className="w-[327px]"
6743
style={{ objectFit: "contain" }}
6844
/>
6945
</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>
46+
<Flex className="w-full flex-col gap-2 self-center">
47+
<h3 className="text-2xl">Human translations only</h3>
48+
<p>
7549
Using machine translation is forbidden! All translations will be
7650
reviewed and evaluated, and participants using machine translation
7751
will be automatically disqualified and not be eligible to claim
@@ -80,36 +54,31 @@ export const TranslatathonInANutshell = () => {
8054
terms and conditions
8155
</Link>
8256
)
83-
</Text>
57+
</p>
8458
</Flex>
8559
</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>
60+
61+
<Flex className="w-full flex-col items-start gap-8 p-8 md:flex-row">
62+
<Flex className="w-full flex-col gap-2 self-center">
63+
<h3 className="text-2xl">Focus on untranslated lines only</h3>
64+
<p>
9865
Translate strings that do not have any suggested translations yet.
9966
Do not translate strings that have already been translated and
10067
approved
101-
</Text>
68+
</p>
10269
</Flex>
103-
<Flex w="full" justifyContent="center">
104-
<Image
70+
<Flex className="w-full justify-center">
71+
<TwImage
10572
src={dogeImage}
10673
alt=""
107-
w="327"
74+
width={327}
75+
className="w-[327px]"
10876
style={{ objectFit: "contain" }}
10977
/>
11078
</Flex>
11179
</Flex>
112-
<Flex width="full" justifyContent="center">
80+
81+
<Flex className="w-full justify-center">
11382
<ButtonLink href="/contributing/translation-program/translatathon/details">
11483
Details and rules
11584
</ButtonLink>

0 commit comments

Comments
 (0)