Tipps: Schnellauswahl auf die nächsten offenen Runden begrenzen
This commit is contained in:
parent
63d73efc42
commit
fd8ae86b5f
2 changed files with 14 additions and 4 deletions
|
|
@ -18,6 +18,9 @@ $teamLogo = function ($name) {
|
|||
$openRounds = array_values(array_filter($rounds, function ($round) {
|
||||
return !$round['locked'] && !empty($round['games']);
|
||||
}));
|
||||
// Schnellauswahl auf die nächsten Runden begrenzen. Spätere Runden sind oft
|
||||
// noch Platzhalter ("Mannschaft 1" usw.) und stehen weiter unten in der Liste.
|
||||
$quickRounds = array_slice($openRounds, 0, 6);
|
||||
?>
|
||||
|
||||
<p>Aktive Saison: <?php echo htmlspecialchars($activeSeason['name']); ?></p>
|
||||
|
|
@ -27,13 +30,16 @@ $openRounds = array_values(array_filter($rounds, function ($round) {
|
|||
<section class="tipp-round" id="round-<?php echo (int)$round['id']; ?>"
|
||||
data-lock-time="<?php echo $round['lock_time'] ? (int)$round['lock_time']->getTimestamp() : ''; ?>">
|
||||
<h2><?php echo htmlspecialchars($round['name']); ?></h2>
|
||||
<?php if ((int)$round['id'] === (int)$firstTippableRoundId && count($openRounds) > 1): ?>
|
||||
<?php if ((int)$round['id'] === (int)$firstTippableRoundId && count($quickRounds) > 1): ?>
|
||||
<nav class="tipp-open-rounds" aria-label="Weitere offene Runden">
|
||||
<strong>Weitere Runden vortippen:</strong>
|
||||
<?php foreach ($openRounds as $openRound): ?>
|
||||
<?php foreach ($quickRounds as $openRound): ?>
|
||||
<?php if ((int)$openRound['id'] === (int)$round['id']) continue; ?>
|
||||
<a href="/index.php?page=tipp_round&id=<?php echo (int)$openRound['id']; ?>"><?php echo htmlspecialchars($openRound['name']); ?></a>
|
||||
<?php endforeach; ?>
|
||||
<?php if (count($openRounds) > count($quickRounds)): ?>
|
||||
<small>Weitere Runden stehen weiter unten.</small>
|
||||
<?php endif; ?>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<?php if ($round['lock_time']): ?>
|
||||
|
|
@ -192,6 +198,10 @@ $openRounds = array_values(array_filter($rounds, function ($round) {
|
|||
background: var(--pitch);
|
||||
color: #fff;
|
||||
}
|
||||
.tipp-open-rounds small {
|
||||
display: block;
|
||||
margin-top: 0.35em;
|
||||
}
|
||||
.tipp-round { margin-bottom: 2.5em; }
|
||||
.tipp-round h2 { margin-bottom: 0.3em; scroll-margin-top: 1em; }
|
||||
.tipp-round .joker-icon { width: 1.5em; height: 1.5em; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue