Files
Sdk_TV_app/TV_APP_V2/templates/league_results_display.html
T
2025-07-30 17:53:24 +02:00

1112 lines
30 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>{% if league.league_finished %}League Final Results{% else %}League Scoreboard{% endif %}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<style>
* {
box-sizing: border-box;
}
html, body {
margin: 0;
padding: 0;
background: #f8f9fa;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
height: 100vh;
overflow: hidden;
color: #333;
}
.navbar {
background: white;
border-bottom: 1px solid #e1e5e9;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
padding: 15px 25px;
display: flex;
align-items: center;
justify-content: space-between;
}
.navbar-logo {
height: 40px;
max-width: 120px;
object-fit: contain;
}
.navbar-title {
font-size: 1.8rem;
font-weight: bold;
color: #333;
margin-left: 15px;
}
.navbar-brand {
display: flex;
align-items: center;
}
.navbar-controls {
display: flex;
gap: 12px;
align-items: center;
}
.nav-btn {
background: #f8f9fa;
border: 2px solid #e9ecef;
cursor: pointer;
padding: 12px 20px;
border-radius: 8px;
transition: all 0.2s ease;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
color: #333;
text-decoration: none;
font-weight: bold;
font-size: 0.9rem;
}
.nav-btn:hover {
background: #e9ecef;
border-color: #007bff;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
transform: translateY(-1px);
color: #007bff;
}
.nav-btn.primary {
background: #007bff;
border-color: #0056b3;
color: white;
}
.nav-btn.primary:hover {
background: #0056b3;
color: white;
}
/* Main League Layout */
.league-container {
height: calc(100vh - 90px);
display: grid;
grid-template-columns: 1fr 2fr;
gap: 20px;
padding: 20px;
}
/* Left Column - Header & Current Leaders */
.left-column {
display: flex;
flex-direction: column;
gap: 20px;
}
.league-header {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
padding: 25px;
text-align: center;
flex-shrink: 0;
color: white;
position: relative;
overflow: hidden;
}
.league-header::before {
content: '';
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(45deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%, rgba(255, 255, 255, 0.05) 100%);
pointer-events: none;
}
.league-header * {
position: relative;
z-index: 2;
}
.header-logo {
height: 70px;
max-width: 180px;
object-fit: contain;
margin-bottom: 20px;
filter: brightness(1.2) contrast(1.1);
background-color: white;
padding: 10px;
border-radius: 8px;
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.2);
}
.league-title {
font-size: 2.2rem;
font-weight: 700;
color: rgb(255, 255, 255);
margin-bottom: 10px;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.league-subtitle {
font-size: 1.1rem;
color: rgba(255, 255, 255, 0.95);
margin-bottom: 20px;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.league-meta {
display: flex;
justify-content: space-around;
gap: 30px;
}
.meta-item {
text-align: center;
}
.meta-number {
font-size: 1.8rem;
font-weight: 700;
color: #ffffff;
display: block;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.meta-label {
font-size: 0.8rem;
color: rgba(255, 255, 255, 0.9);
text-transform: uppercase;
letter-spacing: 0.5px;
font-weight: 500;
}
/* Current Leaders Section */
.leaders-section {
background: white;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
padding: 25px;
flex: 1;
display: flex;
flex-direction: column;
}
.leaders-title {
text-align: center;
font-size: 1.4rem;
font-weight: 700;
color: #2c3e50;
margin-bottom: 20px;
}
.leader-container {
display: flex;
flex-direction: column;
gap: 15px;
flex: 1;
}
.leader-card {
background: white;
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
padding: 20px;
display: flex;
align-items: center;
gap: 20px;
transition: all 0.2s ease;
position: relative;
overflow: hidden;
border-left: 5px solid;
}
.leader-card:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}
.leader-card.rank-1 {
border-left-color: #ffd700;
background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
}
.leader-card.rank-2 {
border-left-color: #c0c0c0;
background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
}
.leader-card.rank-3 {
border-left-color: #cd7f32;
background: linear-gradient(135deg, #fdf6f0 0%, #ffffff 100%);
}
.rank-display {
display: flex;
flex-direction: column;
align-items: center;
min-width: 60px;
}
.rank-number {
font-size: 1.8rem;
font-weight: bold;
color: #333;
line-height: 1;
}
.leader-card.rank-1 .rank-number { color: #b8860b; }
.leader-card.rank-2 .rank-number { color: #696969; }
.leader-card.rank-3 .rank-number { color: #8b4513; }
.rank-suffix {
font-size: 0.7rem;
color: #666;
text-transform: uppercase;
font-weight: bold;
}
.medal {
font-size: 1.5rem;
margin-top: 3px;
}
.participant-info {
flex: 1;
min-width: 0;
}
.participant-name {
font-size: 1.3rem;
font-weight: bold;
color: #333;
margin-bottom: 5px;
word-wrap: break-word;
}
.participant-details {
display: flex;
gap: 10px;
flex-wrap: wrap;
align-items: center;
}
.participant-id {
background: #007bff;
color: white;
padding: 3px 10px;
border-radius: 12px;
font-size: 0.8rem;
font-weight: bold;
display: inline-block;
}
.joker-badge {
background: #ffc107;
color: #856404;
padding: 3px 8px;
border-radius: 8px;
font-size: 0.7rem;
font-weight: bold;
display: inline-block;
}
.current-tournament-badge {
background: #28a745;
color: white;
padding: 3px 8px;
border-radius: 8px;
font-size: 0.7rem;
font-weight: bold;
display: inline-block;
}
.score-display {
text-align: right;
min-width: 100px;
}
.final-score {
font-size: 2rem;
font-weight: bold;
color: #28a745;
line-height: 1;
}
.current-score {
font-size: 0.9rem;
color: #666;
margin-top: 2px;
}
.score-label {
font-size: 0.8rem;
color: #666;
text-transform: uppercase;
font-weight: bold;
}
/* Right Column - Full League Table */
.right-column {
background: white;
border-radius: 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
overflow: hidden;
display: flex;
flex-direction: column;
}
.table-header {
background: #f8f9fa;
padding: 15px 20px;
border-bottom: 1px solid #dee2e6;
flex-shrink: 0;
}
.table-title {
font-size: 1.25rem;
font-weight: 600;
color: #2c3e50;
margin: 0;
}
.table-container {
flex: 1;
overflow-y: auto;
}
.league-table {
width: 100%;
border-collapse: collapse;
font-size: 0.9rem;
}
.league-table th,
.league-table td {
padding: 8px 6px;
text-align: center;
border-bottom: 1px solid #f1f3f4;
border-right: 1px solid #f1f3f4;
}
.league-table th {
background: #f8f9fa;
font-weight: 600;
color: #495057;
text-transform: uppercase;
font-size: 0.65rem;
letter-spacing: 0.5px;
position: sticky;
top: 0;
z-index: 10;
}
.league-table th.player-col {
text-align: left;
width: 140px;
}
.league-table th.tournament-col {
width: 70px;
}
.league-table th.final-col {
width: 80px;
background: #e3f2fd;
}
.league-table th.current-col {
width: 80px;
background: #e8f5e8;
}
.league-table tbody tr:hover {
background: #f8f9fa;
}
.league-table tbody tr:nth-child(1) {
background: #fff9e6;
}
.league-table tbody tr:nth-child(1):hover {
background: #fff3cd;
}
.league-table tbody tr:nth-child(2) {
background: #f5f5f5;
}
.league-table tbody tr:nth-child(2):hover {
background: #e9ecef;
}
.league-table tbody tr:nth-child(3) {
background: #fdf6f0;
}
.league-table tbody tr:nth-child(3):hover {
background: #f8f1e6;
}
.rank-cell {
font-size: 1rem;
font-weight: 700;
width: 50px;
text-align: center;
}
.rank-1 { color: #b8860b; }
.rank-2 { color: #6c757d; }
.rank-3 { color: #8b4513; }
.player-cell {
text-align: left !important;
padding-left: 12px !important;
}
.player-name {
font-size: 0.9rem;
font-weight: 600;
color: #2c3e50;
word-break: keep-all;
overflow-wrap: break-word;
hyphens: none;
}
.player-id {
background: #007bff;
color: white;
padding: 2px 6px;
border-radius: 6px;
font-size: 0.65rem;
font-weight: 500;
display: inline-block;
margin-top: 2px;
}
.tournament-score {
font-size: 0.85rem;
font-weight: 600;
color: #333;
min-width: 40px;
}
.tournament-score.joker {
background: #ffc107;
color: #856404;
padding: 3px 6px;
border-radius: 4px;
font-size: 0.7rem;
font-weight: 600;
}
.tournament-score.excluded {
background: #dc3545;
color: white;
padding: 3px 6px;
border-radius: 4px;
text-decoration: line-through;
opacity: 0.8;
font-size: 0.7rem;
}
.tournament-score.counted {
background: #28a745;
color: white;
padding: 3px 6px;
border-radius: 4px;
font-weight: 600;
font-size: 0.75rem;
}
.final-score-cell {
background: #e3f2fd !important;
font-size: 1.1rem;
font-weight: 700;
color: #1976d2;
}
.current-tournament-cell {
background: #e8f5e8 !important;
font-size: 0.9rem;
font-weight: 600;
color: #2e7d32;
}
/* Tournament Headers */
.tournament-header-group {
background: #e3f2fd;
border-bottom: 2px solid #1976d2;
}
.tournament-header-group th {
background: #e3f2fd;
color: #1976d2;
font-weight: 700;
}
/* Calculation Legend */
.calculation-legend {
background: #f8f9fa;
border-top: 1px solid #dee2e6;
padding: 15px 20px;
flex-shrink: 0;
}
.legend-title {
font-size: 0.9rem;
font-weight: 600;
color: #2c3e50;
margin-bottom: 10px;
}
.legend-items {
display: flex;
gap: 20px;
flex-wrap: wrap;
align-items: center;
}
.legend-item {
display: flex;
align-items: center;
gap: 8px;
font-size: 0.8rem;
color: #495057;
}
.legend-box {
width: 20px;
height: 16px;
border-radius: 3px;
display: inline-block;
}
.legend-joker { background: #ffc107; }
.legend-excluded { background: #dc3545; }
.legend-counted { background: #28a745; }
.legend-final { background: #1976d2; }
.legend-current { background: #2e7d32; }
/* League Stats Footer */
.stats-footer {
background: white;
border-top: 1px solid #dee2e6;
padding: 10px 20px;
display: flex;
justify-content: space-around;
font-size: 0.8rem;
color: #6c757d;
flex-shrink: 0;
}
.stat-item {
text-align: center;
}
.stat-value {
font-weight: 600;
color: #007bff;
}
/* Mobile responsive */
@media (max-width: 768px) {
.navbar {
padding: 10px 15px;
}
.navbar-title {
font-size: 1.4rem;
}
.navbar-logo {
height: 30px;
max-width: 90px;
}
.league-container {
grid-template-columns: 1fr;
grid-template-rows: auto 1fr;
}
.leaders-section {
padding: 20px 15px;
}
.leaders-title {
font-size: 1.3rem;
margin-bottom: 20px;
}
.leader-container {
flex-direction: column;
gap: 12px;
}
.leader-card {
padding: 15px 20px;
gap: 15px;
}
.rank-display {
min-width: 50px;
}
.rank-number {
font-size: 1.6rem;
}
.medal {
font-size: 1.3rem;
}
.participant-name {
font-size: 1.1rem;
}
.final-score {
font-size: 1.6rem;
}
/* Mobile table adjustments */
.league-table {
font-size: 0.75rem;
}
.league-table th,
.league-table td {
padding: 6px 4px;
}
.league-table th.player-col {
width: 100px;
}
.league-table th.tournament-col {
width: 50px;
}
.tournament-score {
font-size: 0.7rem;
}
.tournament-score.counted,
.tournament-score.excluded,
.tournament-score.joker {
padding: 2px 4px;
font-size: 0.65rem;
}
.legend-items {
gap: 10px;
}
.legend-item {
font-size: 0.75rem;
}
.legend-box {
width: 16px;
height: 12px;
}
}
/* Auto-refresh indicator */
.refresh-indicator {
position: fixed;
top: 100px;
right: 20px;
background: rgba(40, 167, 69, 0.9);
color: white;
padding: 5px 10px;
border-radius: 15px;
font-size: 0.7rem;
font-weight: bold;
opacity: 0;
transition: opacity 0.3s ease;
z-index: 1000;
}
.refresh-indicator.show {
opacity: 1;
}
</style>
</head>
<body>
<div class="navbar">
<div class="navbar-brand">
<div class="navbar-title">
{% if league.league_finished %}🏆 League Final Results{% else %}📊 League Scoreboard{% endif %}
</div>
</div>
<div class="navbar-controls">
<a href="/" class="nav-btn">← Dashboard</a>
<a href="/tournament" class="nav-btn">🏆 Tournament</a>
<button class="nav-btn" onclick="window.print()">🖨️ Print</button>
</div>
</div>
<div class="league-container">
<!-- Left Column -->
<div class="left-column">
<!-- League Header -->
<div class="league-header">
<img src="/static/logo.png" alt="Logo" class="header-logo" onerror="this.style.display='none'" />
<div class="league-title">
{% if league.league_finished %}League Championship{% else %}League Scoreboard{% endif %}
</div>
<div class="league-subtitle">
{% if league.league_finished %}
Final Rankings - Best 5 of 6 Tournaments
{% else %}
Tournament {{ league.current_tournament }} of {{ league.total_tournaments }} - Live Updates
{% endif %}
</div>
<div class="league-meta">
<div class="meta-item">
<span class="meta-number">{{ participants|length }}</span>
<span class="meta-label">Participants</span>
</div>
<div class="meta-item">
<span class="meta-number">{{ league.current_tournament if not league.league_finished else league.total_tournaments }}</span>
<span class="meta-label">{% if league.league_finished %}Total Tournaments{% else %}Current Tournament{% endif %}</span>
</div>
<div class="meta-item">
<span class="meta-number">
{% if league.tournament_type == '40_targets' %}40{% else %}20{% endif %}
</span>
<span class="meta-label">Targets</span>
</div>
<div class="meta-item">
<span class="meta-number">{% if participants and participants|length > 0 %}{{ participants[0].final_score if league.league_finished else participants[0].current_total }}{% else %}0{% endif %}</span>
<span class="meta-label">{% if league.league_finished %}Final Score{% else %}Leading Score{% endif %}</span>
</div>
</div>
</div>
{% if participants and participants|length >= 3 %}
<!-- Current Leaders / Final Champions -->
<div class="leaders-section">
<div class="leaders-title">
{% if league.league_finished %}🏆 Final Champions{% else %}🥇 Current Leaders{% endif %}
</div>
<div class="leader-container">
{% for i in range(3) %}
{% set participant = participants[i] %}
<div class="leader-card rank-{{ participant.rank }}">
<div class="rank-display">
<div class="rank-number">{{ participant.rank }}</div>
<div class="rank-suffix">
{% if participant.rank == 1 %}st
{% elif participant.rank == 2 %}nd
{% elif participant.rank == 3 %}rd
{% else %}th
{% endif %}
</div>
<div class="medal">
{% if participant.rank == 1 %}🥇
{% elif participant.rank == 2 %}🥈
{% elif participant.rank == 3 %}🥉
{% endif %}
</div>
</div>
<div class="participant-info">
<div class="participant-name">{{ participant.name }}</div>
<div class="participant-details">
<div class="participant-id">ID: {{ participant.id }}</div>
{% if participant.joker_used %}
<div class="joker-badge">🃏 Joker Used</div>
{% endif %}
{% if not league.league_finished and participant.current_tournament_participating %}
<div class="current-tournament-badge">🎯 Playing Now</div>
{% endif %}
</div>
</div>
<div class="score-display">
<div class="final-score">{{ participant.final_score if league.league_finished else participant.current_total }}</div>
{% if not league.league_finished %}
<div class="current-score">
{% if participant.current_tournament_participating %}
Current: +{{ participant.current_tournament_score }}
{% else %}
Final: {{ participant.final_score }}
{% endif %}
</div>
{% else %}
<div class="current-score">Total: {{ participant.total_score }}</div>
{% endif %}
<div class="score-label">{% if league.league_finished %}Final Score{% else %}Current Score{% endif %}</div>
</div>
</div>
{% endfor %}
</div>
</div>
{% endif %}
</div>
<!-- Right Column -->
<div class="right-column">
<div class="table-header">
<h3 class="table-title">
{% if league.league_finished %}
📊 Complete Tournament Breakdown & Final Calculation
{% else %}
📊 League Standings - Tournament {{ league.current_tournament }} of {{ league.total_tournaments }}
{% endif %}
</h3>
</div>
<div class="table-container">
<table class="league-table">
<thead>
<tr>
<th rowspan="2" class="rank-cell">Rank</th>
<th rowspan="2" class="player-col">Participant</th>
<th colspan="6" class="tournament-header-group">Individual Tournament Scores</th>
<th rowspan="2" class="final-col">
{% if league.league_finished %}
Final Score<br><small>(Best 5)</small>
{% else %}
Current<br><small>(Best 5)</small>
{% endif %}
</th>
{% if not league.league_finished %}
<th rowspan="2" class="current-col">Live<br><small>T{{ league.current_tournament }}</small></th>
{% endif %}
</tr>
<tr class="tournament-header-group">
<th class="tournament-col">T1</th>
<th class="tournament-col">T2</th>
<th class="tournament-col">T3</th>
<th class="tournament-col">T4</th>
<th class="tournament-col">T5</th>
<th class="tournament-col">T6</th>
</tr>
</thead>
<tbody>
{% for participant in participants %}
<tr>
<td class="rank-cell rank-{{ participant.rank if participant.rank <= 3 else 'other' }}">
{{ participant.rank }}
{% if participant.rank == 1 %}🏆
{% elif participant.rank == 2 %}🥈
{% elif participant.rank == 3 %}🥉
{% endif %}
</td>
<td class="player-cell">
<div class="player-name">{{ participant.name }}</div>
<div class="player-id">{{ participant.id }}</div>
</td>
<!-- Tournament Scores -->
{% for tournament_num in range(1, 7) %}
<td>
{% set found_result = false %}
{% for result in participant.tournament_results %}
{% if result.tournament == tournament_num %}
{% set found_result = true %}
{% if result.get('joker') or not result.participated %}
<span class="tournament-score joker">🃏</span>
{% else %}
{% set all_scores = [] %}
{% for r in participant.tournament_results if r.participated %}
{% set _ = all_scores.append(r.score) %}
{% endfor %}
{% set sorted_scores = all_scores|sort(reverse=true) %}
{% set excluded_score = sorted_scores[-1] if sorted_scores|length > 5 else none %}
{% if all_scores|length > 5 and result.score == excluded_score %}
<span class="tournament-score excluded">{{ result.score }}</span>
{% else %}
<span class="tournament-score counted">{{ result.score }}</span>
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
{% if not found_result %}
<span class="tournament-score">-</span>
{% endif %}
</td>
{% endfor %}
<td class="final-score-cell">
{% if league.league_finished %}
{{ participant.final_score }}
{% else %}
{{ participant.current_total }}
{% endif %}
</td>
{% if not league.league_finished %}
<td class="current-tournament-cell">
{% if participant.current_tournament_participating %}
{{ participant.current_tournament_score }}
{% else %}
-
{% endif %}
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
</div>
<div class="calculation-legend">
<div class="legend-title">📖 Scoring Legend:</div>
<div class="legend-items">
<div class="legend-item">
<span class="legend-box legend-counted"></span>
<span>Counted Score</span>
</div>
{% if league.league_finished %}
<div class="legend-item">
<span class="legend-box legend-excluded"></span>
<span>Excluded (Worst)</span>
</div>
{% endif %}
<div class="legend-item">
<span class="legend-box legend-joker"></span>
<span>Joker Used</span>
</div>
<div class="legend-item">
<span class="legend-box legend-final"></span>
<span>{% if league.league_finished %}Final Score (Best 5){% else %}Current Score{% endif %}</span>
</div>
{% if not league.league_finished %}
<div class="legend-item">
<span class="legend-box legend-current"></span>
<span>Live Tournament</span>
</div>
{% endif %}
</div>
</div>
<div class="stats-footer">
<div class="stat-item">
<div class="stat-value">{{ participants|length if participants else 0 }}</div>
<div>Participants</div>
</div>
<div class="stat-item">
<div class="stat-value">{{ league.current_tournament if not league.league_finished else league.total_tournaments }}</div>
<div>{% if league.league_finished %}Total Tournaments{% else %}Current Tournament{% endif %}</div>
</div>
<div class="stat-item">
<div class="stat-value">
{% if participants and participants|length > 0 %}
{% if league.league_finished %}{{ participants[0].final_score }}{% else %}{{ participants[0].current_total }}{% endif %}
{% else %}0{% endif %}
</div>
<div>{% if league.league_finished %}Highest Score{% else %}Leading Score{% endif %}</div>
</div>
<div class="stat-item">
<div class="stat-value">
{% if participants %}
{% if league.league_finished %}
{{ "%.0f"|format(participants|map(attribute='final_score')|sum / participants|length) }}
{% else %}
{{ "%.0f"|format(participants|map(attribute='current_total')|sum / participants|length) }}
{% endif %}
{% else %}0{% endif %}
</div>
<div>Average Score</div>
</div>
<div class="stat-item">
<div class="stat-value">
{% if league.league_finished %}
{{ league.finished_at[:10] if league.finished_at else 'Today' }}
{% else %}
Live
{% endif %}
</div>
<div>{% if league.league_finished %}League Date{% else %}Status{% endif %}</div>
</div>
</div>
</div>
</div>
<!-- Auto-refresh indicator -->
<div class="refresh-indicator" id="refreshIndicator">
🔄 Updating...
</div>
<script>
const participants = {{ participants|tojson }};
const league = {{ league|tojson }};
const isFinished = {{ 'true' if league.league_finished else 'false' }};
// Show winner celebration for finished leagues
function showLeagueChampionHighlight() {
if (participants && participants.length > 0 && isFinished) {
setTimeout(() => {
const champion = document.querySelector('.leader-card.rank-1');
if (champion) {
champion.style.boxShadow = '0 4px 15px rgba(255, 215, 0, 0.4)';
setTimeout(() => {
champion.style.boxShadow = '';
}, 3000);
}
}, 1000);
}
}
// Auto-refresh for ongoing leagues
function setupAutoRefresh() {
if (!isFinished) {
setInterval(() => {
const indicator = document.getElementById('refreshIndicator');
indicator.classList.add('show');
setTimeout(() => {
window.location.reload();
}, 1000);
}, 30000); // Refresh every 30 seconds for ongoing leagues
}
}
// Keyboard shortcuts
document.addEventListener('keydown', function(event) {
if (event.key === 'r' || event.key === 'R') {
event.preventDefault();
window.location.reload();
} else if (event.key === 'p' || event.key === 'P') {
event.preventDefault();
window.print();
}
});
// Initialize
document.addEventListener('DOMContentLoaded', function() {
showLeagueChampionHighlight();
setupAutoRefresh();
// Show refresh indicator briefly on load
setTimeout(() => {
const indicator = document.getElementById('refreshIndicator');
indicator.classList.add('show');
setTimeout(() => {
indicator.classList.remove('show');
}, 2000);
}, 500);
console.log(`🏆 League ${isFinished ? 'Results' : 'Scoreboard'}: ${participants ? participants.length : 0} participants displayed`);
console.log('🎯 Tournament type:', league.tournament_type);
console.log('📊 League status:', isFinished ? 'Finished' : `Active - Tournament ${league.current_tournament}/${league.total_tournaments}`);
});
// Handle screen size changes
window.addEventListener('resize', function() {
document.body.style.display = 'none';
document.body.offsetHeight;
document.body.style.display = '';
});
</script>
</body>
</html>