@@ -613,14 +613,17 @@ def wrapper(*args, **kwargs) -> rx.Component:
613613
614614 show_right_sidebar = right_sidebar and len (toc ) >= 2
615615
616- main_content_width = " lg:w-[90%]" if show_right_sidebar else " lg:w-full"
616+ grid_cols_classes = "grid-cols-1"
617+ if show_right_sidebar :
618+ grid_cols_classes += " 2xl:grid-cols-[300px_1fr_16%]"
619+ grid_cols_classes += " lg:grid-cols-[300px_1fr]"
617620
618621 return rx .box (
619622 navbar (),
620623 rx .el .main (
621624 rx .box (
622625 sidebar ,
623- class_name = "h-full shrink-0 desktop-only lg:w-[24%] "
626+ class_name = "h-full shrink-0 desktop-only lg:block hidden "
624627 + rx .cond (
625628 HostingBannerState .show_banner ,
626629 " mt-[146px]" ,
@@ -630,7 +633,7 @@ def wrapper(*args, **kwargs) -> rx.Component:
630633 rx .box (
631634 rx .box (
632635 breadcrumb (path = path , nav_sidebar = nav_sidebar ),
633- class_name = "px-0 lg :px-20 pt-0" ,
636+ class_name = "px-0 xl :px-20 pt-0" ,
634637 ),
635638 rx .box (
636639 rx .el .article (comp ),
@@ -639,9 +642,10 @@ def wrapper(*args, **kwargs) -> rx.Component:
639642 class_name = "flex flex-row gap-2 mt-8 lg:mt-10 mb-6 lg:mb-12" ,
640643 ),
641644 docpage_footer (path = path .rstrip ("/" )),
642- class_name = "lg:mt-0 mt-6 px-4 lg :px-20" ,
645+ class_name = "lg:mt-0 mt-6 px-4 xl :px-20" ,
643646 ),
644- class_name = "h-full w-full" + main_content_width ,
647+ class_name = "h-full mx-auto max-w-2xl lg:col-start-2 lg:col-end-3 2xl:col-start-2 2xl:col-end-3 "
648+ + (" xl:max-w-[60rem]" if show_right_sidebar else "xl:max-w-full" ),
645649 ),
646650 (
647651 # right-hand sidebar
@@ -700,7 +704,7 @@ def wrapper(*args, **kwargs) -> rx.Component:
700704 class_name = "fixed flex flex-col justify-start gap-4 p-[0.875rem_0.5rem_0px_0.5rem] max-h-[80vh] overflow-y-auto" ,
701705 style = {"width" : "inherit" },
702706 ),
703- class_name = "shrink-0 w-[16%] "
707+ class_name = "shrink-0 2xl:col-start-3 2xl:col-end-4 "
704708 + rx .cond (
705709 HostingBannerState .show_banner ,
706710 " mt-[146px]" ,
@@ -716,9 +720,10 @@ def wrapper(*args, **kwargs) -> rx.Component:
716720 if not pseudo_right_bar or show_right_sidebar
717721 else rx .el .div (class_name = "hidden" )
718722 ),
719- class_name = "justify-center flex flex-row mx-auto mt-0 max-w-[94.5em] h-full min-h-screen w-full" ,
723+ class_name = "grid justify-center mx-auto mt-0 max-w-[94.5em] h-full min-h-screen w-full "
724+ + grid_cols_classes ,
720725 ),
721- class_name = "flex flex-col justify-center bg-slate-1 w-full" ,
726+ class_name = "flex flex-col justify-center bg-slate-1 w-full mx-auto " ,
722727 on_mount = rx .call_script (right_sidebar_item_highlight ()),
723728 )
724729
0 commit comments