feat: mise en page de la page login et page accueil
This commit is contained in:
@@ -1,78 +1,106 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Tableau de bord | Association KAZ{% endblock %}
|
||||
{% block title %}Accueil | Association KAZ{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<div class="min-h-screen bg-gray-50 py-8 w-full">
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
<div class="min-h-screen bg-bg-primaire py-8 w-full font-sora">
|
||||
<div class="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8">
|
||||
|
||||
{# --- EN-TÊTE DU TABLEAU DE BORD --- #}
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gray-100 px-6 py-6 mb-8 flex flex-col sm:flex-row justify-between items-start sm:items-center gap-4">
|
||||
<div>
|
||||
<h1 class="text-2xl font-bold text-gray-900">Espace Adhérent KAZ</h1>
|
||||
<p class="text-sm text-gray-500 mt-1">Bienvenue sur votre intranet associatif.</p>
|
||||
{# Bloc "message d'accueil" #}
|
||||
<h1 class="text-4xl font-caveat text-text mb-6 text-center sm:text-center">
|
||||
Page d'accueil
|
||||
</h1>
|
||||
|
||||
<div class="bg-white rounded-xl shadow-sm border border-gris-clair p-6 sm:p-8 mb-10">
|
||||
<h2 class="text-xl font-bold text-title mb-4 text-center">
|
||||
Bienvenue sur ton espace kaznaute <span class="text-bouton">{{ app.user ? app.user.userIdentifier : 'visiteur' }}</span> !
|
||||
</h2>
|
||||
|
||||
{# Zone réservée pour les futures données de l'API #}
|
||||
<div class="bg-bouton/10 border border-bouton/30 rounded-lg p-5">
|
||||
<h3 class="font-semibold text-title mb-3 flex items-center gap-2">
|
||||
Votre abonnement actuellement :
|
||||
</h3>
|
||||
|
||||
<ul class="space-y-2 text-sm text-text">
|
||||
<li class="flex flex-col sm:flex-row sm:items-center gap-1 sm:gap-2">
|
||||
<span class="font-semibold text-gris-fonce">Formule souscrite :</span>
|
||||
{# TODO API : Remplacer par la vraie variable #}
|
||||
<span class="italic opacity-70">Ajouter la vraie valeur</span>
|
||||
</li>
|
||||
<li class="flex flex-col sm:flex-row sm:items-center gap-1 sm:gap-2">
|
||||
<span class="font-semibold text-gris-fonce">Date de validité :</span>
|
||||
{# TODO API : Remplacer par la vraie variable #}
|
||||
<span class="italic opacity-70">Ajouter la vraie valeur</span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
{% if app.user %}
|
||||
<div class="flex items-center space-x-4">
|
||||
<span class="inline-flex items-center rounded-full bg-blue-50 px-3 py-1 text-sm font-medium text-blue-700 ring-1 ring-inset ring-blue-700/10">
|
||||
👤 {{ app.user.userIdentifier }}
|
||||
</span>
|
||||
<a href="{{ path('app_logout') }}" class="rounded-md bg-red-600 px-4 py-2 text-sm font-semibold text-white shadow-sm hover:bg-red-500 transition-colors duration-200">
|
||||
Déconnexion
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{# --- GRILLE DES FONCTIONNALITÉS --- #}
|
||||
<div class="grid grid-cols-1 gap-6 sm:grid-cols-2 lg:grid-cols-3">
|
||||
|
||||
{# Carte 1 : Profil #}
|
||||
<div class="bg-white overflow-hidden shadow-sm border border-gray-100 rounded-xl hover:shadow-md transition-shadow duration-200">
|
||||
<div class="p-5">
|
||||
<div class="flex items-center">
|
||||
<div class="flex-shrink-0 bg-blue-600 rounded-lg p-3">
|
||||
<span class="text-2xl">📋</span>
|
||||
</div>
|
||||
<div class="ml-5 w-0 flex-1">
|
||||
<dl>
|
||||
<dt class="text-sm font-medium text-gray-500 truncate">Mon Profil</dt>
|
||||
<dd class="text-lg font-semibold text-gray-900">Gérer mes informations</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bg-gray-50 px-5 py-3 border-t border-gray-100">
|
||||
<div class="text-sm">
|
||||
<a href="#" class="font-medium text-blue-600 hover:text-blue-500">Voir mon profil →</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{# Bloc "que souhaitez-vous faire ?" #}
|
||||
<h2 class="text-2xl font-bold text-title mb-6 text-center sm:text-left">
|
||||
Que souhaitez-vous faire ?
|
||||
</h2>
|
||||
{# Gestion du responsive #}
|
||||
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4 sm:gap-6">
|
||||
|
||||
{# Carte 2 : Mon abonnement KAZ #}
|
||||
<div class="bg-white overflow-hidden shadow-sm border border-gray-100 rounded-xl hover:shadow-md transition-shadow duration-200">
|
||||
<div class="p-5">
|
||||
<div class="flex items-center">
|
||||
<div class="flex-shrink-0 bg-green-500 rounded-lg p-3">
|
||||
<span class="text-2xl">💳</span>
|
||||
</div>
|
||||
<div class="ml-5 w-0 flex-1">
|
||||
<dl>
|
||||
<dt class="text-sm font-medium text-gray-500 truncate">Mon abonnement KAZ</dt>
|
||||
<dd class="text-lg font-semibold text-gray-900">À jour</dd>
|
||||
</dl>
|
||||
</div>
|
||||
</div>
|
||||
{# LIGNE 1 : Profil & Offre #}
|
||||
<a href="{{ path('app_user')|default('#') }}" class="group flex items-center p-5 bg-white border border-gris-clair rounded-xl shadow-sm hover:shadow-md hover:border-bouton transition-all duration-200">
|
||||
<div class="flex-shrink-0 bg-blue-50 text-blue-600 rounded-lg p-3 group-hover:bg-blue-600 group-hover:text-white transition-colors">
|
||||
<span class="text-2xl block">👤</span>
|
||||
</div>
|
||||
<div class="bg-gray-50 px-5 py-3 border-t border-gray-100">
|
||||
<div class="text-sm">
|
||||
<a href="#" class="font-medium text-green-600 hover:text-green-500">Voir l'historique →</a>
|
||||
</div>
|
||||
<div class="ml-4">
|
||||
<h3 class="text-lg font-semibold text-title group-hover:text-bouton transition-colors">Mon Profil</h3>
|
||||
<p class="text-sm text-gris-fonce">Consulter et modifier mes informations</p>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<a href="#" class="group flex items-center p-5 bg-white border border-gris-clair rounded-xl shadow-sm hover:shadow-md hover:border-bouton transition-all duration-200">
|
||||
<div class="flex-shrink-0 bg-green-50 text-green-600 rounded-lg p-3 group-hover:bg-green-600 group-hover:text-white transition-colors">
|
||||
<span class="text-2xl block">💳</span>
|
||||
</div>
|
||||
<div class="ml-4">
|
||||
<h3 class="text-lg font-semibold text-title group-hover:text-bouton transition-colors">Mon Offre</h3>
|
||||
<p class="text-sm text-gris-fonce">Gérer mon adhésion KAZ</p>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
{# LIGNE 2 : Sécurité & Organisation/Contact #}
|
||||
|
||||
<a href="{{ path('app_user_edit_password') }}" class="group flex items-center p-5 bg-white border border-gris-clair rounded-xl shadow-sm hover:shadow-md hover:border-bouton transition-all duration-200">
|
||||
<div class="flex-shrink-0 bg-orange-50 text-orange-600 rounded-lg p-3 group-hover:bg-orange-600 group-hover:text-white transition-colors">
|
||||
<span class="text-2xl block">🔒</span>
|
||||
</div>
|
||||
<div class="ml-4">
|
||||
<h3 class="text-lg font-semibold text-title group-hover:text-bouton transition-colors">Sécurité</h3>
|
||||
<p class="text-sm text-gris-fonce">Modifier mes mots de passe</p>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
{# Si la personne gère une asso, on montre l'organisation. Sinon, un bouton Contact pour garder la grille de 6 éléments équilibrée #}
|
||||
{% if is_granted('ROLE_ADMIN_ORGANISATION') %}
|
||||
<a href="#" class="group flex items-center p-5 bg-white border border-bouton/30 rounded-xl shadow-sm hover:shadow-md hover:border-bouton transition-all duration-200">
|
||||
<div class="flex-shrink-0 bg-bouton/20 text-bouton rounded-lg p-3 group-hover:bg-bouton group-hover:text-white transition-colors">
|
||||
<span class="text-2xl block">🏢</span>
|
||||
</div>
|
||||
<div class="ml-4">
|
||||
<h3 class="text-lg font-semibold text-title group-hover:text-bouton transition-colors">Mon Organisation</h3>
|
||||
<p class="text-sm text-gris-fonce">Espace de gestion du bureau</p>
|
||||
</div>
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="https://kaz.bzh/contact/" class="group flex items-center p-5 bg-white border border-gris-clair rounded-xl shadow-sm hover:shadow-md hover:border-bouton transition-all duration-200">
|
||||
<div class="flex-shrink-0 bg-purple-50 text-purple-600 rounded-lg p-3 group-hover:bg-purple-600 group-hover:text-white transition-colors">
|
||||
<span class="text-2xl block">✉️</span>
|
||||
</div>
|
||||
<div class="ml-4">
|
||||
<h3 class="text-lg font-semibold text-title group-hover:text-bouton transition-colors">Nous contacter</h3>
|
||||
<p class="text-sm text-gris-fonce">Besoin d'aide ou d'assistance ?</p>
|
||||
</div>
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user