forked from muyrety/Smarter
66 lines
3.2 KiB
Django/Jinja
66 lines
3.2 KiB
Django/Jinja
{% extends "base.j2" %}
|
|
|
|
{% block title %} Join game {% endblock %}
|
|
|
|
{% block head %}
|
|
<script src="https://cdn.socket.io/4.8.1/socket.io.min.js" integrity="sha384-mkQ3/7FUtcGyoppY6bz/PORYoGqOl7/aSUMn2ymDOJcapfS6PHqxhRTMh1RR0Q6+" crossorigin="anonymous"></script>
|
|
{% endblock %}
|
|
|
|
{% block after_bootstrap_js %}
|
|
<script type="module" src="{{ url_for('static', filename='js/pregame.js') }}"></script>
|
|
{% endblock %}
|
|
|
|
{% block main %}
|
|
<div class="container text-center">
|
|
<div id="gameDeletedModal" class="modal fade" tabindex="-1">
|
|
<div class="modal-dialog modal-dialog-centered">
|
|
<div class="modal-content bg-info-subtle text-success border-success-subtle">
|
|
<div class="modal-header border-success-subtle">
|
|
<h5 class="modal-title">Game deleted</h5>
|
|
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
|
|
</div>
|
|
<div class="modal-body">
|
|
<p>This game has been deleted by the owner</p>
|
|
</div>
|
|
<div class="modal-footer justify-content-center border-success-subtle">
|
|
<button type="button" class="btn btn-outline-success" data-bs-dismiss="modal">OK</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row justify-content-center">
|
|
<div class="d-none col-md-5 mt-1 alert bg-info-subtle text-success border-success-subtle alert-dismissible" id="reconnectAlert">
|
|
You lost your connection but have now been reconnected. Info shown might be out of date. Please refresh the page for the newest data.
|
|
<button id="reconnectAlertDismiss" type="button" class="btn-close"></button>
|
|
</div>
|
|
</div>
|
|
<h2 class="mt-3 text-primary-emphasis"> Waiting for the game to start </h2>
|
|
<p class="text-primary-emphasis"> Question set name: {{ qs_name }} </p>
|
|
<div class="row justify-content-center">
|
|
<div class="col-auto">
|
|
<ul class="list-group" id="playerList">
|
|
<li class="list-group-item list-group-item-info text-success border-success-subtle"><strong>Players</strong></li>
|
|
<li class="list-group-item list-group-item-info text-success border-success-subtle"> {{ owner }} (owner) </li>
|
|
{% for player in players %}
|
|
{% if player == g.user["username"] %}
|
|
<li class="list-group-item list-group-item-info text-success border-success-subtle"> {{ player }} (you) </li>
|
|
{% else %}
|
|
<li class="list-group-item list-group-item-info text-success border-success-subtle"> {{ player }} </li>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<div class="row justify-content-evenly mt-2">
|
|
<div class="col-md-3 m-2 text-center">
|
|
<button class="btn btn-outline-danger" id="leaveGame">Leave game</button>
|
|
</div>
|
|
<div class="col-md-3 m-2 text-center">
|
|
<button class="btn btn-outline-primary" disabled>
|
|
<span class="spinner-border spinner-border-sm"></span>
|
|
<span role="status">Waiting for owner...</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|