@@ -39,11 +39,9 @@ export function DocsLayout({ tree, children, ...props }: DocsLayoutProps) {
3939 < div { ...stylex . props ( layoutStyles . wrapper ) } >
4040 < main id = "nd-docs-layout" { ...stylex . props ( layoutStyles . main ) } >
4141 < Sidebar />
42- < div { ...stylex . props ( layoutStyles . content ) } >
43- { children }
44- </ div >
42+ < div { ...stylex . props ( layoutStyles . content ) } > { children } </ div >
43+ < Footer />
4544 </ main >
46- < Footer />
4745 </ div >
4846 </ TreeContextProvider >
4947 ) ;
@@ -85,22 +83,27 @@ const layoutStyles = stylex.create({
8583 main : {
8684 // flex flex-1 flex-row [--fd-nav-height:56px]
8785 display : 'flex' ,
86+ flexDirection : 'column' ,
8887 flexGrow : 1 ,
89- flexDirection : 'row' ,
90- [ '--fd-nav-height' as any ] : '56px' ,
88+ // flexDirection: 'row',
89+ [ '--fd-nav-height' as any ] : '64px' ,
90+ paddingInlineStart : {
91+ default : 292 ,
92+ '@media (max-width: 767.9px)' : 0 ,
93+ } ,
9194 } ,
9295 content : {
93- display : 'flex' ,
94- flexDirection : 'column' ,
95- flexGrow : 1 ,
96- minWidth : 0 ,
96+ // flexGrow: 1,
97+ // minWidth: 0,
9798 } ,
9899} ) ;
99100
100101function Sidebar ( ) {
101102 const { root } = useTreeContext ( ) ;
102103 const [ open ] = use ( SidebarContext ) ;
103104
105+ console . log ( 'open' , open ) ;
106+
104107 const children = useMemo ( ( ) => {
105108 function renderItems ( items : PageTree . Node [ ] ) {
106109 return items . map ( ( item ) => (
@@ -123,6 +126,10 @@ function Sidebar() {
123126 open === false && sidebarStyles . closed ,
124127 ) }
125128 >
129+ < div { ...stylex . props ( sidebarStyles . blurContainer ) } >
130+ < div { ...stylex . props ( sidebarStyles . blur ) } />
131+ </ div >
132+
126133 < aside { ...stylex . props ( sidebarStyles . base ) } ref = { sidebarRef } >
127134 { children }
128135 </ aside >
@@ -131,37 +138,64 @@ function Sidebar() {
131138}
132139const sidebarStyles = stylex . create ( {
133140 container : {
134- position : 'sticky' ,
135- top : 56 ,
141+ position : 'fixed' ,
142+ top : 64 ,
143+ left : 0 ,
136144 display : {
137145 default : 'flex' ,
138146 '@media (max-width: 767.9px)' : 'none' ,
139147 } ,
140148 alignSelf : 'flex-start' ,
141149 flexShrink : 0 ,
142150 padding : 8 ,
143- height : 'calc(100dvh - 56px)' ,
151+ height : 'calc(100dvh - 64px)' ,
152+ transform : {
153+ default : 'translateX(0px)' ,
154+ '@media (max-width: 767.9px)' : 'translateX(-100%)' ,
155+ } ,
156+ transitionProperty : 'transform' ,
157+ transitionDuration : '0.15s' ,
158+ transitionTimingFunction : 'cubic-bezier(0.4, 0, 0.2, 1)' ,
144159 zIndex : 10 ,
145160 } ,
161+ open : {
162+ transform : 'translateX(0)' ,
163+ } ,
164+ closed : {
165+ transform : 'translateX(-100%)' ,
166+ } ,
167+ blurContainer : {
168+ position : 'absolute' ,
169+ inset : 8 ,
170+ overflow : 'hidden' ,
171+ borderRadius : 20 ,
172+ cornerShape : 'squircle' ,
173+ zIndex : 1 ,
174+ } ,
175+ blur : {
176+ position : 'absolute' ,
177+ inset : - 64 ,
178+ insetInlineStart : - 8 ,
179+ backdropFilter : 'blur(32px) saturate(800%)' ,
180+ } ,
146181 base : {
147182 display : 'flex' ,
148183 flexDirection : 'column' ,
149184 gap : 2 ,
150185 padding : 4 * 4 ,
151- fontSize : `${ 14 / 16 } rem ` ,
186+ fontSize : `1rem ` ,
152187 overflowY : 'auto' ,
153188 overscrollBehavior : 'contain' ,
154189 width : 280 ,
155190 height : '100%' ,
156- backgroundColor : 'var(--color-fd-background)' ,
157191 borderRadius : 20 ,
192+ cornerShape : 'squircle' ,
158193 borderWidth : 1 ,
159194 borderStyle : 'solid' ,
160195 borderColor : 'var(--color-fd-border)' ,
161196 boxShadow : '0 4px 16px rgba(0, 0, 0, 0.06)' ,
197+ zIndex : 10 ,
162198 } ,
163- open : { } ,
164- closed : { } ,
165199} ) ;
166200
167201function SidebarItem ( {
@@ -333,7 +367,7 @@ const linkVariants = stylex.create({
333367 position : 'relative' ,
334368 display : 'inline-flex' ,
335369 alignItems : 'center' ,
336- fontSize : `${ 14 / 16 } rem ` ,
370+ fontSize : `1rem ` ,
337371 lineHeight : 1.42 ,
338372 gap : 2 * 4 ,
339373 paddingBlock : 1.5 * 4 ,
0 commit comments