feat(translations/home): Ajoute les traductions pour la page d'accueil

 feat(templates/home): Crée le template de la page d'accueil avec sections

 chore(src/Controller): Crée le ShopController et la route vers la boutique

 feat(templates/base): Ajoute un lien vers la boutique dans le menu
```
This commit is contained in:
Serreau Jovann
2025-11-16 22:32:06 +01:00
parent 7bf092a674
commit 9a8b99cfad
5 changed files with 213 additions and 14 deletions

View File

@@ -0,0 +1,30 @@
<?php
namespace App\Controller;
use App\Entity\Account;
use App\Entity\AccountResetPasswordRequest;
use App\Form\RequestPasswordConfirmType;
use App\Form\RequestPasswordRequestType;
use App\Service\ResetPassword\Event\ResetPasswordConfirmEvent;
use App\Service\ResetPassword\Event\ResetPasswordEvent;
use Doctrine\ORM\EntityManagerInterface;
use Psr\EventDispatcher\EventDispatcherInterface;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
use Symfony\Component\Routing\Attribute\Route;
use Symfony\Component\Security\Http\Authentication\AuthenticationUtils;
use Twig\Environment;
class ShopController extends AbstractController
{
#[Route(path: '/boutique', name: 'app_shop', options: ['sitemap' => false], methods: ['GET'])]
public function index(): Response
{
return $this->render('home.twig');
}
}

View File

@@ -100,6 +100,7 @@
{ 'name': 'Qui sommes-nous'|trans, 'route': 'app_about' },
{ 'name': 'Nos membres'|trans, 'route': 'app_members' },
{ 'name': 'Nos événements'|trans, 'route': 'app_events' },
{ 'name': 'Boutiques'|trans, 'route': 'app_shop' },
{ 'name': 'Contact'|trans, 'route': 'app_contact' }
] %}
<header class="bg-white shadow-md sticky top-0 z-40">

View File

@@ -1,17 +1,20 @@
{% extends 'base.twig' %}
{% block canonical_url %}<link rel="canonical" href="{{ url('app_home') }}" />
{% endblock %}
{% block title %}{{'home_page.title'|trans}}{% endblock %}
{% block canonical_url %}<link rel="canonical" href="{{ url('app_home') }}" />{% endblock %}
{% block breadcrumb_schema %}
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "Accueil",
"item": "{{ app.request.schemeAndHttpHost }}"
<script type="application/ld+json">
{
"@context": "https://schema.org",
"@type": "BreadcrumbList",
"itemListElement": [
{
"@type": "ListItem",
"position": 1,
"name": "{{ 'breadcrumb.home'|trans }}",
"item": "{{ app.request.schemeAndHttpHost }}"
}
]
}
@@ -19,5 +22,103 @@
{% endblock %}
{% block body %}
{# Contenu de la page #}
{# --- SECTION 1: BANNIÈRE HÉRO --- #}
<div class="bg-indigo-700 text-white py-24 px-4 sm:px-6 lg:px-8 shadow-2xl">
<div class="max-w-7xl mx-auto text-center">
<h1 class="text-5xl md:text-6xl font-extrabold tracking-tight mb-4">
{{ 'home_hero.title'|trans }}
</h1>
<p class="mt-3 max-w-2xl mx-auto text-xl text-indigo-200 sm:mt-4">
{{ 'home_hero.subtitle'|trans }}
</p>
<div class="mt-10 flex justify-center space-x-4">
<a href="{{ url('app_members') }}" class="inline-flex items-center justify-center px-8 py-3 border border-transparent text-base font-medium rounded-full text-indigo-700 bg-white hover:bg-gray-100 shadow-lg transition duration-300">
{{ 'home_hero.button_members'|trans }}
</a>
<a href="{{ url('app_contact') }}" class="inline-flex items-center justify-center px-8 py-3 border border-white text-base font-medium rounded-full text-white bg-indigo-500 hover:bg-indigo-400 transition duration-300">
{{ 'home_hero.button_contact'|trans }}
</a>
</div>
</div>
</div>
{# --- SECTION 2: À PROPOS DE NOUS --- #}
<div class="py-16 bg-white">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="lg:text-center">
<h2 class="text-base text-indigo-600 font-semibold tracking-wide uppercase">{{ 'home_about.pretitle'|trans }}</h2>
<p class="mt-2 text-3xl leading-8 font-extrabold tracking-tight text-gray-900 sm:text-4xl">
{{ 'home_about.title'|trans }}
</p>
<p class="mt-4 max-w-2xl text-xl text-gray-500 lg:mx-auto">
{{ 'home_about.text_1'|trans }}
</p>
</div>
<div class="mt-10">
<p class="text-lg text-gray-700">
{{ 'home_about.text_2'|trans }}
</p>
</div>
</div>
</div>
{# --- SECTION 3: NOS ACTIVITÉS (CARACTÉRISTIQUES) --- #}
<div class="bg-gray-50 py-16">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="lg:text-center mb-12">
<h2 class="text-3xl leading-8 font-extrabold tracking-tight text-gray-900 sm:text-4xl">
{{ 'home_activities.title'|trans }}
</h2>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-10 text-center">
{# Activité 1: Cosplay #}
<div class="p-6 bg-white rounded-xl shadow-md transition duration-300 hover:shadow-lg">
<span class="text-4xl text-indigo-500 mb-4 inline-block">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-mask"><path d="M12 7h.01"/><path d="M22 17c0 4-4 4-4 4H6c-4 0-4-4-4-4V7c0-4 4-4 4-4h12c4 0 4 4 4 4v10z"/><path d="M9 13s1.5 2 3 2 3-2 3-2"/></svg>
</span>
<h3 class="text-xl font-bold text-gray-900 mb-3">{{ 'home_activities.cosplay_title'|trans }}</h3>
<p class="text-gray-600">{{ 'home_activities.cosplay_text'|trans }}</p>
</div>
{# Activité 2: Communauté & Événements #}
<div class="p-6 bg-white rounded-xl shadow-md transition duration-300 hover:shadow-lg">
<span class="text-4xl text-indigo-500 mb-4 inline-block">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-users-round"><path d="M18 21a8 8 0 0 0-16 0"/><circle cx="10" cy="8" r="5"/><path d="M22 21a8 8 0 0 0-16 0"/><path d="M16 3.999a4.5 4.5 0 0 1-2.9 3.86"/><circle cx="16" cy="7.999" r="3.5"/></svg>
</span>
<h3 class="text-xl font-bold text-gray-900 mb-3">{{ 'home_activities.community_title'|trans }}</h3>
<p class="text-gray-600">{{ 'home_activities.community_text'|trans }}</p>
</div>
{# Activité 3: Diversité et Inclusion #}
<div class="p-6 bg-white rounded-xl shadow-md transition duration-300 hover:shadow-lg">
<span class="text-4xl text-indigo-500 mb-4 inline-block">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-heart-handshake"><path d="M19 14c1.49-1.46 3-3.21 3-5.5A5.5 5.5 0 0 0 16.5 3c-1.76 0-3 .5-4.5 2-1.5-1.5-2.74-2-4.5-2A5.5 5.5 0 0 0 2 8.5c0 2.3 1.5 4.05 3 5.5"/><path d="M12 6.5a1 1 0 0 0-1 1v7a1 1 0 0 0 1 1h5.5l-.33-1.66a1 1 0 0 0-.96-.75H12"/><path d="m18 13-1.4-1.4"/><path d="m14 17 1.4 1.4"/></svg>
</span>
<h3 class="text-xl font-bold text-gray-900 mb-3">{{ 'home_activities.diversity_title'|trans }}</h3>
<p class="text-gray-600">{{ 'home_activities.diversity_text'|trans }}</p>
</div>
</div>
</div>
</div>
{# --- SECTION 4: APPEL À L'ADHÉSION (CTA) --- #}
<div class="bg-indigo-600">
<div class="max-w-7xl mx-auto py-12 px-4 sm:px-6 lg:py-16 lg:px-8 lg:flex lg:items-center lg:justify-between">
<h2 class="text-3xl font-extrabold tracking-tight text-white sm:text-4xl">
<span class="block">{{ 'home_cta.title'|trans }}</span>
<span class="block text-indigo-200">{{ 'home_cta.subtitle'|trans }}</span>
</h2>
<div class="mt-8 flex lg:mt-0 lg:flex-shrink-0">
<div class="inline-flex rounded-md shadow">
<a href="{{ url('app_contact') }}" class="inline-flex items-center justify-center px-5 py-3 border border-transparent text-base font-medium rounded-md text-indigo-600 bg-white hover:bg-indigo-50 transition duration-300">
{{ 'home_cta.button'|trans }}
</a>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@@ -479,3 +479,37 @@ orientation.pansexual: "Pansexual"
orientation.queer: "Queer"
orientation.questioning: "Questioning"
orientation.other: "Other"
# --- GENERAL AND NAVIGATION ---
home_page.title: "Home"
# =======================================================
# --- HOME PAGE (HOMEPAGE.TWIG) ---
# =======================================================
# HERO SECTION
home_hero.title: "The Meeting Place for Cosplay Enthusiasts"
home_hero.subtitle: "Join an inclusive community where creativity, diversity, and friendship are celebrated."
home_hero.button_members: "See Our Members"
home_hero.button_contact: "Contact Us"
# ABOUT SECTION
home_about.pretitle: "Our Story"
home_about.title: "A Safe Space for All Fandoms"
home_about.text_1: "Our association was created to offer a supportive and structured environment for all fans of costume art, geek culture, and role-playing."
home_about.text_2: "We believe that personal expression is essential. Whether you are a beginner or experienced, a crosscosplayer, transgender, or simply passionate about a universe, you belong here."
# ACTIVITIES SECTION
home_activities.title: "What We Do Together"
home_activities.cosplay_title: "Creation & Sharing of Cosplay"
home_activities.cosplay_text: "Workshops to improve your skills (sewing, armor, makeup) and themed photoshoots."
home_activities.community_title: "Events and Community"
home_activities.community_text: "Organization of regional meetups, convention trips, and game nights or discussions about anime/manga."
home_activities.diversity_title: "Diversity and Support"
home_activities.diversity_text: "We are a pillar of support for everyone, including crossplay and the welcoming of transgender members and all orientations."
# CTA MEMBERSHIP
home_cta.title: "Ready to Share Your Passion?"
home_cta.subtitle: "Join today and be part of the adventure."
home_cta.button: "Join Now"
Boutiques: Shop

View File

@@ -440,7 +440,12 @@ contact_form.subject.label: "Sujet"
contact_form.tel.label: "Téléphone (facultatif)"
contact_form.message.label: "Votre message"
form_email_label: "Adresse e-mail"
contact_form.message.placeholder: "Saisissez votre question ou votre demande..."
contact_form.tel.placeholder: "Ex: 06 01 02 03 04"
contact_form.subject.placeholder: "Objet de votre message"
contact_form.email.placeholder: "votre.email@exemple.com"
contact_form.surname.placeholder: "Votre nom de famille"
contact_form.name.placeholder: "Votre prénom"
members_page.title: "Nos Membres & Bureau"
members_page.breadcrumb: "Membres"
@@ -469,3 +474,31 @@ orientation.pansexual: "Pansexuel(le)"
orientation.queer: "Queer"
orientation.questioning: "En questionnement"
orientation.other: "Autre"
# --- PAGE D'ACCUEIL (HOMEPAGE.TWIG) ---
home_page.title: "Accueil"
Boutiques: Boutique
# HERO SECTION
home_hero.title: "Le Point de Rencontre des Passionnés de Cosplay"
home_hero.subtitle: "Rejoignez une communauté inclusive où la créativité, la diversité et l'amitié sont à l'honneur."
home_hero.button_members: "Voir nos Membres"
home_hero.button_contact: "Nous Contacter"
# SECTION À PROPOS
home_about.pretitle: "Notre Histoire"
home_about.title: "Un Espace sûr pour tous les Fandoms"
home_about.text_1: "Notre association a été créée pour offrir un environnement bienveillant et structuré à tous les fans d'art vestimentaire, de culture geek et de jeux de rôle."
home_about.text_2: "Nous croyons que l'expression personnelle est essentielle. Que vous soyez débutant ou expérimenté, crosscosplayer, transgenre, ou simplement passionné par un univers, vous avez votre place ici."
# SECTION ACTIVITÉS
home_activities.title: "Ce que nous Faisons Ensemble"
home_activities.cosplay_title: "Création & Partage de Cosplay"
home_activities.cosplay_text: "Des ateliers pour améliorer vos techniques (couture, armure, maquillage) et des séances photo thématiques."
home_activities.community_title: "Événements et Communauté"
home_activities.community_text: "Organisation de rencontres régionales, de sorties en convention et de soirées de jeux de société ou de discussions autour d'anime/manga."
home_activities.diversity_title: "Diversité et Soutien"
home_activities.diversity_text: "Nous sommes un pilier de soutien pour tous, incluant le crossplay et l'accueil bienveillant des membres transgenres et de toutes les orientations."
# CTA ADHÉSION
home_cta.title: "Prêt à Partager votre Passion ?"
home_cta.subtitle: "Adhérez aujourd'hui et faites partie de l'aventure."
home_cta.button: "Adhérer Maintenant"