fix: Trenne Punkte und Joker in Rangliste für bessere Ausrichtung

Co-authored-by: aider (gemini/gemini-2.5-pro) <aider@aider.chat>
This commit is contained in:
torsten 2026-10-04 07:43:52 +02:00
parent 50e348ed88
commit 88005bee4a

View file

@ -12,6 +12,27 @@ if (!isset($currentSeason) || !isset($ranking) || !isset($games) || !isset($allR
}
?>
<style>
.game-header {
width: 70px; /* Feste Breite für die Spiele-Spalten */
}
.tipp-points, .tipp-joker {
width: 35px; /* Aufteilung der game-header Breite */
box-sizing: border-box;
}
.tipp-points {
text-align: right;
padding-right: 5px;
}
.tipp-joker {
padding-left: 5px;
text-align: left;
}
.tipp-joker .joker-icon {
vertical-align: middle;
}
</style>
<h1>Rangliste</h1>
<h2>Saison: <?php echo htmlspecialchars($currentSeason['name']); ?></h2>
@ -50,7 +71,7 @@ if (!isset($currentSeason) || !isset($ranking) || !isset($games) || !isset($allR
<th class="text-center">Punkte (Gesamt)</th>
<th class="text-center">Punkte (Runde)</th>
<?php foreach ($games as $game): ?>
<th class="game-header">
<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>
@ -70,13 +91,16 @@ if (!isset($currentSeason) || !isset($ranking) || !isset($games) || !isset($allR
<?php
$tipp = $entry['tipps'][$game['id']];
$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 <?php echo htmlspecialchars($td_class); ?>" title="Tipp: <?php echo htmlspecialchars($tipp['text']); ?> | Punkte: <?php echo $tipp['points']; ?>">
<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 <?php echo htmlspecialchars($td_class); ?>" title="<?php echo $title; ?>">
<?php if ($tipp['is_joker']): ?>
<img src="/image.php?file=icons/joker.png" alt="Joker" class="joker-icon" title="Joker">
<?php endif; ?>