style: 热门榜封面与文件档预览缩略图改 object-contain 完整显示
热门榜单封面、文件档预览缩略图由 object-cover 改为 object-contain(文件预览 加底色),完整显示不裁剪。 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -132,14 +132,26 @@ function PopularRankRow({
|
||||
}`}
|
||||
>
|
||||
{cover ? (
|
||||
<img
|
||||
src={cover}
|
||||
alt=""
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
className="h-full w-full object-cover"
|
||||
onError={() => setCoverFailed(true)}
|
||||
/>
|
||||
<>
|
||||
{/* Same image, blurred + scaled, fills the letterbox area so we
|
||||
see the full poster (no crop) without dead black bars. */}
|
||||
<img
|
||||
src={cover}
|
||||
alt=""
|
||||
aria-hidden
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
className="absolute inset-0 h-full w-full scale-110 object-cover opacity-70 blur-md"
|
||||
/>
|
||||
<img
|
||||
src={cover}
|
||||
alt=""
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
className="relative h-full w-full object-contain"
|
||||
onError={() => setCoverFailed(true)}
|
||||
/>
|
||||
</>
|
||||
) : (
|
||||
<FallbackCover type={r.type} />
|
||||
)}
|
||||
|
||||
@@ -47,7 +47,7 @@ function AttachmentRow({ postId, att }: { postId: string; att: Attachment }) {
|
||||
loading="lazy"
|
||||
decoding="async"
|
||||
onError={() => setPreviewFailed(true)}
|
||||
className="h-16 w-16 shrink-0 rounded-lg object-cover"
|
||||
className="h-16 w-16 shrink-0 rounded-lg bg-[#111116] object-contain"
|
||||
/>
|
||||
) : (
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user