<!DOCTYPE html>
<html lang="en-US">

<head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="Vampire: the Eternal Struggle (VTES) tournament seating chart">
    <meta name="keywords" content="Archon, Vampire, the Eternal Struggle, VTES, Tournament">
    <meta name="format-detection" content="telephone=no">
    <link rel="shortcut icon" href="{{ url_for('img', path='favicon.ico') }}">
    <link rel="stylesheet" href="{{ url_for('static', path='layout.css') }}">
    {% if finals %}
    <title>Finals</title>
    {% else %}
    <title>Round {{ round_number }} seating</title>
    {% endif %}

</head>

<body>
    <article class="container">
        {% if finals %}
        <h2 class="text-center">Finals </h2>
        {% else %}
        <h2 class="text-center">Round {{ round_number }} seating</h2>
        {% endif %}
        <div style="column-width: 24rem;" ; class="w-100 mt-4">
            {% for table in round %}
            <div style="break-inside: avoid;"
                class="w-100 d-inline-block border border-black border-2 rounded p-2 mb-4">
                <h4 class="mb-0">Table {{ loop.index }}</h4>
                <table class="table table-sm table-striped">
                    <thead>
                        <tr>
                            <th scope="col">{% if finals %}Seed{% else %}Seat{% endif %}</th>
                            <th scope="col">VEKN</th>
                            <th scope="col">Name</th>
                        </tr>
                    </thead>
                    <tbody>
                        {% for player in table %}
                        <tr>
                            <th>{{ loop.index }}</th>
                            <td>{{ player.vekn }}</td>
                            <td>{{ player.name }}</td>
                        </tr>
                        {% endfor %}
                    </tbody>
                </table>
            </div>
            {% endfor %}
        </div>
    </article>