@@ -110,68 +110,70 @@ export function Layout(props: PageProps & {children: ReactElement<any>}) {
110
110
lg : 'none'
111
111
}
112
112
} ) } >
113
- < Header pages = { pages } currentPage = { currentPage } />
114
- < MobileHeader
115
- toc = { < MobileToc key = "toc" toc = { currentPage . tableOfContents ?? [ ] } /> }
116
- nav = { < MobileNav key = "nav" pages = { pages } currentPage = { currentPage } /> } />
117
- < div className = { style ( { display : 'flex' , width : 'full' } ) } >
118
- < Nav pages = { pages } currentPage = { currentPage } />
119
- < main
120
- key = { currentPage . url }
121
- style = { { borderBottomLeftRadius : 0 , borderBottomRightRadius : 0 } }
122
- className = { style ( {
123
- isolation : 'isolate' ,
124
- backgroundColor : 'base' ,
125
- padding : {
126
- default : 12 ,
127
- lg : 40
128
- } ,
129
- borderRadius : {
130
- default : 'none' ,
131
- lg : 'xl'
132
- } ,
133
- boxShadow : {
134
- lg : 'emphasized'
135
- } ,
136
- width : 'full' ,
137
- boxSizing : 'border-box' ,
138
- flexGrow : 1 ,
139
- display : 'flex' ,
140
- justifyContent : 'space-between' ,
141
- position : 'relative' ,
142
- height : {
143
- lg : '[calc(100vh - 72px)]'
144
- } ,
145
- overflow : {
146
- lg : 'auto'
147
- }
148
- } ) } >
149
- < article
113
+ < div className = { style ( { isolation : 'isolate' , width : 'full' } ) } >
114
+ < Header pages = { pages } currentPage = { currentPage } />
115
+ < MobileHeader
116
+ toc = { < MobileToc key = "toc" toc = { currentPage . tableOfContents ?? [ ] } /> }
117
+ nav = { < MobileNav key = "nav" pages = { pages } currentPage = { currentPage } /> } />
118
+ < div className = { style ( { display : 'flex' , width : 'full' , marginTop : 12 } ) } >
119
+ < Nav pages = { pages } currentPage = { currentPage } />
120
+ < main
121
+ key = { currentPage . url }
122
+ style = { { borderBottomLeftRadius : 0 , borderBottomRightRadius : 0 } }
150
123
className = { style ( {
151
- maxWidth : 768 ,
124
+ isolation : 'isolate' ,
125
+ backgroundColor : 'base' ,
126
+ padding : {
127
+ default : 12 ,
128
+ lg : 40
129
+ } ,
130
+ borderRadius : {
131
+ default : 'none' ,
132
+ lg : 'xl'
133
+ } ,
134
+ boxShadow : {
135
+ lg : 'emphasized'
136
+ } ,
152
137
width : 'full' ,
153
- height : 'fit'
154
- } ) } >
155
- { React . cloneElement ( children , { components} ) }
156
- </ article >
157
- < aside
158
- className = { style ( {
159
- position : 'sticky' ,
160
- top : 0 ,
161
- height : 'fit' ,
162
- maxHeight : 'screen' ,
163
- overflow : 'auto' ,
164
- paddingY : 32 ,
165
138
boxSizing : 'border-box' ,
166
- display : {
167
- default : 'none' ,
168
- lg : 'block'
139
+ flexGrow : 1 ,
140
+ display : 'flex' ,
141
+ justifyContent : 'space-between' ,
142
+ position : 'relative' ,
143
+ height : {
144
+ lg : '[calc(100vh - 72px)]'
145
+ } ,
146
+ overflow : {
147
+ lg : 'auto'
169
148
}
170
149
} ) } >
171
- < div className = { style ( { font : 'title' , minHeight : 32 , paddingX : 12 , display : 'flex' , alignItems : 'center' } ) } > Contents</ div >
172
- < Toc toc = { currentPage . tableOfContents ?. [ 0 ] ?. children ?? [ ] } />
173
- </ aside >
174
- </ main >
150
+ < article
151
+ className = { style ( {
152
+ maxWidth : 768 ,
153
+ width : 'full' ,
154
+ height : 'fit'
155
+ } ) } >
156
+ { React . cloneElement ( children , { components} ) }
157
+ </ article >
158
+ < aside
159
+ className = { style ( {
160
+ position : 'sticky' ,
161
+ top : 0 ,
162
+ height : 'fit' ,
163
+ maxHeight : 'screen' ,
164
+ overflow : 'auto' ,
165
+ paddingY : 32 ,
166
+ boxSizing : 'border-box' ,
167
+ display : {
168
+ default : 'none' ,
169
+ lg : 'block'
170
+ }
171
+ } ) } >
172
+ < div className = { style ( { font : 'title' , minHeight : 32 , paddingX : 12 , display : 'flex' , alignItems : 'center' } ) } > Contents</ div >
173
+ < Toc toc = { currentPage . tableOfContents ?. [ 0 ] ?. children ?? [ ] } />
174
+ </ aside >
175
+ </ main >
176
+ </ div >
175
177
</ div >
176
178
</ body >
177
179
</ Provider >
0 commit comments