Skip to content

Commit 532f939

Browse files
committed
feat[ui]: penalty shootout score styling
1 parent 4d0913e commit 532f939

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111
- **Stoppage Time Display** - Goals in stoppage time now display properly (e.g., "45+2'")
1212
- **More Leagues Supported** - Added Gaucho Brasilian competition and multiple Portuguese leagues and competitions (Thanks @felipeolibon and @rmscoelho!)
1313
- **Official Match Highlights** - Finished matches now display clickable links to official highlight videos when available!
14-
- **Penalty Shootout Results** - Finished matches now display penalty scores when matches went to shootout
14+
- **Penalty Shootout Results** - Finished matches now display penalty scores when matches went to shootouts
1515
- **New Contributing Docs** - Added documentation for contributors, including contributing guidelines and process
1616

1717
### Changed

internal/ui/list_panels.go

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -625,9 +625,32 @@ func renderStatsMatchDetailsPanel(width, height int, details *api.MatchDetails,
625625
if details.Attendance > 0 {
626626
headerLines = append(headerLines, neonLabelStyle.Render("Attendance: ")+neonValueStyle.Render(formatNumber(details.Attendance)))
627627
}
628+
// ═══════════════════════════════════════════════
629+
// PENALTIES - Prominent display when match went to shootout
630+
// ═══════════════════════════════════════════════
628631
if details.Penalties != nil && details.Penalties.Home != nil && details.Penalties.Away != nil {
629-
penText := fmt.Sprintf("%d - %d", *details.Penalties.Home, *details.Penalties.Away)
630-
headerLines = append(headerLines, neonLabelStyle.Render("Penalties: ")+neonValueStyle.Render(penText))
632+
headerLines = append(headerLines, "")
633+
634+
// Penalty header with special styling
635+
penaltyHeader := lipgloss.NewStyle().
636+
Foreground(neonRed).
637+
Bold(true).
638+
Width(contentWidth).
639+
Align(lipgloss.Center).
640+
Render("PENALTIES")
641+
headerLines = append(headerLines, penaltyHeader)
642+
643+
// Penalty score with compact styling
644+
penaltyScoreText := fmt.Sprintf("%d - %d", *details.Penalties.Home, *details.Penalties.Away)
645+
penaltyScore := lipgloss.NewStyle().
646+
Foreground(neonCyan).
647+
Bold(true).
648+
Width(contentWidth).
649+
Align(lipgloss.Center).
650+
Render(penaltyScoreText)
651+
headerLines = append(headerLines, penaltyScore)
652+
653+
headerLines = append(headerLines, "")
631654
}
632655

633656
// ═══════════════════════════════════════════════

0 commit comments

Comments
 (0)