Statische Dateien eine Woche cachen und Team-Logos lazy laden
This commit is contained in:
parent
9bc5e5b905
commit
d196b8b929
8 changed files with 34 additions and 12 deletions
|
|
@ -98,9 +98,9 @@ $teamLogo = function ($name) {
|
|||
$l2 = $teamLogo($team2Name);
|
||||
?>
|
||||
<tr>
|
||||
<td><span class="team-cell"><?php if ($l1): ?><img src="<?php echo htmlspecialchars($l1); ?>" alt="" class="team-logo"><?php endif; ?><input type="text" name="<?php echo $field; ?>[team1]" maxlength="100" required
|
||||
<td><span class="team-cell"><?php if ($l1): ?><img src="<?php echo htmlspecialchars($l1); ?>" alt="" class="team-logo" loading="lazy"><?php endif; ?><input type="text" name="<?php echo $field; ?>[team1]" maxlength="100" required
|
||||
value="<?php echo htmlspecialchars($team1Name); ?>"></span></td>
|
||||
<td><span class="team-cell"><?php if ($l2): ?><img src="<?php echo htmlspecialchars($l2); ?>" alt="" class="team-logo"><?php endif; ?><input type="text" name="<?php echo $field; ?>[team2]" maxlength="100" required
|
||||
<td><span class="team-cell"><?php if ($l2): ?><img src="<?php echo htmlspecialchars($l2); ?>" alt="" class="team-logo" loading="lazy"><?php endif; ?><input type="text" name="<?php echo $field; ?>[team2]" maxlength="100" required
|
||||
value="<?php echo htmlspecialchars($team2Name); ?>"></span></td>
|
||||
<td><input type="datetime-local" name="<?php echo $field; ?>[kickoff]" required
|
||||
value="<?php echo htmlspecialchars($in['kickoff'] ?? date('Y-m-d\TH:i', strtotime($game['kickoff']))); ?>"></td>
|
||||
|
|
|
|||
|
|
@ -224,11 +224,11 @@ if (!isset($currentSeason) || !isset($ranking) || !isset($games) || !isset($allR
|
|||
$matchTitle = htmlspecialchars($game['team1'] . ' : ' . $game['team2']);
|
||||
?>
|
||||
<th class="game-header" title="<?php echo $matchTitle; ?>">
|
||||
<?php if ($t1 && $t1['logo']): ?><img src="<?php echo htmlspecialchars($t1['logo']); ?>" alt="" class="team-logo"><?php endif; ?>
|
||||
<?php if ($t1 && $t1['logo']): ?><img src="<?php echo htmlspecialchars($t1['logo']); ?>" alt="" class="team-logo" loading="lazy"><?php endif; ?>
|
||||
<span class="rotated-label"><?php echo htmlspecialchars($game['team1']); ?></span>
|
||||
</th>
|
||||
<th class="game-header" title="<?php echo $matchTitle; ?>">
|
||||
<?php if ($t2 && $t2['logo']): ?><img src="<?php echo htmlspecialchars($t2['logo']); ?>" alt="" class="team-logo"><?php endif; ?>
|
||||
<?php if ($t2 && $t2['logo']): ?><img src="<?php echo htmlspecialchars($t2['logo']); ?>" alt="" class="team-logo" loading="lazy"><?php endif; ?>
|
||||
<span class="rotated-label"><?php echo htmlspecialchars($game['team2']); ?></span>
|
||||
</th>
|
||||
<th class="game-header" title="Joker">
|
||||
|
|
|
|||
|
|
@ -38,9 +38,9 @@ $teamLogo = function ($name) {
|
|||
<th>Spieler</th>
|
||||
<?php foreach ($round['games'] as $game): ?>
|
||||
<th class="game-header">
|
||||
<?php $l1 = $teamLogo($game['team1']); if ($l1): ?><img src="<?php echo htmlspecialchars($l1); ?>" alt="" class="team-logo"><?php endif; ?>
|
||||
<?php $l1 = $teamLogo($game['team1']); if ($l1): ?><img src="<?php echo htmlspecialchars($l1); ?>" alt="" class="team-logo" loading="lazy"><?php endif; ?>
|
||||
<?php echo htmlspecialchars($game['team1']); ?><br>
|
||||
<?php $l2 = $teamLogo($game['team2']); if ($l2): ?><img src="<?php echo htmlspecialchars($l2); ?>" alt="" class="team-logo"><?php endif; ?>
|
||||
<?php $l2 = $teamLogo($game['team2']); if ($l2): ?><img src="<?php echo htmlspecialchars($l2); ?>" alt="" class="team-logo" loading="lazy"><?php endif; ?>
|
||||
<?php echo htmlspecialchars($game['team2']); ?><br>
|
||||
<small>(<?php echo Game::getResultString($game['score1'], $game['score2'], $game['kickoff']); ?>)</small>
|
||||
</th>
|
||||
|
|
|
|||
|
|
@ -21,9 +21,9 @@ $teamLogo = function ($name) {
|
|||
<div>Maximale Anzahl gleicher Joker: <?php echo $maxIdenticalJokertipps; ?></div>
|
||||
|
||||
<p><strong>
|
||||
<span class="team-cell"><?php $l1 = $teamLogo($game['team1']); if ($l1): ?><img src="<?php echo htmlspecialchars($l1); ?>" alt="" class="team-logo"><?php endif; ?><?php echo htmlspecialchars($game['team1']); ?></span>
|
||||
<span class="team-cell"><?php $l1 = $teamLogo($game['team1']); if ($l1): ?><img src="<?php echo htmlspecialchars($l1); ?>" alt="" class="team-logo" loading="lazy"><?php endif; ?><?php echo htmlspecialchars($game['team1']); ?></span>
|
||||
:
|
||||
<span class="team-cell"><?php $l2 = $teamLogo($game['team2']); if ($l2): ?><img src="<?php echo htmlspecialchars($l2); ?>" alt="" class="team-logo"><?php endif; ?><?php echo htmlspecialchars($game['team2']); ?></span>
|
||||
<span class="team-cell"><?php $l2 = $teamLogo($game['team2']); if ($l2): ?><img src="<?php echo htmlspecialchars($l2); ?>" alt="" class="team-logo" loading="lazy"><?php endif; ?><?php echo htmlspecialchars($game['team2']); ?></span>
|
||||
</strong></p>
|
||||
|
||||
<?php if ($error): ?>
|
||||
|
|
|
|||
|
|
@ -49,9 +49,9 @@ $teamLogo = function ($name) {
|
|||
?>
|
||||
<tr>
|
||||
<td>
|
||||
<span class="team-cell"><?php $l1 = $teamLogo($game['team1']); if ($l1): ?><img src="<?php echo htmlspecialchars($l1); ?>" alt="" class="team-logo"><?php endif; ?><?php echo htmlspecialchars($game['team1']); ?></span>
|
||||
<span class="team-cell"><?php $l1 = $teamLogo($game['team1']); if ($l1): ?><img src="<?php echo htmlspecialchars($l1); ?>" alt="" class="team-logo" loading="lazy"><?php endif; ?><?php echo htmlspecialchars($game['team1']); ?></span>
|
||||
:
|
||||
<span class="team-cell"><?php $l2 = $teamLogo($game['team2']); if ($l2): ?><img src="<?php echo htmlspecialchars($l2); ?>" alt="" class="team-logo"><?php endif; ?><?php echo htmlspecialchars($game['team2']); ?></span>
|
||||
<span class="team-cell"><?php $l2 = $teamLogo($game['team2']); if ($l2): ?><img src="<?php echo htmlspecialchars($l2); ?>" alt="" class="team-logo" loading="lazy"><?php endif; ?><?php echo htmlspecialchars($game['team2']); ?></span>
|
||||
</td>
|
||||
<td><?php echo date('d.m.Y H:i', strtotime($game['kickoff'])); ?></td>
|
||||
<td><?php echo (int)$game['score1'] > -1 ? (int)$game['score1'] . ' : ' . (int)$game['score2'] : ''; ?></td>
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@ $teamLogo = function ($name) {
|
|||
$gameId = (int)$game['id'];
|
||||
?>
|
||||
<tr>
|
||||
<td><span class="team-cell"><?php $l1 = $teamLogo($game['team1']); if ($l1): ?><img src="<?php echo htmlspecialchars($l1); ?>" alt="" class="team-logo"><?php endif; ?><?php echo htmlspecialchars($game['team1']); ?></span></td>
|
||||
<td><span class="team-cell"><?php $l1 = $teamLogo($game['team1']); if ($l1): ?><img src="<?php echo htmlspecialchars($l1); ?>" alt="" class="team-logo" loading="lazy"><?php endif; ?><?php echo htmlspecialchars($game['team1']); ?></span></td>
|
||||
<td>:</td>
|
||||
<td><span class="team-cell"><?php $l2 = $teamLogo($game['team2']); if ($l2): ?><img src="<?php echo htmlspecialchars($l2); ?>" alt="" class="team-logo"><?php endif; ?><?php echo htmlspecialchars($game['team2']); ?></span></td>
|
||||
<td><span class="team-cell"><?php $l2 = $teamLogo($game['team2']); if ($l2): ?><img src="<?php echo htmlspecialchars($l2); ?>" alt="" class="team-logo" loading="lazy"><?php endif; ?><?php echo htmlspecialchars($game['team2']); ?></span></td>
|
||||
<td class="score">
|
||||
<input type="number" min="0" max="99" name="scores[<?php echo $gameId; ?>][score1]" required
|
||||
value="<?php echo htmlspecialchars((string)($formScores[$gameId]['score1'] ?? '')); ?>">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue