style: redesign Match-Cards — balanced layout, better tipped state

- Move kickoff time above teams row instead of between flags
- Center separator: slim ":" instead of 100px time block
- Use shortName for teams (prevents overflow on mobile)
- Tipped state: clean green bar with icon, label, score, edit hint
  instead of scattered checkmark + underline link

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ronny
2026-04-11 21:29:18 +02:00
parent 5af41a8a2c
commit 8bc00f12aa
2 changed files with 90 additions and 25 deletions
+16 -23
View File
@@ -117,22 +117,28 @@ export default function MatchCard({ match, onTip }: Props) {
)}
</div>
{/* Kickoff time — above the teams row */}
{!isFinished && !isLive && (
<div className={styles.kickoffRow}>
<span className={styles.kickoffTime}>{formatKickoff(match.utcDate)}</span>
</div>
)}
{/* Teams + Score */}
<div className={styles.matchRow}>
{/* Home */}
<div className={styles.teamHome}>
<span className={styles.teamName}>{match.homeTeam.name}</span>
<span className={styles.teamName}>{match.homeTeam.shortName}</span>
<FlagBox crest={match.homeTeam.crest} name={match.homeTeam.name} />
</div>
{/* Score / Kickoff time */}
{/* Center: Score or VS separator */}
<div className={styles.scoreBox}>
{isFinished || isLive ? (
<div className={styles.scoreStack}>
<span className={styles.score}>
{match.score.home ?? ''}&nbsp;:&nbsp;{match.score.away ?? ''}
</span>
{/* For live: show user's tip next to score for comparison */}
{isLive && hasTip && (
<span className={styles.liveTipCompare}>
Tipp: {match.userTip!.home}:{match.userTip!.away}
@@ -140,16 +146,14 @@ export default function MatchCard({ match, onTip }: Props) {
)}
</div>
) : (
<div className={styles.kickoffCenter}>
<span className={styles.kickoffCenterTime}>{formatKickoff(match.utcDate)}</span>
</div>
<span className={styles.vsSeparator}>:</span>
)}
</div>
{/* Away */}
<div className={styles.teamAway}>
<FlagBox crest={match.awayTeam.crest} name={match.awayTeam.name} />
<span className={styles.teamName}>{match.awayTeam.name}</span>
<span className={styles.teamName}>{match.awayTeam.shortName}</span>
</div>
</div>
@@ -210,22 +214,11 @@ export default function MatchCard({ match, onTip }: Props) {
</div>
) : (
/* ── Tipp vorhanden, noch nicht ausgewertet (tipped state) ── */
<div className={styles.tipDisplay}>
<div className={styles.tipLeft}>
{match.tippable && (
<button className={styles.changeBtn} onClick={onTip}>Ändern</button>
)}
</div>
<div className={styles.tipCenter}>
{!match.tippable && <span className={styles.tipLabel}>DEIN TIPP</span>}
<span className={styles.tipDisplay_score}>
<Check size={13} strokeWidth={3} style={{ color: 'var(--success)', flexShrink: 0 }} />
<span className={styles.tipScore}>
{match.userTip!.home} : {match.userTip!.away}
</span>
</span>
</div>
<div className={styles.tipRight} />
<div className={styles.tippedRow} onClick={match.tippable ? onTip : undefined}>
<span className={styles.tippedIcon}></span>
<span className={styles.tippedLabel}>Dein Tipp</span>
<span className={styles.tippedScore}>{match.userTip!.home} : {match.userTip!.away}</span>
{match.tippable && <span className={styles.tippedEdit}>Ändern</span>}
</div>
)
) : match.tippable ? (