Skip to content

Commit f310ec0

Browse files
committed
fix: fix overflow for sidebar layout
1 parent 5812e3a commit f310ec0

File tree

1 file changed

+34
-36
lines changed

1 file changed

+34
-36
lines changed

src/layouts/SidebarLayout.res

Lines changed: 34 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -366,43 +366,41 @@ let make = (
366366
}
367367
| None => React.null
368368
}
369-
370-
<div className={"mt-16 min-w-320 " ++ theme}>
371-
<div className="w-full">
372-
<div className="flex lg:justify-center">
373-
<div className="flex w-full max-w-1280 md:mx-10 md:mt-16">
374-
sidebar
375-
<main className="px-4 w-full pt-4 md:ml-12 lg:mr-8 mb-32 md:max-w-576 lg:max-w-740">
376-
//width of the right content part
377-
<div
378-
id="mobile-navbar"
379-
className={`z-10 fixed border-b shadow ${isDocRoute(~route=pathname)
380-
? "top-28"
381-
: "top-16"} left-0 pl-4 bg-white w-full py-4 md:relative md:border-none md:shadow-none md:p-0 md:top-auto flex items-center transition duration-300 ease-out group-[.nav-disappear]:-translate-y-64 md:group-[.nav-disappear]:-translate-y-0 z-25`}
382-
>
383-
<MobileDrawerButton hidden=isNavOpen onClick={handleDrawerButtonClick} />
384-
<div
385-
className="truncate overflow-x-auto touch-scroll flex items-center space-x-4 md:justify-between mr-4 w-full"
386-
>
387-
breadcrumbs
388-
editLinkEl
389-
</div>
390-
</div>
391-
<div
392-
className={hasBreadcrumbs ? "mt-28 md:mt-10" : "mt-6 md:-mt-4"}
393-
dataTestId="side-layout-children"
394-
>
395-
children
396-
</div>
397-
pagination
398-
</main>
399-
{switch rightSidebar {
400-
| Some(ele) => ele
401-
| None => React.null
402-
}}
369+
<>
370+
<div
371+
className={"w-full mt-16 min-w-320 grid lg:justify-center max-w-1280 md:mx-10 md:mt-16 grid-cols-[auto_minmax(0px,1fr)] " ++
372+
theme}
373+
>
374+
sidebar
375+
<main className="px-4 w-full pt-4 md:ml-12 lg:mr-8 mb-32 md:max-w-576 lg:max-w-740">
376+
//width of the right content part
377+
<div
378+
id="mobile-navbar"
379+
className={`z-10 fixed border-b shadow ${isDocRoute(~route=pathname)
380+
? "top-28"
381+
: "top-16"} left-0 pl-4 bg-white w-full py-4 md:relative md:border-none md:shadow-none md:p-0 md:top-auto flex items-center transition duration-300 ease-out group-[.nav-disappear]:-translate-y-64 md:group-[.nav-disappear]:-translate-y-0 z-25`}
382+
>
383+
<MobileDrawerButton hidden=isNavOpen onClick={handleDrawerButtonClick} />
384+
<div
385+
className="truncate overflow-x-auto touch-scroll flex items-center space-x-4 md:justify-between mr-4 w-full"
386+
>
387+
breadcrumbs
388+
editLinkEl
389+
</div>
403390
</div>
404-
</div>
391+
<div
392+
className={hasBreadcrumbs ? "mt-28 md:mt-10" : "mt-6 md:-mt-4"}
393+
dataTestId="side-layout-children"
394+
>
395+
children
396+
</div>
397+
pagination
398+
</main>
399+
{switch rightSidebar {
400+
| Some(ele) => ele
401+
| None => React.null
402+
}}
405403
</div>
406404
<Footer />
407-
</div>
405+
</>
408406
}

0 commit comments

Comments
 (0)