From e66014eb95613736bb64a6ba2b33cea319396c80 Mon Sep 17 00:00:00 2001 From: jinsir <874871581@qq.com> Date: Wed, 19 Nov 2025 15:35:19 +0800 Subject: [PATCH 01/10] list --- app/components/list/NewsList.tsx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/app/components/list/NewsList.tsx b/app/components/list/NewsList.tsx index e219af9..dd9a476 100644 --- a/app/components/list/NewsList.tsx +++ b/app/components/list/NewsList.tsx @@ -35,11 +35,11 @@ const NewsList: React.FC = () => {
{/* 标题栏:独立于列表之外 */}
-
+
科技新闻
-
@@ -60,11 +60,11 @@ const NewsList: React.FC = () => {
{/* 标题栏:独立于列表之外 */}
-
+
教育新闻
-
From fc6b0d3a7cd1bb26e55ff9424cc612aecb217c9d Mon Sep 17 00:00:00 2001 From: qiuchenfan <2035024011@qq.com> Date: Wed, 19 Nov 2025 15:53:36 +0800 Subject: [PATCH 02/10] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AF=BC=E8=88=AA?= =?UTF-8?q?=E6=A0=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/news/header/TopNav.tsx | 62 +++++++++++++++------------ 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/app/components/news/header/TopNav.tsx b/app/components/news/header/TopNav.tsx index f5dfd1f..d9247a3 100644 --- a/app/components/news/header/TopNav.tsx +++ b/app/components/news/header/TopNav.tsx @@ -1,6 +1,6 @@ import { Search } from 'lucide-react'; import React, { useState } from 'react'; - +import { Button } from '@/ui/button'; interface MenuItem { label: string; key: string; @@ -60,46 +60,54 @@ export function TopNav({ }; return ( -
+ // 将组件宽度调整为1514px,并保持居中 +
{/* 搜索框与导航菜单组合 */} -
+
{/* 搜索框 */} -
-
- setSearchKeyword(e.target.value)} - placeholder="搜索..." - className="pl-10 pr-4 py-2 text-sm rounded-lg border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent w-64 transition-all duration-200 hover:shadow-sm" - /> - - - -
-
- {/* 导航菜单 */} -
    +
    + + + setSearchKeyword(e.target.value)} + className="pl-5 pr-4 py-2 text-sm h-full border border-gray-300 focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-transparent w-64 transition-all duration-200 hover:shadow-sm" /> +
    + + + {/* 导航菜单 */} +
      {menuItems.map((item) => { - const isActive = currentActiveKey === item.key; // 判断当前项是否激活 + const isActive = currentActiveKey === item.key; return ( -
    • +
    • ); })}
    + + +
); -}; +}; \ No newline at end of file From fffc57ce8324ada7bd45dfd10c1059fe29df454b Mon Sep 17 00:00:00 2001 From: qiuchenfan <2035024011@qq.com> Date: Wed, 19 Nov 2025 16:01:05 +0800 Subject: [PATCH 03/10] =?UTF-8?q?s=E5=88=A0=E9=99=A4=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/news/header/TopNav.tsx | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/app/components/news/header/TopNav.tsx b/app/components/news/header/TopNav.tsx index d52002f..8eaf5ed 100644 --- a/app/components/news/header/TopNav.tsx +++ b/app/components/news/header/TopNav.tsx @@ -29,15 +29,7 @@ export function TopNav({ const [internalActiveKey, setInternalActiveKey] = useState('home'); const currentActiveKey = externalActiveKey !== undefined ? externalActiveKey : internalActiveKey; const [searchKeyword, setSearchKeyword] = useState(''); - // const [activeIndex, setActiveIndex] = useState(0); - // const [prevIndex, setPrevIndex] = useState(0); - - // 监听激活项变化,更新索引和动画方向 - // useEffect(() => { - // const currentIndex = menuItems.findIndex(item => item.key === currentActiveKey); - // setPrevIndex(activeIndex); - // setActiveIndex(currentIndex); - // }, [currentActiveKey, menuItems, activeIndex]); + const handleSearchSubmit = (e: React.FormEvent) => { e.preventDefault(); From 42730b0479782f0d7ad225a4340965323f428ad0 Mon Sep 17 00:00:00 2001 From: Li1304553726 <1304553726@qq.com> Date: Wed, 19 Nov 2025 16:03:12 +0800 Subject: [PATCH 04/10] 1 --- app/components/Carousel.tsx | 19 ++++++++++--------- app/components/news/body/FireNews/fhyw.tsx | 7 +++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/components/Carousel.tsx b/app/components/Carousel.tsx index ee00eb0..2a6d040 100755 --- a/app/components/Carousel.tsx +++ b/app/components/Carousel.tsx @@ -25,6 +25,7 @@ export function CarouselDemo() { const [current, setCurrent] = React.useState(0); const [count, setCount] = React.useState(0); const totalSlides = imageUrls.length; + React.useEffect(() => { if (!api) return; @@ -53,18 +54,18 @@ export function CarouselDemo() { {Array.from({ length: totalSlides }).map((_, index) => (
- - -
{/* 移除了 aspect-square */} +
-
- - + > +
+
))} diff --git a/app/components/news/body/FireNews/fhyw.tsx b/app/components/news/body/FireNews/fhyw.tsx index 45d7877..9239ae6 100644 --- a/app/components/news/body/FireNews/fhyw.tsx +++ b/app/components/news/body/FireNews/fhyw.tsx @@ -1,17 +1,16 @@ import { CarouselDemo } from "@/components/Carousel"; import {FireNewsList} from "./FireNewsList"; - export function FhywPage() { return( -
+
{/* 轮播背景图 */} -
+
{/* 固定的烽火要闻 */} -
+
From 5d68fd09f8230b57a141981558bdeb799acf294d Mon Sep 17 00:00:00 2001 From: jinsir <874871581@qq.com> Date: Wed, 19 Nov 2025 16:06:11 +0800 Subject: [PATCH 05/10] =?UTF-8?q?=E9=98=B4=E5=BD=B1=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/list/List.tsx | 4 ++-- app/components/list/NewsList.tsx | 2 +- app/components/news/body/GrassrootsDynamics.tsx | 9 +++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/app/components/list/List.tsx b/app/components/list/List.tsx index ae0b0ff..b830a2f 100644 --- a/app/components/list/List.tsx +++ b/app/components/list/List.tsx @@ -19,11 +19,11 @@ const NewsItem: React.FC = ({ title = '', time = '', url = '' }) => { {/* 标题部分:左侧 */}
-

{title}

+

{title}

{/* 时间部分:右侧 */} -

{time}

+

{time}

); diff --git a/app/components/list/NewsList.tsx b/app/components/list/NewsList.tsx index dd9a476..12a9606 100644 --- a/app/components/list/NewsList.tsx +++ b/app/components/list/NewsList.tsx @@ -28,7 +28,7 @@ const NewsList: React.FC = () => { const educationNews = mockNewsData.filter((news) => news.type === "教育"); return ( -
+
{/* 使用 Flexbox 将两个列表放在一行 */}
{/* 科技新闻 */} diff --git a/app/components/news/body/GrassrootsDynamics.tsx b/app/components/news/body/GrassrootsDynamics.tsx index 3c69570..706bbdc 100644 --- a/app/components/news/body/GrassrootsDynamics.tsx +++ b/app/components/news/body/GrassrootsDynamics.tsx @@ -3,19 +3,20 @@ import List from '@/components/list/List'; export default function GrassrootsDynamics() { return ( -
+
-
+
基层动态
{/* 右边列表 */} -
+
From 10e859bd28e7641cac9e5e624ee9357b7c370bb2 Mon Sep 17 00:00:00 2001 From: Li1304553726 <1304553726@qq.com> Date: Wed, 19 Nov 2025 16:08:37 +0800 Subject: [PATCH 06/10] 1 --- app/components/Carousel.tsx | 19 +++++++++---------- app/components/news/body/FireNews/fhyw.tsx | 4 ++-- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/app/components/Carousel.tsx b/app/components/Carousel.tsx index 2a6d040..ee00eb0 100755 --- a/app/components/Carousel.tsx +++ b/app/components/Carousel.tsx @@ -25,7 +25,6 @@ export function CarouselDemo() { const [current, setCurrent] = React.useState(0); const [count, setCount] = React.useState(0); const totalSlides = imageUrls.length; - React.useEffect(() => { if (!api) return; @@ -54,18 +53,18 @@ export function CarouselDemo() { {Array.from({ length: totalSlides }).map((_, index) => (
- {/* 移除了 aspect-square */} -
+
-
- + > +
+
+
))} diff --git a/app/components/news/body/FireNews/fhyw.tsx b/app/components/news/body/FireNews/fhyw.tsx index 9239ae6..7244e31 100644 --- a/app/components/news/body/FireNews/fhyw.tsx +++ b/app/components/news/body/FireNews/fhyw.tsx @@ -4,8 +4,8 @@ import {FireNewsList} from "./FireNewsList"; export function FhywPage() { return(
- {/* 轮播背景图 */} -
+ {/* 轮播背景图 - 确保有明确尺寸 */} +
From 13407f8a3cf0efc208d7f268f7a344eb47623ab3 Mon Sep 17 00:00:00 2001 From: Li1304553726 <1304553726@qq.com> Date: Wed, 19 Nov 2025 16:13:11 +0800 Subject: [PATCH 07/10] 1 --- app/components/news/body/FireNews/fhjt.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/news/body/FireNews/fhjt.tsx b/app/components/news/body/FireNews/fhjt.tsx index 943221a..6d380ec 100644 --- a/app/components/news/body/FireNews/fhjt.tsx +++ b/app/components/news/body/FireNews/fhjt.tsx @@ -4,7 +4,7 @@ import {FireNewsList} from "./FireNewsList"; export function FhjtPage() { return( -
+
{/* 轮播背景图 */}
From 87751644114a00e02c449c1590cfa5c4983d9994 Mon Sep 17 00:00:00 2001 From: Li1304553726 <1304553726@qq.com> Date: Wed, 19 Nov 2025 16:13:18 +0800 Subject: [PATCH 08/10] 1 --- app/components/news/body/FireNews/fhrx.tsx | 2 +- app/components/news/body/FireNews/fhws.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/news/body/FireNews/fhrx.tsx b/app/components/news/body/FireNews/fhrx.tsx index 6192610..2834797 100644 --- a/app/components/news/body/FireNews/fhrx.tsx +++ b/app/components/news/body/FireNews/fhrx.tsx @@ -4,7 +4,7 @@ import {FireNewsList} from "./FireNewsList"; export function FhrxPage() { return( -
+
{/* 轮播背景图 */}
diff --git a/app/components/news/body/FireNews/fhws.tsx b/app/components/news/body/FireNews/fhws.tsx index 7c04f18..a3f0213 100644 --- a/app/components/news/body/FireNews/fhws.tsx +++ b/app/components/news/body/FireNews/fhws.tsx @@ -4,7 +4,7 @@ import {FireNewsList} from "./FireNewsList"; export function FhwsPage() { return( -
+
{/* 标题部分 */}
From c10df53e5e0caf61a5538c53a847ce8be2c568ff Mon Sep 17 00:00:00 2001 From: jinsir <874871581@qq.com> Date: Wed, 19 Nov 2025 16:25:28 +0800 Subject: [PATCH 09/10] =?UTF-8?q?=E7=A7=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/news/body/GrassrootsDynamics.tsx | 4 +++- app/components/{ => news}/list/List.tsx | 0 app/components/{ => news}/list/NewsData.tsx | 0 app/components/{ => news}/list/NewsList.tsx | 0 app/routes/news.tsx | 2 +- 5 files changed, 4 insertions(+), 2 deletions(-) rename app/components/{ => news}/list/List.tsx (100%) rename app/components/{ => news}/list/NewsData.tsx (100%) rename app/components/{ => news}/list/NewsList.tsx (100%) diff --git a/app/components/news/body/GrassrootsDynamics.tsx b/app/components/news/body/GrassrootsDynamics.tsx index 706bbdc..79c5d45 100644 --- a/app/components/news/body/GrassrootsDynamics.tsx +++ b/app/components/news/body/GrassrootsDynamics.tsx @@ -1,5 +1,7 @@ import React from 'react'; -import List from '@/components/list/List'; +import List from '@/components/news/list/List'; + + export default function GrassrootsDynamics() { return ( diff --git a/app/components/list/List.tsx b/app/components/news/list/List.tsx similarity index 100% rename from app/components/list/List.tsx rename to app/components/news/list/List.tsx diff --git a/app/components/list/NewsData.tsx b/app/components/news/list/NewsData.tsx similarity index 100% rename from app/components/list/NewsData.tsx rename to app/components/news/list/NewsData.tsx diff --git a/app/components/list/NewsList.tsx b/app/components/news/list/NewsList.tsx similarity index 100% rename from app/components/list/NewsList.tsx rename to app/components/news/list/NewsList.tsx diff --git a/app/routes/news.tsx b/app/routes/news.tsx index 6daf3fb..58fc702 100755 --- a/app/routes/news.tsx +++ b/app/routes/news.tsx @@ -4,7 +4,7 @@ import Integrated from "@/components/news/body/Integrated"; import CultureBgPage from "@/components/news/body/Culturebg"; import {Header} from "@/components/news/header/Header"; import {TopNav} from "@/components/news/header/TopNav"; -import NewsList from "@/components/list/NewsList"; +import NewsList from "@/components/news/list/NewsList"; import ImageGridSection from "@/components/news/body/ImageGridSection"; import GrassrootsDynamics from "@/components/news/body/GrassrootsDynamics"; import { FhywPage } from "@/components/news/body/FireNews/fhyw"; From f3a90dbc983a3ca2bdb7175e81cb3f2c8584fbb0 Mon Sep 17 00:00:00 2001 From: Li1304553726 <1304553726@qq.com> Date: Wed, 19 Nov 2025 16:30:47 +0800 Subject: [PATCH 10/10] 1 --- app/components/body/AutoCarousel.tsx | 82 ------------------- app/components/body/FireNews/FireNewsList.tsx | 63 -------------- app/components/body/FireNews/fhjt.tsx | 39 --------- app/components/body/FireNews/fhrx.tsx | 39 --------- app/components/body/FireNews/fhws.tsx | 38 --------- app/components/body/FireNews/fhyw.tsx | 21 ----- 6 files changed, 282 deletions(-) delete mode 100644 app/components/body/AutoCarousel.tsx delete mode 100644 app/components/body/FireNews/FireNewsList.tsx delete mode 100644 app/components/body/FireNews/fhjt.tsx delete mode 100644 app/components/body/FireNews/fhrx.tsx delete mode 100644 app/components/body/FireNews/fhws.tsx delete mode 100644 app/components/body/FireNews/fhyw.tsx diff --git a/app/components/body/AutoCarousel.tsx b/app/components/body/AutoCarousel.tsx deleted file mode 100644 index 01a32b1..0000000 --- a/app/components/body/AutoCarousel.tsx +++ /dev/null @@ -1,82 +0,0 @@ -// src/components/CarouselDemo.tsx -import * as React from "react"; -import Autoplay from "embla-carousel-autoplay"; - -import { Card, CardContent } from "@/ui/card"; -import { - Carousel, - CarouselContent, - CarouselItem, - CarouselNext, - CarouselPrevious, -} from "@/ui/carousel"; - -const imageUrls = [ - "/images/carousel-1.jpg", - "/images/carousel-2.jpg", - "/images/carousel-3.jpg", - "/images/carousel-4.jpg", - "/images/carousel-5.jpg", - "/images/carousel-6.jpg", -]; - -export function AutoCarouselDemo() { - return ( -
- {/* 相对定位 宽度100% 水平居中 隐藏溢出 */} -
-
- {/* 绝对定位 上下与父对齐 水平左对齐 背景渐变从左 从黑70%到透明 */} - - - {imageUrls.map((src, index) => ( - - {/* 基宽 中屏 大屏 防止收缩 相对定位 - 内边距 过渡500ms 鼠标悬停时放大1.05倍 鼠标手型 - 隐藏溢出 移除边框 中等阴影 - 弹性布局 正方形 垂直居中 水平居中 内边距0 相对 - */} -
- - - {`Slide - - -
-
- ))} -
- - {/* 左右箭头控制 */} - - -
-
- ); -} \ No newline at end of file diff --git a/app/components/body/FireNews/FireNewsList.tsx b/app/components/body/FireNews/FireNewsList.tsx deleted file mode 100644 index 77601c8..0000000 --- a/app/components/body/FireNews/FireNewsList.tsx +++ /dev/null @@ -1,63 +0,0 @@ -import React from 'react'; - -interface NewsItem { - content: string; -} - -export function FireNewsList() { - const newsItems: NewsItem[] = [ - { - content: "记者从16日召开的海南省政府新闻发布会上获悉,2018年,海南旅游总收入达1,262万人次,支出达399.7亿元...", - }, - { - content: "记者从16日召开的海南省政府新闻发布会上获悉,2018年,海南旅游总收入达1,262万人次,支出达399.7亿元...", - }, - { - content: "记者从16日召开的海南省政府新闻发布会上获悉,2018年,海南旅游总收入达1,262万人次,支出达399.7亿元...", - }, - { - content: "记者从16日召开的海南省政府新闻发布会上获悉,2018年,海南旅游总收入达1,262万人次,支出达399.7亿元...", - }, - { - content: "记者从16日召开的海南省政府新闻发布会上获悉,2018年,海南旅游总收入达1,262万人次,支出达399.7亿元...", - }, - { - content: "记者从16日召开的海南省政府新闻发布会上获悉,2018年,海南旅游总收入达1,262万人次,支出达399.7亿元...", - }, - ]; - - return ( -
- {/* 标题栏 */} -
-

烽火要闻

- - 查看更多 {'>'} - -
- - {/* 新闻列表 */} -
- {newsItems.map((item, index) => ( -
- - {/* 内容部分 */} -
-

- {item.content} - - [MORE] - -

-
-
- ))} -
-
- ); -}; diff --git a/app/components/body/FireNews/fhjt.tsx b/app/components/body/FireNews/fhjt.tsx deleted file mode 100644 index 6ab127b..0000000 --- a/app/components/body/FireNews/fhjt.tsx +++ /dev/null @@ -1,39 +0,0 @@ - -import { CarouselDemo } from "@/components/Carousel"; -import {FireNewsList} from "./FireNewsList"; - - -export function FhjtPage() { - return( -
- {/* 轮播背景图 */} -
- -
- -
- {/* 标题部分 */} -
-

烽火讲堂

- {/* 蓝色装饰线 */} -
-
- {/* 列表 */} -
- -
- 一等奖 -
- -
- 二等奖 -
- -
- 三等奖 -
-
-
-
- ) -} \ No newline at end of file diff --git a/app/components/body/FireNews/fhrx.tsx b/app/components/body/FireNews/fhrx.tsx deleted file mode 100644 index a9f9f4f..0000000 --- a/app/components/body/FireNews/fhrx.tsx +++ /dev/null @@ -1,39 +0,0 @@ - -import { CarouselDemo } from "@/components/Carousel"; -import {FireNewsList} from "./FireNewsList"; - - -export function FhrxPage() { - return( -
- {/* 轮播背景图 */} -
- -
- -
- {/* 标题部分 */} -
-

烽火热线

- {/* 蓝色装饰线 */} -
-
- {/* 列表 */} -
- -
- 信箱 -
- -
- 问答 -
- -
- 心灵 -
-
-
-
- ) -} \ No newline at end of file diff --git a/app/components/body/FireNews/fhws.tsx b/app/components/body/FireNews/fhws.tsx deleted file mode 100644 index 14f0832..0000000 --- a/app/components/body/FireNews/fhws.tsx +++ /dev/null @@ -1,38 +0,0 @@ - -import { CarouselDemo } from "@/components/Carousel"; -import {FireNewsList} from "./FireNewsList"; - - -export function FhwsPage() { - return( -
-
- {/* 标题部分 */} -
-

烽火微视

- {/* 蓝色装饰线 */} -
-
- {/* 列表 */} -
- -
- 一 -
- -
- 二 -
- -
- 三 -
-
-
- {/* 轮播背景图 */} -
- -
-
- ) -} \ No newline at end of file diff --git a/app/components/body/FireNews/fhyw.tsx b/app/components/body/FireNews/fhyw.tsx deleted file mode 100644 index a160ee1..0000000 --- a/app/components/body/FireNews/fhyw.tsx +++ /dev/null @@ -1,21 +0,0 @@ - - -import { CarouselDemo } from "@/components/Carousel"; -import {FireNewsList} from "./FireNewsList"; - - -export function FhywPage() { - return( -
- {/* 轮播背景图 */} -
- -
- - {/* 固定的烽火要闻 */} -
- -
-
- ) -} \ No newline at end of file