58 lines
1.4 KiB
HTML
58 lines
1.4 KiB
HTML
<!-- 통계 숫자 카드: 큰 숫자 + 라벨 + 설명 -->
|
|
<!--
|
|
📋 card-stat-number
|
|
─────────────────
|
|
용도: KPI, 성과 수치, 목표 달성률, 비용 절감율 등 핵심 지표 강조
|
|
슬롯: stats[] (각 항목에 number, unit, label, description, color)
|
|
Figma 참고: 건설 정책 수치 (30% 절감, 40% 감소 등)
|
|
-->
|
|
<div class="block-stat" style="--st-count: {{ stats|length }}">
|
|
{% for stat in stats %}
|
|
<div class="st-card">
|
|
<div class="st-number" style="color: {{ stat.color | default('#2563eb') }}">
|
|
{{ stat.number }}<span class="st-unit">{{ stat.unit | default('') }}</span>
|
|
</div>
|
|
<div class="st-label">{{ stat.label }}</div>
|
|
{% if stat.description %}<div class="st-desc">{{ stat.description }}</div>{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
|
|
<style>
|
|
.block-stat {
|
|
display: grid;
|
|
grid-template-columns: repeat(var(--st-count, 3), 1fr);
|
|
gap: 16px;
|
|
}
|
|
.st-card {
|
|
text-align: center;
|
|
padding: 20px 12px;
|
|
background: #f8fafc;
|
|
border-radius: var(--radius);
|
|
border: 1px solid #e2e8f0;
|
|
}
|
|
.st-number {
|
|
font-size: 36px;
|
|
font-weight: 900;
|
|
line-height: 1.2;
|
|
}
|
|
.st-unit {
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
margin-left: 2px;
|
|
}
|
|
.st-label {
|
|
font-size: 14px;
|
|
font-weight: 700;
|
|
color: #1e293b;
|
|
margin-top: 6px;
|
|
}
|
|
.st-desc {
|
|
font-size: 12px;
|
|
color: #64748b;
|
|
margin-top: 4px;
|
|
line-height: 1.5;
|
|
white-space: pre-line;
|
|
}
|
|
</style>
|