feat: 예능 썸네일 없을 때 카테고리 색상 기본 이미지 표시
- 썸네일 없으면 카테고리 색상 배경 + Tv 아이콘 표시 - PC/모바일 모두 적용 - 항상 flex 레이아웃 유지 (썸네일 유무와 무관) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
4bc188b4f9
commit
2a1849f608
2 changed files with 24 additions and 10 deletions
|
|
@ -487,17 +487,24 @@ function MobileVarietySection({ schedule }) {
|
|||
|
||||
return (
|
||||
<div className="bg-white rounded-xl overflow-hidden shadow-sm">
|
||||
<div className={`${hasThumbnail ? 'flex' : ''}`}>
|
||||
<div className="flex">
|
||||
{/* 썸네일 */}
|
||||
{hasThumbnail && (
|
||||
<div className="flex-shrink-0 w-32">
|
||||
<div className="flex-shrink-0 w-28">
|
||||
{hasThumbnail ? (
|
||||
<img
|
||||
src={schedule.thumbnailUrl}
|
||||
alt={schedule.title}
|
||||
className="w-full h-full object-cover"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
) : (
|
||||
<div
|
||||
className="w-full h-full flex items-center justify-center"
|
||||
style={{ backgroundColor: `${schedule.category?.color || '#06b6d4'}15` }}
|
||||
>
|
||||
<Tv size={32} style={{ color: schedule.category?.color || '#06b6d4' }} strokeWidth={1.5} />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* 콘텐츠 */}
|
||||
<div className="flex-1 p-4 flex flex-col justify-between">
|
||||
|
|
|
|||
|
|
@ -13,17 +13,24 @@ function VarietySection({ schedule }) {
|
|||
|
||||
return (
|
||||
<div className="bg-white rounded-2xl overflow-hidden shadow-sm border border-gray-100">
|
||||
<div className={`${hasThumbnail ? 'flex' : ''}`}>
|
||||
<div className="flex">
|
||||
{/* 왼쪽: 썸네일 */}
|
||||
{hasThumbnail && (
|
||||
<div className="flex-shrink-0 w-44">
|
||||
<div className="flex-shrink-0 w-44">
|
||||
{hasThumbnail ? (
|
||||
<img
|
||||
src={schedule.thumbnailUrl}
|
||||
alt={schedule.title}
|
||||
className="w-full h-full object-cover"
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
) : (
|
||||
<div
|
||||
className="w-full h-full flex items-center justify-center"
|
||||
style={{ backgroundColor: `${schedule.category?.color || '#06b6d4'}15` }}
|
||||
>
|
||||
<Tv size={40} style={{ color: schedule.category?.color || '#06b6d4' }} strokeWidth={1.5} />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* 오른쪽: 콘텐츠 */}
|
||||
<div className="flex-1 p-5 flex flex-col justify-between">
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue