refacto: Cover review
This commit is contained in:
@@ -37,6 +37,7 @@ export function HeroSection({ series }: HeroSectionProps) {
|
||||
alt={t("home.hero.coverAlt", { title: series.metadata.title })}
|
||||
quality={25}
|
||||
sizes="(max-width: 640px) 50vw, (max-width: 1024px) 33vw, 16.666vw"
|
||||
showProgressUi={false}
|
||||
/>
|
||||
</div>
|
||||
))}
|
||||
|
||||
@@ -128,19 +128,30 @@ function MediaCard({ item, onClick }: MediaCardProps) {
|
||||
>
|
||||
<div className="relative aspect-[2/3] bg-muted">
|
||||
{isSeries ? (
|
||||
<SeriesCover series={item as KomgaSeries} alt={`Couverture de ${title}`} quality={100} />
|
||||
<>
|
||||
<SeriesCover
|
||||
series={item as KomgaSeries}
|
||||
alt={`Couverture de ${title}`}
|
||||
quality={100}
|
||||
/>
|
||||
<div className="absolute inset-0 bg-black/60 opacity-0 hover:opacity-100 transition-opacity duration-200 flex flex-col justify-end p-3">
|
||||
<h3 className="font-medium text-sm text-white line-clamp-2">{title}</h3>
|
||||
<p className="text-xs text-white/80 mt-1">
|
||||
{item.booksCount} tome{item.booksCount > 1 ? "s" : ""}
|
||||
</p>
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
<BookCover book={item as KomgaBook} alt={`Couverture de ${title}`} quality={100} />
|
||||
<>
|
||||
<BookCover
|
||||
book={item as KomgaBook}
|
||||
alt={`Couverture de ${title}`}
|
||||
quality={100}
|
||||
showControls={false}
|
||||
overlayVariant="home"
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
{/* Overlay avec les informations au survol */}
|
||||
<div className="absolute inset-0 bg-black/60 opacity-0 hover:opacity-100 transition-opacity duration-200 flex flex-col justify-end p-3">
|
||||
<h3 className="font-medium text-sm text-white line-clamp-2">{title}</h3>
|
||||
{isSeries && (
|
||||
<p className="text-xs text-white/80 mt-1">
|
||||
{item.booksCount} tome{item.booksCount > 1 ? "s" : ""}
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user