pcbjam/site/src/components/StatBar.astro

48 lines
887 B
Text
Raw Normal View History

---
/** StatBar — thin band of mono numerals (§8). */
interface Props {
stats: { value: string; label: string }[];
}
const { stats } = Astro.props;
---
<dl class="statbar">
{
stats.map((s) => (
<div class="stat">
<dt class="stat-value">{s.value}</dt>
<dd class="stat-label muted">{s.label}</dd>
</div>
))
}
</dl>
<style>
.statbar {
display: grid;
grid-template-columns: repeat(4, 1fr);
gap: 1.5rem;
margin: 0;
text-align: center;
}
.stat {
display: flex;
flex-direction: column;
gap: 0.35rem;
}
.stat-value {
font-family: var(--font-mono);
font-size: clamp(1.2rem, 2.4vw, 1.6rem);
font-weight: 700;
color: var(--fg);
}
.stat-label {
margin: 0;
font-size: 0.85rem;
}
@media (max-width: 680px) {
.statbar {
grid-template-columns: 1fr 1fr;
}
}
</style>