feat: add image preview for large view cards

- Extract YouTube video thumbnails from URLs
- Display thumbnail images as background in large preview cards
- Add gradient overlay for better text contrast
- Fallback to icon placeholder for non-YouTube URLs
- Handle multiple YouTube URL formats (watch, youtu.be, shorts)
- Gracefully handle missing images with icon fallback
This commit is contained in:
Gigi
2025-10-03 10:16:22 +02:00
parent bd3193957c
commit 57c5be9907
3 changed files with 67 additions and 7 deletions

View File

@@ -838,16 +838,28 @@ body {
width: 100%;
height: 180px;
background: #1a1a1a;
background-size: cover;
background-position: center;
background-repeat: no-repeat;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
transition: background 0.2s ease;
transition: all 0.2s ease;
border-bottom: 1px solid #333;
position: relative;
}
.large-preview-image:hover {
background: #222;
opacity: 0.9;
}
.large-preview-image::after {
content: '';
position: absolute;
inset: 0;
background: linear-gradient(to bottom, transparent 60%, rgba(0,0,0,0.3) 100%);
pointer-events: none;
}
.preview-placeholder {