Move docs to docusaurus site
This commit is contained in:
@@ -6,12 +6,12 @@ import {
|
||||
Chip,
|
||||
Link as NextUiLink,
|
||||
} from "@nextui-org/react";
|
||||
import { MoveUpRight } from "lucide-react";
|
||||
import { useTranslations } from "next-intl";
|
||||
import { Link } from "@/src/navigation";
|
||||
import LangSwitch from "./LangSwitch";
|
||||
import { ThemeSwitch } from "@/components/theme-switch";
|
||||
import { GithubIcon } from "@/components/icons";
|
||||
|
||||
import Image from "next/image";
|
||||
|
||||
export default function Header(params: { locale: string }) {
|
||||
@@ -46,15 +46,6 @@ export default function Header(params: { locale: string }) {
|
||||
</Link>
|
||||
</Chip>
|
||||
</NavbarItem>
|
||||
<NavbarItem className="hidden sm:block">
|
||||
<Link
|
||||
className="data-[active=true]:text-primary data-[active=true]:font-medium"
|
||||
href="/guide/selfhost"
|
||||
locale={params.locale}
|
||||
>
|
||||
{t("guide")}
|
||||
</Link>
|
||||
</NavbarItem>
|
||||
<NavbarItem className="hidden sm:block">
|
||||
<Link
|
||||
className="data-[active=true]:text-primary data-[active=true]:font-medium"
|
||||
@@ -64,6 +55,17 @@ export default function Header(params: { locale: string }) {
|
||||
{t("projects")}
|
||||
</Link>
|
||||
</NavbarItem>
|
||||
<NavbarItem className="hidden sm:block">
|
||||
<NextUiLink
|
||||
isExternal
|
||||
href="https://kimatata.github.io/TestPlat/docs/selfhost"
|
||||
aria-label="docs"
|
||||
showAnchorIcon
|
||||
anchorIcon={<MoveUpRight size={12} className="ms-1" />}
|
||||
>
|
||||
{t("docs")}
|
||||
</NextUiLink>
|
||||
</NavbarItem>
|
||||
</NavbarContent>
|
||||
|
||||
<NavbarContent className="basis-1 pl-4" justify="end">
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { title, subtitle } from "@/components/primitives";
|
||||
import { Button, Link as NextUiLink } from "@nextui-org/react";
|
||||
import { ExternalLink } from "lucide-react";
|
||||
import { Link } from "@/src/navigation";
|
||||
import { useTranslations } from "next-intl";
|
||||
|
||||
@@ -38,27 +37,32 @@ export default function MainTitle({ locale }: Props) {
|
||||
|
||||
<div className="mt-5">
|
||||
<Button color="primary" radius="full">
|
||||
<Link href={`/guide/selfhost`} locale={locale}>
|
||||
<NextUiLink
|
||||
isExternal
|
||||
href="https://kimatata.github.io/TestPlat/docs/selfhost"
|
||||
aria-label="docs"
|
||||
className="text-white"
|
||||
>
|
||||
{t("get_started")}
|
||||
</NextUiLink>
|
||||
</Button>
|
||||
|
||||
<Button color="primary" radius="full" className="ms-2">
|
||||
<Link href={`/projects/`} locale={locale}>
|
||||
{t("demo")}
|
||||
</Link>
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
color="primary"
|
||||
radius="full"
|
||||
variant="bordered"
|
||||
className="ms-3"
|
||||
>
|
||||
<Link href={`/projects/`} locale={locale}>
|
||||
GitHub
|
||||
</Link>
|
||||
<Button color="primary" radius="full" className="ms-2">
|
||||
<NextUiLink
|
||||
size="sm"
|
||||
isExternal
|
||||
href="https://github.com/kimatata/TestPlat"
|
||||
aria-label="Github"
|
||||
showAnchorIcon
|
||||
anchorIcon={<ExternalLink size={16} />}
|
||||
></NextUiLink>
|
||||
className="text-white"
|
||||
>
|
||||
GitHub
|
||||
</NextUiLink>
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
import { useTranslations } from "next-intl";
|
||||
import { Link, NextUiLinkClasses } from "@/src/navigation";
|
||||
|
||||
export type Props = {
|
||||
locale: string;
|
||||
};
|
||||
|
||||
export default function Guidebar({ locale }: Props) {
|
||||
const t = useTranslations("Guide");
|
||||
const links = [
|
||||
{
|
||||
name: t("self_host"),
|
||||
href: "/guide/selfhost",
|
||||
indent: false,
|
||||
},
|
||||
{
|
||||
name: t("docker"),
|
||||
href: "/guide/selfhost/docker",
|
||||
indent: true,
|
||||
},
|
||||
{
|
||||
name: t("manual"),
|
||||
href: "/guide/selfhost/manual",
|
||||
indent: true,
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<div className="w-64 border-r-1 ps-6 pt-6 dark:border-neutral-700">
|
||||
{links.map((link) => (
|
||||
<div key={link.name} className={`py-1 ${link.indent ? "ps-4" : ""}`}>
|
||||
<Link href={link.href} locale={locale} className={NextUiLinkClasses}>
|
||||
{link.name}
|
||||
</Link>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
import Guidebar from "./GuideBar";
|
||||
|
||||
export default function GuideLayout({
|
||||
children,
|
||||
params: { locale },
|
||||
}: {
|
||||
children: React.ReactNode;
|
||||
params: { locale: string };
|
||||
}) {
|
||||
return (
|
||||
<div className="flex border-t-1 dark:border-neutral-700 min-h-[calc(100vh-64px)]">
|
||||
<Guidebar locale={locale} />
|
||||
<div className="flex w-full">
|
||||
<div className="flex-grow px-12">{children}</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
import { useTranslations } from "next-intl";
|
||||
import { title } from "@/components/primitives";
|
||||
import { Snippet, Card, CardBody } from "@nextui-org/react";
|
||||
|
||||
export default function Page() {
|
||||
const t = useTranslations("Guide");
|
||||
|
||||
return (
|
||||
<section className="mx-auto max-w-screen-xl my-12">
|
||||
<h1 className={title({ size: "sm" })}>{t("run_as_docker")}</h1>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
import { useTranslations } from "next-intl";
|
||||
import { title } from "@/components/primitives";
|
||||
import { Snippet } from "@nextui-org/react";
|
||||
|
||||
export default function Page() {
|
||||
const t = useTranslations("Guide");
|
||||
const manualProcedures = [
|
||||
{
|
||||
uid: "clone",
|
||||
detail: "",
|
||||
code: "git clone git@github.com:kimatata/TestPlat.git",
|
||||
},
|
||||
{
|
||||
uid: "move-to-backend",
|
||||
detail: t("move_to_back"),
|
||||
code: "cd backend",
|
||||
},
|
||||
{
|
||||
uid: "backend-install",
|
||||
detail: t("backend_install"),
|
||||
code: "npm install",
|
||||
},
|
||||
{ uid: "init-db", detail: t("init_db"), code: "npm run migrate" },
|
||||
{ uid: "backend_start", detail: t("front_start"), code: "node index" },
|
||||
{
|
||||
uid: "move-to-frontend",
|
||||
detail: t("move_to_front"),
|
||||
code: "cd frontend",
|
||||
},
|
||||
{
|
||||
uid: "front-install",
|
||||
detail: t("frontend_install"),
|
||||
code: "npm install",
|
||||
},
|
||||
{ uid: "front-start", detail: t("front_start"), code: "npm run start" },
|
||||
];
|
||||
|
||||
return (
|
||||
<section className="mx-auto max-w-screen-xl my-12">
|
||||
<h1 className={title({ size: "sm" })}>{t("run_by_manually")}</h1>
|
||||
<div className="mt-3">
|
||||
{manualProcedures.map((procedure, index) => (
|
||||
<div key={procedure.uid} className={`${index !== 0 ? "mt-3" : ""}`}>
|
||||
<p>{procedure.detail}</p>
|
||||
<Snippet variant="solid" color="primary" style={{ width: "32rem" }}>
|
||||
{procedure.code}
|
||||
</Snippet>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
import { useTranslations } from "next-intl";
|
||||
import { title } from "@/components/primitives";
|
||||
|
||||
export default function Page() {
|
||||
const t = useTranslations("Guide");
|
||||
|
||||
return (
|
||||
<section className="mx-auto max-w-screen-xl my-12">
|
||||
<h1 className={title({ size: "sm" })}>{t("self_host")}</h1>
|
||||
</section>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user