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 = () => {