fix(nx-dev): make toc sticky (#29784)
Makes sidebar table of contents not overlap the footer Fixes #29719
This commit is contained in:
parent
5aec542774
commit
67f12a2d7a
@ -115,6 +115,7 @@ export function DocViewer({
|
|||||||
</div>
|
</div>
|
||||||
<div className="min-w-0 flex-auto pb-24 lg:pb-16">
|
<div className="min-w-0 flex-auto pb-24 lg:pb-16">
|
||||||
{/*MAIN CONTENT*/}
|
{/*MAIN CONTENT*/}
|
||||||
|
<div className="flex justify-between">
|
||||||
<div className="relative">
|
<div className="relative">
|
||||||
<div
|
<div
|
||||||
ref={ref}
|
ref={ref}
|
||||||
@ -126,10 +127,12 @@ export function DocViewer({
|
|||||||
>
|
>
|
||||||
{vm.content}
|
{vm.content}
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
{!hideTableOfContent && (
|
{!hideTableOfContent && (
|
||||||
|
<div>
|
||||||
<div
|
<div
|
||||||
className={cx(
|
className={cx(
|
||||||
'fixed right-[max(2rem,calc(50%-55rem))] top-44 z-20 hidden w-60 space-y-6 overflow-y-auto bg-white text-sm xl:block dark:bg-slate-900'
|
'sticky top-2 z-20 ml-[max(2rem,calc(50%-8rem))] hidden w-60 space-y-6 overflow-y-auto bg-white text-sm xl:block dark:bg-slate-900'
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{widgetData.githubStarsCount > 0 && (
|
{widgetData.githubStarsCount > 0 && (
|
||||||
@ -182,6 +185,7 @@ export function DocViewer({
|
|||||||
</>
|
</>
|
||||||
</TableOfContents>
|
</TableOfContents>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{/*RELATED CONTENT*/}
|
{/*RELATED CONTENT*/}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user