...
This commit is contained in:
parent
1c712d0781
commit
a82d14c168
6 changed files with 213 additions and 26 deletions
|
|
@ -16,7 +16,26 @@ require __DIR__ . '/partials/header.php';
|
|||
<p>Saison: <strong><?php echo htmlspecialchars($currentSeason['name']); ?></strong></p>
|
||||
<?php if ($rounds): ?>
|
||||
<?php foreach ($rounds as $round): ?>
|
||||
<?php
|
||||
$summary = $roundSummaries[$round['id']] ?? ['winnings' => [], 'notes' => []];
|
||||
$winnings = $summary['winnings'];
|
||||
?>
|
||||
<h3><a href="/index.php?page=ranking&round_id=<?php echo htmlspecialchars($round['id']); ?>"><?php echo htmlspecialchars($round['name']); ?></a></h3>
|
||||
<?php if ($winnings): ?>
|
||||
<p class="round-winnings-title"><strong>Gewinne:</strong></p>
|
||||
<ul class="round-winnings">
|
||||
<?php foreach ($winnings as $win): ?>
|
||||
<li>
|
||||
<strong><?php echo htmlspecialchars($win['name']); ?></strong>:
|
||||
<?php echo number_format($win['amount'], 2, ',', '.'); ?> €
|
||||
<span class="win-type">(<?php echo htmlspecialchars($win['label']); ?>)</span>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
<?php foreach ($summary['notes'] as $note): ?>
|
||||
<p class="round-note"><?php echo htmlspecialchars($note); ?></p>
|
||||
<?php endforeach; ?>
|
||||
<?php if (!empty($round['report'])): ?>
|
||||
<p><?php echo nl2br(htmlspecialchars(Round::reportToText($round['report']))); ?></p>
|
||||
<?php endif; ?>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,28 @@
|
|||
</main>
|
||||
<footer class="site-footer">⚽ Tippspiel 2027</footer>
|
||||
<script>
|
||||
// Veraltete, noch als eingeloggt gerenderte Seiten dürfen nicht stehen
|
||||
// bleiben: Bei Wiederherstellung aus dem Back-Forward-Cache neu laden,
|
||||
// damit der Server den Login-Status erneut prüft.
|
||||
window.addEventListener('pageshow', function (event) {
|
||||
if (event.persisted) {
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
|
||||
if ('serviceWorker' in navigator) {
|
||||
var hadController = !!navigator.serviceWorker.controller;
|
||||
var reloading = false;
|
||||
|
||||
// Übernimmt ein neuer Service Worker, die Seite einmal neu laden,
|
||||
// damit keine alte App-Shell mehr angezeigt wird.
|
||||
navigator.serviceWorker.addEventListener('controllerchange', function () {
|
||||
if (hadController && !reloading) {
|
||||
reloading = true;
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
|
||||
window.addEventListener('load', function () {
|
||||
navigator.serviceWorker.register('/sw.js');
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue