From 1d49f000efd9f3e6ac13da4e459b8e1e600c3335 Mon Sep 17 00:00:00 2001
From: qiuchenfan <2035024011@qq.com>
Date: Tue, 18 Nov 2025 17:13:49 +0800
Subject: [PATCH] part2
---
app/components/{untils => }/Carousel.tsx | 0
app/components/body/ImageGridSection.tsx | 103 +++++++++++++++++++++++
app/components/body/learn.tsx | 0
app/routes/news.tsx | 7 +-
4 files changed, 108 insertions(+), 2 deletions(-)
rename app/components/{untils => }/Carousel.tsx (100%)
create mode 100644 app/components/body/ImageGridSection.tsx
delete mode 100644 app/components/body/learn.tsx
diff --git a/app/components/untils/Carousel.tsx b/app/components/Carousel.tsx
similarity index 100%
rename from app/components/untils/Carousel.tsx
rename to app/components/Carousel.tsx
diff --git a/app/components/body/ImageGridSection.tsx b/app/components/body/ImageGridSection.tsx
new file mode 100644
index 0000000..6625297
--- /dev/null
+++ b/app/components/body/ImageGridSection.tsx
@@ -0,0 +1,103 @@
+import { CarouselDemo } from "@/components/Carousel";
+const ImageGridSection = () => {
+ // 替换为你自己的图片路径
+ const elements = [
+ "/images/carousel-1.jpg",
+ ,
+ "/images/carousel-2.jpg",
+ "/images/carousel-3.jpg"
+ ];
+ const listItems = [
+ '新闻标题一:重要政策发布',
+ '新闻标题二:经济数据稳步回升',
+ '新闻标题三:科技创新成果显著',
+ '新闻标题四:民生工程持续推进',
+ '新闻标题五:国际交流合作深化'
+ ];
+ return (
+
+
+ {/* 左侧:3张图片 + 1个轮播图 2x2 网格 */}
+
+ {elements.map((element, index) => (
+
+ {typeof element === 'string' ? (
+

+ ) : (
+ element // 如果是 React 元素,则直接渲染
+ )}
+
+ ))}
+
+
+
+ {listItems.map((item, index) => (
+ -
+ •
+ {item}
+
+ ))}
+
+
+
+ );
+};
+export default ImageGridSection;
\ No newline at end of file
diff --git a/app/components/body/learn.tsx b/app/components/body/learn.tsx
deleted file mode 100644
index e69de29..0000000
diff --git a/app/routes/news.tsx b/app/routes/news.tsx
index eaba461..dd1e84b 100755
--- a/app/routes/news.tsx
+++ b/app/routes/news.tsx
@@ -1,8 +1,9 @@
-import { CarouselDemo } from "@/components/untils/Carousel";
+import { CarouselDemo } from "@/components/Carousel";
import type { Route } from "./+types/news";
import {Header} from "@/components/header/Header";
import {TopNav} from "@/components/header/TopNav";
import NewsList from "@/components/list/NewsList";
+import ImageGridSection from "@/components/body/ImageGridSection";
export function meta( ) {
return [
{ title: "New React Router App" },
@@ -13,8 +14,10 @@ export function meta( ) {
export default function Home() {
return (
-
+
+
+
);
}