Django Projektordner von 'core' in ''django' umbenennen
This commit is contained in:
5
django/templates/play/game/score_overview.html
Normal file
5
django/templates/play/game/score_overview.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<!-->
|
||||
Spieler sehen ihre Punktzahl, Platzierung und Richtig/Falsch
|
||||
|
||||
Host: Scoreboard, Button: 'Weiter'
|
||||
</!-->
|
||||
5
django/templates/play/game/wait_for_other_players.html
Normal file
5
django/templates/play/game/wait_for_other_players.html
Normal file
@@ -0,0 +1,5 @@
|
||||
<!-->
|
||||
Spieler: Countdown, automatische Weiterleitung
|
||||
|
||||
(Host: Frage)
|
||||
</!-->
|
||||
13
django/templates/play/initialize_participant.html
Normal file
13
django/templates/play/initialize_participant.html
Normal file
@@ -0,0 +1,13 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<h1>User for a Game:</h1>
|
||||
<div class="input-group border-blue-600 border-2 rounded-xl shadow-md">
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="join_code" value="{{join_code}}">
|
||||
<input type="text" name="display_name" placeholder="Anzeigename">
|
||||
<button type="submit">Speichern</button>
|
||||
</form>
|
||||
</div>
|
||||
{% endblock %}
|
||||
35
django/templates/play/join_game.html
Normal file
35
django/templates/play/join_game.html
Normal file
@@ -0,0 +1,35 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="grid place-items-center min-h-[calc(100vh-5rem)] py-6 m-2">
|
||||
<div class="max-w-md w-full p-8 rounded-2xl border-2 border-blue-400 bg-white">
|
||||
<h1 class="text-2xl text-center font-bold mb-4">Spiel beitreten</h1>
|
||||
<form action="{% url 'play:join_game' %}" method="post" class="flex flex-col gap-4">
|
||||
{% csrf_token %}
|
||||
<div class="flex gap-3 items-center justify-center">
|
||||
<input type="text" name="game_code" placeholder="123456" maxlength="6" class="w-32 p-3 rounded-full bg-gray-200 focus:scale-105 transition duration-200 font-black focus:outline-none focus:ring-2 focus:ring-blue-400 focus:bg-blue-100 text-center tracking-wider" autofocus>
|
||||
<button type="submit" class="h-12 px-6 rounded-full bg-blue-600 text-white font-black hover:scale-105 transition duration-200 flex items-center gap-2 disabled:opacity-50 disabled:cursor-not-allowed hover:bg-blue-700 active:scale-95 group" disabled>
|
||||
<span class="hidden sm:block">Beitreten</span>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="2" stroke="currentColor" class="w-5 h-5 transition-transform group-hover:translate-x-1">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" d="M13.5 4.5L21 12m0 0l-7.5 7.5M21 12H3" />
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
<script>
|
||||
const input = document.querySelector('input[name="game_code"]');
|
||||
const button = document.querySelector('button[type="submit"]');
|
||||
|
||||
input.addEventListener('input', function(e) {
|
||||
button.disabled = !this.value.match(/^[0-9]{6}$/);
|
||||
});
|
||||
|
||||
input.addEventListener('keypress', function(e) {
|
||||
if (e.key === 'Enter' && !button.disabled) {
|
||||
button.click();
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
21
django/templates/play/lobby.html
Normal file
21
django/templates/play/lobby.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{% extends 'base.html' %}
|
||||
|
||||
{% block content %}
|
||||
<div class="container mx-auto px-4">
|
||||
<h1>Bundeslaender Deutschland Quiz</h1>
|
||||
<div class="mt-4 mb-4 text-center">
|
||||
<h3>Sichtbar als <b>{{ participant.display_name }}</b></h3>
|
||||
</div>
|
||||
<div id="player-list">
|
||||
<ul>
|
||||
<li>Noch keine Spieler gefunden.</li>
|
||||
</ul>
|
||||
{{debug}}
|
||||
</div>
|
||||
<button class="w-full p-3 rounded-full bg-blue-600 text-white font-black hover:scale-105 transition duration-200" type="submit">Starten</button>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// TODO: Websocket Verbindung aufbauen und Teilnehmerliste bei beitreten updaten
|
||||
</script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user