generated from nisabmohd/Aria-Docs
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update page.tsx Update page.tsx examples 12-20
- Loading branch information
Showing
18 changed files
with
550 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import DocsBreadcrumb from "@/components/docs-breadcrumb"; | ||
import { ExamplePagination } from "@/components/pagination"; | ||
import { ExampleToc } from "@/components/toc"; | ||
import { notFound } from "next/navigation"; | ||
import { getExamplsForSlug } from "@/lib/markdown"; | ||
import { Typography } from "@/components/typography"; | ||
|
||
type PageProps = { | ||
params: Promise<{ slug: string[] }>; | ||
}; | ||
|
||
export default async function ExamplesPage(props: PageProps) { | ||
const params = await props.params; | ||
|
||
const { | ||
slug = [] | ||
} = params; | ||
|
||
const pathName = slug.join("/"); | ||
const res = await getExamplsForSlug(pathName); | ||
|
||
if (!res) notFound(); | ||
return ( | ||
<div className="flex items-start gap-10"> | ||
<div className="flex-[4.5] pt-10"> | ||
<DocsBreadcrumb paths={slug} /> | ||
<Typography> | ||
<h1 className="text-3xl !-mt-0.5">{res.frontmatter.title}</h1> | ||
<p className="-mt-4 text-muted-foreground text-[16.5px]"> | ||
{res.frontmatter.description} | ||
</p> | ||
<div>{res.content}</div> | ||
<ExamplePagination pathname={pathName}/> | ||
</Typography> | ||
</div> | ||
<ExampleToc path={pathName} /> | ||
</div> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { Leftbar } from "@/components/examples-menu"; | ||
|
||
export default function ExamplesLayout({ | ||
children, | ||
}: Readonly<{ | ||
children: React.ReactNode; | ||
}>) { | ||
return ( | ||
<div className="flex items-start gap-8"> | ||
<Leftbar key="leftbar" /> | ||
<div className="flex-[5.25]">{children}</div> | ||
</div> | ||
); | ||
} |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
"use client"; | ||
|
||
import { EXAMPLE_ROUTES } from "@/lib/routes-config"; | ||
import SubLink from "./sublink"; | ||
import { usePathname } from "next/navigation"; | ||
|
||
export default function ExamplesMenu({ isSheet = false }) { | ||
const pathname = usePathname(); | ||
if (!pathname.startsWith("/examples")) return null; | ||
|
||
return ( | ||
<div className="flex flex-col gap-3.5 mt-5 pr-2 pb-6"> | ||
{EXAMPLE_ROUTES.map((item, index) => { | ||
const modifiedItems = { | ||
...item, | ||
href: `/examples${item.href}`, | ||
level: 0, | ||
isSheet, | ||
}; | ||
return <SubLink key={item.title + index} {...modifiedItems} />; | ||
})} | ||
</div> | ||
); | ||
} | ||
|
||
|
||
import { ScrollArea } from "@/components/ui/scroll-area"; | ||
|
||
export function Leftbar() { | ||
return ( | ||
<aside className="md:flex hidden flex-[1.5] min-w-[238px] sticky top-16 flex-col h-[93.75vh] overflow-y-auto"> | ||
<ScrollArea className="py-4"> | ||
<ExamplesMenu /> | ||
</ScrollArea> | ||
</aside> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Compute Dag | ||
description: | ||
--- | ||
|
||
```rust showLineNumbers {} | ||
|
||
``` |
Oops, something went wrong.