Merge branch 'main' of http://113.45.67.59:3003/qiuchenfan/news
This commit is contained in:
commit
4e377d4e8b
|
|
@ -69,7 +69,7 @@ export function FireNewsList() {
|
|||
</div>
|
||||
|
||||
{/* 文章列表 */}
|
||||
<div className="space-y-1 h-200 overflow-hidden hover:overflow-auto scroll-container">
|
||||
<div className="space-y-5 h-200 overflow-hidden hover:overflow-auto scroll-container">
|
||||
{articles.map((article, index) => (
|
||||
<div key={index} className="flex items-center space-x-3 pb-1">
|
||||
{/* 左侧竖线和日期 */}
|
||||
|
|
|
|||
|
|
@ -31,8 +31,9 @@ export function ImportantNews() {
|
|||
}));
|
||||
|
||||
return(
|
||||
<div className="relative w-5/6 h-220 mx-auto overflow-hidden ">
|
||||
{/* 轮播背景图 - 确保有明确尺寸 */}
|
||||
<div className="relative w-5/6 mx-auto overflow-hidden">
|
||||
{/* 轮播背景图 - 使用 aspect-ratio 或固定高度 */}
|
||||
<div className="w-full relative" style={{ aspectRatio: '16/9' }}> {/* 或者设置固定高度 */}
|
||||
<div className="absolute top-0 left-0 w-full h-full">
|
||||
<CarouselDemo
|
||||
paginationPosition="left"
|
||||
|
|
@ -41,9 +42,10 @@ export function ImportantNews() {
|
|||
</div>
|
||||
|
||||
{/* 固定的烽火要闻 */}
|
||||
<div className="absolute top-0 right-0 w-1/3 h-220 p-1">
|
||||
<div className="absolute top-0 right-0 w-1/3 h-full p-1">
|
||||
<FireNewsList />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
|
@ -59,7 +59,7 @@ export function TopNav({
|
|||
|
||||
return (
|
||||
// 将组件宽度调整为1514px,并保持居中
|
||||
<div className="h-full w-full mx-auto flex items-center px-8 bg-white border-t-16 border-b-16 border-[#1f79bf]">
|
||||
<div className="h-full w-full mx-auto flex items-center px-8 bg-white border-t-16 border-b-16 border-[#176cad]">
|
||||
{/* 搜索框与导航菜单组合 */}
|
||||
<div className="flex items-center justify-start gap-30 ml-45 ">
|
||||
{/* 导航菜单 */}
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ const NewsItem: React.FC<NewsProps> = ({ title = '', time = '', url = '' }) => {
|
|||
onClick={() => url && window.open(url)} // 点击时打开链接
|
||||
className="flex items-center justify-between hover:text-blue-600 cursor-pointer transition duration-300 ease-in-out"
|
||||
>
|
||||
<h3 className="text-lg font-semibold text-gray-600 hover:text-blue-400 transition duration-300 ease-in-out">{title}</h3>
|
||||
<p className="text-sm text-gray-500">{time}</p>
|
||||
<h3 className="text-lg font-semibold text-gray-800 hover:text-blue-400 transition duration-300 ease-in-out">{title}</h3>
|
||||
<p className="text-sm text-gray-800">{time}</p>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
|
@ -28,7 +28,7 @@ const NewsList: React.FC = () => {
|
|||
const educationNews = mockNewsData.filter((news) => news.type === "教育");
|
||||
|
||||
return (
|
||||
<div className=" p-18 rounded-2xl w-10/11 mx-auto">
|
||||
<div className=" pt-10 pb-10 rounded-2xl w-5/6 mx-auto">
|
||||
{/* 使用 Flexbox 将两个列表放在一行 */}
|
||||
<div className="flex gap-8">
|
||||
{/* 科技新闻 */}
|
||||
|
|
@ -38,7 +38,7 @@ const NewsList: React.FC = () => {
|
|||
<div className="bg-[#1c6cab] text-white px-6 py-3 font-bold text-4xl">
|
||||
科技新闻
|
||||
</div>
|
||||
<button className="text-base text-blue-200 hover:text-blue-400 transition duration-200 pl-6 pr-6">
|
||||
<button className="text-base text-blue-300 hover:text-blue-400 transition duration-200 pl-6 pr-6">
|
||||
【查看更多】
|
||||
</button>
|
||||
</div>
|
||||
|
|
@ -63,7 +63,7 @@ const NewsList: React.FC = () => {
|
|||
<div className="bg-[#1c6cab] text-white px-6 py-3 font-bold text-4xl">
|
||||
教育新闻
|
||||
</div>
|
||||
<button className="text-base text-blue-200 hover:text-blue-400 transition duration-200 pl-6 pr-6">
|
||||
<button className="text-base text-blue-300 hover:text-blue-400 transition duration-200 pl-6 pr-6">
|
||||
【查看更多】
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue