1
- import { HTMLAttributes , ReactNode } from "react"
1
+ import { ReactNode } from "react"
2
2
import { getTranslations } from "next-intl/server"
3
3
4
4
import { Lang } from "@/lib/types"
@@ -13,63 +13,22 @@ import { Image } from "@/components/Image"
13
13
import MainArticle from "@/components/MainArticle"
14
14
import { ButtonLink } from "@/components/ui/buttons/Button"
15
15
import { Card } from "@/components/ui/card"
16
- import { Flex , VStack } from "@/components/ui/flex"
16
+ import { VStack } from "@/components/ui/flex"
17
17
import InlineLink from "@/components/ui/Link"
18
18
19
- import { cn } from "@/lib/utils/cn"
20
19
import { getMetadata } from "@/lib/utils/metadata"
21
20
22
21
import SpeedRunEthereumImage from "@/public/images/dev-tools/speed-run-ethereum-banner.png"
23
22
import DevelopersImage from "@/public/images/developers-eth-blocks.png"
24
23
import DogeImage from "@/public/images/doge-computer.png"
25
24
import HeroImage from "@/public/images/heroes/developers-hub-hero.jpg"
26
25
27
- const Page = ( props : ChildOnlyProp ) => (
28
- < VStack className = "mx-auto my-0 w-full" { ...props } />
29
- )
30
-
31
- const GrayContainer = ( props : ChildOnlyProp ) => (
32
- < div
33
- className = "mt-8 w-full border-t bg-background-highlight px-0 py-16 shadow-table-item-box"
34
- { ...props }
35
- />
36
- )
37
-
38
- const Content = ( props : ChildOnlyProp ) => (
39
- < MainArticle className = "w-full px-8 py-4" { ...props } />
40
- )
41
-
42
- const Subtitle = ( {
43
- className,
44
- ...props
45
- } : HTMLAttributes < HTMLHeadingElement > ) => (
46
- < p className = { cn ( "leading-xs text-body-medium" , className ) } { ...props } />
47
- )
48
-
49
- const MonoSubtitle = ( props : ChildOnlyProp ) => (
50
- < h2 className = "mb-0 mt-12" { ...props } />
51
- )
52
-
53
26
const H2 = ( props : ChildOnlyProp ) => < h2 className = "mb-8 mt-12" { ...props } />
54
27
55
28
const H3 = ( props : ChildOnlyProp ) => < h3 className = "mb-8 mt-10" { ...props } />
56
29
57
30
const Text = ( props : ChildOnlyProp ) => < p className = "mb-6" { ...props } />
58
31
59
- const TwoColumnContent = ( props : ChildOnlyProp ) => (
60
- < Flex
61
- className = "w-full flex-col items-start justify-between lg:flex-row lg:items-center"
62
- { ...props }
63
- />
64
- )
65
-
66
- const ThreeColumnContent = ( props : ChildOnlyProp ) => (
67
- < Flex
68
- className = "flex-col items-start justify-between px-8 py-0 lg:flex-row"
69
- { ...props }
70
- />
71
- )
72
-
73
32
const Column = ( props : ChildOnlyProp ) => (
74
33
< div className = "mb-6 me-8 w-full flex-1 basis-1/3" { ...props } />
75
34
)
@@ -101,6 +60,10 @@ const DevelopersPage = async ({
101
60
locale,
102
61
namespace : "page-developers-index" ,
103
62
} )
63
+ const tCommon = await getTranslations ( {
64
+ locale,
65
+ namespace : "common" ,
66
+ } )
104
67
105
68
const paths : DevelopersPath [ ] = [
106
69
{
@@ -145,17 +108,18 @@ const DevelopersPage = async ({
145
108
]
146
109
147
110
return (
148
- < Page >
111
+ < VStack className = "mx-auto my-0 w-full" >
149
112
< HubHero
150
113
heroImg = { HeroImage }
151
114
header = { `${ t ( "page-developers-title-1" ) } ${ t (
152
115
"page-developers-title-2"
153
116
) } ${ t ( "page-developers-title-3" ) } `}
154
- title = { t ( "common: developers") }
117
+ title = { tCommon ( " developers") }
155
118
description = { t ( "page-developers-subtitle" ) }
156
119
/>
157
- < Content >
158
- < MonoSubtitle > { t ( "page-developers-get-started" ) } </ MonoSubtitle >
120
+
121
+ < MainArticle className = "w-full space-y-12 px-8 py-4" >
122
+ < h2 className = "-mb-4 mt-12" > { t ( "page-developers-get-started" ) } </ h2 >
159
123
160
124
< div className = "grid grid-cols-1 gap-6 md:grid-cols-2 md:gap-8 xl:mb-12" >
161
125
< div
@@ -206,7 +170,8 @@ const DevelopersPage = async ({
206
170
</ div >
207
171
</ Card >
208
172
</ div >
209
- < div className = "-mx-4 mb-12 mt-8 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4" >
173
+
174
+ < div className = "-mx-4 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4" >
210
175
{ paths . map ( ( path , idx ) => (
211
176
< OldCard
212
177
className = { `m-4 p-6 shadow-[0px_1px_3px_rgba(0,0,0,0.1)] transition-transform duration-100 hover:scale-105 hover:rounded hover:bg-background-highlight hover:shadow-[0px_8px_17px_rgba(0,0,0,0.15)] dark:shadow-[0px_1px_3px_rgba(60,60,60,0.1)]` }
@@ -220,12 +185,12 @@ const DevelopersPage = async ({
220
185
) ) }
221
186
</ div >
222
187
223
- < TwoColumnContent >
188
+ < div className = "flex w-full flex-col items-start justify-between lg:flex-row lg:items-center" >
224
189
< IntroColumn >
225
190
< H2 > { t ( "page-developers-about" ) } </ H2 >
226
- < Subtitle className = "mb-6" >
191
+ < p className = "mb-6 leading-xs text-body-medium " >
227
192
{ t ( "page-developers-about-desc" ) }
228
- </ Subtitle >
193
+ </ p >
229
194
< Text > { t ( "page-developers-about-desc-2" ) } </ Text >
230
195
< Text >
231
196
{ t ( "page-developers-feedback" ) } { " " }
@@ -247,14 +212,15 @@ const DevelopersPage = async ({
247
212
</ ButtonLink >
248
213
</ div >
249
214
</ CalloutSSR >
250
- </ TwoColumnContent >
251
- </ Content >
252
- < GrayContainer >
253
- < Content >
215
+ </ div >
216
+ </ MainArticle >
217
+
218
+ < div className = "mt-8 w-full border-t bg-background-highlight px-0 py-16 shadow-table-item-box" >
219
+ < div className = "w-full scroll-mt-24 px-8 py-4" >
254
220
< H2 > { t ( "page-developers-explore-documentation" ) } </ H2 >
255
- </ Content >
221
+ </ div >
256
222
257
- < ThreeColumnContent >
223
+ < div className = "flex flex-col items-start justify-between px-8 py-0 lg:flex-row" >
258
224
< Column >
259
225
< H3 > { t ( "page-developers-docs-introductions" ) } </ H3 >
260
226
< InlineLink href = "/developers/docs/intro-to-ethereum/" >
@@ -401,10 +367,10 @@ const DevelopersPage = async ({
401
367
{ t ( "page-developers-data-structures-and-encoding-desc" ) }
402
368
</ Text >
403
369
</ RightColumn >
404
- </ ThreeColumnContent >
405
- </ GrayContainer >
370
+ </ div >
371
+ </ div >
406
372
< FeedbackCard />
407
- </ Page >
373
+ </ VStack >
408
374
)
409
375
}
410
376
0 commit comments