2020-03-28 20:55:39 +01:00
|
|
|
{% for state in games %}
|
2020-04-01 20:49:50 +02:00
|
|
|
<section class="accordion">
|
|
|
|
<input type="checkbox" name="collapse" id="handle_{{loop.index}}">
|
|
|
|
<h2 class="handle">
|
|
|
|
<label for="handle_{{loop.index}}">
|
2020-04-02 09:56:47 +02:00
|
|
|
<span>{{state.name}} ({% if state.state %}{{state.state.map}}{% else %}{{state.map}}{% endif %})</span>
|
2020-04-11 08:17:27 +02:00
|
|
|
<span style="float: right">{% if state.type == "Playing" %}{{ state.connected }}/{{state.total}}{% else %}<a class="link" href='/visualizer?name={{state.name | safe }}&game=/games/{{state.file | safe}}'></a>{% endif %}</span>
|
2020-04-01 20:49:50 +02:00
|
|
|
</label>
|
|
|
|
</h2>
|
|
|
|
<div class="content">
|
|
|
|
{% if state.type == "Playing" %}
|
|
|
|
<div class="players">
|
|
|
|
{% for player in state.players %}
|
|
|
|
<p class="{% if player.waiting %}waiting {% endif %}{% if player.connected %}connected {% endif %}{% if player.reconnecting %}reconnecting {% endif %}">{{ player.value }}</p>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% else %}
|
|
|
|
<div class="players">
|
|
|
|
{% for player in state.players %}
|
|
|
|
<p class="{% if player[1] %}winner{% endif %}">{{ player[0] }}</p>
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
2020-03-28 20:55:39 +01:00
|
|
|
</div>
|
2020-04-01 20:49:50 +02:00
|
|
|
</section>
|
2020-03-28 20:55:39 +01:00
|
|
|
{% endfor %}
|