fix: réorganisation des colonnes et amélioration de la structure du template utilisateur pour une meilleure lisibilité et maintien des boutons d'action
This commit is contained in:
@@ -9,13 +9,35 @@
|
||||
{% block body %}
|
||||
<div class="py-8 w-full">
|
||||
{# Affichage du formulaire (seulement en mode édition) #}
|
||||
<div class="max-w-6xl mx-auto px-4 sm:px-6 lg:px-8 grid md:grid-cols-3 gap-8">
|
||||
{% if isEditMode %}
|
||||
{{ form_start(form, {'attr': {'class': 'contents'}}) }}
|
||||
{% endif %}
|
||||
|
||||
{# Gestion des boutons d'action (Modifier / Annuler) et des titres #}
|
||||
<div class="relative flex items-center justify-center mb-6">
|
||||
<h1 class="text-4xl font-caveat text-text m-0">Mon profil</h1>
|
||||
|
||||
<div class="absolute right-0">
|
||||
{% if isEditMode %}
|
||||
<a href="{{ path('app_user') }}"
|
||||
class="flex items-center gap-1.5 px-3 py-1.5 bg-white border border-gris-clair hover:bg-gray-50 text-text text-sm font-bold rounded-md shadow-sm transition-colors">
|
||||
❌ Annuler
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{{ path('app_user', {'edit': 1}) }}"
|
||||
class="flex items-center gap-1.5 px-3 py-1.5 bg-white border border-gris-clair hover:bg-gray-50 text-text text-sm font-bold rounded-md shadow-sm transition-colors">
|
||||
✏️ Modifier
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{# --- Gestion de l'affichage des informations personnelles et de la photo --- #}
|
||||
{# Mise en page en colonne #}
|
||||
<div class="grid md:grid-cols-3 gap-8">
|
||||
|
||||
{# Colonne Photo #}
|
||||
<div class="flex flex-col text-text items-center order-2 md:order-1">
|
||||
<div class="flex flex-col text-text items-center">
|
||||
|
||||
<div class="mt-16 flex-shrink-0">
|
||||
{% if userData.image %}
|
||||
@@ -61,30 +83,10 @@
|
||||
</div>
|
||||
|
||||
{# Colonne Infos Persos #}
|
||||
<div class="md:col-span-2 order-1 md:order-2">
|
||||
|
||||
{# Gestion des boutons d'action (Modifier / Annuler) et des titres #}
|
||||
<div class="relative flex items-center justify-center mb-6">
|
||||
<h1 class="text-4xl font-caveat text-text m-0">Mon profil</h1>
|
||||
|
||||
<div class="absolute right-0">
|
||||
{% if isEditMode %}
|
||||
<a href="{{ path('app_user') }}"
|
||||
class="flex items-center gap-1.5 px-3 py-1.5 bg-white border border-gris-clair hover:bg-gray-50 text-text text-sm font-bold rounded-md shadow-sm transition-colors">
|
||||
❌ Annuler
|
||||
</a>
|
||||
{% else %}
|
||||
<a href="{{ path('app_user', {'edit': 1}) }}"
|
||||
class="flex items-center gap-1.5 px-3 py-1.5 bg-white border border-gris-clair hover:bg-gray-50 text-text text-sm font-bold rounded-md shadow-sm transition-colors">
|
||||
✏️ Modifier
|
||||
</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="md:col-span-2">
|
||||
|
||||
<h2 class="text-2xl font-caveat text-text mb-6 text-center">Mes informations personnelles</h2>
|
||||
|
||||
{# --- Gestion de l'affichage des informations personnelles --- #}
|
||||
<div class="flex flex-col gap-6">
|
||||
{# Identifiant #}
|
||||
<div class="space-y-1">
|
||||
@@ -277,7 +279,6 @@
|
||||
{% if isEditMode %}
|
||||
{{ form_end(form) }}
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user