refactor: align tipp colors with legacy and drop goal difference category

Co-authored-by: aider (anthropic/claude-opus-5-5) <aider@aider.chat>
This commit is contained in:
torsten 2026-10-04 21:00:54 +02:00
parent 7ecd38cb20
commit 36c356b69c
2 changed files with 17 additions and 33 deletions

View file

@ -66,11 +66,10 @@ if (!isset($currentSeason) || !isset($ranking) || !isset($games) || !isset($allR
<div class="legend">
<div class="legend-item"><span class="daily-winner-icon">🏆</span> Tagessieger</div>
<div class="legend-item"><img src="/image.php?file=icons/joker.png" alt="Joker" class="joker-icon"> Joker gesetzt</div>
<div class="legend-item"><div class="legend-color" style="background-color: orange;"></div> Exaktes Ergebnis</div>
<div class="legend-item"><div class="legend-color" style="background-color: red;"></div> Exakt mit Joker</div>
<div class="legend-item"><div class="legend-color" style="background-color: gold;"></div> Richtige Differenz</div>
<div class="legend-item"><img src="/icons/joker.png" alt="Joker" class="joker-icon"> Joker gesetzt</div>
<div class="legend-item"><div class="legend-color" style="background-color: grey;"></div> Richtige Tendenz</div>
<div class="legend-item"><div class="legend-color" style="background-color: orange;"></div> Richtiges Ergebnis</div>
<div class="legend-item"><div class="legend-color" style="background-color: red;"></div> Richtiges Ergebnis mit Joker</div>
</div>
<div class="table-container">
@ -87,7 +86,7 @@ if (!isset($currentSeason) || !isset($ranking) || !isset($games) || !isset($allR
<th class="game-header" colspan="2">
<?php echo htmlspecialchars($game['team1']); ?><br>
<?php echo htmlspecialchars($game['team2']); ?><br>
<small>(<?php echo App\Models\Game::getResultString($game['score1'], $game['score2'], $game['kickoff']); ?>)</small>
<small>(<?php echo htmlspecialchars(App\Models\Game::getResultString($game['score1'], $game['score2'], $game['kickoff'])); ?>)</small>
</th>
<?php endforeach; ?>
</tr>
@ -103,19 +102,16 @@ if (!isset($currentSeason) || !isset($ranking) || !isset($games) || !isset($allR
<?php foreach ($games as $game): ?>
<?php
$tipp = $entry['tipps'][$game['id']];
// Farbklasse kommt fertig aus Tipp::getCol (col_tendenz / col_exact / col_joker_exact)
$td_class = $tipp['color'];
$title = "Tipp: " . htmlspecialchars($tipp['text']) . " | Punkte: " . $tipp['points'];
// Spezielle Farbe für exakten Tipp mit Joker
if ($td_class === 'col_exact' && $tipp['is_joker']) {
$td_class = 'col_joker_exact';
}
?>
<td class="tipp-cell tipp-points <?php echo htmlspecialchars($td_class); ?>" title="<?php echo $title; ?>">
<?php echo $tipp['points']; ?>
</td>
<td class="tipp-cell tipp-joker" title="<?php echo $title; ?>">
<?php if ($tipp['is_joker']): ?>
<img src="/image.php?file=icons/joker.png" alt="Joker" class="joker-icon" title="Joker">
<img src="/icons/joker.png" alt="Joker" class="joker-icon" title="Joker">
<?php endif; ?>
</td>
<?php endforeach; ?>