Files
C.E.L_Slide_test2/templates/blocks/cards/hero-icon-cards.html
kyeongmin 05703c8e72 WIP: hero-icon-cards_1 블록 + 오답노트 + figma 관련 파일
- hero-icon-cards_1.html: hero-icon-cards 변형 (icon → 소제목+불릿 계층)
- compare-detail-gradient.html: 하단 2열 비교 블록 (Figma Frame 4 기반)
- 오답노트.md: 절대 하지 말아야 하는 실수 목록
- figma_to_html.py: Figma→HTML 변환 스크립트
- static/figma-assets/: Figma export 이미지 (배지, 화살표)
- 주의: compare-detail-gradient CSS 폰트 크기가 임의 수정됨 — 원본 복원 필요

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-07 17:14:09 +09:00

99 lines
3.7 KiB
HTML

<!-- 히어로 문구 + 아이콘 카드: 큰 선언문 + 3D 리본 배지 + N열 아이콘 카드 -->
<!--
📋 hero-icon-cards
─────────────────
용도: 핵심 목표/가치를 선언하고 N개 키워드 카드로 시각화
슬롯: statement, badge_title, cards[] (icon, title, subtitle)
Figma 원본: Frame 2 (Solution 제작 목표 — 다크 테마, 빨간 리본+테두리, 5열 카드)
수학적 계산:
badge 508x94 at y=1431, box at y=1449, frame_w=1808
scale = 1200/1808 = 0.6637
ribbon: 337x62px, fold_offset: 12px, ribbon_below_fold: 50px
box padding-top: 56px
-->
<div class="block-hic">
{% if statement %}
<div class="hic-statement">{{ statement }}</div>
{% endif %}
<div class="hic-card-area">
{% if badge_title %}
<div class="hic-ribbon">
<img src="{{ ribbon_image | default('/static/figma-assets/badge_solution.png') }}" class="hic-ribbon-img" alt="">
<span class="hic-ribbon-text">{{ badge_title }}</span>
</div>
{% endif %}
<div class="hic-box">
<div class="hic-cards">
{% for card in cards %}
<div class="hic-card">
{% if card.icon %}<div class="hic-icon">{{ card.icon }}</div>{% endif %}
<div class="hic-title">{{ card.title }}</div>
{% if card.subtitle %}<div class="hic-sub">({{ card.subtitle }})</div>{% endif %}
</div>
{% if not loop.last %}<div class="hic-sep"></div>{% endif %}
{% endfor %}
</div>
</div>
</div>
</div>
<style>
.block-hic {
display: flex; flex-direction: column; align-items: center;
width: 100%; background: #0a0a0a; border-radius: 16px;
padding: 36px 32px 28px; overflow: visible;
}
/* ── Hero Statement ── */
.hic-statement {
text-align: center; font-size: 28px; font-weight: var(--weight-bold, 700);
color: #fff; line-height: 1.6; word-break: keep-all;
margin-bottom: 28px; padding: 0 24px;
}
.hic-statement strong { font-weight: 900; font-size: 1.1em; }
.hic-statement em { color: #ef4444; font-style: normal; font-weight: 900; font-size: 1.15em; }
/*
리본+박스 수학적 계산 (Figma 원본):
badge 508x94 at y=1431, box at y=1449
접힘선 = 18px = 이미지 높이의 19.1%
scale(1200/1808) → ribbon 337x62, fold top에서 12px, 아래 50px
*/
.hic-card-area { position: relative; width: 100%; margin-top: 20px; }
.hic-ribbon {
position: absolute;
top: -12px; /* 접힘선이 박스 top border와 정확히 일치 */
left: 50%; transform: translateX(-50%);
z-index: 2; width: 337px; text-align: center;
}
.hic-ribbon-img { width: 100%; height: auto; display: block; }
.hic-ribbon-text {
position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
font-size: 20px; font-weight: 700; color: #fff;
letter-spacing: 0.03em; white-space: nowrap;
text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
/* 빨간 테두리 흰 박스 */
.hic-box {
position: relative; background: #fff;
border: 6px solid #9b1b1b; border-radius: 20px;
padding: 56px 8px 8px; /* top: ribbon_below(50) + 6px 여유 */
}
.hic-cards { display: flex; align-items: stretch; width: 100%; }
.hic-card {
flex: 1; display: flex; flex-direction: column;
align-items: center; justify-content: center; text-align: center;
padding: 16px 12px 20px; gap: 8px;
}
.hic-sep { width: 1px; background: #e0e0e0; align-self: stretch; margin: 8px 0; }
.hic-icon { font-size: 48px; line-height: 1; margin-bottom: 8px; }
.hic-icon img { width: 64px; height: 64px; object-fit: contain; }
.hic-title { font-size: 20px; font-weight: var(--weight-black, 900); color: #1a1a1a; line-height: 1.3; }
.hic-sub { font-size: 15px; font-weight: var(--weight-medium, 500); color: #666; }
</style>