1
+ import { BaseHTMLAttributes } from "react"
1
2
import { useRouter } from "next/router"
2
3
import { GetStaticProps } from "next/types"
3
4
import { useTranslation } from "next-i18next"
4
5
import { serverSideTranslations } from "next-i18next/serverSideTranslations"
5
- import {
6
- Box ,
7
- BoxProps ,
8
- Flex ,
9
- HeadingProps ,
10
- List ,
11
- ListItem ,
12
- useColorModeValue ,
13
- } from "@chakra-ui/react"
6
+ import { useColorModeValue } from "@chakra-ui/react"
14
7
15
8
import { BasePageProps , Lang } from "@/lib/types"
16
9
17
10
import ActionCard from "@/components/ActionCard"
18
11
import Breadcrumbs from "@/components/Breadcrumbs"
19
12
import FeedbackCard from "@/components/FeedbackCard"
20
- import { Image } from "@/components/Image"
21
- import InlineLink from "@/components/Link"
22
- import MainArticle from "@/components/MainArticle"
23
- import OldHeading from "@/components/OldHeading"
24
- import Text from "@/components/OldText"
13
+ import { TwImage } from "@/components/Image"
25
14
import PageMetadata from "@/components/PageMetadata"
26
15
import TranslationLeaderboard from "@/components/TranslationLeaderboard"
16
+ import { Flex } from "@/components/ui/flex"
17
+ import InlineLink from "@/components/ui/Link"
18
+ import { ListItem , OrderedList } from "@/components/ui/list"
27
19
20
+ import { cn } from "@/lib/utils/cn"
28
21
import { existsNamespace } from "@/lib/utils/existsNamespace"
29
22
import { getLastDeployDate } from "@/lib/utils/getLastDeployDate"
30
23
import { getLocaleTimestamp } from "@/lib/utils/time"
@@ -39,12 +32,31 @@ import lightThemeCertificateImg from "@/public/images/certificates/light-certifi
39
32
import dogeComputerImg from "@/public/images/doge-computer.png"
40
33
import whatIsEthereumImg from "@/public/images/what-is-ethereum.png"
41
34
42
- const Content = ( props : BoxProps ) => (
43
- < Box as = { MainArticle } py = { 4 } px = { 10 } w = "full" { ...props } />
35
+ const Content = ( {
36
+ className,
37
+ ...props
38
+ } : BaseHTMLAttributes < HTMLHeadingElement > ) => (
39
+ < div className = { cn ( "w-full px-10 py-4" , className ) } { ...props } />
44
40
)
45
41
46
- const ContentHeading = ( props : HeadingProps ) => (
47
- < OldHeading lineHeight = { 1.4 } { ...props } />
42
+ const H2 = ( {
43
+ className,
44
+ ...props
45
+ } : BaseHTMLAttributes < HTMLHeadingElement > ) => (
46
+ < h2
47
+ className = { cn (
48
+ "mb-8 mt-12 text-2xl font-semibold leading-xs md:text-[2rem]" ,
49
+ className
50
+ ) }
51
+ { ...props }
52
+ />
53
+ )
54
+
55
+ const Text = ( {
56
+ className,
57
+ ...props
58
+ } : BaseHTMLAttributes < HTMLHeadingElement > ) => (
59
+ < p className = { cn ( "mb-[1.45rem] leading-[1.6rem]" , className ) } { ...props } />
48
60
)
49
61
50
62
export const getStaticProps = ( async ( { locale } ) => {
@@ -81,7 +93,7 @@ const TranslatorAcknowledgements = () => {
81
93
)
82
94
83
95
return (
84
- < Flex direction = "column" align = "center" w = " full">
96
+ < Flex className = "w- full flex-col items-center ">
85
97
< PageMetadata
86
98
title = { t (
87
99
"page-contributing-translation-program-acknowledgements-meta-title"
@@ -93,26 +105,14 @@ const TranslatorAcknowledgements = () => {
93
105
94
106
< Content >
95
107
< Breadcrumbs slug = { router . asPath } className = "mt-12" />
96
- < ContentHeading
97
- as = "h1"
98
- fontSize = { { base : "2rem" , sm : "2.5rem" , md : "5xl" } }
99
- >
108
+ < h1 className = "my-8 text-[2rem] leading-xs sm:text-[2.5rem] md:text-5xl" >
100
109
{ t (
101
110
"page-contributing-translation-program-acknowledgements-acknowledgement-page-title"
102
111
) }
103
- </ ContentHeading >
104
- < Flex
105
- direction = { { base : "column" , lg : "row" } }
106
- align = { { base : "flex-start" , lg : "normal" } }
107
- w = "full"
108
- ms = { 0 }
109
- me = { { base : 0 , lg : 8 } }
110
- >
112
+ </ h1 >
113
+ < Flex className = "me-0 ms-0 w-full flex-col items-start lg:me-8 lg:flex-row lg:items-center" >
111
114
{ /* LEFT COLUMN */ }
112
- < Box
113
- m = { { base : "auto 0" , lg : "0 2rem 0 0" } }
114
- w = { { base : "full" , lg : "50%" } }
115
- >
115
+ < div className = "m-auto w-full lg:mb-0 lg:ml-0 lg:mr-8 lg:mt-0 lg:w-1/2" >
116
116
< Text >
117
117
{ t (
118
118
"page-contributing-translation-program-acknowledgements-acknowledgement-page-1"
@@ -143,34 +143,26 @@ const TranslatorAcknowledgements = () => {
143
143
{ /* <p>
144
144
<Translation id="page-contributing-translation-program-acknowledgements-acknowledgement-page-5" />
145
145
</p> */ }
146
- </ Box >
146
+ </ div >
147
147
{ /* RIGHT COLUMN */ }
148
- < Box
149
- m = { { base : "auto 0" , lg : "0 0 0 2rem" } }
150
- w = { { base : "full" , lg : "50%" } }
151
- >
152
- < Image
148
+ < div className = "m-auto w-full lg:mb-0 lg:ml-8 lg:mr-0 lg:mt-0 lg:w-1/2" >
149
+ < TwImage
150
+ width = { 500 }
153
151
src = { dogeComputerImg }
154
- w = { 500 }
155
152
alt = { t (
156
153
"page-contributing-translation-program-acknowledgements-hero-image-alt"
157
154
) }
158
155
/>
159
- </ Box >
156
+ </ div >
160
157
</ Flex >
161
158
</ Content >
162
159
163
- < Content maxW = "800px" >
164
- < ContentHeading
165
- as = "h2"
166
- textAlign = "center"
167
- fontSize = { { base : "2xl" , md : "2rem" } }
168
- fontWeight = { 600 }
169
- >
160
+ < Content className = "max-w-[800px]" >
161
+ < H2 className = "text-center" >
170
162
{ t (
171
163
"page-contributing-translation-program-acknowledgements-translation-leaderboard-title"
172
164
) }
173
- </ ContentHeading >
165
+ </ H2 >
174
166
< TranslationLeaderboard
175
167
monthData = { monthData }
176
168
quarterData = { quarterData }
@@ -184,15 +176,11 @@ const TranslatorAcknowledgements = () => {
184
176
</ Content >
185
177
186
178
< Content >
187
- < ContentHeading
188
- as = "h2"
189
- fontSize = { { base : "2xl" , md : "2rem" } }
190
- fontWeight = { 600 }
191
- >
179
+ < H2 >
192
180
{ t (
193
181
"page-contributing-translation-program-acknowledgements-our-translators-title"
194
182
) }
195
- </ ContentHeading >
183
+ </ H2 >
196
184
< Text >
197
185
{ t (
198
186
"page-contributing-translation-program-acknowledgements-our-translators-1"
@@ -213,15 +201,11 @@ const TranslatorAcknowledgements = () => {
213
201
</ Content >
214
202
215
203
< Content id = "certificate" >
216
- < ContentHeading
217
- as = "h2"
218
- fontSize = { { base : "2xl" , md : "2rem" } }
219
- fontWeight = { 600 }
220
- >
204
+ < H2 >
221
205
{ t (
222
206
"page-contributing-translation-program-acknowledgements-cert-title"
223
207
) }
224
- </ ContentHeading >
208
+ </ H2 >
225
209
< Text >
226
210
{ t ( "page-contributing-translation-program-acknowledgements-cert-1" ) }
227
211
</ Text >
@@ -231,21 +215,17 @@ const TranslatorAcknowledgements = () => {
231
215
< Text >
232
216
{ t ( "page-contributing-translation-program-acknowledgements-cert-3" ) }
233
217
</ Text >
234
- < Flex justify = " center">
235
- < Image src = { themedCertificateImage } alt = "translator certificate" />
218
+ < Flex className = "justify- center">
219
+ < TwImage src = { themedCertificateImage } alt = "translator certificate" />
236
220
</ Flex >
237
221
</ Content >
238
222
239
223
< Content id = "oats" >
240
- < ContentHeading
241
- as = "h2"
242
- fontSize = { { base : "2xl" , md : "2rem" } }
243
- fontWeight = { 600 }
244
- >
224
+ < H2 >
245
225
{ t (
246
226
"page-contributing-translation-program-acknowledgements-oats-title"
247
227
) }
248
- </ ContentHeading >
228
+ </ H2 >
249
229
< Text >
250
230
{ t ( "page-contributing-translation-program-acknowledgements-1" ) }
251
231
</ Text >
@@ -255,17 +235,13 @@ const TranslatorAcknowledgements = () => {
255
235
< Text >
256
236
{ t ( "page-contributing-translation-program-acknowledgements-3" ) }
257
237
</ Text >
258
- < ContentHeading
259
- as = "h3"
260
- fontSize = { { base : "xl" , md : "2xl" } }
261
- fontWeight = { 600 }
262
- >
238
+ < h3 className = "mb-8 mt-10 text-xl font-semibold leading-xs md:text-2xl" >
263
239
{ t (
264
240
"page-contributing-translation-program-acknowledgements-how-to-claim-title"
265
241
) }
266
- </ ContentHeading >
242
+ </ h3 >
267
243
268
- < List as = "ol" styleType = "decimal" >
244
+ < OrderedList >
269
245
< ListItem >
270
246
{ t (
271
247
"page-contributing-translation-program-acknowledgements-how-to-claim-1"
@@ -291,7 +267,7 @@ const TranslatorAcknowledgements = () => {
291
267
"page-contributing-translation-program-acknowledgements-how-to-claim-4"
292
268
) }
293
269
</ ListItem >
294
- </ List >
270
+ </ OrderedList >
295
271
< Text >
296
272
{ t ( "page-contributing-translation-program-acknowledgements-4" ) }
297
273
</ Text >
0 commit comments