Print function correction + player analysis fix and player stats fix

This commit is contained in:
bl3kunja-FW
2025-08-10 18:22:22 +02:00
parent 054c81e78e
commit 33758e7340
7 changed files with 1678 additions and 383 deletions
+89 -5
View File
@@ -12,7 +12,7 @@
html, body {
margin: 0;
padding: 0;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
background: #f5f5f5;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
height: 100vh;
overflow: hidden; /* Prevent scrolling for TV display */
@@ -652,7 +652,88 @@
.tv-refresh-indicator.show {
opacity: 1;
}
</style>
/* PRINT STYLES - Clean professional printout */
@media print {
/* Hide everything except the rankings table */
.navbar,
.left-column,
.tv-refresh-indicator {
display: none !important;
}
/* Reset body and html for print */
html, body {
height: auto !important;
overflow: visible !important;
background: white !important;
margin: 0;
padding: 20px;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
/* Make the container take full width and remove grid */
.tv-container {
display: block !important;
height: auto !important;
padding: 0 !important;
gap: 0 !important;
max-width: 100%;
}
/* Style the right column for print */
.right-column {
background: white !important;
border-radius: 0 !important;
box-shadow: none !important;
overflow: visible !important;
display: block !important;
height: auto !important;
margin: 0;
padding: 0;
}
/* Create a beautiful print header */
.table-header {
background: white !important;
padding: 30px 0 30px 0 !important;
border-bottom: 3px solid #007bff !important;
text-align: center;
margin-bottom: 30px !important;
page-break-inside: avoid;
position: relative;
}
/* Add logo using CSS */
.table-header::before {
content: "";
display: block;
width: 200px;
height: 80px;
margin: 0 auto 20px auto;
background: url('/static/logo.png') no-repeat center center;
background-size: contain;
/* Fallback for when logo doesn't load */
background-color: transparent;
}
/* Add title using CSS */
.table-header::after {
content: "🏆 TOURNAMENT RESULTS";
display: block;
font-size: 28pt;
font-weight: bold;
color: #333;
margin: 0;
letter-spacing: 2px;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
/* Hide the original table title */
.table-title {
display: none !important;
}
}
</style>
</head>
<body>
<div class="navbar">
@@ -661,9 +742,7 @@
</div>
<div class="navbar-controls">
<a href="/" class="nav-btn">← Dashboard</a>
<a href="/tournament/draft" class="nav-btn">📋 Draft</a>
<a href="/results/calculator" class="nav-btn primary">🎯 Calculator</a>
<button class="nav-btn" onclick="window.print()">🖨️ Print</button>
<button class="nav-btn" onclick="printResults()">🖨️ Print</button>
</div>
</div>
@@ -867,6 +946,11 @@
document.body.offsetHeight; // Trigger reflow
document.body.style.display = '';
});
function printResults() {
// Trigger print dialog
window.print();
}
</script>
</body>
</html>