<!DOCTYPE html>
<html lang="es">

<head>
    <meta charset="UTF-8">
    <title>Lista de Torneos</title>
    <link rel="stylesheet" href="../public/css/style.css">
</head>

<body>
    <div class="wb">
        <div class="head">
            <div class="tittle">Torneos</div>
        </div>
        <a href="../public/tournament.php?action=create">
            <h2>Crear</h2>
        </a>
        <?php foreach ($tournaments as $tournament): ?>
            <a href="../public/tournament.php?id=<?= $tournament['id'] ?>">
                <div class="mainCard">
                    <div class="tittle"><?= htmlspecialchars($tournament['name']) ?></div>
                    <div class="date"><?= htmlspecialchars($tournament['date']) ?></div>
                </div>
            </a>
        <?php endforeach; ?>
    </div>
</body>

</html>