🚀 Patch auto
This commit is contained in:
@@ -1,14 +1,10 @@
|
||||
<!doctype html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<title>Détail tournoi — Super Sunday</title>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800&display=swap" rel="stylesheet">
|
||||
<link rel="stylesheet" href="/assets/style.css?v=4" />
|
||||
|
||||
<title>Détail tournoi — Super Sunday</title>
|
||||
<link rel="stylesheet" href="/assets/style.css?v=8" />
|
||||
</head>
|
||||
<body>
|
||||
<header>
|
||||
@@ -19,49 +15,27 @@
|
||||
<a href="/admin">Admin</a>
|
||||
</nav>
|
||||
</header>
|
||||
|
||||
<main class="container">
|
||||
<section class="card accent" style="padding:22px; margin:8px 0 18px;">
|
||||
<div class="kicker">Super Sunday</div>
|
||||
<h2 class="hero-title" id="ttitle">Tournoi</h2>
|
||||
<p class="muted" id="tsub">Détails & participants</p>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2 class="section-title">Infos</h2>
|
||||
<div id="info" class="card"></div>
|
||||
</section>
|
||||
<section>
|
||||
<h2 class="section-title">Participants</h2>
|
||||
<div id="participants"></div>
|
||||
</section>
|
||||
<section>
|
||||
<h2 class="section-title">Matches</h2>
|
||||
<div id="matchlist"></div>
|
||||
</section>
|
||||
<h2 class="hero-title" id="ttitle">Tournoi</h2>
|
||||
<p class="muted" id="tsub"></p>
|
||||
<h3 class="section-title">Participants</h3>
|
||||
<div id="participants"></div>
|
||||
<h3 class="section-title">Matches</h3>
|
||||
<div id="matchlist"></div>
|
||||
</main>
|
||||
|
||||
<div class="bg-bubble b1"></div>
|
||||
<div class="bg-bubble b2"></div>
|
||||
<div class="bg-bubble b3"></div>
|
||||
<div class="bg-bubble b4"></div>
|
||||
<div class="bg-bubble b5"></div>
|
||||
|
||||
<script src="/assets/api.js"></script>
|
||||
<script src="/assets/tournament.js"></script>
|
||||
<script>
|
||||
(function(){
|
||||
const params = new URLSearchParams(location.search);
|
||||
const id = Number(params.get('id')||'0');
|
||||
<script type="module">
|
||||
import { getTournament,listParticipants,listMatches } from '/assets/api.js?v=8';
|
||||
(async()=>{
|
||||
const id=Number(new URLSearchParams(location.search).get('id')||'0');
|
||||
if(!id) return;
|
||||
fetch('/api/tournaments/'+id).then(r=>r.json()).then(t=>{
|
||||
if(t && t.name){
|
||||
document.getElementById('ttitle').textContent = t.name;
|
||||
const d = (t.start_date||'') + (t.end_date? ' → '+t.end_date : '');
|
||||
document.getElementById('tsub').textContent = [t.location||'Lieu à venir', d].filter(Boolean).join(' • ');
|
||||
}
|
||||
}).catch(()=>{});
|
||||
const t=await getTournament(id);
|
||||
document.getElementById('ttitle').textContent=t.name||'Tournoi';
|
||||
document.getElementById('tsub').textContent=[t.location||'—',t.start_date].filter(Boolean).join(' • ');
|
||||
const ps=await listParticipants(id);
|
||||
document.getElementById('participants').innerHTML=ps.map(p=>`<div class="card">${p.full_name}</div>`).join('')||'<div class="empty">Aucun participant</div>';
|
||||
const ms=await listMatches(id);
|
||||
document.getElementById('matchlist').innerHTML=ms.map(m=>`<div class="card"><strong>${m.team_a}</strong> vs <strong>${m.team_b}</strong> — <span class="muted">${m.court||'—'}</span></div>`).join('')||'<div class="empty">Aucun match</div>';
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user