Mobile desighn Adjustments

This commit is contained in:
2025-09-05 12:37:33 +02:00
parent 00849e6d15
commit 3872397082
8 changed files with 918 additions and 231 deletions

View File

@@ -656,30 +656,304 @@ body {
background: #ef4444;
}
/* Mobile First Responsive Design */
@media (max-width: 768px) {
.header {
.main-container {
padding: 1rem;
flex-direction: column;
gap: 1rem;
max-width: 100%;
}
.main-title {
font-size: 2.5rem;
margin-bottom: 0.5rem;
}
.tagline {
font-size: 1rem;
}
.nav-buttons {
flex-wrap: wrap;
position: fixed;
top: 1rem;
right: 1rem;
left: 1rem;
flex-direction: column;
gap: 0.5rem;
background: rgba(15, 23, 42, 0.95);
backdrop-filter: blur(20px);
border: 1px solid #1e293b;
border-radius: 1rem;
padding: 1rem;
z-index: 1000;
}
.user-info {
order: -1;
margin-bottom: 0.5rem;
padding-bottom: 0.5rem;
border-bottom: 1px solid #334155;
width: 100%;
justify-content: center;
}
.container {
padding: 0 1rem;
.btn {
width: 100%;
padding: 1rem;
font-size: 1rem;
text-align: center;
}
.dashboard-grid {
grid-template-columns: 1fr;
gap: 1rem;
margin-bottom: 1.5rem;
}
.card {
padding: 1.5rem;
}
.card h3 {
font-size: 1.1rem;
}
.welcome-card {
padding: 1.5rem;
margin-bottom: 1.5rem;
}
.times-section {
padding: 1.5rem;
margin-top: 1.5rem;
}
.times-header h2 {
font-size: 1.5rem;
}
.times-header p {
font-size: 1rem;
}
.times-stats {
grid-template-columns: repeat(2, 1fr);
gap: 1rem;
margin-bottom: 1.5rem;
}
.stat-card {
padding: 1rem;
}
.stat-number {
font-size: 1.5rem;
}
.stat-label {
font-size: 0.8rem;
}
.times-grid {
grid-template-columns: 1fr;
gap: 1rem;
}
.user-time-card {
padding: 1rem;
}
.time-value-large {
font-size: 1.5rem;
}
.modal-content {
margin: 2% auto;
margin: 1% auto;
width: 95%;
padding: 1.5rem;
padding: 1rem;
max-height: 90vh;
overflow-y: auto;
}
.modal-title {
font-size: 1.2rem;
}
.form-input {
padding: 1rem;
font-size: 1rem;
}
.player-selection {
max-height: 150px;
}
.player-option {
padding: 1rem;
}
.run-item {
flex-direction: column;
align-items: flex-start;
gap: 0.5rem;
}
.run-details {
text-align: left;
}
}
/* Extra small devices (phones in portrait) */
@media (max-width: 480px) {
.main-container {
padding: 0.5rem;
}
.main-title {
font-size: 2rem;
}
.tagline {
font-size: 0.9rem;
}
.nav-buttons {
top: 0.5rem;
right: 0.5rem;
left: 0.5rem;
padding: 0.75rem;
}
.card {
padding: 1rem;
}
.times-section {
padding: 1rem;
}
.times-stats {
grid-template-columns: 1fr;
gap: 0.75rem;
}
.stat-card {
padding: 0.75rem;
}
.stat-number {
font-size: 1.25rem;
}
.modal-content {
margin: 0.5% auto;
width: 98%;
padding: 0.75rem;
}
.times-header h2 {
font-size: 1.25rem;
}
.times-header p {
font-size: 0.9rem;
}
}
/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
.nav-buttons {
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
}
.user-info {
order: 0;
margin-bottom: 0;
padding-bottom: 0;
border-bottom: none;
width: auto;
}
.btn {
width: auto;
flex: 1;
min-width: 120px;
}
.main-title {
font-size: 2rem;
}
.times-stats {
grid-template-columns: repeat(4, 1fr);
}
}
/* Touch-friendly improvements for mobile */
@media (max-width: 768px) {
.btn {
min-height: 44px; /* Apple's recommended minimum touch target */
touch-action: manipulation; /* Prevents double-tap zoom */
}
.card {
touch-action: manipulation;
}
.user-time-card {
touch-action: manipulation;
}
.player-option {
min-height: 44px;
touch-action: manipulation;
}
.close {
min-width: 44px;
min-height: 44px;
display: flex;
align-items: center;
justify-content: center;
}
/* Improve scrolling on mobile */
.times-grid {
-webkit-overflow-scrolling: touch;
}
.player-selection {
-webkit-overflow-scrolling: touch;
}
/* Better spacing for mobile */
.header-section {
margin-bottom: 2rem;
margin-top: 5rem; /* Account for fixed nav */
}
/* Improve modal usability on mobile */
.modal {
padding: 1rem;
}
.modal-content {
border-radius: 0.75rem;
}
/* Better form inputs on mobile */
.form-input {
-webkit-appearance: none;
appearance: none;
border-radius: 0.5rem;
}
/* Improve video container on mobile */
#cameraContainer video {
max-width: 100%;
height: auto;
border-radius: 0.5rem;
}
}

