28 lines
1.0 KiB
Twig
28 lines
1.0 KiB
Twig
{% extends 'base.html.twig' %}
|
|
|
|
{% block body %}
|
|
{% if game %}
|
|
<div class="game-container">
|
|
<div class="game-actions">
|
|
<form method="post" action="{{ path('app_game_abandon', {id: game.id}) }}">
|
|
<input type="hidden" name="_token" value="{{ csrf_token('game_abandon') }}">
|
|
<button type="submit" class="btn btn-abandon">Abandonner</button>
|
|
</form>
|
|
</div>
|
|
|
|
<div {{ react_component('GameGrid', {
|
|
grid: grid,
|
|
width: width,
|
|
middle: middle,
|
|
}) }}></div>
|
|
</div>
|
|
{% else %}
|
|
<div class="game-start-container">
|
|
<form method="post" action="{{ path('app_game_start') }}">
|
|
<input type="hidden" name="_token" value="{{ csrf_token('game_start') }}">
|
|
<button type="submit" class="btn btn-primary btn-start">Commencer une partie</button>
|
|
</form>
|
|
</div>
|
|
{% endif %}
|
|
{% endblock %}
|