Compare commits
No commits in common. "ca9d1dd74c2e480d5181f1f90f422bd158d17281" and "1d49f000efd9f3e6ac13da4e459b8e1e600c3335" have entirely different histories.
ca9d1dd74c
...
1d49f000ef
|
|
@ -11,11 +11,7 @@ import {
|
||||||
CarouselPrevious,
|
CarouselPrevious,
|
||||||
type CarouselApi,
|
type CarouselApi,
|
||||||
} from "@/ui/carousel";
|
} from "@/ui/carousel";
|
||||||
<<<<<<< HEAD:app/components/untils/Carousel.tsx
|
|
||||||
import FireNewsList from "./FireNewsList";
|
|
||||||
=======
|
|
||||||
const imageUrls = [
|
const imageUrls = [
|
||||||
>>>>>>> 1d49f000efd9f3e6ac13da4e459b8e1e600c3335:app/components/Carousel.tsx
|
|
||||||
|
|
||||||
"/images/carousel-1.jpg",
|
"/images/carousel-1.jpg",
|
||||||
"/images/carousel-2.jpg",
|
"/images/carousel-2.jpg",
|
||||||
|
|
@ -62,24 +58,12 @@ export function CarouselDemo() {
|
||||||
<CarouselItem key={index}>
|
<CarouselItem key={index}>
|
||||||
<div className="p-1">
|
<div className="p-1">
|
||||||
<Card>
|
<Card>
|
||||||
<<<<<<< HEAD:app/components/untils/Carousel.tsx
|
|
||||||
<CardContent className="flex aspect-square items-center justify-center ">
|
|
||||||
<div
|
|
||||||
className="w-full h-full"
|
|
||||||
style={{
|
|
||||||
backgroundImage: "url('/app/images/header.png')",
|
|
||||||
backgroundSize: '100% 100%',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
</div>
|
|
||||||
=======
|
|
||||||
<CardContent className="flex aspect-square items-center justify-center p-6">
|
<CardContent className="flex aspect-square items-center justify-center p-6">
|
||||||
<img
|
<img
|
||||||
src={src}
|
src={src}
|
||||||
alt={`Slide ${index + 1}`}
|
alt={`Slide ${index + 1}`}
|
||||||
className="w-full h-full object-cover"
|
className="w-full h-full object-cover"
|
||||||
/>
|
/>
|
||||||
>>>>>>> 1d49f000efd9f3e6ac13da4e459b8e1e600c3335:app/components/Carousel.tsx
|
|
||||||
</CardContent>
|
</CardContent>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -90,15 +74,6 @@ export function CarouselDemo() {
|
||||||
<CarouselNext className="absolute right-2 top-1/2 -translate-y-1/2 z-10" />
|
<CarouselNext className="absolute right-2 top-1/2 -translate-y-1/2 z-10" />
|
||||||
</Carousel>
|
</Carousel>
|
||||||
|
|
||||||
{/* 要闻列表 - 右上角 */}
|
|
||||||
<div className="absolute top-0 right-0 w-1/3 h-full">
|
|
||||||
<Card className="h-full">
|
|
||||||
<CardContent className="h-full p-0">
|
|
||||||
<FireNewsList />
|
|
||||||
</CardContent>
|
|
||||||
</Card>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* 分页指示器 - 右下角 */}
|
{/* 分页指示器 - 右下角 */}
|
||||||
<div className="absolute bottom-4 right-4 flex gap-2 z-10">
|
<div className="absolute bottom-4 right-4 flex gap-2 z-10">
|
||||||
{Array.from({ length: count }).map((_, index) => (
|
{Array.from({ length: count }).map((_, index) => (
|
||||||
|
|
|
||||||
|
|
@ -1,63 +0,0 @@
|
||||||
import React from 'react';
|
|
||||||
|
|
||||||
interface NewsItem {
|
|
||||||
content: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
const FireNewsList: React.FC = () => {
|
|
||||||
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亿元...",
|
|
||||||
},
|
|
||||||
|
|
||||||
];
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="bg-gray-200 p-4 rounded-lg">
|
|
||||||
{/* 标题栏 */}
|
|
||||||
<div className="flex justify-between items-center mb-4">
|
|
||||||
<h2 className="text-xl font-bold text-gray-800">烽火要闻</h2>
|
|
||||||
<a className="text-blue-600 hover:text-blue-800 font-medium">
|
|
||||||
查看更多 {'>'}
|
|
||||||
</a>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{/* 新闻列表 */}
|
|
||||||
<div className="space-y-4">
|
|
||||||
{newsItems.map((item, index) => (
|
|
||||||
<div
|
|
||||||
key={index}
|
|
||||||
className="flex p-3 bg-white rounded-md shadow-sm hover:shadow-md transition-shadow duration-200"
|
|
||||||
>
|
|
||||||
|
|
||||||
{/* 内容部分 */}
|
|
||||||
<div className="flex-1 min-w-0">
|
|
||||||
<p className="text-gray-700 text-sm ">
|
|
||||||
{item.content}
|
|
||||||
<a
|
|
||||||
className="text-red-600 ml-1 font-medium hover:text-red-800"
|
|
||||||
>
|
|
||||||
[MORE]
|
|
||||||
</a>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default FireNewsList;
|
|
||||||
Loading…
Reference in New Issue