View File

@@ -588,10 +588,11 @@ body {
}
}
/* Mobile responsive styles */
/* Mobile First Responsive Design */
@media (max-width: 1024px) {
.dashboard-grid {
grid-template-columns: 1fr;
gap: 1.5rem;
}
.stats-grid {
@@ -600,57 +601,56 @@ body {
}
@media (max-width: 768px) {
.main-container {
padding: 1rem;
max-width: 100%;
}
.main-title {
font-size: 2.5rem;
margin-bottom: 0.5rem;
}
.rank-entry {
grid-template-columns: 60px 1fr auto;
padding: 1rem;
gap: 0.5rem;
.tagline {
font-size: 1rem;
}
.trophy-icon {
display: none;
.header-section {
margin-bottom: 2rem;
margin-top: 5rem; /* Account for fixed buttons */
}
.time-result {
font-size: 1.5rem;
}
.stats-grid {
.dashboard-grid {
grid-template-columns: 1fr;
gap: 1rem;
gap: 1.5rem;
margin-bottom: 1.5rem;
}
.player-meta {
flex-direction: column;
align-items: flex-start;
gap: 0.5rem;
.control-panel {
padding: 1.5rem;
}
.admin-login-btn, .dashboard-btn, .logout-btn {
top: 1rem;
right: 1rem;
padding: 0.5rem 1rem;
font-size: 0.8rem;
.control-group {
margin-bottom: 1rem;
}
.logout-btn {
right: 8rem;
.custom-select {
padding: 1rem;
font-size: 1rem;
}
.location-control {
flex-direction: column;
gap: 0.5rem;
gap: 0.75rem;
}
.location-btn {
width: 100%;
min-width: auto;
padding: 1rem;
font-size: 1rem;
}
/* Mobile responsive tabs */
.time-tabs {
flex-direction: column;
gap: 0.5rem;
@@ -661,26 +661,220 @@ body {
padding: 1rem;
justify-content: flex-start;
border-radius: 0.75rem;
min-height: 44px;
touch-action: manipulation;
}
.tab-text {
font-size: 1rem;
}
.refresh-btn {
padding: 1rem;
font-size: 1rem;
min-height: 44px;
touch-action: manipulation;
}
.stats-panel {
padding: 1.5rem;
}
.stats-grid {
grid-template-columns: 1fr;
gap: 1rem;
}
.stat-card {
padding: 1rem;
}
.stat-value {
font-size: 2rem;
}
.stat-label {
font-size: 0.8rem;
}
.leaderboard-container {
margin-top: 1rem;
}
.leaderboard-header {
padding: 1.5rem;
}
.active-filters {
font-size: 1.2rem;
}
.last-sync {
font-size: 0.8rem;
}
.rankings-list {
max-height: 500px;
-webkit-overflow-scrolling: touch;
}
.rank-entry {
grid-template-columns: 50px 1fr auto;
padding: 1rem;
gap: 0.75rem;
min-height: 60px;
}
.position {
font-size: 1.5rem;
}
.player-data {
padding-left: 0.5rem;
}
.player-name {
font-size: 1.1rem;
margin-bottom: 0.25rem;
}
.player-meta {
flex-direction: column;
align-items: flex-start;
gap: 0.25rem;
}
.location-tag {
font-size: 0.75rem;
padding: 0.2rem 0.4rem;
}
.time-result {
font-size: 1.5rem;
}
.trophy-icon {
display: none;
}
.admin-login-btn, .dashboard-btn, .logout-btn {
position: fixed;
top: 1rem;
right: 1rem;
padding: 0.75rem 1rem;
font-size: 0.8rem;
min-height: 44px;
touch-action: manipulation;
z-index: 1000;
}
.logout-btn {
right: 8rem;
}
/* Mobile button container for better positioning */
.mobile-nav-buttons {
position: fixed;
top: 1rem;
right: 1rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
z-index: 1000;
}
.mobile-nav-buttons .admin-login-btn,
.mobile-nav-buttons .dashboard-btn,
.mobile-nav-buttons .logout-btn {
position: static;
right: auto;
width: 120px;
padding: 0.5rem 0.75rem;
font-size: 0.75rem;
text-align: center;
}
.notification-bubble {
top: 1rem;
left: 1rem;
right: 1rem;
transform: none;
max-width: none;
padding: 1rem;
}
.notification-bubble.show {
transform: none;
}
.notification-bubble.hide {
transform: none;
}
}
/* Extra small devices (phones in portrait) */
@media (max-width: 480px) {
.main-container {
padding: 0.5rem;
}
.main-title {
font-size: 2rem;
}
.tagline {
font-size: 0.9rem;
}
.control-panel {
padding: 1rem;
}
.stats-panel {
padding: 1rem;
}
.leaderboard-header {
padding: 1rem;
}
.active-filters {
font-size: 1rem;
}
.rank-entry {
grid-template-columns: 40px 1fr auto;
padding: 0.75rem;
gap: 0.5rem;
min-height: 50px;
}
.position {
font-size: 1.25rem;
}
.player-name {
font-size: 1rem;
}
.time-result {
font-size: 1.25rem;
}
.time-tabs {
flex-direction: row;
overflow-x: auto;
padding: 0.25rem;
gap: 0.25rem;
-webkit-overflow-scrolling: touch;
}
.time-tab {
min-width: 80px;
padding: 0.5rem 0.75rem;
padding: 0.75rem 0.5rem;
flex-direction: column;
gap: 0.25rem;
justify-content: center;
}
.tab-icon {
@@ -690,6 +884,114 @@ body {
.tab-text {
font-size: 0.75rem;
}
.mobile-nav-buttons {
top: 0.5rem;
right: 0.5rem;
}
.mobile-nav-buttons .admin-login-btn,
.mobile-nav-buttons .dashboard-btn,
.mobile-nav-buttons .logout-btn {
width: 100px;
padding: 0.4rem 0.5rem;
font-size: 0.7rem;
}
}
/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
.header-section {
margin-top: 4rem;
margin-bottom: 1.5rem;
}
.main-title {
font-size: 2rem;
}
.mobile-nav-buttons {
flex-direction: row;
gap: 0.5rem;
}
.mobile-nav-buttons .admin-login-btn,
.mobile-nav-buttons .dashboard-btn,
.mobile-nav-buttons .logout-btn {
width: auto;
min-width: 80px;
padding: 0.5rem 0.75rem;
font-size: 0.7rem;
}
.time-tabs {
flex-direction: row;
overflow-x: auto;
-webkit-overflow-scrolling: touch;
}
.time-tab {
min-width: 100px;
padding: 0.75rem 1rem;
flex-direction: row;
justify-content: center;
}
.stats-grid {
grid-template-columns: repeat(3, 1fr);
}
.rank-entry {
grid-template-columns: 60px 1fr auto;
padding: 0.75rem 1rem;
}
.position {
font-size: 1.5rem;
}
.time-result {
font-size: 1.75rem;
}
}
/* Touch-friendly improvements for mobile */
@media (max-width: 768px) {
.time-tab {
touch-action: manipulation;
}
.location-btn {
touch-action: manipulation;
}
.refresh-btn {
touch-action: manipulation;
}
.rank-entry {
touch-action: manipulation;
}
.custom-select {
-webkit-appearance: none;
appearance: none;
touch-action: manipulation;
}
/* Improve scrolling performance */
.rankings-list {
scroll-behavior: smooth;
}
/* Better spacing for mobile */
.control-panel {
margin-bottom: 1rem;
}
.stats-panel {
margin-bottom: 1rem;
}
}
/* Footer Styles */

View File

@@ -22,29 +22,29 @@
</div>
<div class="header-section">
<h1 class="main-title">ADMIN DASHBOARD</h1>
<p class="tagline">Verwalte deine SPEEDRUN ARENA</p>
<h1 class="main-title">DEIN DASHBOARD</h1>
<p class="tagline">Verwalte deine Läufe in der NINJACROSS ARENA</p>
</div>
<div id="loading" class="loading">
<div class="spinner"></div>
<p>Loading dashboard...</p>
<p>Lade dein Dashboard...</p>
</div>
<div id="dashboardContent" style="display: none;">
<div class="welcome-card">
<h2>Admin Dashboard 🥷</h2>
<p>Welcome to the admin panel! Manage your ninja server from here.</p>
<h2>Dein Dashboard 🥷</h2>
<p>Willkommen in Deinem Dashboard-Panel! Deine übersichtliche Übersicht aller deiner Läufe.</p>
</div>
<div class="dashboard-grid">
<div class="card">
<h3>📊 Analytics</h3>
<p>Track your performance and monitor key metrics. This section will show detailed analytics once we implement the functionality.</p>
<p>Verfolge deine Leistung und überwache wichtige Metriken. Dieser Abschnitt wird detaillierte Analysen anzeigen, sobald wir die Funktion implementieren.</p>
</div>
<div class="card">
<h3>⚡ Quick Actions</h3>
<p>Common tasks and shortcuts will be available here. We'll add buttons for creating new records, managing settings, and more.</p>
<p>Hier findest du häufige Aufgaben und Schnellzugriffe. Wir werden Buttons für das Erstellen neuer Aufzeichnungen, das Verwalten von Einstellungen und mehr hinzufügen.</p>
</div>
<div class="card" onclick="showRFIDSettings()" style="cursor: pointer;">

View File

@@ -5,174 +5,179 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Datenschutzerklärung - NinjaCross</title>
<link rel="icon" type="image/x-icon" href="/pictures/favicon.ico">
<link rel="stylesheet" href="/css/leaderboard.css">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
color: #333;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
padding: 20px;
}
.container {
max-width: 900px;
.legal-container {
max-width: 1000px;
margin: 0 auto;
background: white;
border-radius: 15px;
box-shadow: 0 20px 40px rgba(0,0,0,0.1);
overflow: hidden;
padding: 2rem;
min-height: 100vh;
}
.header {
background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
color: white;
padding: 40px;
.legal-header {
text-align: center;
margin-bottom: 3rem;
}
.header h1 {
font-size: 2.5rem;
margin-bottom: 10px;
.legal-title {
font-size: 3.5rem;
font-weight: 700;
background: linear-gradient(135deg, #00d4ff, #ff6b35, #ffd700);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
margin-bottom: 0.5rem;
letter-spacing: -0.02em;
}
.header p {
font-size: 1.1rem;
opacity: 0.9;
.legal-subtitle {
font-size: 1.2rem;
color: #8892b0;
font-weight: 300;
}
.content {
padding: 40px;
.legal-content {
background: rgba(30, 41, 59, 0.8);
backdrop-filter: blur(20px);
border: 1px solid rgba(51, 65, 85, 0.3);
border-radius: 20px;
padding: 3rem;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}
.section {
margin-bottom: 30px;
margin-bottom: 2.5rem;
}
.section h2 {
color: #1e3c72;
font-size: 1.5rem;
margin-bottom: 15px;
border-bottom: 2px solid #e2e8f0;
padding-bottom: 10px;
color: #00d4ff;
font-size: 1.8rem;
margin-bottom: 1rem;
border-bottom: 2px solid #334155;
padding-bottom: 0.5rem;
font-weight: 600;
}
.section h3 {
color: #2a5298;
font-size: 1.2rem;
margin: 20px 0 10px 0;
color: #ff6b35;
font-size: 1.3rem;
margin: 1.5rem 0 0.8rem 0;
font-weight: 500;
}
.section p, .section li {
margin-bottom: 10px;
color: #4a5568;
margin-bottom: 0.8rem;
color: #e2e8f0;
line-height: 1.6;
}
.section ul, .section ol {
margin-left: 20px;
}
.highlight-box {
background: #f0f8ff;
border: 1px solid #1e3c72;
padding: 20px;
border-radius: 10px;
margin: 20px 0;
}
.highlight-box h3 {
color: #1e3c72;
margin-top: 0;
margin-left: 1.5rem;
}
.contact-info {
background: #f7fafc;
padding: 20px;
border-radius: 10px;
border-left: 4px solid #1e3c72;
background: rgba(0, 212, 255, 0.1);
border: 1px solid rgba(0, 212, 255, 0.3);
padding: 1.5rem;
border-radius: 12px;
margin: 1rem 0;
}
.contact-info p {
margin-bottom: 0.5rem;
}
.contact-info strong {
color: #00d4ff;
}
.back-button {
display: inline-block;
background: #1e3c72;
display: inline-flex;
align-items: center;
gap: 0.5rem;
background: linear-gradient(135deg, #00d4ff, #0099cc);
color: white;
padding: 12px 24px;
text-decoration: none;
border-radius: 8px;
margin-top: 20px;
transition: background 0.3s ease;
border-radius: 12px;
margin-top: 2rem;
font-weight: 600;
transition: all 0.3s ease;
box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}
.back-button:hover {
background: #2a5298;
background: linear-gradient(135deg, #0099cc, #007aa3);
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}
.disclaimer {
background: #fff3cd;
border: 1px solid #ffeaa7;
padding: 15px;
border-radius: 8px;
margin-top: 20px;
.highlight-box {
background: rgba(255, 107, 53, 0.1);
border: 1px solid rgba(255, 107, 53, 0.3);
padding: 1.5rem;
border-radius: 12px;
margin: 1.5rem 0;
}
.disclaimer h3 {
color: #856404;
margin-bottom: 10px;
.highlight-box h3 {
color: #ff6b35;
margin-top: 0;
}
.disclaimer p {
color: #856404;
.highlight-box p {
color: #e2e8f0;
margin: 0;
}
.cookie-table {
width: 100%;
border-collapse: collapse;
margin: 15px 0;
margin: 1.5rem 0;
background: rgba(30, 41, 59, 0.5);
border-radius: 12px;
overflow: hidden;
}
.cookie-table th, .cookie-table td {
border: 1px solid #e2e8f0;
padding: 12px;
border: 1px solid rgba(51, 65, 85, 0.3);
padding: 1rem;
text-align: left;
}
.cookie-table th {
background: #f7fafc;
font-weight: bold;
color: #1e3c72;
background: rgba(0, 212, 255, 0.1);
font-weight: 600;
color: #00d4ff;
}
.cookie-table td {
color: #e2e8f0;
}
@media (max-width: 768px) {
.container {
margin: 10px;
border-radius: 10px;
.legal-container {
padding: 1rem;
}
.header, .content {
padding: 20px;
.legal-content {
padding: 1.5rem;
}
.header h1 {
font-size: 2rem;
.legal-title {
font-size: 2.5rem;
}
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>🔒 Datenschutzerklärung</h1>
<p>NinjaCross - Speedrun Arena</p>
<div class="legal-container">
<div class="legal-header">
<h1 class="legal-title">🔒 Datenschutzerklärung</h1>
<p class="legal-subtitle">NinjaCross - Speedrun Arena</p>
</div>
<div class="content">
<div class="legal-content">
<div class="section">
<h2>1. Datenschutz auf einen Blick</h2>
<h3>Allgemeine Hinweise</h3>
@@ -324,5 +329,34 @@
<a href="/" class="back-button">← Zurück zur Startseite</a>
</div>
</div>
<!-- Footer -->
<footer class="footer">
<div class="footer-content">
<div class="footer-links">
<a href="/impressum.html" class="footer-link">Impressum</a>
<a href="/datenschutz.html" class="footer-link">Datenschutz</a>
<button id="cookie-settings-footer" class="footer-link cookie-settings-btn">Cookie-Einstellungen</button>
</div>
<div class="footer-text">
<p>&copy; 2024 NinjaCross. Alle Rechte vorbehalten.</p>
</div>
</div>
</footer>
<script src="/js/cookie-consent.js"></script>
<script>
// Add cookie settings button functionality
document.addEventListener('DOMContentLoaded', function() {
const cookieSettingsBtn = document.getElementById('cookie-settings-footer');
if (cookieSettingsBtn) {
cookieSettingsBtn.addEventListener('click', function() {
if (window.cookieConsent) {
window.cookieConsent.resetConsent();
}
});
}
});
</script>
</body>
</html>

View File

@@ -5,137 +5,154 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Impressum - NinjaCross</title>
<link rel="icon" type="image/x-icon" href="/pictures/favicon.ico">
<link rel="stylesheet" href="/css/leaderboard.css">
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
color: #333;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
padding: 20px;
}
.container {
max-width: 800px;
.legal-container {
max-width: 1000px;
margin: 0 auto;
background: white;
border-radius: 15px;
box-shadow: 0 20px 40px rgba(0,0,0,0.1);
overflow: hidden;
padding: 2rem;
min-height: 100vh;
}
.header {
background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
color: white;
padding: 40px;
.legal-header {
text-align: center;
margin-bottom: 3rem;
}
.header h1 {
font-size: 2.5rem;
margin-bottom: 10px;
.legal-title {
font-size: 3.5rem;
font-weight: 700;
background: linear-gradient(135deg, #00d4ff, #ff6b35, #ffd700);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
margin-bottom: 0.5rem;
letter-spacing: -0.02em;
}
.header p {
font-size: 1.1rem;
opacity: 0.9;
.legal-subtitle {
font-size: 1.2rem;
color: #8892b0;
font-weight: 300;
}
.content {
padding: 40px;
.legal-content {
background: rgba(30, 41, 59, 0.8);
backdrop-filter: blur(20px);
border: 1px solid rgba(51, 65, 85, 0.3);
border-radius: 20px;
padding: 3rem;
box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}
.section {
margin-bottom: 30px;
margin-bottom: 2.5rem;
}
.section h2 {
color: #1e3c72;
font-size: 1.5rem;
margin-bottom: 15px;
border-bottom: 2px solid #e2e8f0;
padding-bottom: 10px;
color: #00d4ff;
font-size: 1.8rem;
margin-bottom: 1rem;
border-bottom: 2px solid #334155;
padding-bottom: 0.5rem;
font-weight: 600;
}
.section h3 {
color: #ff6b35;
font-size: 1.3rem;
margin: 1.5rem 0 0.8rem 0;
font-weight: 500;
}
.section p, .section li {
margin-bottom: 10px;
color: #4a5568;
margin-bottom: 0.8rem;
color: #e2e8f0;
line-height: 1.6;
}
.section ul {
margin-left: 20px;
margin-left: 1.5rem;
}
.contact-info {
background: #f7fafc;
padding: 20px;
border-radius: 10px;
border-left: 4px solid #1e3c72;
background: rgba(0, 212, 255, 0.1);
border: 1px solid rgba(0, 212, 255, 0.3);
padding: 1.5rem;
border-radius: 12px;
margin: 1rem 0;
}
.contact-info p {
margin-bottom: 0.5rem;
}
.contact-info strong {
color: #00d4ff;
}
.back-button {
display: inline-block;
background: #1e3c72;
display: inline-flex;
align-items: center;
gap: 0.5rem;
background: linear-gradient(135deg, #00d4ff, #0099cc);
color: white;
padding: 12px 24px;
text-decoration: none;
border-radius: 8px;
margin-top: 20px;
transition: background 0.3s ease;
border-radius: 12px;
margin-top: 2rem;
font-weight: 600;
transition: all 0.3s ease;
box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}
.back-button:hover {
background: #2a5298;
background: linear-gradient(135deg, #0099cc, #007aa3);
transform: translateY(-2px);
box-shadow: 0 8px 25px rgba(0, 212, 255, 0.4);
}
.disclaimer {
background: #fff3cd;
border: 1px solid #ffeaa7;
padding: 15px;
border-radius: 8px;
margin-top: 20px;
.highlight-box {
background: rgba(255, 107, 53, 0.1);
border: 1px solid rgba(255, 107, 53, 0.3);
padding: 1.5rem;
border-radius: 12px;
margin: 1.5rem 0;
}
.disclaimer h3 {
color: #856404;
margin-bottom: 10px;
.highlight-box h3 {
color: #ff6b35;
margin-top: 0;
}
.disclaimer p {
color: #856404;
.highlight-box p {
color: #e2e8f0;
margin: 0;
}
@media (max-width: 768px) {
.container {
margin: 10px;
border-radius: 10px;
.legal-container {
padding: 1rem;
}
.header, .content {
padding: 20px;
.legal-content {
padding: 1.5rem;
}
.header h1 {
font-size: 2rem;
.legal-title {
font-size: 2.5rem;
}
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<h1>🏃‍♂️ Impressum</h1>
<p>NinjaCross - Speedrun Arena</p>
<div class="legal-container">
<div class="legal-header">
<h1 class="legal-title">🏃‍♂️ Impressum</h1>
<p class="legal-subtitle">NinjaCross - Speedrun Arena</p>
</div>
<div class="content">
<div class="legal-content">
<div class="section">
<h2>Angaben gemäß § 5 TMG</h2>
<div class="contact-info">
@@ -191,5 +208,34 @@
<a href="/" class="back-button">← Zurück zur Startseite</a>
</div>
</div>
<!-- Footer -->
<footer class="footer">
<div class="footer-content">
<div class="footer-links">
<a href="/impressum.html" class="footer-link">Impressum</a>
<a href="/datenschutz.html" class="footer-link">Datenschutz</a>
<button id="cookie-settings-footer" class="footer-link cookie-settings-btn">Cookie-Einstellungen</button>
</div>
<div class="footer-text">
<p>&copy; 2024 NinjaCross. Alle Rechte vorbehalten.</p>
</div>
</div>
</footer>
<script src="/js/cookie-consent.js"></script>
<script>
// Add cookie settings button functionality
document.addEventListener('DOMContentLoaded', function() {
const cookieSettingsBtn = document.getElementById('cookie-settings-footer');
if (cookieSettingsBtn) {
cookieSettingsBtn.addEventListener('click', function() {
if (window.cookieConsent) {
window.cookieConsent.resetConsent();
}
});
}
});
</script>
</body>
</html>

View File

@@ -22,9 +22,11 @@
<div class="main-container">
<!-- Admin Login Button -->
<a href="/login" class="admin-login-btn" id="adminLoginBtn">🔐 Login</a>
<a href="/dashboard" class="dashboard-btn" id="dashboardBtn" style="display: none;">📊 Dashboard</a>
<button class="logout-btn" id="logoutBtn" onclick="logout()" style="display: none;">🚪 Logout</button>
<div class="mobile-nav-buttons">
<a href="/login" class="admin-login-btn" id="adminLoginBtn">🔐 Login</a>
<a href="/dashboard" class="dashboard-btn" id="dashboardBtn" style="display: none;">📊 Dashboard</a>
<button class="logout-btn" id="logoutBtn" onclick="logout()" style="display: none;">🚪 Logout</button>
</div>
<div class="header-section">
<h1 class="main-title">NINJACROSS LEADERBOARD</h1>
@@ -37,7 +39,7 @@
<label class="control-label">Standort</label>
<div class="location-control">
<select class="custom-select location-select" id="locationSelect">
<option value="all">🌍 Alle Standorte</option>
<option value="">📍 Bitte Standort auswählen</option>
<!-- Standorte werden dynamisch geladen -->
</select>
<button class="location-btn" id="findLocationBtn" onclick="findNearestLocation()" title="Nächstgelegenen Standort finden">
@@ -94,7 +96,7 @@
<div class="leaderboard-container">
<div class="leaderboard-header">
<div class="active-filters" id="currentSelection">
🌍 Alle Standorte • ♾️ Alle Zeiten
📍 Bitte Standort auswählen • ♾️ Alle Zeiten
</div>
<div class="last-sync" id="lastUpdated">
Letzter Sync: Loading...

View File

@@ -118,8 +118,8 @@ async function loadLocations() {
// Store locations globally for distance calculations
locationsData = locations;
// Clear existing options except "Alle Standorte"
locationSelect.innerHTML = '<option value="all">🌍 Alle Standorte</option>';
// Clear existing options and set default placeholder
locationSelect.innerHTML = '<option value="">📍 Bitte Standort auswählen</option>';
// Add locations from database
locations.forEach(location => {
@@ -284,12 +284,42 @@ function showLocationError(message) {
}, 6000);
}
// Show prompt when no location is selected
function showLocationSelectionPrompt() {
const rankingList = document.getElementById('rankingList');
rankingList.innerHTML = `
<div class="empty-state">
<div class="empty-icon">📍</div>
<div class="empty-title">Standort auswählen</div>
<div class="empty-description">
Bitte wähle einen Standort aus dem Dropdown-Menü aus<br>
oder nutze den "📍 Mein Standort" Button, um automatisch<br>
den nächstgelegenen Standort zu finden.
</div>
</div>
`;
// Reset stats to show no data
document.getElementById('totalPlayers').textContent = '0';
document.getElementById('bestTime').textContent = '--:--';
document.getElementById('totalRecords').textContent = '0';
// Update current selection display
updateCurrentSelection();
}
// Load data from local database via MCP
async function loadData() {
try {
const location = document.getElementById('locationSelect').value;
const period = document.querySelector('.time-tab.active').dataset.period;
// Don't load data if no location is selected
if (!location || location === '') {
showLocationSelectionPrompt();
return;
}
// Build query parameters
const params = new URLSearchParams();
if (location && location !== 'all') {
@@ -383,7 +413,7 @@ function updateCurrentSelection() {
// Get the display text from the selected option
const locationSelect = document.getElementById('locationSelect');
const selectedLocationOption = locationSelect.options[locationSelect.selectedIndex];
const locationDisplay = selectedLocationOption ? selectedLocationOption.textContent : '🌍 Alle Standorte';
const locationDisplay = selectedLocationOption ? selectedLocationOption.textContent : '📍 Bitte Standort auswählen';
const periodIcons = {
'today': '📅 Heute',
@@ -484,7 +514,7 @@ function setupEventListeners() {
async function init() {
await checkAuth();
await loadLocations();
await loadData();
showLocationSelectionPrompt(); // Show prompt instead of loading data initially
setupEventListeners();
}

View File

@@ -83,18 +83,17 @@ router.get('/times-with-details', async (req, res) => {
locationFilter = `AND l.name ILIKE '%${location}%'`;
}
// Build WHERE clause for date filter
// Build WHERE clause for date filter using PostgreSQL timezone functions
let dateFilter = '';
const now = new Date();
if (period === 'today') {
const today = now.toISOString().split('T')[0];
dateFilter = `AND DATE(t.created_at) = '${today}'`;
// Today in local timezone (UTC+2)
dateFilter = `AND DATE(t.created_at AT TIME ZONE 'UTC' AT TIME ZONE 'Europe/Berlin') = CURRENT_DATE`;
} else if (period === 'week') {
const weekAgo = new Date(now.getTime() - 7 * 24 * 60 * 60 * 1000).toISOString().split('T')[0];
dateFilter = `AND DATE(t.created_at) >= '${weekAgo}'`;
// This week starting from Monday in local timezone
dateFilter = `AND DATE(t.created_at AT TIME ZONE 'UTC' AT TIME ZONE 'Europe/Berlin') >= DATE_TRUNC('week', CURRENT_DATE)`;
} else if (period === 'month') {
const monthAgo = new Date(now.getFullYear(), now.getMonth(), 1).toISOString().split('T')[0];
dateFilter = `AND DATE(t.created_at) >= '${monthAgo}'`;
// This month starting from 1st in local timezone
dateFilter = `AND DATE(t.created_at AT TIME ZONE 'UTC' AT TIME ZONE 'Europe/Berlin') >= DATE_TRUNC('month', CURRENT_DATE)`;
}
// Get all times with player and location details, ordered by time (fastest first)