Create Top page
This commit is contained in:
61
frontend/src/app/[locale]/MainFeatures.tsx
Normal file
61
frontend/src/app/[locale]/MainFeatures.tsx
Normal file
@@ -0,0 +1,61 @@
|
||||
import { title, subtitle } from "@/components/primitives";
|
||||
import { Card, CardHeader, CardBody, Avatar } from "@nextui-org/react";
|
||||
import { Scale, Folder, Check, Globe } from "lucide-react";
|
||||
import { useTranslations } from "next-intl";
|
||||
|
||||
export default function MainTitle() {
|
||||
const t = useTranslations("Index");
|
||||
|
||||
const features = [
|
||||
{
|
||||
title: t("oss_title"),
|
||||
detail: t("oss_detail"),
|
||||
icon: <Scale size={24} color="#52e280" />,
|
||||
},
|
||||
{
|
||||
title: t("organize_title"),
|
||||
detail: t("organize_detail"),
|
||||
icon: <Folder size={24} color="#52e280" />,
|
||||
},
|
||||
{
|
||||
title: t("usability_title"),
|
||||
detail: t("usability_detail"),
|
||||
icon: <Check size={24} color="#52e280" />,
|
||||
},
|
||||
{
|
||||
title: t("universal_title"),
|
||||
detail: t("universal_detail"),
|
||||
icon: <Globe size={24} color="#52e280" />,
|
||||
},
|
||||
];
|
||||
|
||||
return (
|
||||
<>
|
||||
{features.map((feature, index) => (
|
||||
<Card
|
||||
key={feature.title}
|
||||
className={`max-w-[300px] min-h-[180px] ${
|
||||
index !== 0 ? "mt-4 sm:mt-0 sm:ml-4" : ""
|
||||
}`}
|
||||
>
|
||||
<CardHeader className="flex gap-3">
|
||||
<div>
|
||||
<Avatar
|
||||
className="bg-green-100"
|
||||
showFallback
|
||||
src=""
|
||||
fallback={feature.icon}
|
||||
/>
|
||||
</div>
|
||||
<div className="flex flex-col">
|
||||
<h4 className="font-bold text-large">{feature.title}</h4>
|
||||
</div>
|
||||
</CardHeader>
|
||||
<CardBody className="pt-0">
|
||||
<p className="text-default-500">{feature.detail}</p>
|
||||
</CardBody>
|
||||
</Card>
|
||||
))}
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -41,7 +41,12 @@ export default function MainTitle({ locale }: Props) {
|
||||
</Link>
|
||||
</Button>
|
||||
|
||||
<Button color="primary" radius="full" className="ms-3">
|
||||
<Button
|
||||
color="primary"
|
||||
radius="full"
|
||||
variant="bordered"
|
||||
className="ms-3"
|
||||
>
|
||||
<Link href={`/projects/`} locale={locale}>
|
||||
GitHub
|
||||
</Link>
|
||||
@@ -50,7 +55,7 @@ export default function MainTitle({ locale }: Props) {
|
||||
href="https://github.com/kimatata/TestCaseManager"
|
||||
aria-label="Github"
|
||||
showAnchorIcon
|
||||
anchorIcon={<ExternalLink size={16} color="#fff" />}
|
||||
anchorIcon={<ExternalLink size={16} />}
|
||||
></NextUiLink>
|
||||
</Button>
|
||||
</div>
|
||||
|
||||
44
frontend/src/app/[locale]/SelfHostProcedure.tsx
Normal file
44
frontend/src/app/[locale]/SelfHostProcedure.tsx
Normal file
@@ -0,0 +1,44 @@
|
||||
import { Code, Card, CardBody } from "@nextui-org/react";
|
||||
import { useTranslations } from "next-intl";
|
||||
|
||||
export default function SelfHostProcedure() {
|
||||
const t = useTranslations("Index");
|
||||
const manualProcedures = [
|
||||
{
|
||||
uid: "clone",
|
||||
detail: "",
|
||||
code: "git clone git@github.com:kimatata/TestCaseManager.git",
|
||||
},
|
||||
{ uid: "go-to-backend", detail: "", code: "cd backend" },
|
||||
{ uid: "backend-install", detail: "", code: "npm install" },
|
||||
{ uid: "backend-start", detail: "", code: "node index" },
|
||||
{ uid: "go-to-frontend", detail: "", code: "cd frontend" },
|
||||
{ uid: "front-install", detail: "", code: "npm install" },
|
||||
{ uid: "front-start", detail: "", code: "npm run start" },
|
||||
];
|
||||
|
||||
return (
|
||||
<>
|
||||
<div>
|
||||
<h3 className="text-2xl font-bold">{t("run_as_docker")}</h3>
|
||||
<Card fullWidth={true} className="bg-red-400">
|
||||
<CardBody>To be implemented</CardBody>
|
||||
</Card>
|
||||
</div>
|
||||
|
||||
<div className="mt-3">
|
||||
<h3 className="text-2xl font-bold">{t("run_by_manually")}</h3>
|
||||
<div className="mt-3">
|
||||
{manualProcedures.map((procedure, index) => (
|
||||
<div key={procedure.uid} className={`${index !== 0 ? "mt-3" : ""}`}>
|
||||
<p>{procedure.detail}</p>
|
||||
<Code radius="sm" className="min-w-96">
|
||||
{procedure.code}
|
||||
</Code>
|
||||
</div>
|
||||
))}
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,14 +1,17 @@
|
||||
import { useTranslations } from "next-intl";
|
||||
import { title } from "@/components/primitives";
|
||||
import { title, subtitle } from "@/components/primitives";
|
||||
import { Divider } from "@nextui-org/react";
|
||||
import Image from "next/image";
|
||||
import heroImage from "./hero.png";
|
||||
import MainTitle from "./MainTitle";
|
||||
import MainFeatures from "./MainFeatures";
|
||||
import SelfHostProcedure from "./SelfHostProcedure";
|
||||
|
||||
export default function Home(params: { locale: string }) {
|
||||
const t = useTranslations("Index");
|
||||
|
||||
return (
|
||||
<section className="mx-auto max-w-screen-lg my-12">
|
||||
<section className="mx-auto max-w-screen-xl my-12">
|
||||
<div className="flex flex-wrap">
|
||||
<div className="w-full md:w-7/12 order-last md:order-first p-4">
|
||||
<MainTitle locale={params.locale} />
|
||||
@@ -48,23 +51,34 @@ export default function Home(params: { locale: string }) {
|
||||
</div>
|
||||
|
||||
<div
|
||||
className="flex flex-wrap"
|
||||
className="flex flex-wrap flex-col items-center sm:flex-row sm:items-start"
|
||||
style={{
|
||||
marginTop: "10rem",
|
||||
marginTop: "6rem",
|
||||
}}
|
||||
>
|
||||
<h2 className={title()}>{t("features")}</h2>
|
||||
<MainFeatures />
|
||||
</div>
|
||||
|
||||
<div
|
||||
className="flex flex-wrap"
|
||||
style={{
|
||||
marginTop: "10rem",
|
||||
}}
|
||||
>
|
||||
<h2 className={title()}>{t("demo_screen")}</h2>
|
||||
<div className="mt-12">
|
||||
<Image src={heroImage} alt="Hero" />
|
||||
<Divider className="my-12" />
|
||||
|
||||
<div className="flex flex-wrap mt-12">
|
||||
<div className="w-full md:w-4/12 order-last md:order-first p-4">
|
||||
<h2 className={title({ size: "sm" })}>{t("organize_test_cases")}</h2>
|
||||
</div>
|
||||
<div className="w-full md:w-8/12 p-4">
|
||||
<Image src={heroImage} alt="Hero" className="max-w-2xl" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<Divider className="my-12" />
|
||||
|
||||
<div className="flex flex-wrap mt-12">
|
||||
<div className="w-full md:w-4/12 order-last md:order-first p-4">
|
||||
<h2 className={title({ size: "sm" })}>{t("self_host")}</h2>
|
||||
</div>
|
||||
|
||||
<div className="w-full md:w-8/12 p-4">
|
||||
<SelfHostProcedure />
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user