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"
@@ -11,63 +11,22 @@ import HubHero from "@/components/Hero/HubHero"
11
11
import { Image } from "@/components/Image"
12
12
import MainArticle from "@/components/MainArticle"
13
13
import { ButtonLink } from "@/components/ui/buttons/Button"
14
- import { Flex , Stack , VStack } from "@/components/ui/flex"
14
+ import { Stack , VStack } from "@/components/ui/flex"
15
15
import InlineLink from "@/components/ui/Link"
16
16
17
- import { cn } from "@/lib/utils/cn"
18
17
import { getMetadata } from "@/lib/utils/metadata"
19
18
20
19
import SpeedRunEthereumImage from "@/public/images/dev-tools/speed-run-ethereum-banner.png"
21
20
import DevelopersImage from "@/public/images/developers-eth-blocks.png"
22
21
import DogeImage from "@/public/images/doge-computer.png"
23
22
import HeroImage from "@/public/images/heroes/developers-hub-hero.jpg"
24
23
25
- const Page = ( props : ChildOnlyProp ) => (
26
- < VStack className = "mx-auto my-0 w-full" { ...props } />
27
- )
28
-
29
- const GrayContainer = ( props : ChildOnlyProp ) => (
30
- < div
31
- className = "mt-8 w-full border-t bg-background-highlight px-0 py-16 shadow-table-item-box"
32
- { ...props }
33
- />
34
- )
35
-
36
- const Content = ( props : ChildOnlyProp ) => (
37
- < MainArticle className = "w-full px-8 py-4" { ...props } />
38
- )
39
-
40
- const Subtitle = ( {
41
- className,
42
- ...props
43
- } : HTMLAttributes < HTMLHeadingElement > ) => (
44
- < p className = { cn ( "leading-xs text-body-medium" , className ) } { ...props } />
45
- )
46
-
47
- const MonoSubtitle = ( props : ChildOnlyProp ) => (
48
- < h2 className = "mb-0 mt-12" { ...props } />
49
- )
50
-
51
24
const H2 = ( props : ChildOnlyProp ) => < h2 className = "mb-8 mt-12" { ...props } />
52
25
53
26
const H3 = ( props : ChildOnlyProp ) => < h3 className = "mb-8 mt-10" { ...props } />
54
27
55
28
const Text = ( props : ChildOnlyProp ) => < p className = "mb-6" { ...props } />
56
29
57
- const TwoColumnContent = ( props : ChildOnlyProp ) => (
58
- < Flex
59
- className = "w-full flex-col items-start justify-between lg:flex-row lg:items-center"
60
- { ...props }
61
- />
62
- )
63
-
64
- const ThreeColumnContent = ( props : ChildOnlyProp ) => (
65
- < Flex
66
- className = "flex-col items-start justify-between px-8 py-0 lg:flex-row"
67
- { ...props }
68
- />
69
- )
70
-
71
30
const Column = ( props : ChildOnlyProp ) => (
72
31
< div className = "mb-6 me-8 w-full flex-1 basis-1/3" { ...props } />
73
32
)
@@ -99,6 +58,10 @@ const DevelopersPage = async ({
99
58
locale,
100
59
namespace : "page-developers-index" ,
101
60
} )
61
+ const tCommon = await getTranslations ( {
62
+ locale,
63
+ namespace : "common" ,
64
+ } )
102
65
103
66
const paths : DevelopersPath [ ] = [
104
67
{
@@ -132,18 +95,19 @@ const DevelopersPage = async ({
132
95
]
133
96
134
97
return (
135
- < Page >
98
+ < VStack className = "mx-auto my-0 w-full" >
136
99
< HubHero
137
100
heroImg = { HeroImage }
138
101
header = { `${ t ( "page-developers-title-1" ) } ${ t (
139
102
"page-developers-title-2"
140
103
) } ${ t ( "page-developers-title-3" ) } `}
141
- title = { t ( "common: developers") }
104
+ title = { tCommon ( " developers") }
142
105
description = { t ( "page-developers-subtitle" ) }
143
106
/>
144
- < Content >
145
- < MonoSubtitle > { t ( "page-developers-get-started" ) } </ MonoSubtitle >
146
- < div className = "-mx-4 mb-12 mt-8 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4" >
107
+ < MainArticle className = "w-full space-y-12 px-8 py-4" >
108
+ < h2 className = "-mb-4 mt-12" > { t ( "page-developers-get-started" ) } </ h2 >
109
+
110
+ < div className = "-mx-4 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4" >
147
111
{ paths . map ( ( path , idx ) => (
148
112
< Card
149
113
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)]` }
@@ -157,7 +121,7 @@ const DevelopersPage = async ({
157
121
) ) }
158
122
</ div >
159
123
160
- < div className = "relative xl:mb-12 " data-label = "speedrunethereum-banner" >
124
+ < div className = "relative" data-label = "speedrunethereum-banner" >
161
125
< Image
162
126
className = "h-[450px] xl:h-auto"
163
127
src = { SpeedRunEthereumImage }
@@ -177,12 +141,12 @@ const DevelopersPage = async ({
177
141
</ Stack >
178
142
</ div >
179
143
180
- < TwoColumnContent >
144
+ < div className = "flex w-full flex-col items-start justify-between lg:flex-row lg:items-center" >
181
145
< IntroColumn >
182
146
< H2 > { t ( "page-developers-about" ) } </ H2 >
183
- < Subtitle className = "mb-6" >
147
+ < p className = "mb-6 leading-xs text-body-medium " >
184
148
{ t ( "page-developers-about-desc" ) }
185
- </ Subtitle >
149
+ </ p >
186
150
< Text > { t ( "page-developers-about-desc-2" ) } </ Text >
187
151
< Text >
188
152
{ t ( "page-developers-feedback" ) } { " " }
@@ -204,14 +168,14 @@ const DevelopersPage = async ({
204
168
</ ButtonLink >
205
169
</ div >
206
170
</ CalloutSSR >
207
- </ TwoColumnContent >
208
- </ Content >
209
- < GrayContainer >
210
- < Content >
171
+ </ div >
172
+ </ MainArticle >
173
+ < div className = "mt-8 w-full border-t bg-background-highlight px-0 py-16 shadow-table-item-box" >
174
+ < div className = "w-full scroll-mt-24 px-8 py-4" >
211
175
< H2 > { t ( "page-developers-explore-documentation" ) } </ H2 >
212
- </ Content >
176
+ </ div >
213
177
214
- < ThreeColumnContent >
178
+ < div className = "flex flex-col items-start justify-between px-8 py-0 lg:flex-row" >
215
179
< Column >
216
180
< H3 > { t ( "page-developers-docs-introductions" ) } </ H3 >
217
181
< InlineLink href = "/developers/docs/intro-to-ethereum/" >
@@ -358,10 +322,10 @@ const DevelopersPage = async ({
358
322
{ t ( "page-developers-data-structures-and-encoding-desc" ) }
359
323
</ Text >
360
324
</ RightColumn >
361
- </ ThreeColumnContent >
362
- </ GrayContainer >
325
+ </ div >
326
+ </ div >
363
327
< FeedbackCard />
364
- </ Page >
328
+ </ VStack >
365
329
)
366
330
}
367
331
0 commit comments