Skip to content

Commit 0815ed0

Browse files
valvesssclaude
andcommitted
feat(worldcup): flags in the fixture selector chips
Each chip shows both nations' flags around the team names, so the Round-of-32 picker is scannable at a glance. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 98c6fe3 commit 0815ed0

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

site/src/pages/worldcup.astro

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ const pct = (x) => (x * 100).toFixed(0) + '%';
6868
{wcl.next ? <div class="nm reveal">
6969
<div class="nm-chips" id="nm-chips">
7070
{wcl.upcoming.map((f, i) => <button class="nm-chip" data-i={i}>
71-
<span class="nm-chip-d">{f.date.slice(5)}</span>{f.home} × {f.away}</button>)}
71+
<span class="nm-chip-d">{f.date.slice(5)}</span>
72+
{f.home_flag && <img class="nm-chip-flag" src={`https://flagcdn.com/w20/${f.home_flag}.png`} alt="" width="18" height="13" />}
73+
{f.home}<span class="nm-chip-x">×</span>{f.away}
74+
{f.away_flag && <img class="nm-chip-flag" src={`https://flagcdn.com/w20/${f.away_flag}.png`} alt="" width="18" height="13" />}
75+
</button>)}
7276
</div>
7377

7478
<div class="nm-card">
@@ -431,6 +435,9 @@ python analysis/export_worldcup_data.py # regenerate this page's data</code></
431435
.nm-chip:hover { border-color: var(--accent-soft); color: var(--ink); }
432436
.nm-chip.on { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); font-weight: 600; }
433437
.nm-chip-d { font-family: var(--mono); font-size: .72rem; color: var(--ink-faint); margin-right: 7px; }
438+
.nm-chip { display: inline-flex; align-items: center; gap: 6px; }
439+
.nm-chip-flag { border-radius: 2px; box-shadow: 0 1px 2px rgba(0,0,0,.15); flex: 0 0 auto; }
440+
.nm-chip-x { color: var(--ink-faint); margin: 0 1px; }
434441
.nm-card { border: 1px solid var(--accent-soft); border-radius: 16px; padding: 28px; background: var(--surface-2);
435442
box-shadow: 0 0 0 3px var(--accent-soft); }
436443
.nm-fixture { display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; gap: 14px; }

0 commit comments

Comments
 (0)