@@ -28,50 +28,50 @@ export default async function Page({
28
28
const MDXContent = page . data . body ;
29
29
30
30
return (
31
- < div className = "container max-w-4xl py-8 lg:py-20 xl:max-w-6xl" >
32
- < div
33
- className = { cn ( "" , {
34
- "xl:grid xl:grid-cols-[1fr_220px] xl:gap-10" :
35
- page . data . toc && page . data . toc . length > 0 ,
36
- } ) }
37
- >
38
- < div className = "pt-4" >
39
- < Breadcrumbs tree = { source . pageTree } className = "mb-2" />
40
- < h1 className = "text-4xl font-bold" > { page . data . title } </ h1 >
41
- < p className = "text-fg-muted mt-2" > { page . data . description } </ p >
42
- { page . data . links && page . data . links . length > 0 && (
43
- < div className = "mt-4 flex flex-wrap gap-2" >
44
- { page . data . links . map ( ( link , index ) => (
45
- < Button
46
- key = { index }
47
- href = { link . href }
48
- prefix = { getIcon ( link . href ) }
49
- suffix = { < ExternalLinkIcon /> }
50
- size = "sm"
51
- className = "h-6 text-xs font-semibold [&_svg]:size-3"
52
- target = "_blank"
53
- >
54
- { link . label }
55
- </ Button >
56
- ) ) }
57
- </ div >
58
- ) }
59
- < div className = "mt-10 text-sm md:text-base" >
60
- < MDXContent components = { mdxComponents } />
61
- </ div >
62
- < div className = "mt-20 space-y-4" >
63
- < PageLastUpdate path = { page . file . path } />
64
- < DocsPager currentPathname = { page . url } />
65
- </ div >
66
- </ div >
67
- { page . data . toc && page . data . toc . length > 0 && (
68
- < div className = "bg-bg z-10 hidden justify-end pt-4 text-sm xl:flex" >
69
- < div className = "sticky top-8 h-[calc(100svh-calc(var(--spacing)*8))]" >
70
- < TableOfContents toc = { page . data . toc as TocType } />
71
- </ div >
31
+ < div
32
+ className = { cn (
33
+ "container w-full max-w-3xl xl:max-w-4xl" ,
34
+ page . data . toc &&
35
+ page . data . toc . length > 0 &&
36
+ "grid grid-cols-1 gap-10 xl:max-w-5xl xl:grid-cols-[minmax(0,1fr)_minmax(180px,220px)]"
37
+ ) }
38
+ >
39
+ < div className = "pb-24 pt-4 sm:pt-10 lg:pt-20" >
40
+ < Breadcrumbs tree = { source . pageTree } className = "mb-2" />
41
+ < h1 className = "text-3xl font-bold lg:text-4xl" > { page . data . title } </ h1 >
42
+ < p className = "text-fg-muted mt-2" > { page . data . description } </ p >
43
+ { page . data . links && page . data . links . length > 0 && (
44
+ < div className = "mt-4 flex flex-wrap gap-2" >
45
+ { page . data . links . map ( ( link , index ) => (
46
+ < Button
47
+ key = { index }
48
+ href = { link . href }
49
+ prefix = { getIcon ( link . href ) }
50
+ suffix = { < ExternalLinkIcon /> }
51
+ size = "sm"
52
+ className = "h-6 text-xs font-semibold [&_svg]:size-3"
53
+ target = "_blank"
54
+ >
55
+ { link . label }
56
+ </ Button >
57
+ ) ) }
72
58
</ div >
73
59
) }
60
+ < div className = "mt-10 text-sm md:text-base" >
61
+ < MDXContent components = { mdxComponents } />
62
+ </ div >
63
+ < div className = "mt-20 space-y-4" >
64
+ < PageLastUpdate path = { page . file . path } />
65
+ < DocsPager currentPathname = { page . url } />
66
+ </ div >
74
67
</ div >
68
+ { page . data . toc && page . data . toc . length > 0 && (
69
+ < div className = "pt-20" >
70
+ < div className = "sticky top-10 h-[calc(100svh-calc(var(--spacing)*10))]" >
71
+ < TableOfContents toc = { page . data . toc as TocType } />
72
+ </ div >
73
+ </ div >
74
+ ) }
75
75
</ div >
76
76
) ;
77
77
}
0 commit comments