diff --git a/src/components/AggregateCard.tsx b/src/components/AggregateCard.tsx index e2d6f0f..5a889bd 100644 --- a/src/components/AggregateCard.tsx +++ b/src/components/AggregateCard.tsx @@ -121,32 +121,25 @@ const AggregateCard: React.FC = ({ year ? `&year=${encodeURIComponent(year)}` : '' }&type=${mostFrequentEpisodes > 1 ? 'tv' : 'movie'}`} > -
+
{/* 封面图片 2:3 */} -
+
{first.title} - {/* 集数指示器 - 绿色小圆球 */} - {mostFrequentEpisodes && mostFrequentEpisodes > 1 && ( -
- - {mostFrequentEpisodes} - -
- )} - - {/* Hover 层 & 播放按钮 */} -
+ {/* Hover 效果层 */} +
+ {/* 播放按钮 */}
{ @@ -168,15 +161,25 @@ const AggregateCard: React.FC = ({
+ {/* 集数矩形展示框 - 不透明,无hover效果 */} + {mostFrequentEpisodes && mostFrequentEpisodes > 1 && ( +
+ + {mostFrequentEpisodes} + +
+ )} + + {/* 豆瓣链接按钮 */} {mostFrequentDoubanId && ( e.stopPropagation()} - className='absolute top-2 left-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200' + className='absolute top-2 left-2 scale-90 group-hover:scale-100 opacity-0 group-hover:opacity-100 transition-all duration-500 cubic-bezier(0.4,0,0.2,1)' > -
+
@@ -184,13 +187,9 @@ const AggregateCard: React.FC = ({
{/* 标题 */} -
-
- - {first.title} - -
-
+ + {first.title} +
); diff --git a/src/components/DemoCard.tsx b/src/components/DemoCard.tsx index 0af6db6..a8dee60 100644 --- a/src/components/DemoCard.tsx +++ b/src/components/DemoCard.tsx @@ -25,8 +25,7 @@ function SearchCircle({ viewBox='0 0 44 44' fill='none' xmlns='http://www.w3.org/2000/svg' - className={className} - style={{ display: 'block' }} + className={`${className} block relative`} > - - -
- -
-
-
+ +
+ +
+
); } @@ -65,62 +54,60 @@ const DemoCard = ({ id, title, poster, rate, type }: DemoCardProps) => { return (
- {/* 海报图片 - 2:3 比例 */} -
+ {/* 海报图片区域 */} +
{title} + {/* 评分徽章 */} {rate && ( -
+
{rate}
)} - {/* Hover 效果 */} -
-
-
setHover(true)} - onMouseLeave={() => setHover(false)} - className={`transition-all duration-200 ${ - hover ? 'scale-110' : '' - }`} - > - -
+ + {/* 悬浮层 - 搜索按钮 */} +
+
setHover(true)} + onMouseLeave={() => setHover(false)} + className={`transition-all duration-500 cubic-bezier(0.4, 0, 0.2, 1) ${ + hover ? 'scale-110 rotate-12' : 'scale-90' + }`} + > +
- {/* 顶部左侧 🔗 链接按钮 */} + + {/* 外部链接按钮 */} e.stopPropagation()} - className='absolute top-2 left-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200' + className='absolute top-2 left-2 scale-90 group-hover:scale-100 opacity-0 group-hover:opacity-100 transition-all duration-500 cubic-bezier(0.4, 0, 0.2, 1)' > - + {/* 信息层 */} -
-
- - {title} - -
-
+ + {title} +
); }; diff --git a/src/components/VideoCard.tsx b/src/components/VideoCard.tsx index 4453a62..dc84051 100644 --- a/src/components/VideoCard.tsx +++ b/src/components/VideoCard.tsx @@ -1,4 +1,4 @@ -import { Heart, LinkIcon } from 'lucide-react'; +import { Heart, Link as LinkIcon } from 'lucide-react'; import Image from 'next/image'; import Link from 'next/link'; import { useRouter } from 'next/navigation'; @@ -58,7 +58,7 @@ function PlayCircleSolid({ viewBox='0 0 44 44' fill='none' xmlns='http://www.w3.org/2000/svg' - className={className} + className={`${className} block relative`} > -
- {/* 海报图片 - 2:3 比例 */} -
+
+ {/* 海报图片容器 */} +
{title} - {/* Hover 效果 */} -
+ {/* Hover 效果层 */} +
+ {/* 播放按钮 */}
{ @@ -188,111 +206,88 @@ export default function VideoCard({
-
+ + {/* 右侧操作按钮组 */} +
{!hideCheckCircle && ( )} - {favorited && ( - - )} - {!favorited && ( - - - - )} + + + +
- {/* 集数指示器 - 绿色小圆球 */} - {episodes && episodes > 1 && ( -
- + {/* 集数矩形展示框 - 增加条件判断:仅当有多个集数且已播放时显示 */} + {episodes && episodes > 1 && currentEpisode && ( +
+ + {currentEpisode} + + / + {episodes}
)} - {/* 播放进度条 */} - {progress !== undefined && ( -
-
-
- )} - - {/* 当前播放集数 */} - {currentEpisode && episodes && episodes > 1 && ( -
- - {currentEpisode} - -
- )} - + {/* 豆瓣链接按钮 */} {douban_id && from === 'search' && ( e.stopPropagation()} - className='absolute top-2 left-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200' + className='absolute top-2 left-2 scale-90 group-hover:scale-100 opacity-0 group-hover:opacity-100 transition-all duration-500 cubic-bezier(0.4,0,0.2,1)' > -
+
)}
- {/* 信息层 */} -
-
- - {title} - - {source && ( - - - {source_name} - - - )} + {/* 播放进度条 - 移至图片容器外部,标题上方 */} + {progress !== undefined && ( +
+
-
+ )} - {/* 收藏夹始终显示红心 */} - {favorited && ( -
- - + {/* 信息层 */} + + {title} + + + {/* 来源信息 */} + {source && ( + + + {source_name} -
+ )}