1- import { Heading } from "@/components/Document" ;
1+ import { Grid , Heading , SDKCard } from "@/components/Document" ;
22import Image from "next/image" ;
33import Link from "next/link" ;
4+ import { UnityIcon } from "../icons" ;
5+ import { DotNetIcon } from "../icons" ;
6+ import { UnrealEngineIcon } from "../icons" ;
7+ import { ReactIcon } from "../icons" ;
8+ import { TypeScriptIcon } from "../icons" ;
9+ import { BridgeIcon } from "../icons/products/BridgeIcon" ;
10+ import { ConnectIcon } from "../icons/products/ConnectIcon" ;
11+ import { ContractsIcon } from "../icons/products/ContractsIcon" ;
12+ import { EngineIcon } from "../icons/products/EngineIcon" ;
13+ import { InsightIcon } from "../icons/products/InsightIcon" ;
14+ import { NebulaIcon } from "../icons/products/NebulaIcon" ;
15+ import { PlaygroundIcon } from "../icons/products/PlaygroundIcon" ;
16+ import { cn } from "../lib/utils" ;
417import DocsHeroDark from "./_images/docs-hero-dark.png" ;
518import DocsHeroLight from "./_images/docs-hero-light.png" ;
6-
719export default function Page ( ) {
820 return (
921 < main className = "container max-w-[900px] grow pb-20" data-noindex >
1022 < Hero />
1123 < div className = "grid grid-cols-1 gap-8" >
12- < FrontendSection />
13- < BackendSection />
14- < ContractsSection />
24+ < PlaygroundSection />
25+ < LearningResourcesSection />
26+ < ReferenceSection />
1527 </ div >
1628 </ main >
1729 ) ;
@@ -42,53 +54,139 @@ function Hero() {
4254 ) ;
4355}
4456
45- function FrontendSection ( ) {
57+ function PlaygroundSection ( ) {
4658 return (
4759 < section >
48- < SectionTitle id = "frontend " title = "Frontend " />
60+ < SectionTitle id = "playground " title = "Live Demos " />
4961 < ArticleCardIndex
50- href = "/connect"
51- title = "Connect"
52- description = "Wallets, auth, and onchain interactions"
62+ href = "https://playground.thirdweb.com"
63+ title = "Playground"
64+ external
65+ description = "Try out our interactive playground to get started"
66+ icon = { PlaygroundIcon }
5367 />
5468 </ section >
5569 ) ;
5670}
5771
58- function ContractsSection ( ) {
72+ function ReferenceSection ( ) {
5973 return (
6074 < section >
61- < SectionTitle id = "onchain" title = "Onchain" />
62- < ArticleCardIndex
63- title = "Contracts"
64- description = "Solidity contracts and deployment tools"
65- href = "/contracts"
75+ < SectionTitle id = "reference" title = "API Reference" />
76+ < SectionTitle
77+ id = "client"
78+ title = "Client libraries"
79+ level = { 4 }
80+ className = "text-muted-foreground"
81+ />
82+ < Grid >
83+ < SDKCard
84+ title = "TypeScript"
85+ href = "/typescript/v5"
86+ icon = { TypeScriptIcon }
87+ />
88+ < SDKCard title = "React" href = "/react/v5" icon = { ReactIcon } />
89+ < SDKCard
90+ title = "React Native"
91+ href = "/react-native/v5"
92+ icon = { ReactIcon }
93+ />
94+ < SDKCard title = "DotNet" href = "/dotnet" icon = { DotNetIcon } />
95+ < SDKCard title = "Unity" href = "/unity" icon = { UnityIcon } />
96+ < SDKCard
97+ title = "Unreal Engine"
98+ href = "/unreal-engine"
99+ icon = { UnrealEngineIcon }
100+ />
101+ </ Grid >
102+ < SectionTitle
103+ id = "backend"
104+ title = "Backend APIs"
105+ level = { 4 }
106+ className = "text-muted-foreground"
66107 />
108+ < Grid >
109+ < SDKCard
110+ title = "Engine"
111+ href = "https://thirdweb-engine.apidocumentation.com/"
112+ icon = { EngineIcon }
113+ isExternal
114+ iconClassName = "text-muted-foreground"
115+ />
116+ < SDKCard
117+ title = "Insight"
118+ href = "https://insight-api.thirdweb.com/reference"
119+ icon = { InsightIcon }
120+ isExternal
121+ iconClassName = "text-muted-foreground"
122+ />
123+ < SDKCard
124+ title = "Universal Bridge"
125+ href = "https://bridge.thirdweb.com/reference"
126+ icon = { BridgeIcon }
127+ isExternal
128+ iconClassName = "text-muted-foreground"
129+ />
130+ < SDKCard
131+ title = "Contracts"
132+ href = "https://contracts.thirdweb.com/reference"
133+ icon = { ContractsIcon }
134+ isExternal
135+ iconClassName = "text-muted-foreground"
136+ />
137+ < SDKCard
138+ title = "Wallets"
139+ href = "/connect/wallet/get-users" // TODO: actual openAPI docs
140+ icon = { ConnectIcon }
141+ iconClassName = "text-muted-foreground"
142+ />
143+ < SDKCard
144+ title = "Nebula"
145+ href = "/nebula/api-reference" // TODO: actual openAPI docs
146+ icon = { NebulaIcon }
147+ iconClassName = "text-muted-foreground"
148+ />
149+ </ Grid >
67150 </ section >
68151 ) ;
69152}
70153
71- function BackendSection ( ) {
154+ function LearningResourcesSection ( ) {
72155 return (
73156 < section >
74- < SectionTitle id = "backend" title = "Backend" />
75- < div className = "flex flex-col gap-4" >
157+ < SectionTitle id = "learning" title = "Learning Resources" />
158+ < Grid className = "md:grid-cols-1 lg:grid-cols-2" >
159+ < ArticleCardIndex
160+ href = "/connect"
161+ title = "Connect"
162+ description = "Wallets, auth, and onchain interactions"
163+ icon = { ConnectIcon }
164+ />
76165 < ArticleCardIndex
77166 href = "/engine"
78167 title = "Engine"
79168 description = "Reliable transactions and monitoring"
169+ icon = { EngineIcon }
80170 />
81171 < ArticleCardIndex
82172 href = "/insight"
83173 title = "Insight"
84174 description = "Blockchain data queries and transformations"
175+ icon = { InsightIcon }
85176 />
86177 < ArticleCardIndex
87178 href = "/nebula"
88- title = "AI "
179+ title = "Nebula "
89180 description = "API interface for LLMs"
181+ icon = { NebulaIcon }
90182 />
91- </ div >
183+ < ArticleCardIndex
184+ title = "Contracts"
185+ description = "Solidity contracts and deployment tools"
186+ href = "/contracts"
187+ icon = { ContractsIcon }
188+ />
189+ </ Grid >
92190 </ section >
93191 ) ;
94192}
@@ -97,9 +195,15 @@ function SectionTitle(props: {
97195 title : string ;
98196 id : string ;
99197 level ?: number ;
198+ className ?: string ;
100199} ) {
101200 return (
102- < Heading id = { props . id } level = { props . level || 2 } anchorClassName = "mb-4 mt-0" >
201+ < Heading
202+ id = { props . id }
203+ level = { props . level || 2 }
204+ anchorClassName = "mb-4 mt-0"
205+ className = { cn ( props . className ) }
206+ >
103207 { props . title }
104208 </ Heading >
105209 ) ;
@@ -112,15 +216,23 @@ function ArticleCardIndex(props: {
112216 title : string ;
113217 description : string ;
114218 href : string ;
219+ icon ?: React . FC < { className ?: string } > ;
220+ external ?: boolean ;
115221} ) {
116222 return (
117223 < Link
118224 href = { props . href }
225+ target = { props . external ? "_blank" : undefined }
119226 className = "flex items-center gap-4 rounded-lg border bg-card p-4 transition-colors hover:border-active-border"
120227 >
121- < div className = "flex flex-col gap-0.5" >
122- < h3 className = "font-semibold text-foreground text-lg" > { props . title } </ h3 >
123- < p className = "text-muted-foreground" > { props . description } </ p >
228+ < div className = "flex items-center gap-3" >
229+ { props . icon && < props . icon className = "text-muted-foreground" /> }
230+ < div className = "flex flex-col gap-0.5" >
231+ < h3 className = "font-semibold text-foreground text-lg" >
232+ { props . title }
233+ </ h3 >
234+ < p className = "text-muted-foreground" > { props . description } </ p >
235+ </ div >
124236 </ div >
125237 </ Link >
126238 ) ;
0 commit comments