From 92089fad1fd4f5167acf7a0f3b3c43b08f981dc4 Mon Sep 17 00:00:00 2001 From: jinsir <874871581@qq.com> Date: Wed, 19 Nov 2025 17:20:09 +0800 Subject: [PATCH 1/7] list --- app/components/news/list/NewsList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/news/list/NewsList.tsx b/app/components/news/list/NewsList.tsx index 12a9606..361b0c4 100644 --- a/app/components/news/list/NewsList.tsx +++ b/app/components/news/list/NewsList.tsx @@ -28,7 +28,7 @@ const NewsList: React.FC = () => { const educationNews = mockNewsData.filter((news) => news.type === "教育"); return ( -
+
{/* 使用 Flexbox 将两个列表放在一行 */}
{/* 科技新闻 */} From 32b9554e699a7b1af96fecce39862703df82c492 Mon Sep 17 00:00:00 2001 From: qiuchenfan <2035024011@qq.com> Date: Wed, 19 Nov 2025 20:37:17 +0800 Subject: [PATCH 2/7] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=83=BD=E7=81=AB?= =?UTF-8?q?=E8=A6=81=E9=97=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/news/body/FireNews/FireNewsList.tsx | 4 ++-- app/components/news/body/FireNews/fhyw.tsx | 6 +++--- app/components/news/header/TopNav.tsx | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/components/news/body/FireNews/FireNewsList.tsx b/app/components/news/body/FireNews/FireNewsList.tsx index 5c29c71..dadf8e6 100644 --- a/app/components/news/body/FireNews/FireNewsList.tsx +++ b/app/components/news/body/FireNews/FireNewsList.tsx @@ -57,7 +57,7 @@ export function FireNewsList() { return (
{/* 文章列表 */} -
+
{/* 标题栏 */}

烽火要闻

@@ -71,7 +71,7 @@ export function FireNewsList() { {/* 文章列表 */}
{articles.map((article, index) => ( -
+
{/* 左侧竖线和日期 */}
diff --git a/app/components/news/body/FireNews/fhyw.tsx b/app/components/news/body/FireNews/fhyw.tsx index 7244e31..331a4fc 100644 --- a/app/components/news/body/FireNews/fhyw.tsx +++ b/app/components/news/body/FireNews/fhyw.tsx @@ -3,14 +3,14 @@ import {FireNewsList} from "./FireNewsList"; export function FhywPage() { return( -
+
{/* 轮播背景图 - 确保有明确尺寸 */} -
+
{/* 固定的烽火要闻 */} -
+
diff --git a/app/components/news/header/TopNav.tsx b/app/components/news/header/TopNav.tsx index 8eaf5ed..d9791e5 100644 --- a/app/components/news/header/TopNav.tsx +++ b/app/components/news/header/TopNav.tsx @@ -45,7 +45,7 @@ export function TopNav({ return ( // 将组件宽度调整为1514px,并保持居中 -
+
{/* 搜索框与导航菜单组合 */}
{/* 搜索框 */} From f1cb856d66b72516ae8f10e89abfa81dadfeba19 Mon Sep 17 00:00:00 2001 From: Li1304553726 <1304553726@qq.com> Date: Wed, 19 Nov 2025 22:03:10 +0800 Subject: [PATCH 3/7] 1 --- .../news/body/FireNews/{fhrx.tsx => Hotline.tsx} | 10 +++++----- .../FireNews/{fhyw.tsx => ImportantNews.tsx} | 2 +- .../body/FireNews/{fhjt.tsx => LectureHall.tsx} | 10 +++++----- .../body/FireNews/{fhws.tsx => MicroVision.tsx} | 10 +++++----- app/components/news/body/GrassrootsDynamics.tsx | 8 ++++---- app/components/news/body/ImageGridSection.tsx | 8 ++++---- app/components/news/list/NewsList.tsx | 2 +- app/routes/news.tsx | 16 ++++++++-------- 8 files changed, 33 insertions(+), 33 deletions(-) rename app/components/news/body/FireNews/{fhrx.tsx => Hotline.tsx} (69%) rename app/components/news/body/FireNews/{fhyw.tsx => ImportantNews.tsx} (93%) rename app/components/news/body/FireNews/{fhjt.tsx => LectureHall.tsx} (69%) rename app/components/news/body/FireNews/{fhws.tsx => MicroVision.tsx} (70%) diff --git a/app/components/news/body/FireNews/fhrx.tsx b/app/components/news/body/FireNews/Hotline.tsx similarity index 69% rename from app/components/news/body/FireNews/fhrx.tsx rename to app/components/news/body/FireNews/Hotline.tsx index 2834797..8c1e2ff 100644 --- a/app/components/news/body/FireNews/fhrx.tsx +++ b/app/components/news/body/FireNews/Hotline.tsx @@ -2,15 +2,15 @@ import { CarouselDemo } from "@/components/Carousel"; import {FireNewsList} from "./FireNewsList"; -export function FhrxPage() { +export function Hotline() { return( -
-
+
+
{/* 轮播背景图 */} -
+
-
+
diff --git a/app/components/news/body/FireNews/fhyw.tsx b/app/components/news/body/FireNews/ImportantNews.tsx similarity index 93% rename from app/components/news/body/FireNews/fhyw.tsx rename to app/components/news/body/FireNews/ImportantNews.tsx index 331a4fc..e47b2b3 100644 --- a/app/components/news/body/FireNews/fhyw.tsx +++ b/app/components/news/body/FireNews/ImportantNews.tsx @@ -1,7 +1,7 @@ import { CarouselDemo } from "@/components/Carousel"; import {FireNewsList} from "./FireNewsList"; -export function FhywPage() { +export function ImportantNews() { return(
{/* 轮播背景图 - 确保有明确尺寸 */} diff --git a/app/components/news/body/FireNews/fhjt.tsx b/app/components/news/body/FireNews/LectureHall.tsx similarity index 69% rename from app/components/news/body/FireNews/fhjt.tsx rename to app/components/news/body/FireNews/LectureHall.tsx index 6d380ec..5c530d8 100644 --- a/app/components/news/body/FireNews/fhjt.tsx +++ b/app/components/news/body/FireNews/LectureHall.tsx @@ -2,15 +2,15 @@ import { CarouselDemo } from "@/components/Carousel"; import {FireNewsList} from "./FireNewsList"; -export function FhjtPage() { +export function LectureHall() { return( -
-
+
+
{/* 轮播背景图 */} -
+
-
+
{/* 标题部分 */} diff --git a/app/components/news/body/FireNews/fhws.tsx b/app/components/news/body/FireNews/MicroVision.tsx similarity index 70% rename from app/components/news/body/FireNews/fhws.tsx rename to app/components/news/body/FireNews/MicroVision.tsx index a3f0213..debd79b 100644 --- a/app/components/news/body/FireNews/fhws.tsx +++ b/app/components/news/body/FireNews/MicroVision.tsx @@ -2,9 +2,9 @@ import { CarouselDemo } from "@/components/Carousel"; import {FireNewsList} from "./FireNewsList"; -export function FhwsPage() { +export function MicroVision() { return( -
+
{/* 标题部分 */}
@@ -28,12 +28,12 @@ export function FhwsPage() {
-
+
{/* 轮播背景图 */} -
+
-
+
) diff --git a/app/components/news/body/GrassrootsDynamics.tsx b/app/components/news/body/GrassrootsDynamics.tsx index 79c5d45..6057022 100644 --- a/app/components/news/body/GrassrootsDynamics.tsx +++ b/app/components/news/body/GrassrootsDynamics.tsx @@ -5,9 +5,9 @@ import List from '@/components/news/list/List'; export default function GrassrootsDynamics() { return ( -
-
-
+
+
+
基层动态 {/* 右边列表 */} -
diff --git a/app/components/news/body/ImageGridSection.tsx b/app/components/news/body/ImageGridSection.tsx index 8b92687..b9c79b2 100644 --- a/app/components/news/body/ImageGridSection.tsx +++ b/app/components/news/body/ImageGridSection.tsx @@ -15,7 +15,7 @@ const LearnPage = () => { ]; return ( -
+
{/* 顶部 Logo */}

学习进行时

@@ -69,7 +69,7 @@ const LearnPage = () => {
-
+
{

-
+
{/* 右边容器内容 */} diff --git a/app/components/news/list/NewsList.tsx b/app/components/news/list/NewsList.tsx index 361b0c4..0031a89 100644 --- a/app/components/news/list/NewsList.tsx +++ b/app/components/news/list/NewsList.tsx @@ -28,7 +28,7 @@ const NewsList: React.FC = () => { const educationNews = mockNewsData.filter((news) => news.type === "教育"); return ( -
+
{/* 使用 Flexbox 将两个列表放在一行 */}
{/* 科技新闻 */} diff --git a/app/routes/news.tsx b/app/routes/news.tsx index 58fc702..8b64b0f 100755 --- a/app/routes/news.tsx +++ b/app/routes/news.tsx @@ -7,10 +7,10 @@ import {TopNav} from "@/components/news/header/TopNav"; 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"; -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 { ImportantNews } from "@/components/news/body/FireNews/ImportantNews"; +import { LectureHall } from "@/components/news/body/FireNews/LectureHall"; +import { MicroVision } from "@/components/news/body/FireNews/MicroVision"; +import { Hotline } from "@/components/news/body/FireNews/Hotline"; import { AutoCarouselDemo } from "@/components/AutoCarousel"; export function meta( ) { @@ -26,16 +26,16 @@ export default function Home() {
- +
- - - + + + From 3fd05e9bebdd60c75c93b3b7a7f97af38acb1555 Mon Sep 17 00:00:00 2001 From: Li1304553726 <1304553726@qq.com> Date: Wed, 19 Nov 2025 22:08:03 +0800 Subject: [PATCH 4/7] 1 --- app/components/news/body/ImageGridSection.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/news/body/ImageGridSection.tsx b/app/components/news/body/ImageGridSection.tsx index b9c79b2..c2259d7 100644 --- a/app/components/news/body/ImageGridSection.tsx +++ b/app/components/news/body/ImageGridSection.tsx @@ -15,7 +15,7 @@ const LearnPage = () => { ]; return ( -
+
{/* 顶部 Logo */}

学习进行时

@@ -69,7 +69,7 @@ const LearnPage = () => {
-
+
Date: Wed, 19 Nov 2025 22:26:14 +0800 Subject: [PATCH 5/7] 1 --- app/components/news/body/ImageGridSection.tsx | 12 ++++++++++-- app/components/news/footer/footer.tsx | 11 +++++++++++ app/routes/news.tsx | 2 ++ 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 app/components/news/footer/footer.tsx diff --git a/app/components/news/body/ImageGridSection.tsx b/app/components/news/body/ImageGridSection.tsx index c2259d7..40690d9 100644 --- a/app/components/news/body/ImageGridSection.tsx +++ b/app/components/news/body/ImageGridSection.tsx @@ -15,7 +15,8 @@ const LearnPage = () => { ]; return ( -
+
+
{/* 顶部 Logo */}

学习进行时

@@ -69,7 +70,7 @@ const LearnPage = () => {
-
+
{
+
+
+
烽火动态
+
+
); }; diff --git a/app/components/news/footer/footer.tsx b/app/components/news/footer/footer.tsx new file mode 100644 index 0000000..d009fb0 --- /dev/null +++ b/app/components/news/footer/footer.tsx @@ -0,0 +1,11 @@ +export function Footer() { + return ( +
+
+ 春风拂面花开满园心情愉悦 +
+
+ ) +} \ No newline at end of file diff --git a/app/routes/news.tsx b/app/routes/news.tsx index 8b64b0f..f1132ef 100755 --- a/app/routes/news.tsx +++ b/app/routes/news.tsx @@ -12,6 +12,7 @@ import { LectureHall } from "@/components/news/body/FireNews/LectureHall"; import { MicroVision } from "@/components/news/body/FireNews/MicroVision"; import { Hotline } from "@/components/news/body/FireNews/Hotline"; import { AutoCarouselDemo } from "@/components/AutoCarousel"; +import { Footer } from "@/components/news/footer/footer"; export function meta( ) { return [ @@ -40,6 +41,7 @@ export default function Home() {
+
); } From 986b645df11846413afe80680a1681c2b1b9845e Mon Sep 17 00:00:00 2001 From: qiuchenfan <2035024011@qq.com> Date: Wed, 19 Nov 2025 22:28:28 +0800 Subject: [PATCH 6/7] =?UTF-8?q?=E5=88=9D=E6=AD=A5=E8=AE=BE=E8=AE=A1?= =?UTF-8?q?=E8=BD=AE=E6=92=AD=E5=9B=BE=E9=87=8D=E6=9E=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/news/body/FireNews/fhyw.tsx | 1 + app/components/untils/CarouselPreset.tsx | 96 ++++++++++++++++++++++ 2 files changed, 97 insertions(+) create mode 100644 app/components/untils/CarouselPreset.tsx diff --git a/app/components/news/body/FireNews/fhyw.tsx b/app/components/news/body/FireNews/fhyw.tsx index 331a4fc..0a29978 100644 --- a/app/components/news/body/FireNews/fhyw.tsx +++ b/app/components/news/body/FireNews/fhyw.tsx @@ -1,5 +1,6 @@ import { CarouselDemo } from "@/components/Carousel"; import {FireNewsList} from "./FireNewsList"; +import { CarouselPreset } from "@/components/untils/CarouselPreset"; export function FhywPage() { return( diff --git a/app/components/untils/CarouselPreset.tsx b/app/components/untils/CarouselPreset.tsx new file mode 100644 index 0000000..a9a7c6f --- /dev/null +++ b/app/components/untils/CarouselPreset.tsx @@ -0,0 +1,96 @@ +import * as React from "react" +import Autoplay from "embla-carousel-autoplay" +import { + Carousel, + CarouselContent, + CarouselItem, + CarouselNext, + CarouselPrevious, + type CarouselApi, +} from "@/ui/carousel" +import { CardContent } from "@/ui/card" +import { cn } from "@/lib/utils" + +type Slide = { + key?: React.Key + content: React.ReactNode +} + +type CarouselPresetProps = { + slides: Slide[] + autoplayDelay?: number + showControls?: boolean + showIndicators?: boolean + indicatorVariant?: "dot" | "pill" + className?: string + contentClassName?: string + itemClassName?: string +} + +export function CarouselPreset({ + slides, + autoplayDelay = 3000, + showControls = true, + showIndicators = true, + indicatorVariant = "dot", + className, + contentClassName, + itemClassName, +}: CarouselPresetProps) { + const [api, setApi] = React.useState() + const [current, setCurrent] = React.useState(0) + const [count, setCount] = React.useState(0) + + React.useEffect(() => { + if (!api) return + setCount(api.scrollSnapList().length) + setCurrent(api.selectedScrollSnap()) + api.on("select", () => setCurrent(api.selectedScrollSnap())) + }, [api]) + + return ( +
+ + + {slides.map((slide, index) => ( + + {slide.content} + + ))} + + + {showControls && ( + <> + + + + )} + + + {showIndicators && ( +
+ {Array.from({ length: count }).map((_, index) => ( +
+ )} +
+ ) +} \ No newline at end of file From b63000d42fddceb3e694ef5089632b21c05fcafe Mon Sep 17 00:00:00 2001 From: Li1304553726 <1304553726@qq.com> Date: Thu, 20 Nov 2025 07:59:46 +0800 Subject: [PATCH 7/7] 1 --- app/components/news/body/ImageGridSection.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/news/body/ImageGridSection.tsx b/app/components/news/body/ImageGridSection.tsx index 40690d9..6ba4265 100644 --- a/app/components/news/body/ImageGridSection.tsx +++ b/app/components/news/body/ImageGridSection.tsx @@ -98,7 +98,7 @@ const LearnPage = () => {
-
烽火动态