mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-05-19 20:37:30 +08:00
fix: add tooltip back #close 161
This commit is contained in:
@@ -263,7 +263,7 @@ export default function VideoCard({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className='group relative w-full rounded-lg bg-transparent cursor-pointer transition-all duration-300 ease-in-out hover:scale-[1.05]'
|
className='group relative w-full rounded-lg bg-transparent cursor-pointer transition-all duration-300 ease-in-out hover:scale-[1.05] hover:z-[9999]'
|
||||||
onClick={handleClick}
|
onClick={handleClick}
|
||||||
>
|
>
|
||||||
{/* 海报容器 */}
|
{/* 海报容器 */}
|
||||||
@@ -361,9 +361,16 @@ export default function VideoCard({
|
|||||||
|
|
||||||
{/* 标题与来源 */}
|
{/* 标题与来源 */}
|
||||||
<div className='mt-2 text-center'>
|
<div className='mt-2 text-center'>
|
||||||
<span className='block text-sm font-semibold truncate text-gray-900 dark:text-gray-100 transition-colors duration-300 ease-in-out group-hover:text-green-600 dark:group-hover:text-green-400'>
|
<div className='relative'>
|
||||||
{actualTitle}
|
<span className='block text-sm font-semibold truncate text-gray-900 dark:text-gray-100 transition-colors duration-300 ease-in-out group-hover:text-green-600 dark:group-hover:text-green-400 peer'>
|
||||||
</span>
|
{actualTitle}
|
||||||
|
</span>
|
||||||
|
{/* 自定义 tooltip */}
|
||||||
|
<div className='absolute bottom-full left-1/2 transform -translate-x-1/2 mb-2 px-3 py-1 bg-gray-800 text-white text-xs rounded-md shadow-lg opacity-0 invisible peer-hover:opacity-100 peer-hover:visible transition-all duration-200 ease-out delay-100 whitespace-nowrap pointer-events-none'>
|
||||||
|
{actualTitle}
|
||||||
|
<div className='absolute top-full left-1/2 transform -translate-x-1/2 w-0 h-0 border-l-4 border-r-4 border-t-4 border-transparent border-t-gray-800'></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
{config.showSourceName && source_name && (
|
{config.showSourceName && source_name && (
|
||||||
<span className='block text-xs text-gray-500 dark:text-gray-400 mt-1'>
|
<span className='block text-xs text-gray-500 dark:text-gray-400 mt-1'>
|
||||||
<span className='inline-block border rounded px-2 py-0.5 border-gray-500/60 dark:border-gray-400/60 transition-all duration-300 ease-in-out group-hover:border-green-500/60 group-hover:text-green-600 dark:group-hover:text-green-400'>
|
<span className='inline-block border rounded px-2 py-0.5 border-gray-500/60 dark:border-gray-400/60 transition-all duration-300 ease-in-out group-hover:border-green-500/60 group-hover:text-green-600 dark:group-hover:text-green-400'>
|
||||||
|
|||||||
Reference in New Issue
Block a user