quality update:

- calculator
- result screens
- some fixes
This commit is contained in:
2026-02-08 15:19:13 +01:00
parent aa01f4136d
commit d0bbf7bdce
39 changed files with 3323 additions and 69107 deletions
+155 -55
View File
@@ -24,7 +24,7 @@
height: calc(100vh - 70px);
display: flex;
flex-direction: column;
padding: 15px;
padding: 0px;
gap: 15px;
}
@@ -36,6 +36,7 @@
text-align: center;
flex-shrink: 0;
position: relative;
margin: 10px 15px 5px 15px;
}
.tournament-header .nav-btn {
@@ -104,85 +105,126 @@
flex: 1;
display: flex;
flex-direction: column;
gap: 8px;
gap: 12px;
min-height: 0;
overflow-y: auto;
padding: 5px;
overflow-x: hidden;
padding: 15px;
background: white;
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
margin: 5px 15px 15px 15px;
}
/* Custom scrollbar styling */
.rounds-container::-webkit-scrollbar {
width: 12px;
}
.rounds-container::-webkit-scrollbar-track {
background: #f5f5f5;
border-radius: 10px;
}
.rounds-container::-webkit-scrollbar-thumb {
background: #5a8fd1;
border-radius: 10px;
border: 2px solid #f5f5f5;
}
.rounds-container::-webkit-scrollbar-thumb:hover {
background: #4a7db8;
}
.round-row {
background: white;
border-radius: 10px;
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
border-radius: 12px;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
overflow: hidden;
transition: all 0.2s ease;
transition: all 0.3s ease;
display: flex;
flex-direction: row;
flex-shrink: 0;
min-height: 0;
border: 2px solid #e9ecef;
border-left: 5px solid #9ca3af;
}
.round-row.current {
border-left: 4px solid #28a745;
box-shadow: 0 4px 15px rgba(0, 123, 255, 0.25);
border-left: 5px solid #5a8fd1;
border-color: #5a8fd1;
box-shadow: 0 6px 24px rgba(90, 143, 209, 0.25);
}
.round-row.completed {
border-left: 4px solid #28a745;
opacity: 0.95;
border-left: 5px solid #28a745;
border-color: #28a745;
opacity: 0.98;
box-shadow: 0 4px 16px rgba(40, 167, 69, 0.15);
}
.round-row.waiting {
opacity: 0.8;
border-color: #d1d5db;
}
.round-header {
background: #f8f9fa;
border-right: 1px solid #e9ecef;
background: linear-gradient(135deg, #f8f9fa 0%, #f0f1f3 100%);
border-right: 3px solid #e9ecef;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 10px 15px;
min-width: 120px;
padding: 14px 16px;
flex-shrink: 0;
text-align: center;
min-width: 130px;
}
.round-row.current .round-header {
background: #e3f2fd;
background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
border-right-color: #5a8fd1;
}
.round-row.completed .round-header {
background: #e8f5e8;
background: linear-gradient(135deg, #e8f5e8 0%, #c8e6c9 100%);
border-right-color: #28a745;
}
.round-title {
font-size: 1rem;
font-weight: bold;
font-size: 1.05rem;
font-weight: 700;
color: #333;
margin-bottom: 4px;
margin-bottom: 6px;
letter-spacing: 0.3px;
}
.round-badge {
padding: 3px 8px;
border-radius: 10px;
font-size: 0.65rem;
font-weight: bold;
padding: 4px 10px;
border-radius: 12px;
font-size: 0.7rem;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.5px;
box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.current-badge {
background: #28a745;
background: #5a8fd1;
color: white;
box-shadow: 0 2px 8px rgba(90, 143, 209, 0.3);
}
.completed-badge {
background: #28a745;
color: white;
box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}
.waiting-badge {
background: #6c757d;
background: #9ca3af;
color: white;
box-shadow: 0 2px 6px rgba(156, 163, 175, 0.2);
}
.positions-container {
@@ -191,59 +233,79 @@
grid-template-columns: repeat(6, 1fr);
gap: 8px;
padding: 12px;
overflow: hidden;
}
.position-card {
background: white;
border: 2px solid #9ca3af;
border-radius: 10px;
overflow: hidden;
overflow: visible;
display: flex;
flex-direction: row;
transition: all 0.3s ease;
box-shadow: 0 2px 6px rgba(156, 163, 175, 0.2);
min-height: 70px;
box-shadow: 0 2px 8px rgba(156, 163, 175, 0.18);
min-height: 80px;
flex-shrink: 0;
}
.position-card:hover {
transform: translateY(-2px);
box-shadow: 0 3px 12px rgba(156, 163, 175, 0.28);
}
/* Current round - blue cards */
.round-row.current .position-card {
border-color: #5a8fd1;
box-shadow: 0 2px 6px rgba(90, 143, 209, 0.2);
box-shadow: 0 2px 8px rgba(90, 143, 209, 0.25);
}
.round-row.current .position-card:hover {
box-shadow: 0 3px 12px rgba(90, 143, 209, 0.35);
}
.round-row.current .position-card .position-header {
background: #5a8fd1;
background: linear-gradient(135deg, #5a8fd1 0%, #4a7db8 100%);
}
/* Completed round - green cards */
.round-row.completed .position-card {
border-color: #28a745;
box-shadow: 0 2px 6px rgba(40, 167, 69, 0.2);
box-shadow: 0 2px 8px rgba(40, 167, 69, 0.25);
}
.round-row.completed .position-card:hover {
box-shadow: 0 3px 12px rgba(40, 167, 69, 0.35);
}
.round-row.completed .position-card .position-header {
background: #28a745;
background: linear-gradient(135deg, #28a745 0%, #1e7e34 100%);
}
/* Waiting round - gray cards */
.round-row.waiting .position-card {
border-color: #9ca3af;
box-shadow: 0 2px 6px rgba(156, 163, 175, 0.2);
box-shadow: 0 2px 8px rgba(156, 163, 175, 0.2);
}
.round-row.waiting .position-card:hover {
box-shadow: 0 3px 10px rgba(156, 163, 175, 0.3);
}
.round-row.waiting .position-card .position-header {
background: #9ca3af;
background: linear-gradient(135deg, #9ca3af 0%, #8b929f 100%);
}
.position-header {
background: #9ca3af;
padding: 0;
padding: 12px 0;
display: flex;
align-items: center;
justify-content: center;
flex-shrink: 0;
min-width: 50px;
width: 50px;
min-height: 80px;
}
.position-card.empty .position-header {
@@ -251,14 +313,14 @@
}
.position-number {
font-size: 1.6rem;
font-size: 2rem;
font-weight: 700;
color: white;
line-height: 1;
}
.position-body {
padding: 10px 12px;
padding: 12px;
display: flex;
flex-direction: column;
justify-content: center;
@@ -266,6 +328,7 @@
flex: 1;
background: white;
border-radius: 0 8px 8px 0;
overflow: visible;
}
.position-card.empty .position-body {
@@ -276,10 +339,13 @@
font-size: 1.15rem;
font-weight: 600;
color: #2c3e50;
line-height: 1.3;
line-height: 1.4;
word-wrap: break-word;
max-width: 100%;
text-align: center;
white-space: normal;
overflow: visible;
text-overflow: clip;
}
.position-card.empty .player-name {
@@ -372,26 +438,30 @@
border: 1px solid #ddd !important;
border-radius: 0 !important;
box-shadow: none !important;
margin-bottom: 15px;
page-break-inside: avoid;
display: block !important;
display: flex !important;
flex-direction: row !important;
margin-bottom: 15px;
flex-shrink: 0 !important;
}
.round-row.current,
.round-row.completed,
.round-row.waiting {
border-left: 1px solid #ddd !important;
border-left: 2px solid #ddd !important;
opacity: 1 !important;
}
.round-header {
background: #f8f9fa !important;
border: none !important;
border-bottom: 1px solid #ddd !important;
border-right: 1px solid #ddd !important;
display: flex !important;
justify-content: space-between !important;
flex-direction: column !important;
justify-content: center !important;
align-items: center !important;
padding: 10px 15px !important;
min-width: 130px !important;
}
.round-row.current .round-header,
@@ -403,7 +473,6 @@
.round-title {
font-size: 14pt !important;
font-weight: bold !important;
flex-shrink: 0;
}
.round-badge {
@@ -411,9 +480,7 @@
}
.round-print-info {
display: flex !important;
align-items: center !important;
gap: 20px !important;
display: none !important;
}
.round-time-field {
@@ -460,21 +527,23 @@
.positions-container {
display: grid !important;
grid-template-columns: repeat(3, 1fr) !important;
gap: 10px !important;
grid-template-columns: repeat(6, 1fr) !important;
gap: 8px !important;
padding: 15px !important;
overflow: visible !important;
}
.position-card {
border: 1px solid #5a8fd1 !important;
border-radius: 8px !important;
overflow: hidden !important;
border-radius: 4px !important;
overflow: visible !important;
background: white !important;
box-shadow: none !important;
min-height: 60px !important;
min-height: 70px !important;
page-break-inside: avoid;
display: flex !important;
flex-direction: row !important;
flex-shrink: 0 !important;
}
/* All cards in print have same blue color */
@@ -486,13 +555,42 @@
.position-header {
background: #5a8fd1 !important;
padding: 0 !important;
padding: 10px 0 !important;
display: flex !important;
align-items: center !important;
justify-content: center !important;
flex-shrink: 0 !important;
min-width: 40px !important;
width: 40px !important;
min-height: 70px !important;
}
.position-number {
font-size: 12pt !important;
font-weight: bold !important;
color: white !important;
}
.position-body {
padding: 6px 10px !important;
display: flex !important;
flex-direction: column !important;
justify-content: center !important;
align-items: center !important;
flex: 1 !important;
background: white !important;
overflow: hidden !important;
}
.player-name {
font-size: 10pt !important;
font-weight: 600 !important;
color: #2c3e50 !important;
line-height: 1.2 !important;
white-space: nowrap !important;
overflow: hidden !important;
text-overflow: ellipsis !important;
max-width: 100% !important;
}
.round-row.current .position-card .position-header,
@@ -511,7 +609,7 @@
}
.position-body {
padding: 8px 10px !important;
padding: 10px !important;
background: white !important;
flex: 1 !important;
display: flex !important;
@@ -525,8 +623,10 @@
}
.player-name {
font-size: 11pt !important;
font-size: 10pt !important;
color: #2c3e50 !important;
white-space: normal !important;
overflow: visible !important;
}
.position-card.empty .player-name {
+51 -7
View File
@@ -683,17 +683,12 @@
<div class="tournament-actions">
<a href="/tournament/draft" class="nav-link tournament-btn">📋 <span data-i18n="tournament.view_full_tournament_draft">Oglej si Celoten Žreb Turnirja</span></a>
<a href="/results/calculator" class="nav-link tournament-btn">🎯 <span data-i18n="scoring.results_calculator">Calculator</span></a>
<a href="/tournament" class="nav-link tournament-btn" id="manageTournamentLink">⚙️ <span data-i18n="tournament.manage_tournament">Upravljaj Turnir</span></a>
</div>
</div>
{% endif %}
{% if settings.tournament_active %}
<div class="settings-group">
<a href="/results/calculator" class="nav-link tournament-btn">🎯 <span data-i18n="scoring.results_calculator">Calculator</span></a>
</div>
{% endif %}
<!-- Tournaments Section -->
<div class="settings-group">
<h4 data-i18n="league.tournaments">Turnirji</h4>
@@ -771,7 +766,7 @@
<!-- Version Information -->
<div class="version-info" style="margin-top: 30px; padding: 15px; text-align: center; border-top: 1px solid #e9ecef; color: #6c757d; font-size: 0.85rem;">
Version 1.0.0
Version 1.0.1
</div>
</div>
</div>
@@ -1466,11 +1461,60 @@
}, { once: true });
});
// TV Display Auto-Update Polling
// (Separate from remote control polling)
let lastDashboardStateHash = null;
let dashboardPollingInterval = null;
async function pollDashboardState() {
// Only poll when page is visible
if (document.visibilityState !== 'visible') {
return;
}
try {
const response = await fetch('/api/dashboard/state');
if (!response.ok) return;
const data = await response.json();
// Create a hash of the state to detect changes
const stateHash = JSON.stringify(data);
// If state changed, reload the page
if (lastDashboardStateHash !== null && stateHash !== lastDashboardStateHash) {
console.log('🔄 Tournament state changed, reloading TV display...');
window.location.reload();
}
lastDashboardStateHash = stateHash;
} catch (error) {
console.error('Dashboard polling error:', error);
// Silent failure - keep polling
}
}
// Start dashboard polling (every 3 seconds)
dashboardPollingInterval = setInterval(pollDashboardState, 3000);
// Initial poll
pollDashboardState();
// Pause polling when page is hidden
document.addEventListener('visibilitychange', () => {
if (document.visibilityState === 'visible') {
pollDashboardState();
}
});
// Cleanup on page unload
window.addEventListener('beforeunload', function() {
if (remotePollingInterval) {
clearInterval(remotePollingInterval);
}
if (dashboardPollingInterval) {
clearInterval(dashboardPollingInterval);
}
});
</script>
</body>
+156 -101
View File
@@ -96,22 +96,25 @@
.league-container {
height: calc(100vh - 90px);
display: grid;
grid-template-columns: 1fr 3fr;
grid-template-columns: 1fr 2fr;
gap: 20px;
padding: 20px;
overflow: hidden;
}
/* Left Column - Header & Champions */
.left-column {
display: flex;
flex-direction: column;
gap: 20px;
gap: 0;
min-height: 0;
overflow: hidden;
}
.league-header {
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
padding: 25px;
border-radius: 12px 12px 0 0;
box-shadow: none;
padding: 20px;
text-align: center;
flex-shrink: 0;
color: white;
@@ -149,37 +152,37 @@
}
.header-logo {
height: 70px;
max-width: 180px;
height: 50px;
max-width: 150px;
object-fit: contain;
margin-bottom: 20px;
margin-bottom: 10px;
filter: brightness(1.2) contrast(1.1);
background-color: white;
padding: 10px;
border-radius: 8px;
padding: 6px;
border-radius: 6px;
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.2);
}
.league-title {
font-size: 2.2rem;
font-size: 1.8rem;
font-weight: 700;
color: rgb(255, 255, 255);
margin-bottom: 10px;
margin-bottom: 8px;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.league-subtitle {
font-size: 1.1rem;
font-size: 0.9rem;
color: rgba(255, 255, 255, 0.95);
margin-bottom: 20px;
margin-bottom: 12px;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.league-meta {
display: flex;
justify-content: space-around;
gap: 15px;
gap: 10px;
}
.meta-item {
@@ -187,7 +190,7 @@
}
.meta-number {
font-size: 1.6rem;
font-size: 1.2rem;
font-weight: 700;
color: #ffffff;
display: block;
@@ -195,83 +198,121 @@
}
.meta-label {
font-size: 0.8rem;
font-size: 0.65rem;
color: rgba(255, 255, 255, 0.9);
text-transform: uppercase;
letter-spacing: 0.5px;
letter-spacing: 0.3px;
font-weight: 500;
}
/* League Champion Section */
.champion-section {
background: white;
border-radius: 12px;
border-radius: 0 0 12px 12px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
padding: 25px;
padding: 12px;
flex: 1;
display: flex;
flex-direction: column;
overflow: visible;
min-height: 0;
border-top: 1px solid #e9ecef;
}
.champion-title {
text-align: center;
font-size: 1.4rem;
font-size: 0.9rem;
font-weight: 700;
color: #2c3e50;
margin-bottom: 20px;
margin-bottom: 8px;
flex-shrink: 0;
}
.champion-container {
display: flex;
flex-direction: column;
gap: 15px;
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: 0.75fr 0.75fr 1.5fr;
gap: 10px;
flex: 1;
overflow: hidden;
min-height: 0;
}
.champion-card {
background: white;
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
padding: 20px;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
padding: 12px 12px 18px 12px;
display: flex;
flex-direction: column;
align-items: center;
gap: 20px;
transition: all 0.2s ease;
gap: 8px;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
border-left: 5px solid;
border: 1px solid #e9ecef;
border-top: 6px solid;
justify-content: flex-end;
}
.champion-card::before {
content: '';
position: absolute;
top: 6px;
left: 1px;
right: 1px;
bottom: 1px;
background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 100%);
pointer-events: none;
z-index: 1;
border-radius: 0 0 11px 11px;
}
.champion-card:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.champion-card.rank-1 {
border-left-color: #ffd700;
background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
border-top-color: #ffd700;
border-color: #ffd700;
background: linear-gradient(135deg, #fffbf0 0%, #fff9e6 100%);
grid-column: 2;
grid-row: 1 / 4;
}
.champion-card.rank-2 {
border-left-color: #c0c0c0;
background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
border-top-color: #c0c0c0;
border-color: #c0c0c0;
background: linear-gradient(135deg, #f5f5f5 0%, #f0f0f0 100%);
grid-column: 1;
grid-row: 2 / 4;
}
.champion-card.rank-3 {
border-left-color: #cd7f32;
background: linear-gradient(135deg, #fdf6f0 0%, #ffffff 100%);
border-top-color: #cd7f32;
border-color: #cd7f32;
background: linear-gradient(135deg, #fff5f0 0%, #ffe8dc 100%);
grid-column: 3;
grid-row: 3;
}
.rank-display {
display: flex;
flex-direction: column;
align-items: center;
min-width: 60px;
gap: 2px;
position: relative;
z-index: 2;
}
.medal {
font-size: 4.5rem;
line-height: 1;
}
.rank-number {
font-size: 1.8rem;
font-weight: bold;
font-size: 1.9rem;
font-weight: 900;
color: #333;
line-height: 1;
}
@@ -280,29 +321,31 @@
.champion-card.rank-2 .rank-number { color: #696969; }
.champion-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;
text-align: center;
position: relative;
z-index: 2;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.participant-name {
font-size: 1.3rem;
font-weight: bold;
color: #333;
margin-bottom: 5px;
font-size: 1rem;
font-weight: 700;
color: #2c3e50;
margin: 0;
word-wrap: break-word;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
line-height: 1.2;
}
.participant-details {
@@ -315,59 +358,80 @@
.participant-id {
background: #28a745;
color: white;
padding: 3px 10px;
padding: 6px 12px;
border-radius: 12px;
font-size: 0.8rem;
font-weight: bold;
font-size: 0.75rem;
font-weight: 700;
display: inline-block;
text-transform: uppercase;
letter-spacing: 0.5px;
box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}
.joker-badge {
background: #ffc107;
color: #856404;
padding: 3px 8px;
border-radius: 8px;
font-size: 0.7rem;
font-weight: bold;
padding: 6px 12px;
border-radius: 12px;
font-size: 0.75rem;
font-weight: 700;
display: inline-block;
text-transform: uppercase;
letter-spacing: 0.5px;
box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
}
.score-display {
text-align: right;
min-width: 100px;
text-align: center;
position: relative;
z-index: 2;
display: flex;
flex-direction: column;
align-items: center;
gap: 1px;
}
.final-score {
font-size: 2rem;
font-weight: bold;
.score-number {
font-size: 1.8rem;
font-weight: 900;
color: #28a745;
line-height: 1;
}
.tens-count {
font-size: 1.2rem;
color: #ffc107;
font-weight: 700;
}
.total-score {
font-size: 0.9rem;
color: #666;
margin-top: 2px;
font-size: 0.8rem;
color: #ffc107;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.3px;
}
.tens-count {
font-size: 0.9rem;
font-size: 0.8rem;
color: #ffc107;
font-weight: bold;
margin-top: 2px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.3px;
}
.score-label {
font-size: 0.8rem;
color: #666;
font-size: 0.6rem;
color: #999;
text-transform: uppercase;
font-weight: bold;
font-weight: 600;
letter-spacing: 0.3px;
}
/* Right Column - League Table */
.right-column {
background: white;
border-radius: 8px;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
overflow: hidden;
display: flex;
@@ -376,13 +440,13 @@
.table-header {
background: #f8f9fa;
padding: 15px 20px;
padding: 12px 15px;
border-bottom: 1px solid #dee2e6;
flex-shrink: 0;
}
.table-title {
font-size: 1.25rem;
font-size: 0.95rem;
font-weight: 600;
color: #2c3e50;
margin: 0;
@@ -396,12 +460,12 @@
.league-table {
width: 100%;
border-collapse: collapse;
font-size: 0.85rem;
font-size: 0.75rem;
}
.league-table th,
.league-table td {
padding: 7px 5px;
padding: 6px 4px;
text-align: center;
border-bottom: 1px solid #f1f3f4;
border-right: 1px solid #f1f3f4;
@@ -421,20 +485,20 @@
.league-table th.player-col {
text-align: left;
width: 120px;
width: 100px;
}
.league-table th.tournament-col {
width: 70px;
width: 60px;
}
.league-table th.final-col {
width: 80px;
width: 70px;
background: #e3f2fd;
}
.league-table th.tens-col {
width: 70px;
width: 60px;
background: #fff3cd;
}
@@ -1043,33 +1107,24 @@
const topThree = processedParticipants.slice(0, 3);
return topThree.map(participant => {
const suffix = participant.rank === 1 ? 'st' :
participant.rank === 2 ? 'nd' :
participant.rank === 3 ? 'rd' : 'th';
const medal = participant.rank === 1 ? '🥇' :
participant.rank === 2 ? '🥈' :
const medal = participant.rank === 1 ? '🥇' :
participant.rank === 2 ? '🥈' :
participant.rank === 3 ? '🥉' : '';
return `
<div class="champion-card rank-${participant.rank}">
<div class="rank-display">
<div class="rank-number">${participant.rank}</div>
<div class="rank-suffix">${suffix}</div>
<div class="medal">${medal}</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>
</div>
</div>
<div class="score-display">
<div class="final-score">${participant.final_score}</div>
<div class="tens-count">🎯 ${participant.total_tens} × 10</div>
<div class="score-number">${participant.final_score}</div>
<div class="tens-count">🎯 ${participant.total_tens}</div>
</div>
</div>
`;
File diff suppressed because it is too large Load Diff
+146 -101
View File
@@ -96,7 +96,7 @@
.tv-container {
height: calc(100vh - 90px);
display: grid;
grid-template-columns: 1fr 3fr;
grid-template-columns: 1fr 2fr;
gap: 20px;
padding: 20px;
}
@@ -105,18 +105,26 @@
.left-column {
display: flex;
flex-direction: column;
gap: 20px;
gap: 0;
overflow: hidden;
flex: 1;
min-height: 0;
}
.results-header {
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
padding: 25px;
border-radius: 12px 12px 0 0;
box-shadow: none;
padding: 15px;
text-align: center;
flex-shrink: 0;
color: white;
position: relative;
overflow: hidden;
min-height: 0;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
/* Dynamic header colors based on tournament type */
@@ -149,37 +157,37 @@
}
.header-logo {
height: 70px;
max-width: 180px;
height: 60px;
max-width: 160px;
object-fit: contain;
margin-bottom: 20px;
margin-bottom: 12px;
filter: brightness(1.2) contrast(1.1);
background-color: white;
padding: 10px;
padding: 8px;
border-radius: 8px;
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.2);
}
.results-title {
font-size: 2.2rem;
font-size: 2rem;
font-weight: 700;
color: rgb(255, 255, 255);
margin-bottom: 10px;
margin-bottom: 6px;
text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}
.results-subtitle {
font-size: 1.1rem;
font-size: 1rem;
color: rgba(255, 255, 255, 0.95);
margin-bottom: 20px;
margin-bottom: 12px;
text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.results-meta {
display: flex;
justify-content: space-around;
gap: 20px;
gap: 12px;
}
.meta-item {
@@ -187,7 +195,7 @@
}
.meta-number {
font-size: 1.8rem;
font-size: 1.2rem;
font-weight: 700;
color: #ffffff;
display: block;
@@ -195,83 +203,121 @@
}
.meta-label {
font-size: 0.8rem;
font-size: 0.65rem;
color: rgba(255, 255, 255, 0.9);
text-transform: uppercase;
letter-spacing: 0.5px;
letter-spacing: 0.3px;
font-weight: 500;
}
/* Modern Podium Design */
.podium-section {
background: white;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
padding: 25px;
border-radius: 0 0 12px 12px;
padding: 12px;
flex: 1;
display: flex;
flex-direction: column;
overflow: visible;
min-height: 0;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
border-top: 1px solid #e9ecef;
}
.podium-title {
text-align: center;
font-size: 1.4rem;
font-size: 0.9rem;
font-weight: 700;
color: #2c3e50;
margin-bottom: 20px;
margin-bottom: 8px;
}
.podium-container {
display: flex;
flex-direction: column;
gap: 15px;
display: grid;
grid-template-columns: repeat(3, 1fr);
grid-template-rows: 0.75fr 0.75fr 1.5fr;
gap: 10px;
overflow: hidden;
flex: 1;
min-height: 0;
}
.podium-card {
background: white;
border-radius: 12px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
padding: 20px;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
padding: 12px 12px 18px 12px;
display: flex;
flex-direction: column;
align-items: center;
gap: 20px;
transition: all 0.2s ease;
gap: 8px;
transition: all 0.3s ease;
position: relative;
overflow: hidden;
border-left: 5px solid;
border-top: 6px solid;
border: 1px solid #e9ecef;
border-top-width: 6px;
justify-content: flex-end;
}
.podium-card::before {
content: '';
position: absolute;
top: 6px;
left: 1px;
right: 1px;
bottom: 1px;
background: linear-gradient(135deg, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 100%);
pointer-events: none;
z-index: 1;
border-radius: 0 0 11px 11px;
}
.podium-card:hover {
transform: translateY(-2px);
box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.podium-card.rank-1 {
border-left-color: #ffd700;
background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
border-top-color: #ffd700;
border-color: #ffd700;
background: linear-gradient(135deg, #fffbf0 0%, #fff9e6 100%);
grid-column: 2;
grid-row: 1 / 4;
}
.podium-card.rank-2 {
border-left-color: #c0c0c0;
background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
border-top-color: #c0c0c0;
border-color: #c0c0c0;
background: linear-gradient(135deg, #f5f5f5 0%, #f0f0f0 100%);
grid-column: 1;
grid-row: 2 / 4;
}
.podium-card.rank-3 {
border-left-color: #cd7f32;
background: linear-gradient(135deg, #fdf6f0 0%, #ffffff 100%);
border-top-color: #cd7f32;
border-color: #cd7f32;
background: linear-gradient(135deg, #fff5f0 0%, #ffe8dc 100%);
grid-column: 3;
grid-row: 3;
}
.rank-display {
display: flex;
flex-direction: column;
align-items: center;
min-width: 60px;
gap: 2px;
position: relative;
z-index: 2;
}
.medal {
font-size: 4.5rem;
line-height: 1;
}
.rank-number {
font-size: 1.8rem;
font-weight: bold;
font-size: 1.9rem;
font-weight: 900;
color: #333;
line-height: 1;
}
@@ -280,71 +326,74 @@
.podium-card.rank-2 .rank-number { color: #696969; }
.podium-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;
text-align: center;
position: relative;
z-index: 2;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.participant-name {
font-size: 1.3rem;
font-weight: bold;
color: #333;
margin-bottom: 5px;
font-size: 1rem;
font-weight: 700;
color: #2c3e50;
margin: 0;
word-wrap: break-word;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
line-height: 1.2;
}
.participant-id {
background: #28a745;
color: white;
padding: 3px 10px;
border-radius: 12px;
font-size: 0.8rem;
font-weight: bold;
display: inline-block;
display: none;
}
.score-display {
text-align: right;
min-width: 100px;
text-align: center;
position: relative;
z-index: 2;
display: flex;
flex-direction: column;
align-items: center;
gap: 1px;
}
.score-number {
font-size: 2rem;
font-weight: bold;
font-size: 1.8rem;
font-weight: 900;
color: #28a745;
line-height: 1;
}
.tens-count {
font-size: 1rem;
font-size: 1.2rem;
color: #ffc107;
font-weight: bold;
margin-top: 2px;
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.3px;
}
.score-label {
font-size: 0.8rem;
color: #666;
font-size: 0.6rem;
color: #999;
text-transform: uppercase;
font-weight: bold;
font-weight: 600;
letter-spacing: 0.3px;
}
/* Right Column - Full Results Table */
.right-column {
background: white;
border-radius: 8px;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
overflow: hidden;
display: flex;
@@ -353,13 +402,13 @@
.table-header {
background: #f8f9fa;
padding: 15px 20px;
padding: 8px 12px;
border-bottom: 1px solid #dee2e6;
flex-shrink: 0;
}
.table-title {
font-size: 1.25rem;
font-size: 0.95rem;
font-weight: 600;
color: #2c3e50;
margin: 0;
@@ -367,17 +416,19 @@
.table-container {
flex: 1;
overflow-y: auto;
overflow: auto;
min-height: 0;
}
.results-table {
width: 100%;
border-collapse: collapse;
font-size: 0.75rem;
}
.results-table th,
.results-table td {
padding: 10px 8px;
padding: 4px 6px;
text-align: center;
border-bottom: 1px solid #f1f3f4;
border-right: 1px solid #f1f3f4;
@@ -388,15 +439,15 @@
font-weight: 600;
color: #495057;
text-transform: uppercase;
font-size: 0.8rem;
letter-spacing: 0.5px;
font-size: 0.65rem;
letter-spacing: 0.3px;
position: sticky;
top: 0;
z-index: 10;
}
.results-table th.rank-col {
width: 80px;
width: auto;
}
.results-table th.player-col {
@@ -405,12 +456,12 @@
}
.results-table th.score-col {
width: 100px;
width: auto;
background: #e3f2fd;
}
.results-table th.tens-col {
width: 100px;
width: auto;
background: #fff3cd;
}
@@ -452,30 +503,30 @@
.rank-2 { color: #6c757d; }
.rank-3 { color: #8b4513; }
.results-table tbody {
display: table-row-group;
}
.player-cell {
text-align: left !important;
padding-left: 12px !important;
}
.player-name {
font-size: 1rem;
font-size: 0.75rem;
font-weight: 600;
color: #2c3e50;
word-break: keep-all;
overflow-wrap: break-word;
hyphens: none;
}
.score-cell {
background: #e3f2fd !important;
font-size: 1.1rem;
font-size: 0.75rem;
font-weight: 700;
color: #1976d2;
}
.tens-cell {
background: #fff3cd !important;
font-size: 1rem;
font-size: 0.75rem;
font-weight: 700;
color: #856404;
}
@@ -484,10 +535,10 @@
.stats-footer {
background: white;
border-top: 1px solid #dee2e6;
padding: 10px 20px;
padding: 6px 15px;
display: flex;
justify-content: space-around;
font-size: 0.8rem;
font-size: 0.7rem;
color: #6c757d;
flex-shrink: 0;
}
@@ -833,19 +884,13 @@
const topThree = processedParticipants.slice(0, 3);
return topThree.map(participant => {
const suffix = participant.rank === 1 ? 'st' :
participant.rank === 2 ? 'nd' :
participant.rank === 3 ? 'rd' : 'th';
const medal = participant.rank === 1 ? '🥇' :
participant.rank === 2 ? '🥈' :
const medal = participant.rank === 1 ? '🥇' :
participant.rank === 2 ? '🥈' :
participant.rank === 3 ? '🥉' : '';
return `
<div class="podium-card rank-${participant.rank}">
<div class="rank-display">
<div class="rank-number">${participant.rank}</div>
<div class="rank-suffix">${suffix}</div>
<div class="medal">${medal}</div>
</div>
@@ -856,7 +901,7 @@
<div class="score-display">
<div class="score-number">${participant.total_score}</div>
<div class="tens-count">🎯 ${participant.tens_count} × 10</div>
<div class="tens-count">🎯 ${participant.tens_count}</div>
</div>
</div>
`;
+8
View File
@@ -2463,6 +2463,10 @@
if (response.ok) {
const result = await response.json();
// Open main page in new tab for TV display
window.open('/', '_blank', 'noopener,noreferrer');
alert('Tournament started successfully!');
window.location.reload();
} else {
@@ -2502,6 +2506,10 @@
if (response.ok) {
const result = await response.json();
// Open main page in new tab for TV display
window.open('/', '_blank', 'noopener,noreferrer');
alert('Tournament started successfully!');
window.location.reload();
} else {