Skip to content

Commit 0e09407

Browse files
adhipkadhami3310
andauthored
added scroll on y overflow and adjusted width of right sidebar for proper word wrap (#1234)
Co-authored-by: Khaleel Al-Adhami <[email protected]>
1 parent 8b79816 commit 0e09407

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

pcweb/templates/docpage/docpage.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ def wrapper(*args, **kwargs) -> rx.Component:
473473
rx.box(
474474
"Next",
475475
get_icon(icon="arrow_right"),
476-
class_name="flex flex-row justify-center lg:justify-start items-center gap-2 rounded-lg w-full self-end",
476+
class_name="flex flex-row lg:justify-start items-center gap-2 rounded-lg w-full self-end",
477477
),
478478
underline="none",
479479
href=next.link,
@@ -511,7 +511,7 @@ def wrapper(*args, **kwargs) -> rx.Component:
511511
rx.box(
512512
rx.box(
513513
breadcrumb(path=path, nav_sidebar=nav_sidebar),
514-
class_name="px-0 lg:px-24",
514+
class_name="px-0 lg:px-20",
515515
),
516516
rx.box(
517517
rx.el.article(comp),
@@ -520,7 +520,7 @@ def wrapper(*args, **kwargs) -> rx.Component:
520520
class_name="flex flex-row gap-2 mt-8 lg:mt-10 mb-6 lg:mb-12",
521521
),
522522
docpage_footer(path=path.rstrip("/")),
523-
class_name="lg:mt-0 mt-6 px-4 lg:px-24",
523+
class_name="lg:mt-0 mt-6 px-4 lg:px-20",
524524
),
525525
class_name="h-full w-full"
526526
+ (
@@ -541,7 +541,7 @@ def wrapper(*args, **kwargs) -> rx.Component:
541541
rx.el.li(
542542
rx.link(
543543
text,
544-
class_name="font-small text-slate-9 hover:!text-slate-11 truncate transition-color",
544+
class_name="font-small text-slate-9 hover:!text-slate-11 whitespace-normal transition-color",
545545
underline="none",
546546
href=path
547547
+ "#"
@@ -553,7 +553,7 @@ def wrapper(*args, **kwargs) -> rx.Component:
553553
rx.list_item(
554554
rx.link(
555555
text,
556-
class_name="font-small text-slate-9 hover:!text-slate-11 truncate transition-color",
556+
class_name="font-small text-slate-9 hover:!text-slate-11 whitespace-normal transition-color",
557557
underline="none",
558558
href=path
559559
+ "#"
@@ -565,7 +565,7 @@ def wrapper(*args, **kwargs) -> rx.Component:
565565
rx.link(
566566
text,
567567
underline="none",
568-
class_name="pl-6 font-small text-slate-9 hover:!text-slate-11 truncate transition-color",
568+
class_name="pl-6 font-small text-slate-9 hover:!text-slate-11 transition-color",
569569
href=path
570570
+ "#"
571571
+ text.lower().replace(" ", "-"),
@@ -577,15 +577,18 @@ def wrapper(*args, **kwargs) -> rx.Component:
577577
],
578578
class_name="flex flex-col gap-4 list-none",
579579
),
580-
class_name="fixed flex flex-col justify-start gap-4 p-[0.875rem_0.5rem_0px_0.5rem] w-full max-w-[300px] max-h-[80vh] overflow-hidden",
580+
class_name="fixed flex flex-col justify-start gap-4 p-[0.875rem_0.5rem_0px_0.5rem] max-h-[80vh] overflow-y-scroll",
581+
style={
582+
"width":"inherit"
583+
}
581584
),
582-
class_name="h-full shrink-0 w-[16%]"
585+
class_name="shrink-0 w-[16%]"
583586
+ rx.cond(
584587
HostingBannerState.show_banner,
585588
" mt-[146px]",
586589
" mt-[90px]",
587590
)
588-
+ (" hidden xl:flex" if right_sidebar else " hidden"),
591+
+ (" hidden xl:flex xl:flex-col" if right_sidebar else " hidden"),
589592
),
590593
class_name="justify-center flex flex-row mx-auto mt-0 max-w-[94.5em] h-full min-h-screen w-full",
591594
),

0 commit comments

Comments
 (0)