|
|
@ -45,14 +45,24 @@ function MediaCardContent({ |
|
|
|
}`}
|
|
|
|
}`}
|
|
|
|
> |
|
|
|
> |
|
|
|
<div |
|
|
|
<div |
|
|
|
className="relative mb-4 aspect-[2/3] w-full overflow-hidden rounded-xl bg-denim-500 bg-cover bg-center transition-[border-radius] duration-100 group-hover:rounded-lg" |
|
|
|
className={`relative mb-4 aspect-[2/3] w-full overflow-hidden rounded-xl bg-denim-500 bg-cover bg-center transition-[border-radius] duration-100 ${ |
|
|
|
|
|
|
|
closable ? "" : "group-hover:rounded-lg" |
|
|
|
|
|
|
|
}`}
|
|
|
|
style={{ |
|
|
|
style={{ |
|
|
|
backgroundImage: media.poster ? `url(${media.poster})` : undefined, |
|
|
|
backgroundImage: media.poster ? `url(${media.poster})` : undefined, |
|
|
|
}} |
|
|
|
}} |
|
|
|
> |
|
|
|
> |
|
|
|
{series ? ( |
|
|
|
{series ? ( |
|
|
|
<div className="absolute right-2 top-2 rounded-md bg-denim-200 py-1 px-2 transition-colors group-hover:bg-denim-500"> |
|
|
|
<div |
|
|
|
<p className="text-center text-xs font-bold text-slate-400 transition-colors group-hover:text-white"> |
|
|
|
className={`absolute right-2 top-2 rounded-md bg-denim-200 py-1 px-2 transition-colors ${ |
|
|
|
|
|
|
|
closable ? "" : "group-hover:bg-denim-500" |
|
|
|
|
|
|
|
}`}
|
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<p |
|
|
|
|
|
|
|
className={`text-center text-xs font-bold text-slate-400 transition-colors ${ |
|
|
|
|
|
|
|
closable ? "" : "group-hover:text-white" |
|
|
|
|
|
|
|
}`}
|
|
|
|
|
|
|
|
> |
|
|
|
{t("seasons.seasonAndEpisode", { |
|
|
|
{t("seasons.seasonAndEpisode", { |
|
|
|
season: series.season, |
|
|
|
season: series.season, |
|
|
|
episode: series.episode, |
|
|
|
episode: series.episode, |
|
|
@ -125,5 +135,9 @@ export function MediaCard(props: MediaCardProps) { |
|
|
|
)}`;
|
|
|
|
)}`;
|
|
|
|
|
|
|
|
|
|
|
|
if (!props.linkable) return <span>{content}</span>; |
|
|
|
if (!props.linkable) return <span>{content}</span>; |
|
|
|
return <Link to={link}>{content}</Link>; |
|
|
|
return ( |
|
|
|
|
|
|
|
<Link to={link} className={props.closable ? "hover:cursor-default" : ""}> |
|
|
|
|
|
|
|
{content} |
|
|
|
|
|
|
|
</Link> |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|