|
@@ -2,6 +2,7 @@
|
|
|
include 'db_config.php';
|
|
include 'db_config.php';
|
|
|
|
|
|
|
|
// --- 1. DATEN LADEN ---
|
|
// --- 1. DATEN LADEN ---
|
|
|
|
|
+// Alle Spieler (Teams) für den Filter laden
|
|
|
$allTeams = $pdo->query("SELECT * FROM spieler ORDER BY name ASC")->fetchAll();
|
|
$allTeams = $pdo->query("SELECT * FROM spieler ORDER BY name ASC")->fetchAll();
|
|
|
|
|
|
|
|
// Filter-Logik
|
|
// Filter-Logik
|
|
@@ -16,6 +17,7 @@ if ($teamFilter > 0) {
|
|
|
$sql .= " WHERE s.id = $teamFilter";
|
|
$sql .= " WHERE s.id = $teamFilter";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// Sortierung nach Titel
|
|
|
$sql .= " ORDER BY sp.titel ASC";
|
|
$sql .= " ORDER BY sp.titel ASC";
|
|
|
$stmt = $pdo->query($sql);
|
|
$stmt = $pdo->query($sql);
|
|
|
$playedGames = $stmt->fetchAll();
|
|
$playedGames = $stmt->fetchAll();
|
|
@@ -28,15 +30,16 @@ $playedGames = $stmt->fetchAll();
|
|
|
<style>
|
|
<style>
|
|
|
:root {
|
|
:root {
|
|
|
--bg: #f4f7f6; --card: #ffffff; --text: #333; --border: #ddd; --accent: #e67e22;
|
|
--bg: #f4f7f6; --card: #ffffff; --text: #333; --border: #ddd; --accent: #e67e22;
|
|
|
|
|
+ --muted: #888;
|
|
|
}
|
|
}
|
|
|
.dark-theme {
|
|
.dark-theme {
|
|
|
- --bg: #121212cf; --card: #1e1e1e; --text: #ffffff; --border: #333;
|
|
|
|
|
|
|
+ --bg: #121212cf; --card: #1e1e1e; --text: #ffffff; --border: #333; --muted: #aaa;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
body { font-family: 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); padding: 20px; transition: 0.3s; }
|
|
body { font-family: 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); padding: 20px; transition: 0.3s; }
|
|
|
.container { max-width: 1200px; margin: 0 auto; }
|
|
.container { max-width: 1200px; margin: 0 auto; }
|
|
|
|
|
|
|
|
- /* HEADER ANALOG ZU ADMIN/INDEX */
|
|
|
|
|
|
|
+ /* HEADER */
|
|
|
header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; border-bottom: 2px solid var(--accent); padding-bottom: 10px; }
|
|
header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; border-bottom: 2px solid var(--accent); padding-bottom: 10px; }
|
|
|
h1 { color: var(--accent); margin: 0; font-size: 1.8rem; }
|
|
h1 { color: var(--accent); margin: 0; font-size: 1.8rem; }
|
|
|
|
|
|
|
@@ -45,7 +48,7 @@ $playedGames = $stmt->fetchAll();
|
|
|
|
|
|
|
|
/* FILTER BAR */
|
|
/* FILTER BAR */
|
|
|
.filter-bar { background: var(--card); padding: 15px; border-radius: 12px; border: 1px solid var(--border); margin-bottom: 25px; display: flex; align-items: center; gap: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
|
|
.filter-bar { background: var(--card); padding: 15px; border-radius: 12px; border: 1px solid var(--border); margin-bottom: 25px; display: flex; align-items: center; gap: 15px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); }
|
|
|
- select { padding: 8px 15px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); cursor: pointer; width: auto; }
|
|
|
|
|
|
|
+ select { padding: 8px 15px; border-radius: 6px; border: 1px solid var(--border); background: var(--bg); color: var(--text); cursor: pointer; }
|
|
|
|
|
|
|
|
/* GRID & CARDS */
|
|
/* GRID & CARDS */
|
|
|
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
|
|
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
|
|
@@ -53,9 +56,15 @@ $playedGames = $stmt->fetchAll();
|
|
|
.item img { width: 100%; height: 180px; object-fit: cover; background: #2a2a2a; border-bottom: 1px solid var(--border); }
|
|
.item img { width: 100%; height: 180px; object-fit: cover; background: #2a2a2a; border-bottom: 1px solid var(--border); }
|
|
|
|
|
|
|
|
.stats { padding: 15px; }
|
|
.stats { padding: 15px; }
|
|
|
- .team-badge { font-size: 0.7em; background: var(--accent); color: white; padding: 2px 10px; border-radius: 10px; margin-bottom: 8px; display: inline-block; text-transform: uppercase; letter-spacing: 0.5px; }
|
|
|
|
|
- .game-title { font-weight: bold; display: block; margin-bottom: 10px; font-size: 1.1em; min-height: 2.2em; display: flex; align-items: center; justify-content: center; }
|
|
|
|
|
|
|
|
|
|
|
|
+ /* TYPOGRAFIE & REIHENFOLGE */
|
|
|
|
|
+ .game-title { font-weight: bold; display: block; margin-bottom: 12px; font-size: 1.1em; min-height: 2.2em; display: flex; align-items: center; justify-content: center; color: var(--text); line-height: 1.2; }
|
|
|
|
|
+
|
|
|
|
|
+ .team-info-container { margin-bottom: 15px; }
|
|
|
|
|
+ .team-label { font-size: 0.7em; color: var(--muted); display: block; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 2px; }
|
|
|
|
|
+ .team-name-text { font-size: 0.9em; color: var(--text); opacity: 0.9; font-weight: 500; }
|
|
|
|
|
+
|
|
|
|
|
+ /* ERGEBNIS ZEILE */
|
|
|
.result-row { display: flex; justify-content: space-around; font-size: 0.85em; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 5px; }
|
|
.result-row { display: flex; justify-content: space-around; font-size: 0.85em; border-top: 1px solid var(--border); padding-top: 10px; margin-top: 5px; }
|
|
|
.res-item span { display: block; opacity: 0.6; font-size: 0.75em; margin-bottom: 2px; }
|
|
.res-item span { display: block; opacity: 0.6; font-size: 0.75em; margin-bottom: 2px; }
|
|
|
.res-item b { color: var(--accent); font-size: 1em; }
|
|
.res-item b { color: var(--accent); font-size: 1em; }
|
|
@@ -99,9 +108,13 @@ $playedGames = $stmt->fetchAll();
|
|
|
<div class="item">
|
|
<div class="item">
|
|
|
<img src="<?= htmlspecialchars($game['bild_url']) ?>" onerror="this.src='https://via.placeholder.com/240x180?text=EXIT+Spiel'">
|
|
<img src="<?= htmlspecialchars($game['bild_url']) ?>" onerror="this.src='https://via.placeholder.com/240x180?text=EXIT+Spiel'">
|
|
|
<div class="stats">
|
|
<div class="stats">
|
|
|
- <span class="team-badge"><?= htmlspecialchars($game['team_name']) ?></span>
|
|
|
|
|
<span class="game-title"><?= htmlspecialchars($game['titel']) ?></span>
|
|
<span class="game-title"><?= htmlspecialchars($game['titel']) ?></span>
|
|
|
|
|
|
|
|
|
|
+ <div class="team-info-container">
|
|
|
|
|
+ <span class="team-label">Gelöst von</span>
|
|
|
|
|
+ <span class="team-name-text"><?= htmlspecialchars($game['team_name']) ?></span>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
<div class="result-row">
|
|
<div class="result-row">
|
|
|
<div class="res-item"><span>Zeit</span><b><?= $game['zeit'] ?> Min.</b></div>
|
|
<div class="res-item"><span>Zeit</span><b><?= $game['zeit'] ?> Min.</b></div>
|
|
|
<div class="res-item"><span>Hilfe</span><b><?= $game['hilfe'] ?></b></div>
|
|
<div class="res-item"><span>Hilfe</span><b><?= $game['hilfe'] ?></b></div>
|