diff --git a/app/components/Carousel.tsx b/app/components/Carousel.tsx index 8e01115..51c40f0 100755 --- a/app/components/Carousel.tsx +++ b/app/components/Carousel.tsx @@ -53,7 +53,7 @@ export function CarouselDemo() {
diff --git a/app/components/FireNews/FireNewsList.tsx b/app/components/FireNews/FireNewsList.tsx deleted file mode 100644 index 77601c8..0000000 --- a/app/components/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/news/body/FireNews/FireNewsList.tsx b/app/components/news/body/FireNews/FireNewsList.tsx new file mode 100644 index 0000000..5c29c71 --- /dev/null +++ b/app/components/news/body/FireNews/FireNewsList.tsx @@ -0,0 +1,98 @@ +import React from 'react'; + +export function FireNewsList() { + const articles = [ + { + date: { month: '11', day: '2025-02' }, + title: '记者从16日召开的海南省政府新闻发布会上获悉,2018年,海南旅游总收入达1,262人次,支出达399.7亿元...', + isHighlighted: false, + }, + { + date: { month: '11', day: '2025-02' }, + title: '记者从16日召开的海南省政府新闻发布会上获悉,2018年,海南旅游总收入达1,262人次,支出达399.7亿元...', + isHighlighted: false, + }, + { + date: { month: '11', day: '2025-02' }, + title: '记者从16日召开的海南省政府新闻发布会上获悉,2018年,海南旅游总收入达1,262人次,支出达399.7亿元...', + isHighlighted: false, + }, + { + date: { month: '11', day: '2025-02' }, + title: '记者从16日召开的海南省政府新闻发布会上获悉,2018年,海南旅游总收入达1,262人次,支出达399.7亿元...', + isHighlighted: true, + }, + { + date: { month: '11', day: '2025-02' }, + title: '记者从16日召开的海南省政府新闻发布会上获悉,2018年,海南旅游总收入达1,262人次,支出达399.7亿元...', + isHighlighted: true, + }, + { + date: { month: '11', day: '2025-02' }, + title: '记者从16日召开的海南省政府新闻发布会上获悉,2018年,海南旅游总收入达1,262人次,支出达399.7亿元...', + isHighlighted: false, + }, + { + date: { month: '11', day: '2025-02' }, + title: '记者从16日召开的海南省政府新闻发布会上获悉,2018年,海南旅游总收入达1,262人次,支出达399.7亿元...', + isHighlighted: true, + }, + { + date: { month: '11', day: '2025-02' }, + title: '记者从16日召开的海南省政府新闻发布会上获悉,2018年,海南旅游总收入达1,262人次,支出达399.7亿元...', + isHighlighted: false, + }, + { + date: { month: '11', day: '2025-02' }, + title: '记者从16日召开的海南省政府新闻发布会上获悉,2018年,海南旅游总收入达1,262人次,支出达399.7亿元...', + isHighlighted: false, + }, + { + date: { month: '11', day: '2025-02' }, + title: '记者从16日召开的海南省政府新闻发布会上获悉,2018年,海南旅游总收入达1,262人次,支出达399.7亿元...', + isHighlighted: false, + }, + ]; + + return ( +
+ {/* 文章列表 */} +
+ {/* 标题栏 */} +
+

烽火要闻

+ +
+ + {/* 文章列表 */} +
+ {articles.map((article, index) => ( +
+ {/* 左侧竖线和日期 */} +
+
+
+
{article.date.month}
+
{article.date.day}
+
+
+ {/* 右侧文章内容 */} +
+

+ {article.title} + + 【MORE】 + +

+
+
+ ))} +
+
+
+ ); +}; diff --git a/app/components/FireNews/fhjt.tsx b/app/components/news/body/FireNews/fhjt.tsx similarity index 64% rename from app/components/FireNews/fhjt.tsx rename to app/components/news/body/FireNews/fhjt.tsx index c728b79..0a2c55a 100644 --- a/app/components/FireNews/fhjt.tsx +++ b/app/components/news/body/FireNews/fhjt.tsx @@ -1,15 +1,17 @@ -import { CarouselDemo } from "../Carousel"; +import { CarouselDemo } from "@/components/Carousel"; import {FireNewsList} from "./FireNewsList"; export function FhjtPage() { return( -
- {/* 轮播背景图 */} -
- -
- +
+
+ {/* 轮播背景图 */} +
+ +
+
+
{/* 标题部分 */}
diff --git a/app/components/FireNews/fhrx.tsx b/app/components/news/body/FireNews/fhrx.tsx similarity index 88% rename from app/components/FireNews/fhrx.tsx rename to app/components/news/body/FireNews/fhrx.tsx index bc0b108..b9e6639 100644 --- a/app/components/FireNews/fhrx.tsx +++ b/app/components/news/body/FireNews/fhrx.tsx @@ -1,10 +1,10 @@ -import { CarouselDemo } from "../Carousel"; +import { CarouselDemo } from "@/components/Carousel"; import {FireNewsList} from "./FireNewsList"; export function FhrxPage() { return( -
+
{/* 轮播背景图 */}
diff --git a/app/components/FireNews/fhws.tsx b/app/components/news/body/FireNews/fhws.tsx similarity index 80% rename from app/components/FireNews/fhws.tsx rename to app/components/news/body/FireNews/fhws.tsx index 4d2d440..bf4bba0 100644 --- a/app/components/FireNews/fhws.tsx +++ b/app/components/news/body/FireNews/fhws.tsx @@ -1,19 +1,19 @@ -import { CarouselDemo } from "../Carousel"; +import { CarouselDemo } from "@/components/Carousel"; import {FireNewsList} from "./FireNewsList"; export function FhwsPage() { return( -
+
{/* 标题部分 */} -
+

烽火微视

{/* 蓝色装饰线 */}
{/* 列表 */} -
+
一 diff --git a/app/components/FireNews/fhyw.tsx b/app/components/news/body/FireNews/fhyw.tsx similarity index 89% rename from app/components/FireNews/fhyw.tsx rename to app/components/news/body/FireNews/fhyw.tsx index 1bf6b02..45d7877 100644 --- a/app/components/FireNews/fhyw.tsx +++ b/app/components/news/body/FireNews/fhyw.tsx @@ -1,4 +1,4 @@ -import { CarouselDemo } from "../Carousel"; +import { CarouselDemo } from "@/components/Carousel"; import {FireNewsList} from "./FireNewsList"; diff --git a/app/components/body/GrassrootsDynamics.tsx b/app/components/news/body/GrassrootsDynamics.tsx similarity index 92% rename from app/components/body/GrassrootsDynamics.tsx rename to app/components/news/body/GrassrootsDynamics.tsx index 6ce395a..d8ceb34 100644 --- a/app/components/body/GrassrootsDynamics.tsx +++ b/app/components/news/body/GrassrootsDynamics.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import List from '../list/List'; +import List from '@/components/list/List'; export default function GrassrootsDynamics() { return ( diff --git a/app/components/body/ImageGridSection.tsx b/app/components/news/body/ImageGridSection.tsx similarity index 100% rename from app/components/body/ImageGridSection.tsx rename to app/components/news/body/ImageGridSection.tsx diff --git a/app/components/news/header/Header.tsx b/app/components/news/header/Header.tsx index 96d3624..c0af4ae 100644 --- a/app/components/news/header/Header.tsx +++ b/app/components/news/header/Header.tsx @@ -7,7 +7,7 @@ export function Header(){ // setInterval是 JavaScript 中的一个全局函数,用于重复执行代码 const timer = setInterval(() => { setCurrentTime(new Date()); - }, 1000); // 每秒更新一次 + }, 24*60*1000); // 每天更新一次 // 清理定时器 return () => clearInterval(timer);// 只在组件卸载时清理定时器 @@ -15,8 +15,8 @@ export function Header(){ return (
{/* 时间显示 只显示日期: "2025/3/15"*/}
diff --git a/app/routes/news.tsx b/app/routes/news.tsx index 76a8479..0fac963 100755 --- a/app/routes/news.tsx +++ b/app/routes/news.tsx @@ -5,12 +5,12 @@ 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 ImageGridSection from "@/components/body/ImageGridSection"; -import GrassrootsDynamics from "@/components/body/GrassrootsDynamics"; -import { FhywPage } from "@/components/FireNews/fhyw"; -import { FhjtPage } from "@/components/FireNews/fhjt"; -import { FhwsPage } from "@/components/FireNews/fhws"; -import { FhrxPage } from "@/components/FireNews/fhrx"; +import ImageGridSection from "@/components/news/body/ImageGridSection"; +import GrassrootsDynamics from "@/components/news/body/GrassrootsDynamics"; +import { FhywPage } from "@/components/news/body/FireNews/fhyw"; +import { FhjtPage } from "@/components/news/body/FireNews/fhjt"; +import { FhwsPage } from "@/components/news/body/FireNews/fhws"; +import { FhrxPage } from "@/components/news/body/FireNews/fhrx"; import { AutoCarouselDemo } from "@/components/AutoCarousel"; export function meta( ) { return [ @@ -28,13 +28,17 @@ export default function Home() { - - - - - - - +
+ + + + + + + +
); } diff --git a/app/images/header.png b/public/images/header.png similarity index 100% rename from app/images/header.png rename to public/images/header.png diff --git a/public/images/jcdt.png b/public/images/jcdt.png new file mode 100644 index 0000000..529c734 Binary files /dev/null and b/public/images/jcdt.png differ