1 |
rakinar2 |
577 |
import "prism-themes/themes/prism-coldark-dark.css"; |
2 |
|
|
import { Fragment, PropsWithChildren } from "react"; |
3 |
|
|
import EditButton from "../MDX/EditButton"; |
4 |
|
|
import PageInfo from "../MDX/PageInfo"; |
5 |
|
|
import TableOfContents from "../MDX/TableOfContents"; |
6 |
|
|
import DocsLinkList from "../Navbar/DocsLinkList"; |
7 |
|
|
import Navigator from "../Navigation/Navigator"; |
8 |
|
|
|
9 |
|
|
export default function DocsLayout({ children }: PropsWithChildren) { |
10 |
|
|
return ( |
11 |
|
|
<div |
12 |
|
|
className="grid lg:grid-cols-[3fr_10fr_2.5fr] md:gap-[50px] mb-10 relative" |
13 |
|
|
id="docs_layout_root" |
14 |
|
|
> |
15 |
|
|
<DocsLinkList desktopOnly fragment /> |
16 |
|
|
|
17 |
|
|
<div className="lg:px-[50px] xl:px-[100px] lg:max-w-[60vw]"> |
18 |
|
|
<article |
19 |
|
|
id="article" |
20 |
|
|
className="prose prose-neutral prose-invert prose-code:before:hidden prose-code:after:hidden mt-8 p-3 text-wrap max-w-[100vw] relative" |
21 |
|
|
> |
22 |
|
|
<EditButton /> |
23 |
|
|
{children} |
24 |
|
|
</article> |
25 |
|
|
<br /> |
26 |
|
|
<div className="mx-3"> |
27 |
|
|
<Navigator /> |
28 |
|
|
<hr className="[border-top:1px_solid_#333] mb-5" /> |
29 |
|
|
<PageInfo /> |
30 |
|
|
</div> |
31 |
|
|
</div> |
32 |
|
|
|
33 |
|
|
<div className="hidden lg:block mr-5 fixed right-0 max-w-[20vw] max-h-[calc(100vh-50px)] overflow-y-scroll"> |
34 |
|
|
<TableOfContents as={Fragment} /> |
35 |
|
|
</div> |
36 |
|
|
</div> |
37 |
|
|
); |
38 |
|
|
} |