Skip to content

Commit a348424

Browse files
committed
feat: speedrun to top, add quickstarts
1 parent c8a9896 commit a348424

File tree

1 file changed

+70
-24
lines changed

1 file changed

+70
-24
lines changed

app/[locale]/developers/page.tsx

Lines changed: 70 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ import { Lang } from "@/lib/types"
55
import { ChildOnlyProp } from "@/lib/types"
66

77
import CalloutSSR from "@/components/CalloutSSR"
8-
import Card from "@/components/Card"
8+
import OldCard from "@/components/Card"
9+
import { CopyButton } from "@/components/CopyToClipboard"
910
import FeedbackCard from "@/components/FeedbackCard"
1011
import HubHero from "@/components/Hero/HubHero"
1112
import { Image } from "@/components/Image"
1213
import MainArticle from "@/components/MainArticle"
1314
import { ButtonLink } from "@/components/ui/buttons/Button"
14-
import { Flex, Stack, VStack } from "@/components/ui/flex"
15+
import { Card } from "@/components/ui/card"
16+
import { Flex, VStack } from "@/components/ui/flex"
1517
import InlineLink from "@/components/ui/Link"
1618

1719
import { cn } from "@/lib/utils/cn"
@@ -131,6 +133,17 @@ const DevelopersPage = async ({
131133
},
132134
]
133135

136+
const quickstarts = [
137+
{
138+
description: "Quickstart a smart contract",
139+
command: "npx create-eth@latest",
140+
},
141+
{
142+
description: "Quickstart a wallet-enabled front end",
143+
command: "npm init @rainbow-me/rainbowkit@latest",
144+
},
145+
]
146+
134147
return (
135148
<Page>
136149
<HubHero
@@ -143,40 +156,73 @@ const DevelopersPage = async ({
143156
/>
144157
<Content>
145158
<MonoSubtitle>{t("page-developers-get-started")}</MonoSubtitle>
159+
160+
<div className="grid grid-cols-1 gap-6 md:grid-cols-2 md:gap-8 xl:mb-12">
161+
<div
162+
className="relative h-[450px]"
163+
data-label="speedrunethereum-banner"
164+
>
165+
<Image
166+
className="pointer-events-none absolute -z-[1] h-full rounded-t-2xl"
167+
src={SpeedRunEthereumImage}
168+
alt="SpeedRunEthereum banner"
169+
sizes="100vw"
170+
style={{ width: "100vw", objectFit: "cover" }}
171+
/>
172+
<div className="z-[1] space-y-4 break-words p-6 md:space-y-6 lg:p-12">
173+
<h3>Start experimenting</h3>
174+
<p>
175+
Hands-on challenges such as building NFTs, DEXs in a
176+
step-by-step tutorial series.
177+
</p>
178+
<ButtonLink
179+
href="https://speedrunethereum.com/"
180+
size="lg"
181+
className="mt-4"
182+
>
183+
{t("page-developers-speedrunethereum-link")}
184+
</ButtonLink>
185+
</div>
186+
</div>
187+
188+
<Card className="!space-y-8 break-words border border-accent-c/20 bg-gradient-to-t from-accent-c/15 to-accent-c/5 p-6 md:space-y-6 lg:p-12">
189+
<h3>Jump right into the code</h3>
190+
<div className="space-y-6">
191+
{quickstarts.map(({ description, command }) => (
192+
<div key={command} className="space-y-1">
193+
<div className="font-bold">{description}</div>
194+
<div className="flex items-center rounded-lg border bg-background px-3 py-1">
195+
<div className="flex-1 font-mono text-sm">{command}</div>
196+
<CopyButton message={command} size="sm" />
197+
</div>
198+
</div>
199+
))}
200+
</div>
201+
<div>
202+
<ButtonLink
203+
href="https://docs.soliditylang.org/en/latest/"
204+
variant="outline"
205+
className="bg-background"
206+
>
207+
Read the Solidity docs
208+
</ButtonLink>
209+
</div>
210+
</Card>
211+
</div>
146212
<div className="-mx-4 mb-12 mt-8 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4">
147213
{paths.map((path, idx) => (
148-
<Card
214+
<OldCard
149215
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)]`}
150216
key={idx}
151217
emoji={path.emoji}
152218
title={path.title}
153219
description={path.description}
154220
>
155221
<ButtonLink href={path.url}>{path.button}</ButtonLink>
156-
</Card>
222+
</OldCard>
157223
))}
158224
</div>
159225

160-
<div className="relative xl:mb-12" data-label="speedrunethereum-banner">
161-
<Image
162-
className="h-[450px] xl:h-auto"
163-
src={SpeedRunEthereumImage}
164-
alt="SpeedRunEthereum banner"
165-
sizes="100vw"
166-
style={{
167-
width: "100vw",
168-
objectFit: "cover",
169-
objectPosition: "20%",
170-
}}
171-
/>
172-
<Stack className="absolute top-0 max-w-lg items-start space-y-3 break-words p-6 md:top-12 md:ms-8 md:space-y-4 lg:p-8 xl:max-w-xl">
173-
<h2>{t("page-developers-speedrunethereum-title")}</h2>
174-
<ButtonLink href="https://speedrunethereum.com/">
175-
{t("page-developers-speedrunethereum-link")}
176-
</ButtonLink>
177-
</Stack>
178-
</div>
179-
180226
<TwoColumnContent>
181227
<IntroColumn>
182228
<H2>{t("page-developers-about")}</H2>

0 commit comments

Comments
 (0)