5c7f255a02
- Created JSON files for tournament archives on 2025-07-28 and 2025-07-29, including detailed player scores and shot results. - Added a new tournament results file summarizing the outcomes of the tournament held on 2025-07-29, including participant scores and completion status.
696 lines
16 KiB
HTML
696 lines
16 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8" />
|
|
<title>📱 Tournament Results</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<style>
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
html, body {
|
|
margin: 0;
|
|
padding: 0;
|
|
background: #f5f5f5;
|
|
font-family: Arial, sans-serif;
|
|
min-height: 100vh;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
.mobile-navbar {
|
|
background: white;
|
|
color: black;
|
|
padding: 15px 20px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
border-bottom: 2px solid #ccc;
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 100;
|
|
}
|
|
|
|
.navbar-title {
|
|
font-size: 1.4rem;
|
|
font-weight: bold;
|
|
color: #333;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.navbar-controls {
|
|
display: flex;
|
|
gap: 8px;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.nav-btn {
|
|
background: #f8f9fa;
|
|
border: 2px solid #e9ecef;
|
|
cursor: pointer;
|
|
padding: 8px 12px;
|
|
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.8rem;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
min-width: 44px;
|
|
justify-content: center;
|
|
}
|
|
|
|
.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.active {
|
|
background: #007bff;
|
|
border-color: #0056b3;
|
|
color: white;
|
|
}
|
|
|
|
.nav-btn.active:hover {
|
|
background: #0056b3;
|
|
color: white;
|
|
}
|
|
|
|
.nav-btn.disabled {
|
|
opacity: 0.5;
|
|
pointer-events: none;
|
|
background: #f1f3f4;
|
|
border-color: #dadce0;
|
|
}
|
|
|
|
.container {
|
|
padding: 20px;
|
|
max-width: 100%;
|
|
}
|
|
|
|
.results-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 20px;
|
|
margin-bottom: 25px;
|
|
text-align: center;
|
|
color: white;
|
|
}
|
|
|
|
.results-title {
|
|
font-size: 1.8rem;
|
|
font-weight: bold;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.results-subtitle {
|
|
font-size: 1.1rem;
|
|
opacity: 0.9;
|
|
margin-bottom: 15px;
|
|
}
|
|
|
|
.results-badge {
|
|
background: rgba(255, 255, 255, 0.2);
|
|
backdrop-filter: blur(10px);
|
|
border: 1px solid rgba(255, 255, 255, 0.3);
|
|
color: white;
|
|
padding: 8px 16px;
|
|
border-radius: 20px;
|
|
font-size: 0.9rem;
|
|
font-weight: bold;
|
|
display: inline-block;
|
|
}
|
|
|
|
.results-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 15px;
|
|
margin-bottom: 25px;
|
|
}
|
|
|
|
.result-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;
|
|
}
|
|
|
|
.result-card.podium {
|
|
border-left: 5px solid;
|
|
}
|
|
|
|
.result-card.rank-1 {
|
|
border-left-color: #ffd700;
|
|
background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
|
|
}
|
|
|
|
.result-card.rank-2 {
|
|
border-left-color: #c0c0c0;
|
|
background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
|
|
}
|
|
|
|
.result-card.rank-3 {
|
|
border-left-color: #cd7f32;
|
|
background: linear-gradient(135deg, #fdf6f0 0%, #ffffff 100%);
|
|
}
|
|
|
|
.result-card:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
.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;
|
|
}
|
|
|
|
.result-card.rank-1 .rank-number { color: #b8860b; }
|
|
.result-card.rank-2 .rank-number { color: #696969; }
|
|
.result-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-id {
|
|
background: #007bff;
|
|
color: white;
|
|
padding: 3px 10px;
|
|
border-radius: 12px;
|
|
font-size: 0.8rem;
|
|
font-weight: bold;
|
|
display: inline-block;
|
|
}
|
|
|
|
.score-display {
|
|
text-align: right;
|
|
min-width: 80px;
|
|
}
|
|
|
|
.score-number {
|
|
font-size: 2rem;
|
|
font-weight: bold;
|
|
color: #28a745;
|
|
line-height: 1;
|
|
}
|
|
|
|
.score-label {
|
|
font-size: 0.8rem;
|
|
color: #666;
|
|
text-transform: uppercase;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.tournament-info {
|
|
background: white;
|
|
border-radius: 12px;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
|
|
padding: 20px;
|
|
margin-bottom: 25px;
|
|
}
|
|
|
|
.info-title {
|
|
font-size: 1.2rem;
|
|
font-weight: bold;
|
|
color: #333;
|
|
margin-bottom: 15px;
|
|
text-align: center;
|
|
}
|
|
|
|
.info-grid {
|
|
display: grid;
|
|
grid-template-columns: 1fr;
|
|
gap: 10px;
|
|
}
|
|
|
|
.info-item {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding: 8px 0;
|
|
border-bottom: 1px solid #f0f0f0;
|
|
}
|
|
|
|
.info-item:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.info-label {
|
|
font-weight: bold;
|
|
color: #333;
|
|
}
|
|
|
|
.info-value {
|
|
color: #666;
|
|
}
|
|
|
|
.congratulations {
|
|
background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
|
|
border-radius: 12px;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
padding: 25px 20px;
|
|
margin-bottom: 25px;
|
|
text-align: center;
|
|
color: white;
|
|
}
|
|
|
|
.congrats-title {
|
|
font-size: 1.5rem;
|
|
font-weight: bold;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.congrats-message {
|
|
font-size: 1.1rem;
|
|
opacity: 0.9;
|
|
}
|
|
|
|
/* Mobile landscape optimization */
|
|
@media (orientation: landscape) and (max-height: 500px) {
|
|
.mobile-navbar {
|
|
padding: 10px 15px;
|
|
}
|
|
|
|
.navbar-title {
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
.container {
|
|
padding: 15px;
|
|
}
|
|
|
|
.results-header {
|
|
padding: 20px 15px;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.results-title {
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.results-subtitle {
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.result-card {
|
|
padding: 15px;
|
|
gap: 15px;
|
|
}
|
|
|
|
.rank-number {
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.participant-name {
|
|
font-size: 1.1rem;
|
|
}
|
|
|
|
.score-number {
|
|
font-size: 1.7rem;
|
|
}
|
|
|
|
.navbar-controls {
|
|
gap: 6px;
|
|
}
|
|
|
|
.nav-btn {
|
|
padding: 6px 10px;
|
|
font-size: 0.75rem;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 400px) {
|
|
.container {
|
|
padding: 15px;
|
|
}
|
|
|
|
.results-header {
|
|
padding: 20px 15px;
|
|
}
|
|
|
|
.results-title {
|
|
font-size: 1.6rem;
|
|
}
|
|
|
|
.results-subtitle {
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.result-card {
|
|
padding: 15px;
|
|
gap: 15px;
|
|
}
|
|
|
|
.rank-display {
|
|
min-width: 50px;
|
|
}
|
|
|
|
.rank-number {
|
|
font-size: 1.6rem;
|
|
}
|
|
|
|
.participant-name {
|
|
font-size: 1.2rem;
|
|
}
|
|
|
|
.score-display {
|
|
min-width: 70px;
|
|
}
|
|
|
|
.score-number {
|
|
font-size: 1.8rem;
|
|
}
|
|
|
|
.congratulations {
|
|
padding: 20px 15px;
|
|
}
|
|
|
|
.congrats-title {
|
|
font-size: 1.3rem;
|
|
}
|
|
|
|
.congrats-message {
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.navbar-controls {
|
|
gap: 6px;
|
|
}
|
|
|
|
.nav-btn {
|
|
padding: 6px 8px;
|
|
font-size: 0.75rem;
|
|
}
|
|
}
|
|
|
|
/* Animation for results appearance */
|
|
.result-card {
|
|
animation: slideInUp 0.5s ease forwards;
|
|
opacity: 0;
|
|
transform: translateY(20px);
|
|
}
|
|
|
|
.result-card:nth-child(1) { animation-delay: 0.1s; }
|
|
.result-card:nth-child(2) { animation-delay: 0.2s; }
|
|
.result-card:nth-child(3) { animation-delay: 0.3s; }
|
|
.result-card:nth-child(4) { animation-delay: 0.4s; }
|
|
.result-card:nth-child(5) { animation-delay: 0.5s; }
|
|
.result-card:nth-child(6) { animation-delay: 0.6s; }
|
|
|
|
@keyframes slideInUp {
|
|
to {
|
|
opacity: 1;
|
|
transform: translateY(0);
|
|
}
|
|
}
|
|
|
|
/* Celebration confetti effect */
|
|
.confetti {
|
|
position: fixed;
|
|
top: 0;
|
|
left: 0;
|
|
width: 100%;
|
|
height: 100%;
|
|
pointer-events: none;
|
|
z-index: 999;
|
|
}
|
|
|
|
.confetti-piece {
|
|
position: absolute;
|
|
width: 10px;
|
|
height: 10px;
|
|
background: #ffd700;
|
|
animation: confetti-fall 3s linear infinite;
|
|
}
|
|
|
|
@keyframes confetti-fall {
|
|
0% {
|
|
transform: translateY(-100vh) rotate(0deg);
|
|
opacity: 1;
|
|
}
|
|
100% {
|
|
transform: translateY(100vh) rotate(720deg);
|
|
opacity: 0;
|
|
}
|
|
}
|
|
|
|
/* Results status indicator */
|
|
.results-indicator {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
background: #28a745;
|
|
color: white;
|
|
padding: 2px 6px;
|
|
border-radius: 8px;
|
|
font-size: 0.7rem;
|
|
font-weight: bold;
|
|
margin-left: 5px;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="mobile-navbar">
|
|
<div class="navbar-title">
|
|
🏆 Results
|
|
<span class="results-indicator">FINAL</span>
|
|
</div>
|
|
<div class="navbar-controls">
|
|
<a href="/mobile/streams" class="nav-btn">📷</a>
|
|
|
|
{% if tournament_active %}
|
|
<a href="/mobile/draft" class="nav-btn">📋</a>
|
|
{% endif %}
|
|
|
|
<a href="/mobile/results" class="nav-btn active">🏆</a>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="container">
|
|
|
|
{% if participants %}
|
|
{% if participants|length > 0 %}
|
|
<div class="congratulations">
|
|
<div class="congrats-title">🎉 Tournament Complete!</div>
|
|
<div class="congrats-message">
|
|
Congratulations to {{ participants[0].name }} for winning!
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="results-list">
|
|
{% for participant in participants %}
|
|
<div class="result-card {{ 'podium rank-' + participant.rank|string if participant.rank <= 3 else '' }}">
|
|
<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>
|
|
{% if participant.rank == 1 %}
|
|
<div class="medal">🥇</div>
|
|
{% elif participant.rank == 2 %}
|
|
<div class="medal">🥈</div>
|
|
{% elif participant.rank == 3 %}
|
|
<div class="medal">🥉</div>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="participant-info">
|
|
<div class="participant-name">{{ participant.name }}</div>
|
|
<div class="participant-id">ID: {{ participant.id }}</div>
|
|
</div>
|
|
|
|
<div class="score-display">
|
|
<div class="score-number">{{ participant.total_score }}</div>
|
|
<div class="score-label">Points</div>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<div class="result-card">
|
|
<div style="text-align: center; width: 100%; color: #666;">
|
|
<h3>No Results Available</h3>
|
|
<p>Tournament results will appear here when scoring is complete.</p>
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<!-- Tournament Info -->
|
|
<div class="tournament-info">
|
|
<div class="info-title">📊 Tournament Information</div>
|
|
<div class="info-grid">
|
|
<div class="info-item">
|
|
<span class="info-label">Total Participants:</span>
|
|
<span class="info-value">{{ participants|length if participants else 0 }}</span>
|
|
</div>
|
|
<div class="info-item">
|
|
<span class="info-label">Tournament ID:</span>
|
|
<span class="info-value">{{ results.tournament_id[:10] if results.tournament_id else 'Unknown' }}...</span>
|
|
</div>
|
|
<div class="info-item">
|
|
<span class="info-label">Created:</span>
|
|
<span class="info-value">{{ results.created_at[:10] if results.created_at else 'Unknown' }}</span>
|
|
</div>
|
|
<div class="info-item">
|
|
<span class="info-label">Status:</span>
|
|
<span class="info-value" style="color: #28a745; font-weight: bold;">Completed</span>
|
|
</div>
|
|
{% if participants and participants|length > 0 %}
|
|
<div class="info-item">
|
|
<span class="info-label">Highest Score:</span>
|
|
<span class="info-value" style="color: #28a745; font-weight: bold;">{{ participants[0].total_score }} points</span>
|
|
</div>
|
|
<div class="info-item">
|
|
<span class="info-label">Winner:</span>
|
|
<span class="info-value" style="color: #ffd700; font-weight: bold;">{{ participants[0].name }}</span>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Confetti container -->
|
|
<div class="confetti" id="confetti"></div>
|
|
|
|
<script>
|
|
function createConfetti() {
|
|
const confettiContainer = document.getElementById('confetti');
|
|
const colors = ['#ffd700', '#ff6b6b', '#4ecdc4', '#45b7d1', '#96ceb4', '#ffeaa7'];
|
|
|
|
for (let i = 0; i < 50; i++) {
|
|
const confettiPiece = document.createElement('div');
|
|
confettiPiece.className = 'confetti-piece';
|
|
confettiPiece.style.left = Math.random() * 100 + '%';
|
|
confettiPiece.style.backgroundColor = colors[Math.floor(Math.random() * colors.length)];
|
|
confettiPiece.style.animationDelay = Math.random() * 3 + 's';
|
|
confettiPiece.style.animationDuration = (Math.random() * 2 + 2) + 's';
|
|
confettiContainer.appendChild(confettiPiece);
|
|
}
|
|
|
|
setTimeout(() => {
|
|
confettiContainer.innerHTML = '';
|
|
}, 5000);
|
|
}
|
|
|
|
function addMobileTouchFeedback() {
|
|
const touchElements = document.querySelectorAll('.nav-btn:not(.disabled), .result-card');
|
|
|
|
touchElements.forEach(element => {
|
|
element.addEventListener('touchstart', function(e) {
|
|
if (!this.disabled) {
|
|
this.style.transform = 'scale(0.98) translateY(0)';
|
|
this.style.transition = 'transform 0.1s ease';
|
|
}
|
|
});
|
|
|
|
element.addEventListener('touchend', function(e) {
|
|
if (!this.disabled) {
|
|
setTimeout(() => {
|
|
this.style.transform = '';
|
|
this.style.transition = 'transform 0.2s ease';
|
|
}, 100);
|
|
}
|
|
});
|
|
|
|
element.addEventListener('touchcancel', function(e) {
|
|
if (!this.disabled) {
|
|
this.style.transform = '';
|
|
this.style.transition = 'transform 0.2s ease';
|
|
}
|
|
});
|
|
});
|
|
}
|
|
|
|
function showWinnerCelebration() {
|
|
{% if participants and participants|length > 0 %}
|
|
createConfetti();
|
|
|
|
setTimeout(() => {
|
|
const firstCard = document.querySelector('.result-card.rank-1');
|
|
if (firstCard) {
|
|
firstCard.style.boxShadow = '0 0 30px rgba(255, 215, 0, 0.5)';
|
|
setTimeout(() => {
|
|
firstCard.style.boxShadow = '';
|
|
}, 2000);
|
|
}
|
|
}, 1000);
|
|
{% endif %}
|
|
}
|
|
|
|
document.addEventListener('keydown', function(event) {
|
|
if (event.key === 'r' || event.key === 'R') {
|
|
event.preventDefault();
|
|
window.location.reload();
|
|
}
|
|
});
|
|
|
|
document.addEventListener('DOMContentLoaded', function() {
|
|
addMobileTouchFeedback();
|
|
|
|
setTimeout(() => {
|
|
showWinnerCelebration();
|
|
}, 1500);
|
|
|
|
console.log('📱 Mobile Results with Smart Navbar loaded');
|
|
console.log('🏆 Tournament Results:', {
|
|
participants: {{ participants|length if participants else 0 }},
|
|
{% if participants and participants|length > 0 %}
|
|
winner: '{{ participants[0].name }}',
|
|
winning_score: {{ participants[0].total_score }}
|
|
{% endif %}
|
|
});
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |