diff --git a/components/PostPreview.js b/components/PostPreview.js new file mode 100644 index 0000000..f56395f --- /dev/null +++ b/components/PostPreview.js @@ -0,0 +1,19 @@ +import styles from "../styles/Home.module.css"; +import Link from "next/link"; +import ClickForMore from "./ClickForMore"; + +function PostPreview({ title, description, date, href }) { + return ( + +
+

{title}

+

{description}

+ 发布于 {date} + {" | "} + +
+ + ); +} + +export default PostPreview; diff --git a/pages/index.js b/pages/index.js index b491313..ea2f9fa 100644 --- a/pages/index.js +++ b/pages/index.js @@ -1,7 +1,6 @@ import Head from "next/head"; -import Link from "next/link"; import Header from "../components/Header"; -import ClickForMore from "../components/ClickForMore"; +import PostPreview from "../components/PostPreview"; import mainbg from "../public/mainbg.webp"; @@ -20,30 +19,27 @@ export default function Home() {
- -
-

Social OjO 正式成立

-

平台介绍、期望及使命

- 发布于 2022-05-12{" | "} -
- +
- -
-

社会管理法律

-

小组研讨真实法律案件的案情和判决

- 发布于 2022-07-06{" | "} -
- +
- -
-

全国灾害统计地图

- 发布于 2022-05-12{" | "} -
- +
); } -