Commit 4857cdb 1 parent 489731f commit 4857cdb Copy full SHA for 4857cdb
File tree 4 files changed +101
-0
lines changed
docs/site/app/(openapi)/repo
4 files changed +101
-0
lines changed Original file line number Diff line number Diff line change
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+
5
+ # nd-page
6
+ > article
7
+ > div .prose
8
+ > div
9
+ > div
10
+ > div .min-w-0 .flex-1
11
+ > form
12
+ > div .flex .flex-row .items-center .gap-2 .text-sm
13
+ > button {
14
+ color : white !important ;
15
+ }
16
+
17
+ .dark {
18
+ # nd-page
19
+ > article
20
+ > div .prose
21
+ > div
22
+ > div
23
+ > div .min-w-0 .flex-1
24
+ > form
25
+ > div .flex .flex-row .items-center .gap-2 .text-sm
26
+ > button {
27
+ color : black !important ;
28
+ }
29
+ }
Original file line number Diff line number Diff line change
1
+ import {
2
+ DocsPage ,
3
+ DocsBody ,
4
+ DocsTitle ,
5
+ DocsDescription ,
6
+ } from "fumadocs-ui/page" ;
7
+ import { notFound } from "next/navigation" ;
8
+ import defaultMdxComponents from "fumadocs-ui/mdx" ;
9
+ import { openapi , openapiPages } from "@/app/source" ;
10
+ // eslint-disable-next-line rulesdir/global-css
11
+ import "./openapi.css" ;
12
+
13
+ export default async function Page ( props : {
14
+ params : Promise < { slug ?: string [ ] } > ;
15
+ } ) : Promise < JSX . Element > {
16
+ const params = await props . params ;
17
+ const page = openapiPages . getPage ( params . slug ) ;
18
+
19
+ if ( ! page ) {
20
+ notFound ( ) ;
21
+ }
22
+
23
+ const Mdx = page . data . body ;
24
+
25
+ return (
26
+ < DocsPage full = { page . data . full } toc = { page . data . toc } >
27
+ < DocsTitle > { page . data . title } </ DocsTitle >
28
+ < DocsDescription > { page . data . description } </ DocsDescription >
29
+ < DocsBody >
30
+ < Mdx
31
+ components = { {
32
+ ...defaultMdxComponents ,
33
+ APIPage : openapi . APIPage ,
34
+ } }
35
+ />
36
+ </ DocsBody >
37
+ </ DocsPage >
38
+ ) ;
39
+ }
40
+
41
+ export function generateStaticParams ( ) : { slug : string [ ] } [ ] {
42
+ return openapiPages . generateParams ( ) ;
43
+ }
Original file line number Diff line number Diff line change
1
+ import type { ReactNode } from "react" ;
2
+ import { DocsLayout } from "fumadocs-ui/layouts/docs" ;
3
+ import { layoutPropsWithSidebar } from "@/app/_components/inner-layout-props" ;
4
+ import { openapiPages } from "@/app/source" ;
5
+
6
+ export default function Layout ( {
7
+ children,
8
+ } : {
9
+ children : ReactNode ;
10
+ } ) : JSX . Element {
11
+ return (
12
+ < DocsLayout
13
+ { ...layoutPropsWithSidebar }
14
+ sidebar = { { defaultOpenLevel : 3 , collapsible : false } }
15
+ tree = { openapiPages . pageTree }
16
+ >
17
+ { children }
18
+ </ DocsLayout >
19
+ ) ;
20
+ }
Original file line number Diff line number Diff line change
1
+ import type { ReactNode } from "react" ;
2
+
3
+ export default function Layout ( {
4
+ children,
5
+ } : {
6
+ children : ReactNode ;
7
+ } ) : JSX . Element {
8
+ return < > { children } </ > ;
9
+ }
You can’t perform that action at this time.
0 commit comments