From eb87de7d5a5259d70d0c209279967ebc6b987e46 Mon Sep 17 00:00:00 2001 From: qiuchenfan <2035024011@qq.com> Date: Thu, 20 Nov 2025 10:24:53 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E6=97=A0=E5=9C=86=E8=A7=92?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/news/body/ImageGridSection.tsx | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/app/components/news/body/ImageGridSection.tsx b/app/components/news/body/ImageGridSection.tsx index a3f8d51..49f7a37 100644 --- a/app/components/news/body/ImageGridSection.tsx +++ b/app/components/news/body/ImageGridSection.tsx @@ -23,12 +23,12 @@ const LearnPage = () => { {/* 主内容区:固定高度,紧凑布局 */} -
+
{/* 左侧图片区 */} -
-
+
+
{/* 上左:第一张图 */} -
+
Image 1 {
{/* 上右:轮播图 */} -
+
{ {/* 下三图 */} {[3, 4, 5].map((i) => ( -
+
{`Image {
{/* 左边容器内容 */} @@ -89,10 +89,10 @@ const LearnPage = () => {
-
+ book {/* 右边容器内容 */}

习近平著作选读

From 23ff02673e94fd26ed2b02ce4b8eb0faf9b5531f Mon Sep 17 00:00:00 2001 From: Li1304553726 <1304553726@qq.com> Date: Thu, 20 Nov 2025 10:50:06 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E8=BD=AE=E6=92=AD=E5=9B=BE=E5=9B=BE?= =?UTF-8?q?=E7=89=87=E8=87=AA=E9=80=82=E5=BA=94?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/Carousel.tsx | 24 +++++++++--------- app/components/news/header/TopNav.tsx | 35 +++++++++++++-------------- 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/app/components/Carousel.tsx b/app/components/Carousel.tsx index da0724e..6150276 100755 --- a/app/components/Carousel.tsx +++ b/app/components/Carousel.tsx @@ -87,27 +87,29 @@ export function CarouselDemo({ }), ]} setApi={setApi} // 将 Embla 实例保存到 state 中 - className="w-full h-full" // 占满容器 + className="w-full" // 占满容器 > {/* 轮播内容区域 */} - + {/* 遍历图片数组,为每张图创建一个轮播项 */} {imageUrls.map((src, index) => ( {/* 内部包裹层:无内边距,占满 */} -
+
{/* 使用 CardContent 包裹图片,移除默认间距 */} - + {/* 图片元素:自动填充容器,保持比例裁剪 */} - {`Slide +
{/* 可选:设置固定宽高比 */} + {`Slide +
diff --git a/app/components/news/header/TopNav.tsx b/app/components/news/header/TopNav.tsx index d9791e5..16ddd42 100644 --- a/app/components/news/header/TopNav.tsx +++ b/app/components/news/header/TopNav.tsx @@ -1,5 +1,5 @@ import { Search } from 'lucide-react'; -import React, { useState,useEffect} from 'react'; +import React, { useState, useEffect } from 'react'; import { Button } from '@/ui/button'; interface MenuItem { label: string; @@ -25,11 +25,11 @@ export function TopNav({ activeKey: externalActiveKey, onSearch, onItemClick, -}: TopNavProps){ +}: TopNavProps) { const [internalActiveKey, setInternalActiveKey] = useState('home'); const currentActiveKey = externalActiveKey !== undefined ? externalActiveKey : internalActiveKey; const [searchKeyword, setSearchKeyword] = useState(''); - + const handleSearchSubmit = (e: React.FormEvent) => { e.preventDefault(); @@ -49,24 +49,24 @@ export function TopNav({ {/* 搜索框与导航菜单组合 */}
{/* 搜索框 */} - +
- 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" /> + 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" />
- - - {/* 导航菜单 */} + + + {/* 导航菜单 */}