This commit is contained in:
quantulr
2023-11-03 17:25:10 +08:00
parent 2423f8c2e8
commit b6a722fa79
62 changed files with 415 additions and 260 deletions

View File

@ -4,7 +4,7 @@ const Page = () => {
return (
<>
<ArticleHeading text={"政府政策"} />
<ol className={"list-decimal list-inside indent-8"}>
<ol className={"list-inside list-decimal indent-8"}>
<li></li>
<li></li>
<li></li>

View File

@ -4,7 +4,7 @@ const Page = () => {
return (
<>
<ArticleHeading text={"产业对接"} />
<ol className={"list-decimal list-inside indent-8"}>
<ol className={"list-inside list-decimal indent-8"}>
<li></li>
<li></li>
<li></li>

View File

@ -4,10 +4,10 @@ const Page = () => {
return (
<>
<ArticleHeading text={"知识产权服务"} />
<p className={"text-base indent-8 my-1 text-center"}>
<p className={"my-1 text-center indent-8 text-base"}>
</p>
<ol className={"list-decimal list-inside indent-8 text-center"}>
<ol className={"list-inside list-decimal text-center indent-8"}>
<li></li>
<li></li>
<li></li>

View File

@ -4,7 +4,7 @@ const Page = () => {
return (
<>
<ArticleHeading text={"情报服务"} />
<ol className={"list-decimal list-inside indent-8"}>
<ol className={"list-inside list-decimal indent-8"}>
<li>
</li>

View File

@ -4,7 +4,7 @@ const Page = () => {
return (
<>
<ArticleHeading text={"投融资"} />
<ol className={"list-decimal list-inside indent-8"}>
<ol className={"list-inside list-decimal indent-8"}>
<li></li>
<li></li>
<li></li>

View File

@ -4,7 +4,7 @@ const Page = () => {
return (
<>
<ArticleHeading text={"科研项目申报"} />
<ol className={"list-decimal list-inside indent-8"}>
<ol className={"list-inside list-decimal indent-8"}>
<li></li>
<li></li>
<li>

View File

@ -4,7 +4,7 @@ const Page = () => {
return (
<>
<ArticleHeading text={"科技评估"} />
<ol className={"list-decimal list-inside indent-8"}>
<ol className={"list-inside list-decimal indent-8"}>
<li></li>
<li></li>
<li></li>

View File

@ -9,9 +9,9 @@ const breadcrumb = [
const Layout = ({ children }: { children: ReactNode }) => {
return (
<ArticleLayout leftNavTitle={"联系我们"}>
<div className={"flex flex-col h-full"}>
<div className={"flex h-full flex-col"}>
<Breadcrumb navigations={breadcrumb} />
<div className={"bg-white px-5 py-4 flex-1 mt-2"}>{children}</div>
<div className={"mt-2 flex-1 bg-white px-5 py-4"}>{children}</div>
</div>
</ArticleLayout>
);

View File

@ -1,22 +1,22 @@
const Page = () => {
return (
<>
<h2 className={"text-center text-lg font-bold text-[#054786] mb-8"}>
<h2 className={"mb-8 text-center text-lg font-bold text-[#054786]"}>
</h2>
<p className={"text-base indent-8 my-1"}>
<p className={"my-1 indent-8 text-base"}>
绿
</p>
<p className={"text-base indent-8 my-1"}>
<p className={"my-1 indent-8 text-base"}>
8:3018:00
</p>
<p className={"text-base indent-8 my-1"}>
<p className={"my-1 indent-8 text-base"}>
18156053255 18156054143
</p>
<p className={"text-base indent-8 my-1"}>
<p className={"my-1 indent-8 text-base"}>
D1 7
</p>
<p className={"text-base indent-8 my-1"}>230022</p>
<p className={"my-1 indent-8 text-base"}>230022</p>
</>
);
};

View File

@ -10,9 +10,9 @@ const breadcrumb = [
const Layout = ({ children }: { children: ReactNode }) => {
return (
<div className={"flex flex-col h-full"}>
<div className={"flex h-full flex-col"}>
<Breadcrumb navigations={breadcrumb} />
<div className={"bg-white px-5 py-4 flex-1 mt-2"}>{children}</div>
<div className={"mt-2 flex-1 bg-white px-5 py-4"}>{children}</div>
</div>
);
};

View File

@ -4,9 +4,9 @@ const Page = () => {
return (
<>
<ArticleHeading text={"资产财务处"} />
<p className={"text-base indent-8 my-1"}>
<p className={"my-1 indent-8 text-base"}>
<ol className={"list-decimal list-inside"}>
<ol className={"list-inside list-decimal"}>
<li>
</li>

View File

@ -10,9 +10,9 @@ const breadcrumb = [
const Layout = ({ children }: { children: ReactNode }) => {
return (
<div className={"flex flex-col h-full"}>
<div className={"flex h-full flex-col"}>
<Breadcrumb navigations={breadcrumb} />
<div className={"bg-white px-5 py-4 flex-1 mt-2"}>{children}</div>
<div className={"mt-2 flex-1 bg-white px-5 py-4"}>{children}</div>
</div>
);
};

View File

@ -4,9 +4,9 @@ const Page = () => {
return (
<>
<ArticleHeading text={"综合办公室"} />
<p className={"text-base indent-8 my-1"}>
<p className={"my-1 indent-8 text-base"}>
<ol className={"list-decimal list-inside"}>
<ol className={"list-inside list-decimal"}>
<li>
</li>
@ -32,7 +32,7 @@ const Page = () => {
<li></li>
</ol>
</p>
<p className={"text-base indent-8 my-1"}>
<p className={"my-1 indent-8 text-base"}>
</p>
</>

View File

@ -10,9 +10,9 @@ const breadcrumb = [
const Layout = ({ children }: { children: ReactNode }) => {
return (
<div className={"flex flex-col h-full"}>
<div className={"flex h-full flex-col"}>
<Breadcrumb navigations={breadcrumb} />
<div className={"bg-white px-5 py-4 flex-1 mt-2"}>{children}</div>
<div className={"mt-2 flex-1 bg-white px-5 py-4"}>{children}</div>
</div>
);
};

View File

@ -4,9 +4,9 @@ const Page = () => {
return (
<>
<ArticleHeading text={"产业处"} />
<p className={"text-base indent-8 my-1"}>
<p className={"my-1 indent-8 text-base"}>
<ol className={"list-decimal list-inside"}>
<ol className={"list-inside list-decimal"}>
<li></li>
<li></li>
<li></li>

View File

@ -10,9 +10,9 @@ const breadcrumb = [
const Layout = ({ children }: { children: ReactNode }) => {
return (
<div className={"flex flex-col h-full"}>
<div className={"flex h-full flex-col"}>
<Breadcrumb navigations={breadcrumb} />
<div className={"bg-white px-5 py-4 flex-1 mt-2"}>{children}</div>
<div className={"mt-2 flex-1 bg-white px-5 py-4"}>{children}</div>
</div>
);
};

View File

@ -4,9 +4,9 @@ const Page = () => {
return (
<>
<ArticleHeading text={"人事处"} />
<p className={"text-base indent-8 my-1"}>
<p className={"my-1 indent-8 text-base"}>
<ol className={"list-decimal list-inside"}>
<ol className={"list-inside list-decimal"}>
<li></li>
<li></li>
<li>

View File

@ -10,9 +10,9 @@ const breadcrumb = [
const Layout = ({ children }: { children: ReactNode }) => {
return (
<div className={"flex flex-col h-full"}>
<div className={"flex h-full flex-col"}>
<Breadcrumb navigations={breadcrumb} />
<div className={"bg-white px-5 py-4 flex-1 mt-2"}>{children}</div>
<div className={"mt-2 flex-1 bg-white px-5 py-4"}>{children}</div>
</div>
);
};

View File

@ -4,10 +4,10 @@ const Page = () => {
return (
<>
<ArticleHeading text={"科技处"} />
<p className={"text-base indent-8 my-1"}>
<p className={"my-1 indent-8 text-base"}>
</p>
<ol className={"list-decimal list-inside indent-8"}>
<ol className={"list-inside list-decimal indent-8"}>
<li>
,
</li>

View File

@ -9,9 +9,9 @@ const breadcrumb = [
const Layout = ({ children }: { children: ReactNode }) => {
return (
<div className={"flex flex-col h-full"}>
<div className={"flex h-full flex-col"}>
<Breadcrumb navigations={breadcrumb} />
<div className={"bg-white px-5 py-4 flex-1 mt-2"}>{children}</div>
<div className={"mt-2 flex-1 bg-white px-5 py-4"}>{children}</div>
</div>
);
};

View File

@ -9,9 +9,9 @@ const breadcrumb = [
const Layout = ({ children }: { children: ReactNode }) => {
return (
<div className={"flex flex-col h-full"}>
<div className={"flex h-full flex-col"}>
<Breadcrumb navigations={breadcrumb} />
<div className={"bg-white px-5 py-4 flex-1 mt-2"}>{children}</div>
<div className={"mt-2 flex-1 bg-white px-5 py-4"}>{children}</div>
</div>
);
};

View File

@ -4,17 +4,17 @@ const Page = () => {
return (
<>
<ArticleHeading text={"院长致辞"} />
<p className={"text-base indent-8 my-1"}>
<p className={"my-1 indent-8 text-base"}>
</p>
<p className={"text-base indent-8 my-1"}>
<p className={"my-1 indent-8 text-base"}>
绿绿
</p>
<p className={"text-base indent-8 my-1"}>
<p className={"my-1 indent-8 text-base"}>
5G物联网等领域进行科技布局绿沿
</p>
<p className={"text-base indent-8 my-1"}>
<p className={"my-1 indent-8 text-base"}>
</p>
</>

View File

@ -9,9 +9,9 @@ const breadcrumb = [
const Layout = ({ children }: { children: ReactNode }) => {
return (
<div className={"flex flex-col h-full"}>
<div className={"flex h-full flex-col"}>
<Breadcrumb navigations={breadcrumb} />
<div className={"bg-white px-5 py-4 flex-1 mt-2"}>{children}</div>
<div className={"mt-2 flex-1 bg-white px-5 py-4"}>{children}</div>
</div>
);
};

View File

@ -4,7 +4,7 @@ const Page = () => {
return (
<>
<ArticleHeading text={"研究中心"} />
<p className={"text-base indent-8 my-1"}>...</p>
<p className={"my-1 indent-8 text-base"}>...</p>
</>
);
};

View File

@ -9,9 +9,9 @@ const breadcrumb = [
const Layout = ({ children }: { children: ReactNode }) => {
return (
<div className={"flex flex-col h-full"}>
<div className={"flex h-full flex-col"}>
<Breadcrumb navigations={breadcrumb} />
<div className={"bg-white px-5 py-4 flex-1 mt-2"}>{children}</div>
<div className={"mt-2 flex-1 bg-white px-5 py-4"}>{children}</div>
</div>
);
};

View File

@ -4,7 +4,7 @@ const Page = () => {
return (
<>
<ArticleHeading text={"合作企业"} />
<p className={"text-base indent-8 my-1"}>...</p>
<p className={"my-1 indent-8 text-base"}>...</p>
</>
);
};

View File

@ -9,9 +9,9 @@ const breadcrumb = [
const Layout = ({ children }: { children: ReactNode }) => {
return (
<div className={"flex flex-col h-full"}>
<div className={"flex h-full flex-col"}>
<Breadcrumb navigations={breadcrumb} />
<div className={"bg-white px-5 py-4 flex-1 mt-2"}>{children}</div>
<div className={"mt-2 flex-1 bg-white px-5 py-4"}>{children}</div>
</div>
);
};

View File

@ -4,13 +4,13 @@ const Page = () => {
return (
<>
<ArticleHeading text={"中国科学院重庆绿色智能技术研究院合肥分院"} />
<p className={"text-base indent-8 my-1"}>
<p className={"my-1 indent-8 text-base"}>
绿绿201822020181220
</p>
<p className={"text-base indent-8 my-1"}>
<p className={"my-1 indent-8 text-base"}>
5G物联绿绿
</p>
<p className={"text-base indent-8 my-1"}>
<p className={"my-1 indent-8 text-base"}>
</p>
</>

View File

@ -9,9 +9,9 @@ const breadcrumb = [
const Layout = ({ children }: { children: ReactNode }) => {
return (
<div className={"flex flex-col h-full"}>
<div className={"flex h-full flex-col"}>
<Breadcrumb navigations={breadcrumb} />
<div className={"bg-white px-5 py-4 flex-1 mt-2"}>{children}</div>
<div className={"mt-2 flex-1 bg-white px-5 py-4"}>{children}</div>
</div>
);
};

View File

@ -4,7 +4,7 @@ const Page = () => {
return (
<>
<ArticleHeading text={"科研平台"} />
<p className={"text-base indent-8 my-1"}>...</p>
<p className={"my-1 indent-8 text-base"}>...</p>
</>
);
};

View File

@ -9,9 +9,9 @@ const breadcrumb = [
const Layout = ({ children }: { children: ReactNode }) => {
return (
<div className={"flex flex-col h-full"}>
<div className={"flex h-full flex-col"}>
<Breadcrumb navigations={breadcrumb} />
<div className={"bg-white px-5 py-4 flex-1 mt-2"}>{children}</div>
<div className={"mt-2 flex-1 bg-white px-5 py-4"}>{children}</div>
</div>
);
};

View File

@ -4,7 +4,7 @@ const Page = () => {
return (
<>
<ArticleHeading text={"科技产业发展委员会"} />
<p className={"text-base indent-8 my-1"}>...</p>
<p className={"my-1 indent-8 text-base"}>...</p>
</>
);
};

View File

@ -9,9 +9,9 @@ const breadcrumb = [
const Layout = ({ children }: { children: ReactNode }) => {
return (
<div className={"flex flex-col h-full"}>
<div className={"flex h-full flex-col"}>
<Breadcrumb navigations={breadcrumb} />
<div className={"bg-white px-5 py-4 flex-1 mt-2"}>{children}</div>
<div className={"mt-2 flex-1 bg-white px-5 py-4"}>{children}</div>
</div>
);
};

View File

@ -5,8 +5,8 @@ const Page = () => {
return (
<>
<ArticleHeading text={"两院院士"} />
<p className={"text-base text-center"}></p>
<p className={"flex justify-center mt-2"}>
<p className={"text-center text-base"}></p>
<p className={"mt-2 flex justify-center"}>
<img
src={`${process.env.NEXT_PUBLIC_ADMIN_BASE_URL}/uploads/image/20231030/8d05e613-e2c6-47d1-81a9-08bd70b8ba73.jpeg`}
alt={"张景中"}

View File

@ -9,9 +9,9 @@ const breadcrumb = [
const Layout = ({ children }: { children: ReactNode }) => {
return (
<div className={"flex flex-col h-full"}>
<div className={"flex h-full flex-col"}>
<Breadcrumb navigations={breadcrumb} />
<div className={"bg-white px-5 py-4 flex-1 mt-2"}>{children}</div>
<div className={"mt-2 flex-1 bg-white px-5 py-4"}>{children}</div>
</div>
);
};

View File

@ -5,7 +5,7 @@ const Page = () => {
<>
<ArticleHeading text={"人才概况"} />
<p className={"text-base indent-8 my-1"}>
<p className={"my-1 indent-8 text-base"}>
20171033340611362120171025381173973
5
</p>

View File

@ -9,9 +9,9 @@ const breadcrumb = [
const Layout = ({ children }: { children: ReactNode }) => {
return (
<div className={"flex flex-col h-full"}>
<div className={"flex h-full flex-col"}>
<Breadcrumb navigations={breadcrumb} />
<div className={"bg-white px-5 py-4 flex-1 mt-2"}>{children}</div>
<div className={"mt-2 flex-1 bg-white px-5 py-4"}>{children}</div>
</div>
);
};

View File

@ -55,7 +55,7 @@ const Page = () => {
{academicians.map((academician) => (
<div
key={academician.name}
className={`${styles.academician} flex flex-col items-center w-1/5 mb-4`}
className={`${styles.academician} mb-4 flex w-1/5 flex-col items-center`}
>
<img
className={"h-[138px]"}

View File

@ -9,9 +9,9 @@ const breadcrumb = [
const Layout = ({ children }: { children: ReactNode }) => {
return (
<div className={"flex flex-col h-full"}>
<div className={"flex h-full flex-col"}>
<Breadcrumb navigations={breadcrumb} />
<div className={"bg-white px-5 py-4 flex-1 mt-2"}>{children}</div>
<div className={"mt-2 flex-1 bg-white px-5 py-4"}>{children}</div>
</div>
);
};

View File

@ -24,7 +24,7 @@ const Page = () => {
{academicians.map((academician) => (
<div
key={academician.name}
className={`flex flex-col items-center w-1/5`}
className={`flex w-1/5 flex-col items-center`}
>
<img
className={"h-[138px]"}

View File

@ -1,12 +1,14 @@
"use client";
import React, { useEffect, useState } from "react";
import { register } from "swiper/element/bundle";
import axios from "axios";
import request from "@/app/lib/request";
import { BaseResponse, PageData } from "@/app/types/base";
import { Album } from "@/app/types/album";
import React, { useEffect } from "react";
register();
import Swiper from "swiper";
import { Pagination, EffectCoverflow, Autoplay } from "swiper/modules";
// import Swiper and modules styles
import "swiper/css";
import "swiper/css/pagination";
import "swiper/css/effect-coverflow";
import "swiper/css/autoplay";
const albums = [
{
@ -111,59 +113,50 @@ const albums = [
];
const AnhuiSwiper = () => {
// const [albums, setAlbums] = useState<Album[]>([]);
// useEffect(() => {
// request
// .get<never, BaseResponse<PageData<Album>>>(`/albums/albumList`, {
// // baseURL: `${process.env.NEXT_PUBLIC_ADMIN_BASE_URL}`,
// baseURL: `http://localhost:8082/api}`,
// params: {
// cid: 3,
// },
// })
// .then((res) => {
// setAlbums(() => res.data.lists);
// });
// }, []);
useEffect(() => {
let swiper: Swiper | null = null;
swiper = new Swiper(".swiper", {
modules: [Pagination, EffectCoverflow, Autoplay],
autoplay: {
delay: 2000,
},
loop: true,
slidesPerView: 3,
effect: "coverflow",
pagination: {
el: ".swiper-pagination",
dynamicBullets: true,
},
});
return () => {
swiper?.destroy();
swiper = null;
};
}, []);
return (
<div className={"h-[205px] bg-white flex flex-col"}>
<div className={"flex h-[205px] flex-col bg-white"}>
<div
className={
"bg-[#1f87e8] text-white h-[30px] pl-[5px] flex items-center"
"flex h-[30px] items-center bg-[#1f87e8] pl-[5px] text-white"
}
>
</div>
<div className={"flex-1 h-0"}>
{/* @ts-ignore*/}
<swiper-container
effect={"coverflow"}
autoplay
slides-per-view="3"
loop
style={{
height: "100%",
}}
>
{/* @ts-ignore*/}
{albums.map((el) => (
// @ts-ignore
<swiper-slide
key={el.id}
style={{
display: "flex",
alignItems: "center",
}}
>
<img
src={`${process.env.NEXT_PUBLIC_ADMIN_BASE_URL}${el.path}`}
alt={""}
/>
{/*@ts-ignore*/}
</swiper-slide>
))}
{/* @ts-ignore */}
</swiper-container>
<div className={"h-0 flex-1"}>
<div className={"swiper h-full"}>
<div className={"swiper-wrapper"}>
{albums.map((el) => (
<div className={"swiper-slide"} key={el.id}>
<img
className={"h-full w-full object-contain"}
src={`${process.env.NEXT_PUBLIC_ADMIN_BASE_URL}${el.path}`}
alt={""}
/>
</div>
))}
</div>
<div className={"swiper-pagination"}></div>
</div>
</div>
</div>
);

View File

@ -37,24 +37,24 @@ const ArticleBlock = async ({
className={"flex flex-col overflow-hidden"}
>
<div
className={`title-bar text-white flex items-center px-2 font-bold ${styles.articleBlockTitleBar} relative`}
className={`title-bar flex items-center px-2 font-bold text-white ${styles.articleBlockTitleBar} relative`}
>
<Image width={30} height={30} src={trumpetIcon} alt={"trumpet icon"} />
<span className={"ml-2 text-[14px]"}>{title}</span>
<Link
className={"absolute right-3 text-white text-xs"}
className={"absolute right-3 text-xs text-white"}
href={`${linkPrefix}/pages/1`}
>
+
</Link>
</div>
<div className={`${styles.articlesList} bg-[#e1f1fd] flex-1`}>
<div className={`${styles.articlesList} flex-1 bg-[#e1f1fd]`}>
<ul>
{data.lists?.map((article) => (
<li className={"h-8"} key={article.id}>
<Link
className={
"w-full px-1 h-full flex items-center text-xs justify-between"
"flex h-full w-full items-center justify-between px-1 text-xs"
}
href={`${linkPrefix}/${article.id}`}
>

View File

@ -1,6 +1,6 @@
const ArticleHeading = ({ text }: { text: string }) => {
return (
<h2 className={"text-center text-lg font-bold text-[#054786] mb-8"}>
<h2 className={"mb-8 text-center text-lg font-bold text-[#054786]"}>
{text}
</h2>
);

View File

@ -15,7 +15,7 @@ const ArticleLayout = ({
<div className={"left-side w-[325px]"}>
<LeftNav navigations={navigations} title={leftNavTitle} />
</div>
<div className={"flex-1 ml-3 w-0"}>{children}</div>
<div className={"ml-3 w-0 flex-1"}>{children}</div>
</div>
);
};

View File

@ -22,15 +22,15 @@ const ArticleList = async ({
});
return (
<>
<h2 className={"text-[#0f6fca] text-sm"}>{title}</h2>
<h2 className={"text-sm text-[#0f6fca]"}>{title}</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"}
className={"flex h-8 items-center text-sm text-[#666666]"}
href={`../${article.id}`}
>
<span className={"flex-1 w-0 truncate"}>{article.title}</span>
<span className={"w-0 flex-1 truncate"}>{article.title}</span>
<span>{dayjs(article.createTime).format("YYYY-MM-DD")}</span>
</Link>
</li>

View File

@ -7,11 +7,11 @@ const ArticleRender = ({ article }: { article: ArticleDetail }) => {
<div className={"h-full"}>
<ArticleHeading text={article.title} />
<div dangerouslySetInnerHTML={{ __html: article.content }}></div>
<div className={"bottom-nav mt-[27px] mb-[50px]"}>
<div className={"bottom-nav mb-[50px] mt-[27px]"}>
<div className={"prev"}>
<span className={"text-base"}></span>
<Link
className={"text-sm text-[#666] ml-8"}
className={"ml-8 text-sm text-[#666]"}
href={`./${article.prev?.id}`}
>
{article.prev?.title ?? "没有了"}
@ -20,7 +20,7 @@ const ArticleRender = ({ article }: { article: ArticleDetail }) => {
<div className={"next mt-8"}>
<span className={"text-base"}></span>
<Link
className={"text-sm text-[#666] ml-8"}
className={"ml-8 text-sm text-[#666]"}
href={`./${article.next?.id}`}
>
{article.next?.title ?? "没有了"}

View File

@ -9,9 +9,9 @@ const ArticleWithBreadcrumb = ({
children: ReactNode;
}) => {
return (
<div className={"flex flex-col h-full"}>
<div className={"flex h-full flex-col"}>
<Breadcrumb navigations={breadcrumb} />
<div className={"bg-white px-5 py-4 flex-1 mt-2"}>{children}</div>
<div className={"mt-2 flex-1 bg-white px-5 py-4"}>{children}</div>
</div>
);
};

View File

@ -1,14 +1,28 @@
"use client";
import backTop from "@/app/assets/backtop.png";
import Image from "next/image";
// import { useScroll } from "ahooks";
import { useScroll } from "ahooks";
/**
* 返回到顶部
* @constructor
*/
const BackToTop = () => {
// const position = useScroll();
const position = useScroll();
return (
<div className={`fixed bottom-4 right-10 w-[50px] h-[50px]`}>
<div
className={`fixed bottom-4 right-10 h-[50px] w-[50px] overflow-hidden`}
>
<Image
className={"w-full h-full cursor-pointer"}
onClick={() => {
window.scroll({
top: 0,
behavior: "smooth",
});
}}
className={`${
(position?.top ?? 0) > 100 ? "top-0" : "top-full"
} absolute left-0 h-full w-full cursor-pointer transition-all`}
src={backTop}
alt={""}
/>

View File

@ -19,7 +19,7 @@ const BranchLifeSketch = async () => {
return (
<>
<div
className={`title-bar text-white flex items-center px-2 font-bold ${styles.articleBlockTitleBar} relative`}
className={`title-bar flex items-center px-2 font-bold text-white ${styles.articleBlockTitleBar} relative`}
>
<Image width={30} height={30} src={trumpetIcon} alt={"trumpet icon"} />
<span className={"ml-2 text-[14px]"}></span>
@ -51,28 +51,28 @@ const BranchLifeSketch = async () => {
return (
// @ts-ignore
<swiper-slide key={article.id}>
<div className={"w-full h-[108px] px-2 py-4 flex"}>
<div className={"flex h-[108px] w-full px-2 py-4"}>
<Link
className={"aspect-square"}
href={`/branch-life-sketch/${article.id}`}
>
<img
alt={article.title}
className={"w-full h-full"}
className={"h-full w-full"}
src={article.image.replace(
"http://101.34.131.16:8084/api/uploads/",
"",
)}
/>
</Link>
<div className={"flex-1 w-0 ml-1"}>
<div className={"ml-1 w-0 flex-1"}>
<Link
href={`/branch-life-sketch/${article.id}`}
className={"text-xs truncate text-[#144673]"}
className={"truncate text-xs text-[#144673]"}
>
{article.title}
</Link>
<div className={"text-xs text-[#797979] line-clamp-4 mt-3"}>
<div className={"mt-3 line-clamp-4 text-xs text-[#797979]"}>
{articleText}
</div>
</div>

View File

@ -8,7 +8,7 @@ export interface BreadcrumbItem {
const Breadcrumb = ({ navigations }: { navigations: BreadcrumbItem[] }) => {
return (
<div className={"flex text-xs text-[#13426e] truncate"}>
<div className={"flex truncate text-xs text-[#13426e]"}>
<span className={"mr-2"}>:</span>
{navigations.map((navigation, index) => {
if (index === navigations.length - 1) {

View File

@ -53,7 +53,7 @@ const FriendLinks = () => {
return (
<div className={"h-[360px] bg-white"}>
<div
className={`title-bar text-black flex items-center px-2 font-bold ${styles.titleBar} relative`}
className={`title-bar flex items-center px-2 font-bold text-black ${styles.titleBar} relative`}
>
<Image width={30} height={30} src={pin} alt={"trumpet icon"} />
<span className={"ml-2 text-[14px]"}></span>
@ -64,7 +64,7 @@ const FriendLinks = () => {
<Link
target={"_blank"}
href={link.href}
className={"flex items-center text-xs hover:underline h-7"}
className={"flex h-7 items-center text-xs hover:underline"}
>
{link.title}
</Link>

View File

@ -23,33 +23,33 @@ const LatestNews = async () => {
});
return (
<div className={"h-[180px] bg-white p-2 flex"}>
<div className={"flex h-[180px] bg-white p-2"}>
<Link
href={`general-news/${lists[0].id}`}
className={"article-cover w-[207px]"}
>
<img
className={"w-full h-full object-cover"}
className={"h-full w-full object-cover"}
src={`${process.env.NEXT_PUBLIC_ADMIN_BASE_URL}/uploads/${article.image}`}
alt={""}
/>
</Link>
<div className={"w-0 flex-1 ml-1 relative"}>
<div className={"relative ml-1 w-0 flex-1"}>
<Link
href={`general-news/${lists[0].id}`}
className={"title block truncate text-[#186ab6] text-base"}
className={"title block truncate text-base text-[#186ab6]"}
>
{article.title}
</Link>
<Link
href={`general-news/${lists[0].id}`}
className={"content text-xs line-clamp-4 leading-7"}
className={"content line-clamp-4 text-xs leading-7"}
>
{content}
</Link>
<Link
href={"/general-news/pages/1"}
className={"text-xs text-[#ffc001] absolute left-0 bottom-0"}
className={"absolute bottom-0 left-0 text-xs text-[#ffc001]"}
>
</Link>

View File

@ -17,24 +17,24 @@ const LeftNav = ({
return (
<div
className={
"left-nav min-h-[600px] h-full bg-[#d7ecfd] rounded shadow pt-2"
"left-nav h-full min-h-[600px] rounded bg-[#d7ecfd] pt-2 shadow"
}
>
<div className={"flex items-center pl-2 h-7"}>
<div className={"flex h-7 items-center pl-2"}>
<Image src={circle} alt={"circle icon"} height={16} width={16} />
<span className={"pl-2"}>{title}</span>
</div>
{(navigations?.length ?? 0) > 0 && (
<div
className={`${styles.navContent} mt-3 mx-3 rounded-lg px-2.5 py-[5px]`}
className={`${styles.navContent} mx-3 mt-3 rounded-lg px-2.5 py-[5px]`}
>
<ul className={styles.navItems}>
{navigations?.map((navigation) => (
<li key={navigation.href}>
<Link
className={`text-sm px-[9px] h-[34px] flex items-center font-bold transition-all hover:text-[#fff176] hover:text-xs ${
className={`flex h-[34px] items-center px-[9px] text-sm font-bold transition-all hover:text-xs hover:text-[#fff176] ${
navigation.href === pathname
? "text-[#fff176] text-xs"
? "text-xs text-[#fff176]"
: "text-white"
}`}
href={navigation.href}

View File

@ -51,8 +51,8 @@ const MainNav = () => {
const pathname = usePathname();
const [activePopup, setActivePopup] = useState(-1);
return (
<nav className={"main-nav bg-[#1958a7] h-[38px]"}>
<ul className={"w-full h-full flex"}>
<nav className={"main-nav h-[38px] bg-[#1958a7]"}>
<ul className={"flex h-full w-full"}>
{navigations.map((navigation, index) => (
<li
className={"relative"}
@ -74,17 +74,17 @@ const MainNav = () => {
isActive(navigation.href, pathname)
? "text-[#dedede]"
: "text-white"
} hover:text-[#dedede] text-sm h-[38px] flex justify-center items-center min-w-[60px] mx-2.5`}
} mx-2.5 flex h-[38px] min-w-[60px] items-center justify-center text-sm hover:text-[#dedede]`}
>
{navigation.title}
</Link>
{index === activePopup && navigation.children?.length && (
<div
className={`z-40 popup-menu min-w-[120px] absolute top-full left-1/2 -translate-x-1/2`}
className={`popup-menu absolute left-1/2 top-full z-40 min-w-[120px] -translate-x-1/2`}
>
<div
className={
"w-0 h-0 mx-auto border-b-[12px] border-l-[12px] border-r-[12px] border-b-[#b0d3eb] border-l-transparent border-r-transparent"
"mx-auto h-0 w-0 border-b-[12px] border-l-[12px] border-r-[12px] border-b-[#b0d3eb] border-l-transparent border-r-transparent"
}
></div>
<ul className={"whitespace-nowrap bg-[#b0d3eb]"}>
@ -95,7 +95,7 @@ const MainNav = () => {
setActivePopup(() => -1);
}}
className={
"h-10 flex justify-center items-center text-[13px] px-2 hover:text-[#fe5722]"
"flex h-10 items-center justify-center px-2 text-[13px] hover:text-[#fe5722]"
}
href={child.href}
>

View File

@ -12,14 +12,14 @@ const Pagination = ({
const pageCount = Math.ceil(total / perPage);
return (
<div
className={"w-full flex justify-center mt-2.5 h-10 items-center text-sm"}
className={"mt-2.5 flex h-10 w-full items-center justify-center text-sm"}
>
{page <= 1 ? (
<div className={"prev mx-3 text-gray-500 cursor-not-allowed"}>
<div className={"prev mx-3 cursor-not-allowed text-gray-500"}>
</div>
) : (
<Link className={"next block mx-3"} href={`./${page - 1}`}>
<Link className={"next mx-3 block"} href={`./${page - 1}`}>
</Link>
)}
@ -39,11 +39,11 @@ const Pagination = ({
),
)}
{page >= pageCount ? (
<div className={"next mx-3 text-gray-500 cursor-not-allowed"}>
<div className={"next mx-3 cursor-not-allowed text-gray-500"}>
</div>
) : (
<Link className={"next block mx-3"} href={`./${page + 1}`}>
<Link className={"next mx-3 block"} href={`./${page + 1}`}>
</Link>
)}

View File

@ -19,7 +19,7 @@ export default function RootLayout({ children }: { children: ReactNode }) {
return (
<html lang="en">
<body className={inter.className}>
<main className={"w-[1000px] m-auto"}>
<main className={"m-auto w-[1000px]"}>
<Image className={"w-full"} src={banner} alt={"banner"} />
<MainNav />
{children}

View File

@ -9,7 +9,7 @@ import BranchLifeSketch from "@/app/components/BranchLifeSketch";
export default async function Home() {
return (
<main className={"flex justify-between bg-[#f5fafe] mt-1"}>
<main className={"mt-1 flex justify-between bg-[#f5fafe]"}>
<div className={"left-side w-[222px]"}>
<Image
src={leftBanner}
@ -94,7 +94,7 @@ export default async function Home() {
showDate={true}
></ArticleBlock>
</div>
<div className={"flex justify-between mt-1"}>
<div className={"mt-1 flex justify-between"}>
<ArticleBlock
width={"49.5%"}
height={221}
@ -110,7 +110,7 @@ export default async function Home() {
linkPrefix={"/academic-exchange/academic-events"}
></ArticleBlock>
</div>
<div className={"flex justify-between mt-1"}>
<div className={"mt-1 flex justify-between"}>
<ArticleBlock
width={"49.5%"}
height={221}