authentication done
This commit is contained in:
33
templates/auth/login.html.twig
Normal file
33
templates/auth/login.html.twig
Normal file
@@ -0,0 +1,33 @@
|
||||
{% extends 'main/base.html.twig' %}
|
||||
{% block head %}
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
{% block stylesheets %}
|
||||
{{ encore_entry_link_tags('app') }}
|
||||
{% endblock %}
|
||||
</head>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="flex flex-col justify-center items-center py-48">
|
||||
<div class="bg-white shadow-lg rounded-lg p-8 max-w-sm text-center">
|
||||
<h2 class="text-2xl font-bold text-center pb-6">Connectez-vous !</h2>
|
||||
<form action="{{ path('app_login') }}" method="post">
|
||||
<label class="text-gray-700 font-bold" for="username">Email</label>
|
||||
<input class="w-full mb-4 px-4 py-2 border-2 border-gray-300 rounded-lg focus:outline-none focus:border-blue-500" placeholder="Adresse e-mail" type="email" value="{{ last_username }}" name="_username" id="username" autocomplete="email" required autofocus>
|
||||
<label class="text-gray-700 font-bold" for="password">Mot de passe</label>
|
||||
<input class="w-full mb-4 px-4 py-2 border-2 border-gray-300 rounded-lg focus:outline-none focus:border-blue-500" placeholder="Mot de passe" type="password" name="_password" id="password" autocomplete="current-password" required>
|
||||
|
||||
<input type="hidden" name="_csrf_token"
|
||||
value="{{ csrf_token('authenticate') }}"
|
||||
>
|
||||
<div class="flex flex-row justify-between">
|
||||
<button class="bg-blue-500 hover:bg-blue-400 text-white font-bold py-2 px-4 border-b-4 border-blue-700 hover:border-blue-500 rounded" type="submit">Se connecter</button>
|
||||
<a href="{{ path('app_register') }}">
|
||||
<button class="bg-blue-500 hover:bg-blue-400 text-white font-bold py-2 px-4 border-b-4 border-blue-700 hover:border-blue-500 rounded mx-auto" type="button">S'inscrire</button>
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -10,14 +10,17 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="flex flex-row justify-center items-stretch py-48">
|
||||
<div class="flex flex-row justify-center items-stretch py-24">
|
||||
<div class="bg-gray-500 shadow-lg p-8 max-w-sm text-center flex-1">
|
||||
<h4 class="text-white text-lg font-semibold py-6">Sortir !</h4>
|
||||
<p class="text-[13px] text-gray-300 mt-3 leading-relaxed">Bienvenue sur notre application web référencant tout type d'évènements à travers le monde. N'hésitez pas à vous inscrire sur notre plateforme et y invitez vos amis afins de participer à des évènements simplement et qui vous conviennent !</p>
|
||||
<h2 class="text-white text-2xl font-semibold py-6">Sortir !</h2>
|
||||
<p class="text-lg text-gray-300 mt-3 leading-relaxed">Bienvenue sur notre application web référencant tout type d'évènements à travers le monde. N'hésitez pas à vous inscrire sur notre plateforme et y invitez vos amis afins de participer à des évènements simplement et qui vous conviennent !</p>
|
||||
</div>
|
||||
<div class="bg-white shadow-lg p-8 max-w-sm text-center flex-1">
|
||||
<h2 class="text-2xl font-bold text-center pb-6">S'inscrire</h2>
|
||||
{{ form_start(registrationForm) }}
|
||||
{{ form_row(registrationForm.prenom) }}
|
||||
{{ form_row(registrationForm.nom) }}
|
||||
{{ form_row(registrationForm.telephone) }}
|
||||
{{ form_row(registrationForm.email) }}
|
||||
{{ form_row(registrationForm.plainPassword) }}
|
||||
<button class="bg-blue-500 hover:bg-blue-400 text-white font-bold py-2 px-4 border-b-4 border-blue-700 hover:border-blue-500 rounded mx-auto" type="submit">S'inscrire</button>
|
||||
@@ -27,13 +27,12 @@
|
||||
<li><a href="/" class="text-gray-700 font-bold hover:text-blue-500">Sortie</a></li>
|
||||
<li><a href="/" class="text-gray-700 font-bold hover:text-blue-500">ToDo</a></li>
|
||||
<li><a href="/" class="text-gray-700 font-bold hover:text-blue-500">À propos</a></li>
|
||||
{# <li><a href="#Contact" class="text-gray-700 font-bold hover:text-blue-500">Contact</a></li>#}
|
||||
{# {% if app.user %}#}
|
||||
{# <li><a href="{{ path('auth_logout') }}" class="text-gray-700 font-bold hover:text-blue-500">Se déconnecter</a></li>#}
|
||||
{# {% else %}#}
|
||||
{# <li><a href="{{ path('auth_register') }}" class="text-gray-700 font-bold hover:text-blue-500">S'inscrire</a></li>#}
|
||||
{# <li><a href="{{ path('auth_login') }}" class="text-gray-700 font-bold hover:text-blue-500">Se connecter</a></li>#}
|
||||
{# {% endif %}#}
|
||||
{% if app.user %}
|
||||
<li><a href="{{ path('app_logout') }}" class="text-gray-700 font-bold hover:text-blue-500">Se déconnecter</a></li>
|
||||
{% else %}
|
||||
<li><a href="{{ path('app_register') }}" class="text-gray-700 font-bold hover:text-blue-500">S'inscrire</a></li>
|
||||
<li><a href="{{ path('app_login') }}" class="text-gray-700 font-bold hover:text-blue-500">Se connecter</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
Reference in New Issue
Block a user