Vous avez reçu un message "Your GitLab account has been locked ..." ? Pas d'inquiétude : lisez cet article https://docs.gricad-pages.univ-grenoble-alpes.fr/help/unlock/

Commit 8f4dbe5b authored by Arnaud Bey's avatar Arnaud Bey
Browse files

WIP UI

parent f79b9479
......@@ -27,6 +27,9 @@
<i class="fa fa-sign-out" aria-hidden="true"></i>
<span class="hidden-xs">{{ 'logout' | trans }}</span>
</a>
{% if is_granted('ROLE_ADMIN') %}
<a class="btn btn-primary btn-sm" href="{{ path('admin_index') }}">Administration</a>
{% endif %}
{% else %}
{% if getGeneralParameters().selfRegistration %}
<a href="{{ path('fos_user_registration_register') }}" class="btn btn-primary btn-sm">
......
......@@ -16,6 +16,30 @@ class DefaultController extends Controller
return $this->render('MagicWordBundle:Default:home.html.twig');
}
/**
* @Route("/home/play", name="home_play")
*/
public function playAction()
{
return $this->render('MagicWordBundle:Default:play.html.twig');
}
/**
* @Route("/home/create", name="home_create")
*/
public function createAction()
{
return $this->render('MagicWordBundle:Default:create.html.twig');
}
/**
* @Route("/home/me", name="home_me")
*/
public function meAction()
{
return $this->render('MagicWordBundle:Default:me.html.twig');
}
/**
* @Route("/", name="index")
*/
......
{% extends '::base.html.twig' %}
{% import "MagicWordBundle:Player:macros.html.twig" as pmacros %}
{% block body -%}
{% set languages = get_languages() %}
<div class="row">
<div class="col-sm-4 mb-2">
<div class="card">
<h5 class="card-header">Nouvelle partie</h5>
<div class="card-body">
<p><i class="fa fa-star fa-4x" aria-hidden="true"></i>
Blabla labla Blab laBlabla BlablaBlabla Blabla Blabla
</p>
<a class="card-link" href="{{ path('massive') }}">{{ 'new_massive' | trans }}</a>
</div>
</div>
</div>
<div class="col-sm-4 mb-2">
<div class="card">
<h5 class="card-header">Parties en chantier</h5>
<div class="card-body">
<p><i class="fa fa-bolt fa-4x" aria-hidden="true"></i>
Blabla labla Blab laBlabla BlablaBlabla Blabla Blabla
</p>
<a class="card-link" href="{{ path('my_massives_under_construction') }}">{{ 'my_massives_under_construction' | trans }}</a>
</div>
</div>
</div>
<div class="col-sm-4 mb-2">
<div class="card">
<h5 class="card-header">Parties finalisées</h5>
<div class="card-body">
<p><i class="fa fa-long-arrow-right fa-4x" aria-hidden="true"></i>
Blabla labla Blab laBlabla BlablaBlabla Blabla Blabla
</p>
<a class="card-link" href="{{ path('my_massives_published') }}">{{ 'my_massives_published' | trans }}</a>
</div>
</div>
</div>
</div>
{% endblock %}
......@@ -3,119 +3,52 @@
{% import "MagicWordBundle:Player:macros.html.twig" as pmacros %}
{% block body -%}
{% set languages = get_languages() %}
<div class="row">
<div class="col-4">
<div class="col-sm-4">
<div class="card">
<div class="card-header">
<i class="fa fa-gamepad" aria-hidden="true"></i>
{{ 'play' | trans }}
<div class="card-body">
<p class="card-text">
<i class="fa fa-gamepad fa-4x" aria-hidden="true"></i> With supporting text below as a natural lead-in to additional content. With supporting text below as a natural lead-in to additional content.
</p>
<a href="{{ path('home_play') }}" class="btn btn-primary">{{ 'play' | trans }}</a>
</div>
<ul class="list-group list-group-flush">
{% set generalParameters = getGeneralParameters() %}
{% if generalParameters.tutorial %}
<li class="list-group-item">
<a href="{{ path('tutorial') }}">{{ 'tutorial' | trans }}</a>
</li>
{% endif %}
<li class="list-group-item">
{{ 'train' | trans }}
{% set languages = get_languages() %}
{% for language in languages %}
<a class="please-wait" data-message="Génération de la grille" href="{{ path('train', {id: language.id}) }}">
{{ language.value | trans }}
</a>
{% endfor %}
</li>
<li class="list-group-item">
<a href="{{ path('challenge') }}">{{ 'challenge_someone' | trans }}</a>
</li>
<li class="list-group-item">
<a href="{{ path('massives') }}">{{ 'massives' | trans }}</a>
</li>
<li class="list-group-item">
<a href="{{ path('games_started') }}">{{ 'games_started' | trans }}</a>
</li>
</ul>
</div>
</div>
<div class="col-4">
<div class="col-sm-4">
<div class="card">
<div class="card-header">
<i class="fa fa-cogs" aria-hidden="true"></i>
{{ 'create' | trans }}
<div class="card-body">
<p class="card-text">
<i class="fa fa-cogs fa-4x" aria-hidden="true"></i> With supporting text below as a natural lead-in to additional content. With supporting text below as a natural lead-in to additional content.
</p>
<a href="{{ path('home_create') }}" class="btn btn-primary">Créer</a>
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item">
<a href="{{ path('massive') }}">{{ 'new_massive' | trans }}</a>
</li>
<li class="list-group-item">
<a href="{{ path('my_massives_under_construction') }}">{{ 'my_massives_under_construction' | trans }}</a>
</li>
<li class="list-group-item">
<a href="{{ path('my_massives_published') }}">{{ 'my_massives_published' | trans }}</a>
</li>
</ul>
</div>
</div>
<div class="col-4">
<div class="col-sm-4 mb-2">
<div class="card">
<div class="card-header">
<i class="fa fa-user" aria-hidden="true"></i>
{{ 'me' | trans }} <span class="text-muted">({{app.user.username}})</span>
<div class="card-body">
<p class="card-text">
<i class="fa fa-user fa-4x" aria-hidden="true"></i> With supporting text below as a natural lead-in to additional content. With supporting text below as a natural lead-in to additional content.
</p>
<a href="{{ path('home_me') }}" class="btn btn-primary">Moi</a>
</div>
<ul class="list-group list-group-flush">
<li class="list-group-item">
{{ 'wordbox' | trans }}
{% for language in languages %}
<a href="{{ path('wordbox', {id: language.id}) }}">
{{ language.value | trans }}
</a>
{% endfor %}
</li>
<li class="list-group-item">
{{ 'found' | trans }}
{% for language in languages %}
<a href="{{ path('found', {id: language.id}) }}">
{{ language.value | trans }}
</a>
{% endfor %}
</li>
<li class="list-group-item">
<a href="{{ path('parameters') }}">{{ 'parameters' | trans }}</a>
</li>
<li class="list-group-item">
<a href="{{ path('my_profile') }}">{{ 'my_profile' | trans }}</a>
</li>
<li class="list-group-item">
<a href="{{ path('my_friends') }}">{{ 'my_friends' | trans }} ({{app.user.friends|length}})</a>
</li>
<li class="list-group-item">
<a href="{{ path('games_ended') }}">{{ 'rankings' | trans }}</a>
</li>
{% if is_granted('ROLE_ADMIN') %}
<li class="list-group-item">
<a href="{{ path('admin_index') }}">Administration</a>
</li>
{% endif %}
</ul>
</div>
</div>
<div class="card mt-3">
<div class="card-header">
<i class="fa fa-users" aria-hidden="true"></i>
{{ 'online' | trans }}
</div>
<ul class="list-group list-group-flush">
{% for user in get_connected(500) %}
<li class="list-group-item">
{{ pmacros.playerPicAndName(user) }}
</li>
{% endfor %}
</ul>
</div>
<div class="col-12">
<div class="alert alert-light" role="alert">
{% for user in get_connected(500) %}
{{ pmacros.playerPicAndName(user) }} &nbsp;
{% endfor %}
</div>
</div>
</div>
{% endblock %}
{% extends '::base.html.twig' %}
{% import "MagicWordBundle:Player:macros.html.twig" as pmacros %}
{% block body -%}
{% set languages = get_languages() %}
<div class="row">
<div class="col-sm-4 mb-2">
<div class="card">
<h5 class="card-header">{{ 'wordbox' | trans }}</h5>
<div class="card-body">
<p>
<i class="fa fa-motorcycle fa-4x" aria-hidden="true"></i> Blabla Blab laBlabla BlablaBlabla Blabla Blabla
</p>
{% for language in languages %}
<a class="card-link" href="{{ path('wordbox', {id: language.id}) }}">{{ language.value | trans }}</a> &nbsp;
{% endfor %}
</div>
</div>
</div>
<div class="col-sm-4 mb-2">
<div class="card">
<h5 class="card-header">{{ 'found' | trans }}</h5>
<div class="card-body">
<p>
<i class="fa fa-star fa-4x" aria-hidden="true"></i> Blabla Blab laBlabla BlablaBlabla Blabla Blabla
</p>
{% for language in languages %}
<a class="card-link" href="{{ path('found', {id: language.id}) }}">{{ language.value | trans }}</a> &nbsp;
{% endfor %}
</div>
</div>
</div>
<div class="col-sm-4 mb-2">
<div class="card">
<h5 class="card-header">{{ 'parameters' | trans }}</h5>
<div class="card-body">
<p><i class="fa fa-star fa-4x" aria-hidden="true"></i>
Blabla labla Blab laBlabla BlablaBlabla Blabla Blabla
</p>
<a class="card-link" href="{{ path('parameters') }}">{{ 'parameters' | trans }}</a>
</div>
</div>
</div>
<div class="col-sm-4 mb-2">
<div class="card">
<h5 class="card-header">{{ 'my_profile' | trans }}</h5>
<div class="card-body">
<p><i class="fa fa-bolt fa-4x" aria-hidden="true"></i>
Blabla labla Blab laBlabla BlablaBlabla Blabla Blabla
</p>
<a class="card-link" href="{{ path('my_profile') }}">{{ 'my_profile' | trans }}</a>
</div>
</div>
</div>
<div class="col-sm-4 mb-2">
<div class="card">
<h5 class="card-header">{{ 'my_friends' | trans }}</h5>
<div class="card-body">
<p><i class="fa fa-long-arrow-right fa-4x" aria-hidden="true"></i>
Blabla labla Blab laBlabla BlablaBlabla Blabla Blabla
</p>
<a class="card-link" href="{{ path('my_friends') }}">{{ 'my_friends' | trans }} ({{app.user.friends|length}})</a>
</div>
</div>
</div>
<div class="col-sm-4 mb-2">
<div class="card">
<h5 class="card-header">{{ 'rankings' | trans }}</h5>
<div class="card-body">
<p><i class="fa fa-star fa-4x" aria-hidden="true"></i>
Blabla labla Blab laBlabla BlablaBlabla Blabla Blabla
</p>
<a class="card-link" href="{{ path('games_ended') }}">{{ 'rankings' | trans }}</a>
</div>
</div>
</div>
</div>
{% endblock %}
{% extends '::base.html.twig' %}
{% import "MagicWordBundle:Player:macros.html.twig" as pmacros %}
{% block body -%}
{% set languages = get_languages() %}
<div class="row">
<!-- TRAIN -->
<div class="col-sm-4 mb-2">
<div class="card">
<h5 class="card-header">S'entrainer</h5>
<div class="card-body">
<p>
<i class="fa fa-motorcycle fa-4x" aria-hidden="true"></i> Blabla Blab laBlabla BlablaBlabla Blabla Blabla
</p>
{% for language in languages %}
<a class="please-wait card-link" data-message="Génération de la grille" href="{{ path('train', {id: language.id}) }}">
{{ language.value | trans }}
</a> &nbsp;
{% endfor %}
</div>
</div>
</div>
<div class="col-sm-4 mb-2">
<div class="card">
<h5 class="card-header">Défi</h5>
<div class="card-body">
<p><i class="fa fa-star fa-4x" aria-hidden="true"></i>
Blabla labla Blab laBlabla BlablaBlabla Blabla Blabla
</p>
<a class="card-link" href="{{ path('challenge') }}">{{ 'challenge_someone' | trans }}</a>
</div>
</div>
</div>
<div class="col-sm-4 mb-2">
<div class="card">
<h5 class="card-header">Parties massives</h5>
<div class="card-body">
<p><i class="fa fa-bolt fa-4x" aria-hidden="true"></i>
Blabla labla Blab laBlabla BlablaBlabla Blabla Blabla
</p>
<a class="card-link" href="{{ path('massives') }}">{{ 'massives' | trans }}</a>
</div>
</div>
</div>
<div class="col-sm-4 mb-2">
<div class="card">
<h5 class="card-header">Parties en cours</h5>
<div class="card-body">
<p><i class="fa fa-long-arrow-right fa-4x" aria-hidden="true"></i>
Blabla labla Blab laBlabla BlablaBlabla Blabla Blabla
</p>
<a class="card-link" href="{{ path('games_started') }}">{{ 'games_started' | trans }}</a>
</div>
</div>
</div>
</div>
{% endblock %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment