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