This commit is contained in:
quantulr
2023-11-01 17:27:06 +08:00
parent 7e465da9d2
commit 1a22404f19
87 changed files with 1604 additions and 196 deletions

View File

@ -0,0 +1,19 @@
import { ReactNode } from "react";
import ArticleLayout from "@/app/components/ArticleLayout";
const Layout = ({
children,
}: {
children: ReactNode;
params: {
articleId: string;
};
}) => {
return (
<ArticleLayout leftNavTitle={"新闻详情"} navigations={[]}>
{children}
</ArticleLayout>
);
};
export default Layout;

View File

@ -0,0 +1,23 @@
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
import ArticleRender from "@/app/components/ArticleRender";
import { articleDetail } from "@/app/api/articles";
const Page = async ({
params,
}: {
params: {
articleId: string;
};
}) => {
const { articleId } = params;
const data = await articleDetail({ id: articleId });
return (
<>
<ArticleWithBreadcrumb breadcrumb={[]}>
<ArticleRender article={data} />
</ArticleWithBreadcrumb>
</>
);
};
export default Page;

View File

@ -0,0 +1,6 @@
export const navigations = [
{
title: "学术活动",
href: "/academic-exchange/academic-events/pages/1",
},
];

View File

@ -0,0 +1,28 @@
import { ReactNode } from "react";
import ArticleLayout from "@/app/components/ArticleLayout";
import { BreadcrumbItem } from "@/app/components/Breadcrumb";
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
import { navigations } from "@/app/(articles)/academic-exchange/academic-events/pages/[pageIndex]/config";
const breadcrumb: BreadcrumbItem[] = [
{ title: "首页", href: "/" },
{
title: "学术交流",
href: "/academic-exchange/academic-events/pages/1",
},
{
title: "学术活动",
href: "/academic-exchange/academic-events/pages/1",
},
];
const Layout = ({ children }: { children: ReactNode }) => {
return (
<ArticleLayout navigations={navigations} leftNavTitle={"学术交流"}>
<ArticleWithBreadcrumb breadcrumb={breadcrumb}>
{children}
</ArticleWithBreadcrumb>
</ArticleLayout>
);
};
export default Layout;

View File

@ -0,0 +1,18 @@
import ArticleList from "@/app/components/ArticleList";
const Page = ({
params,
}: {
params: {
pageIndex: string;
};
}) => {
const { pageIndex } = params;
return (
<>
<ArticleList title={"学术活动"} cid={"6"} pageNo={parseInt(pageIndex)} />
</>
);
};
export default Page;