File tree Expand file tree Collapse file tree 2 files changed +16
-16
lines changed Expand file tree Collapse file tree 2 files changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -36,27 +36,22 @@ export function Page({children, toc}: PageProps) {
36
36
< >
37
37
< SocialBanner />
38
38
< SidebarContext . Provider value = { routeTree } >
39
- < div className = "h-auto flex flex-col lg:flex-row " >
40
- < div className = "fixed lg:sticky top-0 left-0 right-0 py-0 lg:w-80 flex-none lg:static shadow lg:shadow-none z-50" >
39
+ < div className = "grid grid-cols-only-content lg:grid-cols-sidebar-content 2xl:grid-cols-sidebar-content-toc " >
40
+ < div className = "fixed lg:sticky top-0 left-0 right-0 py-0 shadow lg:shadow-none z-50" >
41
41
< Nav />
42
42
</ div >
43
-
44
- < div className = "lg:hidden h-16 mb-2" />
45
-
46
43
{ /* No fallback UI so need to be careful not to suspend directly inside. */ }
47
44
< React . Suspense fallback = { null } >
48
- < div className = "flex flex-1 w-full h-full self-stretch min-w-0" >
49
- < main className = "w-full self-stretch h-full mx-auto relative w-full min-w-0" >
50
- < article className = "break-words" key = { asPath } >
51
- { children }
52
- </ article >
53
- < Footer />
54
- </ main >
55
- </ div >
45
+ < main className = "min-w-0" >
46
+ < div className = "lg:hidden h-16 mb-2" />
47
+ < article className = "break-words" key = { asPath } >
48
+ { children }
49
+ </ article >
50
+ < Footer />
51
+ </ main >
56
52
</ React . Suspense >
57
-
58
- < div className = "lg:w-80 flex-none lg:max-w-xs hidden 2xl:block" >
59
- { toc . length > 0 && < Toc headings = { toc } /> }
53
+ < div className = "hidden lg:max-w-xs 2xl:block" >
54
+ { toc . length > 0 && < Toc headings = { toc } key = { asPath } /> }
60
55
</ div >
61
56
</ div >
62
57
</ SidebarContext . Provider >
Original file line number Diff line number Diff line change @@ -68,6 +68,11 @@ module.exports = {
68
68
code : 'calc(1em - 20%)' ,
69
69
} ,
70
70
colors,
71
+ gridTemplateColumns : {
72
+ 'only-content' : 'auto' ,
73
+ 'sidebar-content' : '20rem auto' ,
74
+ 'sidebar-content-toc' : '20rem auto 20rem' ,
75
+ } ,
71
76
} ,
72
77
} ,
73
78
plugins : [ ] ,
You can’t perform that action at this time.
0 commit comments