feat(supporters): 유튜브·로고 단계 — collect_youtube.mjs(API 집계·정보형 필터·쇼츠 판별), 워커 youtube 단계(로고·파비콘·homeVideos), 글↔영상 매칭, 카드 로고 대체, 기존 글 보존 재실행. 원진 재배포

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Haewon KamandClaude Fable 5.1 committed 2026-09-08 09:09:00 +09:00
1 parent 572978c316
commit eb873bc43a
12 files changed
+353 -15

No files matched your search

+6 -4
View File
@@ -4,11 +4,13 @@ interface Props { post: any }
const { post } = Astro.props;
const d = post.data;
const v0 = d.videos?.[0] ?? d.video;
const thumb = d.thumbnail ?? d.hero?.src ?? (v0 ? `https://i.ytimg.com/vi/${v0.id}/hqdefault.jpg` : S.buildingImage?.src ?? '/favicon.svg');
const thumbAlt = d.hero?.alt ?? (v0 ? `유튜브 영상 썸네일: ${v0.title}` : S.buildingImage?.alt ?? `${fact.shortName} 건물 외관`);
// 썸네일 우선순위: 지정 썸네일 → 히어로 → 첫 영상 → 건물 사진 → 병원 로고. 전부 없으면 이미지 없이 낸다(프레임워크 기본 파비콘을 쓰지 않는다).
const thumb = d.thumbnail ?? d.hero?.src ?? (v0 ? `https://i.ytimg.com/vi/${v0.id}/hqdefault.jpg` : S.buildingImage?.src ?? S.logo?.src ?? null);
const thumbAlt = d.hero?.alt ?? (v0 ? `유튜브 영상 썸네일: ${v0.title}` : S.buildingImage?.alt ?? S.logo?.alt ?? `${fact.shortName} 로고`);
const isLogo = !d.thumbnail && !d.hero?.src && !v0 && !S.buildingImage?.src && Boolean(S.logo?.src);
---
<article class="card has-thumb">
<a class="thumb" href={`/posts/${post.id}`}><img src={thumb} alt={thumbAlt} loading="lazy" /></a>
<article class={`card ${thumb ? 'has-thumb' : ''}`}>
{thumb && <a class={`thumb ${isLogo ? 'thumb-logo' : ''}`} href={`/posts/${post.id}`}><img src={thumb} alt={thumbAlt} loading="lazy" /></a>}
<div class="body">
<div class="cat">{d.category} · {CATEGORY_LABELS[d.category]}</div>
<h3><a href={`/posts/${post.id}`}>{d.title}</a></h3>
+2
View File
@@ -239,6 +239,8 @@ td { color: var(--slate-700); }
.figure.portrait img { aspect-ratio: auto; }
.card.has-thumb { padding: 0; overflow: hidden; }
.card.has-thumb .thumb img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.card.has-thumb .thumb.thumb-logo { display: block; background: #F7F8FC; aspect-ratio: 16 / 9; }
.card.has-thumb .thumb.thumb-logo img { object-fit: contain; padding: 18% 22%; box-sizing: border-box; }
.card.has-thumb .body { padding: 1.2rem 1.4rem 1.4rem; display: flex; flex-direction: column; gap: 0.5rem; flex: 1; }
.card.has-thumb .body p { flex: 1; }
.doctor-strip { display: flex; gap: 1rem; align-items: center; background: #fff; border: 1px solid var(--slate-100); border-radius: 16px; padding: 1rem 1.2rem; margin: 1.4rem 0; box-shadow: var(--shadow); }