update
This commit is contained in:
@ -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;
|
@ -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;
|
@ -0,0 +1,6 @@
|
||||
export const navigations = [
|
||||
{
|
||||
title: "学术活动",
|
||||
href: "/academic-exchange/academic-events/pages/1",
|
||||
},
|
||||
];
|
@ -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;
|
@ -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;
|
@ -1,6 +1,5 @@
|
||||
import { ReactNode } from "react";
|
||||
import ArticleLayout from "@/app/components/ArticleLayout";
|
||||
import Breadcrumb from "@/app/components/Breadcrumb";
|
||||
|
||||
const Layout = ({
|
||||
children,
|
||||
@ -12,10 +11,7 @@ const Layout = ({
|
||||
}) => {
|
||||
return (
|
||||
<ArticleLayout leftNavTitle={"新闻详情"} navigations={[]}>
|
||||
<div className={"flex flex-col h-full"}>
|
||||
<Breadcrumb navigations={[]} />
|
||||
<div className={"bg-white px-5 py-4 flex-1 mt-2"}>{children}</div>
|
||||
</div>
|
||||
{children}
|
||||
</ArticleLayout>
|
||||
);
|
||||
};
|
||||
|
@ -1,5 +1,6 @@
|
||||
import { articleDetail } from "@/app/api/articles";
|
||||
import ArticleContent from "@/app/components/ArticleContent";
|
||||
import ArticleRender from "@/app/components/ArticleRender";
|
||||
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
|
||||
|
||||
export default async function Article({
|
||||
params,
|
||||
@ -9,5 +10,15 @@ export default async function Article({
|
||||
};
|
||||
}) {
|
||||
const data = await articleDetail({ id: params.articleId });
|
||||
return <ArticleContent article={data} />;
|
||||
return (
|
||||
<ArticleWithBreadcrumb
|
||||
breadcrumb={[
|
||||
{ title: "首页", href: "/" },
|
||||
{ title: "公告通知", href: "/announcements/pages/1" },
|
||||
{ title: data.title, href: `/announcements/${data.id}` },
|
||||
]}
|
||||
>
|
||||
<ArticleRender article={data} />
|
||||
</ArticleWithBreadcrumb>
|
||||
);
|
||||
}
|
||||
|
@ -1,19 +1,19 @@
|
||||
import { ReactNode } from "react";
|
||||
import ArticleLayout from "@/app/components/ArticleLayout";
|
||||
import Breadcrumb from "@/app/components/Breadcrumb";
|
||||
import { BreadcrumbItem } from "@/app/components/Breadcrumb";
|
||||
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
|
||||
|
||||
const breadcrumb: BreadcrumbItem[] = [
|
||||
{ title: "首页", href: "/" },
|
||||
{ title: "公告通知", href: "/announcements/pages/1" },
|
||||
];
|
||||
|
||||
const Layout = ({ children }: { children: ReactNode }) => {
|
||||
return (
|
||||
<ArticleLayout navigations={[]} leftNavTitle={"公告通知"}>
|
||||
<div className={"flex flex-col h-full"}>
|
||||
<Breadcrumb
|
||||
navigations={[
|
||||
{ title: "首页", href: "/" },
|
||||
{ title: "公告通知", href: "/announcements/pages/1" },
|
||||
]}
|
||||
/>
|
||||
<div className={"bg-white px-5 py-4 flex-1 mt-2"}>{children}</div>
|
||||
</div>
|
||||
<ArticleWithBreadcrumb breadcrumb={breadcrumb}>
|
||||
{children}
|
||||
</ArticleWithBreadcrumb>
|
||||
</ArticleLayout>
|
||||
);
|
||||
};
|
||||
|
@ -1,8 +1,4 @@
|
||||
import { listArticles } from "@/app/api/articles";
|
||||
import { Fragment } from "react";
|
||||
import styles from "./styles.module.scss";
|
||||
import Link from "next/link";
|
||||
import Pagination from "@/app/components/Pagination";
|
||||
import ArticleList from "@/app/components/ArticleList";
|
||||
|
||||
const Page = async ({
|
||||
params,
|
||||
@ -11,31 +7,10 @@ const Page = async ({
|
||||
pageIndex: string;
|
||||
};
|
||||
}) => {
|
||||
const data = await listArticles({
|
||||
cid: "3",
|
||||
pageNo: params.pageIndex,
|
||||
pageSize: 20,
|
||||
});
|
||||
const { pageIndex } = params;
|
||||
return (
|
||||
<div>
|
||||
<h2 className={"text-[#0f6fca] text-sm"}>公告通知</h2>
|
||||
<ul className={`${styles.articles} mt-5`}>
|
||||
{data.lists.map((article, index) => (
|
||||
<li className={`${styles.article}`} key={article.id}>
|
||||
<Link
|
||||
className={"flex h-8 text-sm text-[#666666] items-center"}
|
||||
href={`/announcements/${article.id}`}
|
||||
>
|
||||
{article.title}
|
||||
</Link>
|
||||
</li>
|
||||
))}
|
||||
</ul>
|
||||
<Pagination
|
||||
page={parseInt(params.pageIndex)}
|
||||
total={data.count}
|
||||
perPage={20}
|
||||
/>
|
||||
<ArticleList title={"公告通知"} cid={"3"} pageNo={parseInt(pageIndex)} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
@ -1,7 +0,0 @@
|
||||
.articles {
|
||||
.article {
|
||||
&:not(:last-child) {
|
||||
border-bottom: 1px dashed #000;
|
||||
}
|
||||
}
|
||||
}
|
19
app/(articles)/general-news/[articleId]/layout.tsx
Normal file
19
app/(articles)/general-news/[articleId]/layout.tsx
Normal 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;
|
24
app/(articles)/general-news/[articleId]/page.tsx
Normal file
24
app/(articles)/general-news/[articleId]/page.tsx
Normal file
@ -0,0 +1,24 @@
|
||||
import { articleDetail } from "@/app/api/articles";
|
||||
import ArticleRender from "@/app/components/ArticleRender";
|
||||
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
|
||||
|
||||
export default async function Article({
|
||||
params,
|
||||
}: {
|
||||
params: {
|
||||
articleId: string;
|
||||
};
|
||||
}) {
|
||||
const data = await articleDetail({ id: params.articleId });
|
||||
return (
|
||||
<ArticleWithBreadcrumb
|
||||
breadcrumb={[
|
||||
{ title: "首页", href: "/" },
|
||||
{ title: "综合新闻", href: "/general-news/pages/1" },
|
||||
{ title: data.title, href: `/general-news/${data.id}` },
|
||||
]}
|
||||
>
|
||||
<ArticleRender article={data} />
|
||||
</ArticleWithBreadcrumb>
|
||||
);
|
||||
}
|
21
app/(articles)/general-news/pages/[pageIndex]/layout.tsx
Normal file
21
app/(articles)/general-news/pages/[pageIndex]/layout.tsx
Normal file
@ -0,0 +1,21 @@
|
||||
import { ReactNode } from "react";
|
||||
import ArticleLayout from "@/app/components/ArticleLayout";
|
||||
import { BreadcrumbItem } from "@/app/components/Breadcrumb";
|
||||
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
|
||||
|
||||
const breadcrumb: BreadcrumbItem[] = [
|
||||
{ title: "首页", href: "/" },
|
||||
{ title: "综合新闻", href: "/general-news/pages/1" },
|
||||
];
|
||||
|
||||
const Layout = ({ children }: { children: ReactNode }) => {
|
||||
return (
|
||||
<ArticleLayout navigations={[]} leftNavTitle={"综合新闻"}>
|
||||
<ArticleWithBreadcrumb breadcrumb={breadcrumb}>
|
||||
{children}
|
||||
</ArticleWithBreadcrumb>
|
||||
</ArticleLayout>
|
||||
);
|
||||
};
|
||||
|
||||
export default Layout;
|
23
app/(articles)/general-news/pages/[pageIndex]/page.tsx
Normal file
23
app/(articles)/general-news/pages/[pageIndex]/page.tsx
Normal file
@ -0,0 +1,23 @@
|
||||
import React from "react";
|
||||
import ArticleList from "@/app/components/ArticleList";
|
||||
|
||||
const Page = ({
|
||||
params,
|
||||
}: {
|
||||
params: {
|
||||
pageIndex: string;
|
||||
};
|
||||
}) => {
|
||||
const { pageIndex } = params;
|
||||
return (
|
||||
<>
|
||||
<ArticleList
|
||||
title={"综合新闻"}
|
||||
cid={"4"}
|
||||
pageNo={parseInt(pageIndex)}
|
||||
></ArticleList>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Page;
|
19
app/(articles)/recruitment/[articleId]/layout.tsx
Normal file
19
app/(articles)/recruitment/[articleId]/layout.tsx
Normal 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;
|
24
app/(articles)/recruitment/[articleId]/page.tsx
Normal file
24
app/(articles)/recruitment/[articleId]/page.tsx
Normal file
@ -0,0 +1,24 @@
|
||||
import { articleDetail } from "@/app/api/articles";
|
||||
import ArticleRender from "@/app/components/ArticleRender";
|
||||
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
|
||||
|
||||
export default async function Article({
|
||||
params,
|
||||
}: {
|
||||
params: {
|
||||
articleId: string;
|
||||
};
|
||||
}) {
|
||||
const data = await articleDetail({ id: params.articleId });
|
||||
return (
|
||||
<ArticleWithBreadcrumb
|
||||
breadcrumb={[
|
||||
{ title: "首页", href: "/" },
|
||||
{ title: "研究院招聘", href: "/recruitment/pages/1" },
|
||||
{ title: data.title, href: `/recruitment/${data.id}` },
|
||||
]}
|
||||
>
|
||||
<ArticleRender article={data} />
|
||||
</ArticleWithBreadcrumb>
|
||||
);
|
||||
}
|
20
app/(articles)/recruitment/pages/[pageIndex]/layout.tsx
Normal file
20
app/(articles)/recruitment/pages/[pageIndex]/layout.tsx
Normal file
@ -0,0 +1,20 @@
|
||||
import { ReactNode } from "react";
|
||||
import ArticleLayout from "@/app/components/ArticleLayout";
|
||||
import Breadcrumb, { BreadcrumbItem } from "@/app/components/Breadcrumb";
|
||||
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
|
||||
|
||||
const breadcrumb: BreadcrumbItem[] = [
|
||||
{ title: "首页", href: "/" },
|
||||
{ title: "研究院招聘", href: "/recruitment/pages/1" },
|
||||
];
|
||||
const Layout = ({ children }: { children: ReactNode }) => {
|
||||
return (
|
||||
<ArticleLayout navigations={[]} leftNavTitle={"研究院招聘"}>
|
||||
<ArticleWithBreadcrumb breadcrumb={breadcrumb}>
|
||||
{children}
|
||||
</ArticleWithBreadcrumb>
|
||||
</ArticleLayout>
|
||||
);
|
||||
};
|
||||
|
||||
export default Layout;
|
22
app/(articles)/recruitment/pages/[pageIndex]/page.tsx
Normal file
22
app/(articles)/recruitment/pages/[pageIndex]/page.tsx
Normal file
@ -0,0 +1,22 @@
|
||||
import ArticleList from "@/app/components/ArticleList";
|
||||
|
||||
const Page = ({
|
||||
params,
|
||||
}: {
|
||||
params: {
|
||||
pageIndex: string;
|
||||
};
|
||||
}) => {
|
||||
const { pageIndex } = params;
|
||||
return (
|
||||
<>
|
||||
<ArticleList
|
||||
title={"研究院招聘"}
|
||||
cid={"12"}
|
||||
pageNo={parseInt(pageIndex)}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Page;
|
19
app/(articles)/research-progress/[articleId]/layout.tsx
Normal file
19
app/(articles)/research-progress/[articleId]/layout.tsx
Normal 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;
|
@ -1,7 +1,24 @@
|
||||
import React from "react";
|
||||
import { articleDetail } from "@/app/api/articles";
|
||||
import ArticleRender from "@/app/components/ArticleRender";
|
||||
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
|
||||
|
||||
const ResearchProgress = () => {
|
||||
return <div></div>;
|
||||
};
|
||||
|
||||
export default ResearchProgress;
|
||||
export default async function ResearchProgress({
|
||||
params,
|
||||
}: {
|
||||
params: {
|
||||
articleId: string;
|
||||
};
|
||||
}) {
|
||||
const data = await articleDetail({ id: params.articleId });
|
||||
return (
|
||||
<ArticleWithBreadcrumb
|
||||
breadcrumb={[
|
||||
{ title: "首页", href: "/" },
|
||||
{ title: "科研进展", href: "/general-news/pages/1" },
|
||||
{ title: data.title, href: `/general-news/${data.id}` },
|
||||
]}
|
||||
>
|
||||
<ArticleRender article={data} />
|
||||
</ArticleWithBreadcrumb>
|
||||
);
|
||||
}
|
||||
|
@ -0,0 +1,20 @@
|
||||
import { ReactNode } from "react";
|
||||
import ArticleLayout from "@/app/components/ArticleLayout";
|
||||
import Breadcrumb, { BreadcrumbItem } from "@/app/components/Breadcrumb";
|
||||
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
|
||||
|
||||
const breadcrumb: BreadcrumbItem[] = [
|
||||
{ title: "首页", href: "/" },
|
||||
{ title: "科研进展", href: "/research-progress/pages/1" },
|
||||
];
|
||||
const Layout = ({ children }: { children: ReactNode }) => {
|
||||
return (
|
||||
<ArticleLayout navigations={[]} leftNavTitle={"科研进展"}>
|
||||
<ArticleWithBreadcrumb breadcrumb={breadcrumb}>
|
||||
{children}
|
||||
</ArticleWithBreadcrumb>
|
||||
</ArticleLayout>
|
||||
);
|
||||
};
|
||||
|
||||
export default Layout;
|
18
app/(articles)/research-progress/pages/[pageIndex]/page.tsx
Normal file
18
app/(articles)/research-progress/pages/[pageIndex]/page.tsx
Normal file
@ -0,0 +1,18 @@
|
||||
import ArticleList from "@/app/components/ArticleList";
|
||||
|
||||
const Page = ({
|
||||
params,
|
||||
}: {
|
||||
params: {
|
||||
pageIndex: string;
|
||||
};
|
||||
}) => {
|
||||
const { pageIndex } = params;
|
||||
return (
|
||||
<>
|
||||
<ArticleList title={"科研进展"} cid={"9"} pageNo={parseInt(pageIndex)} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Page;
|
@ -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;
|
@ -0,0 +1,24 @@
|
||||
import { articleDetail } from "@/app/api/articles";
|
||||
import ArticleRender from "@/app/components/ArticleRender";
|
||||
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
|
||||
|
||||
export default async function Page({
|
||||
params,
|
||||
}: {
|
||||
params: {
|
||||
articleId: string;
|
||||
};
|
||||
}) {
|
||||
const data = await articleDetail({ id: params.articleId });
|
||||
return (
|
||||
<ArticleWithBreadcrumb
|
||||
breadcrumb={[
|
||||
{ title: "首页", href: "/" },
|
||||
{ title: "科技成果", href: "/general-news/pages/1" },
|
||||
{ title: data.title, href: `/general-news/${data.id}` },
|
||||
]}
|
||||
>
|
||||
<ArticleRender article={data} />
|
||||
</ArticleWithBreadcrumb>
|
||||
);
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
import ArticleLayout from "@/app/components/ArticleLayout";
|
||||
import Breadcrumb, { BreadcrumbItem } from "@/app/components/Breadcrumb";
|
||||
import { ReactNode } from "react";
|
||||
import ArticleWithBreadcrumb from "@/app/components/ArticleWithBreadcrumb";
|
||||
|
||||
const breadcrumb: BreadcrumbItem[] = [
|
||||
{ title: "首页", href: "/" },
|
||||
{ title: "科技成果", href: "/technological-achievements/pages/1" },
|
||||
];
|
||||
const Layout = ({ children }: { children: ReactNode }) => {
|
||||
return (
|
||||
<ArticleLayout navigations={[]} leftNavTitle={"科研进展"}>
|
||||
<ArticleWithBreadcrumb breadcrumb={breadcrumb}>
|
||||
{children}
|
||||
</ArticleWithBreadcrumb>
|
||||
</ArticleLayout>
|
||||
);
|
||||
};
|
||||
|
||||
export default Layout;
|
@ -0,0 +1,18 @@
|
||||
import ArticleList from "@/app/components/ArticleList";
|
||||
|
||||
const Page = ({
|
||||
params,
|
||||
}: {
|
||||
params: {
|
||||
pageIndex: string;
|
||||
};
|
||||
}) => {
|
||||
const { pageIndex } = params;
|
||||
return (
|
||||
<>
|
||||
<ArticleList title={"科技成果"} cid={"7"} pageNo={parseInt(pageIndex)} />
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
export default Page;
|
Reference in New Issue
Block a user