diff --git a/.env b/.env index 87f4f4c..0076c52 100644 --- a/.env +++ b/.env @@ -56,7 +56,7 @@ VAPID_PK=DsOg7jToRSD-VpNSV1Gt3YAhSwz4l-nqeu7yFvzbSxg VAPID_PC=BKz0kdcsG6kk9KxciPpkfP8kEDAd408inZecij5kBDbQ1ZGZSNwS4KZ8FerC28LFXvgSqpDXtor3ePo0zBCdNqo CLOUDFLARE_ZONE_ID=a26d2ecd33d18c984f348eeb060ed5b3 -CLOUDFLARE_API_TOKEN=zhpO0bBO8wdogBrDuePbpGzMRrY6pItGhPSmhQ-h +CLOUDFLARE_API_TOKEN=Kq_hpaH_ng-hAeGsJo6KhQb2TxYW1v6lRGE84aOR MARCHAND_ID=5685183792 ###> google/apiclient ### GOOGLE_API_KEY= diff --git a/config/packages/vich_uploader.yaml b/config/packages/vich_uploader.yaml index 953474b..32ded30 100644 --- a/config/packages/vich_uploader.yaml +++ b/config/packages/vich_uploader.yaml @@ -75,8 +75,8 @@ vich_uploader: delete_on_update: true delete_on_remove: true epage_avatar: - uri_prefix: /epage_avatar/events - upload_destination: '%kernel.project_dir%/public/storage/epage_avatar' + uri_prefix: /storage/epage/ + upload_destination: '%kernel.project_dir%/public/storage/epage' namer: App\VichUploader\Namer\Epage\AvatarNamer # Replaced namer directory_namer: App\VichUploader\DirectoryNamer\Epage\DirectoryNamer inject_on_load: true diff --git a/src/Controller/PagesController.php b/src/Controller/PagesController.php index e7f2e4b..0ac40f2 100644 --- a/src/Controller/PagesController.php +++ b/src/Controller/PagesController.php @@ -5,6 +5,7 @@ namespace App\Controller; use App\Entity\OnBoaringEpage; use App\Form\EPageOnboard; use App\Repository\AbonementsRepository; +use App\Service\Epage\EpageService; use Cocur\Slugify\Slugify; use Doctrine\ORM\EntityManagerInterface; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; @@ -23,6 +24,15 @@ class PagesController extends AbstractController ]); } + #[Route(path: '/pages/check', name: 'app_pages_check', options: ['sitemap' => false], methods: ['GET','POST'])] + public function check(Request $request,EpageService $epageService): Response + { + $s = new Slugify(); + $g = $request->get('q',null); + $slug = $s->slugify($g); + $isAvailable = $epageService->checkDispo($slug); + return $this->json(['available' => $isAvailable, 'slug' => $slug]); + } #[Route(path: '/pages/discover', name: 'app_pages_discover', options: ['sitemap' => false], methods: ['GET','POST'])] public function discover(): Response { diff --git a/src/Service/Epage/EpageService.php b/src/Service/Epage/EpageService.php new file mode 100644 index 0000000..45010a6 --- /dev/null +++ b/src/Service/Epage/EpageService.php @@ -0,0 +1,71 @@ +zoneId = $_ENV['CLOUDFLARE_ZONE_ID']; + $this->apiToken = $_ENV['CLOUDFLARE_API_TOKEN']; + + } + + public function checkDispo(string $dns): bool + { + $finalDomain = $dns . self::EPAGE_ROOT; + + try { + $response = $this->httpClient->request('GET', "https://api.cloudflare.com/client/v4/zones/{$this->zoneId}/dns_records", [ + 'headers' => [ + 'Authorization' => 'Bearer ' . $this->apiToken, + 'Content-Type' => 'application/json', + ], + 'query' => [ + 'name' => $finalDomain, // On filtre directement par le nom complet + ], + ]); + + $data = $response->toArray(); + + // Cloudflare retourne un tableau 'result'. + // S'il est vide, l'enregistrement n'existe pas, donc c'est disponible (true). + return empty($data['result']); + + } catch (\Exception $e) { + // En cas d'erreur API, on considère par sécurité que ce n'est pas disponible + // ou vous pouvez logger l'erreur selon votre politique. + return false; + } + } + public function createDns(string $dns) : array + { + $final = $dns.self::EPAGE_ROOT; + } + public function deleteDns(string $dns) : array + { + $final = $dns.self::EPAGE_ROOT; + } + public function updateDns(string $dns) : array + { + $final = $dns.self::EPAGE_ROOT; + } + public function addCustomDns() + { + + } + public function deleteCustomDns() + { + + } + +} diff --git a/templates/pages/onboarding.twig b/templates/pages/onboarding.twig index 14d7bad..de2fe88 100644 --- a/templates/pages/onboarding.twig +++ b/templates/pages/onboarding.twig @@ -5,145 +5,207 @@ {% block canonical_url %}{% endblock %} {% block body %} - {{ form_start(form) }} - -
+
+ {{ form_start(form) }} +
-

{{ 'onboarding.form.title'|trans }}

+ {# EN-TÊTE DU FORMULAIRE #} +
+

+ {{ 'onboarding.form.title'|trans }} +

+
- -
+
- -
-
-

- + {# SECTION 1 : INFORMATIONS PERSONNELLES #} +
+

+ 1 {{ 'onboarding.form.section1.title'|trans }}

-

{{ 'onboarding.form.section1.description'|trans }}

+

+ // {{ 'onboarding.form.section1.description'|trans }} +

-
- -
- {{ form_row(form.name) }} +
+
{{ form_row(form.name) }}
+
{{ form_row(form.surname) }}
+
{{ form_row(form.email) }}
+
{{ form_row(form.birdth) }}
+
+
+ + {# SECTION 2 : PROFIL COSPLAY + CHECK DISPO #} +
+

+ 2 + {{ 'onboarding.form.section2.title'|trans }} +

+

+ // {{ 'onboarding.form.section2.description'|trans }} +

+ +
+
+ {{ form_row(form.nameCosplayer) }} + {# Le feedback JS sera injecté ici #}
- -
- {{ form_row(form.surname) }} +
{{ form_row(form.description)}}
+
{{ form_row(form.epage) }}
+
+
+ + {# SECTION 3 : RÉSEAUX SOCIAUX #} +
+

+ 3 + {{ 'onboarding.form.section3.title'|trans }} +

+

+ // {{ 'onboarding.form.section3.description'|trans }} +

+ +
+
{{ form_row(form.linkFacebook) }}
+
{{ form_row(form.linkInstagram) }}
+
{{ form_row(form.linkTiktok) }}
+
{{ form_row(form.linkX) }}
+
+
+ + {# SECTION 4 : LIEN PERSONNALISÉ #} +
+

+ 4 + {{ 'onboarding.form.section4.title'|trans }} +

+ +
+
+ {{ form_row(form.useDomain) }}
- -
- {{ form_row(form.email) }} -
- -
- {{ form_row(form.birdth) }} + +
- -
-

- - {{ 'onboarding.form.section2.title'|trans }} -

-

{{ 'onboarding.form.section2.description'|trans }}

- -
-
- {{ form_row(form.nameCosplayer) }} -
-
- {{ form_row(form.description)}} -
- {{ form_row(form.epage) }} -
+ {# BOUTON SOUMISSION #} +
+
- -
-

- - {{ 'onboarding.form.section3.title'|trans }} -

-

{{ 'onboarding.form.section3.description'|trans }}

- -
-
- {{ form_row(form.linkFacebook) }} -
-
- {{ form_row(form.linkInstagram) }} -
-
- {{ form_row(form.linkTiktok) }} -
-
- {{ form_row(form.linkX) }} -
-
-
- - -
-

- - {{ 'onboarding.form.section4.title'|trans }} -

-
- - -
- {{ form_row(form.useDomain) }} -
- - - -
-
- - -
- -
- + {{ form_end(form) }}
- {{ form_end(form) }} + + {% endblock %} diff --git a/templates/pages/prestation.twig b/templates/pages/prestation.twig index 1f5b671..715b5fe 100644 --- a/templates/pages/prestation.twig +++ b/templates/pages/prestation.twig @@ -1,410 +1,318 @@ {% extends 'base.twig' %} {# --- METADATA & SCHEMA --- #} -{% block title %}{{'page.presentation.title'|trans}}{% endblock %} -{% block meta_description %}{{'page.presentation.description'|trans}}{% endblock %} +{% block title %}{{ 'page.presentation.title'|trans }}{% endblock %} +{% block meta_description %}{{ 'page.presentation.description'|trans }}{% endblock %} + +{% block canonical_url %} + +{% endblock %} -{% block canonical_url %}{% endblock %} {% block breadcrumb_schema %} {% endblock %} {# --- BODY --- #} {% block body %} -
- - {# Wrapper global pour centrer le contenu et gérer le padding mobile #} +
- {# Titre Style Moderne/Anime Épuré #} -

- EPage - {{ 'page.presentation.header'|trans }} - -

+ {# Titre Neubrutaliste #} +
+

+ EPage + // {{ 'page.presentation.header'|trans }} +

+
{# Conteneur des Fonctionnalités #} -
-

+
+

{{ 'page.presentation.subtitle'|trans }}

-

- {{ 'page.presentation.intro_paragraph_1'|trans }}EPage {{ 'page.presentation.intro_paragraph_1_2'|trans }} + +

+ {{ 'page.presentation.intro_paragraph_1'|trans }} + EPage + {{ 'page.presentation.intro_paragraph_1_2'|trans }}

- {# Clarification du Rôle de l'EPage #} -

- {{ 'page.presentation.intro_paragraph_2'|trans({ - 'page_span': 'EPage', - 'strong_tag': '', - 'strong_end_tag': '', - 'warning_tag': '' - })|raw }} -

+ {# Alerte Rôle EPage #} +
+

+ {{ 'page.presentation.intro_paragraph_2'|trans({ + 'page_span': 'EPage', + 'strong_tag': '', + 'strong_end_tag': '', + 'warning_tag': '' + })|raw }} +

+
- {# GRILLE DES FONCTIONNALITÉS (devient 1 colonne sur mobile, 2 sur md, 3 sur lg) #} -
+ {# GRILLE DES FONCTIONNALITÉS #} +
- {# Bloc 1: Visibilité Maximale (Loupe) #} -
-
- - - -

{{ 'page.presentation.feature.seo.title'|trans }}

+ {# Bloc 1: SEO #} +
+
+
+ +
+

{{ 'page.presentation.feature.seo.title'|trans }}

-

{{ 'page.presentation.feature.seo.description'|trans({ - 'page_span': 'EPage' +

{{ 'page.presentation.feature.seo.description'|trans({ + 'page_span': 'EPage' })|raw }}

- {# Bloc 2: Centralisation de Contenu (Chaîne) #} -
-
- - - -

{{ 'page.presentation.feature.nexus.title'|trans }}

+ {# Bloc 2: Centralisation #} +
+
+
+ +
+

{{ 'page.presentation.feature.nexus.title'|trans }}

-

{{ 'page.presentation.feature.nexus.description'|trans({ - 'strong_tag': '', - 'strong_end_tag': '' +

{{ 'page.presentation.feature.nexus.description'|trans({ + 'strong_tag': '', + 'strong_end_tag': '' })|raw }}

- {# Bloc 3: Annonces & Événements (Calendrier) #} -
-
- - - -

{{ 'page.presentation.feature.convention.title'|trans }}

+ {# Bloc 3: Événements #} +
+
+
+ +
+

{{ 'page.presentation.feature.convention.title'|trans }}

-

{{ 'page.presentation.feature.convention.description'|trans }}

+

{{ 'page.presentation.feature.convention.description'|trans }}

- {# Bloc 4: Intégration E-Cosplay (Cœur) #} -
-
- - - -

{{ 'page.presentation.feature.approval.title'|trans }}

+ {# Bloc 4: Intégration #} +
+
+
+ +
+

{{ 'page.presentation.feature.approval.title'|trans }}

-

{{ 'page.presentation.feature.approval.description'|trans({ - 'strong_tag': '', - 'strong_end_tag': '' +

{{ 'page.presentation.feature.approval.description'|trans({ + 'strong_tag': '', + 'strong_end_tag': '' })|raw }}

- {# Bloc 5: Modération et Sécurité (Bouclier) #} -
-
- - - -

{{ 'page.presentation.feature.security.title'|trans }}

+ {# Bloc 5: Sécurité #} +
+
+
+ +
+

{{ 'page.presentation.feature.security.title'|trans }}

+
+
+

{{ 'page.presentation.feature.security.description'|trans({'page_span': 'EPage', 'strong_tag': '', 'strong_end_tag': ''})|raw }}

+

{{ 'page.presentation.feature.security.encrypted_data'|trans({'strong_tag': '', 'strong_end_tag': ''}) }}

-

- {{ 'page.presentation.feature.security.description'|trans({ - 'page_span': 'EPage', - 'strong_tag': '', - 'strong_end_tag': '' - })|raw }} -

-

- {{ 'page.presentation.feature.security.encrypted_data'|trans({ - 'strong_tag': '', - 'strong_end_tag': '' - })|raw }} -

-

- {{ 'page.presentation.feature.security.data_minimum'|trans }} -

-

- {{ 'page.presentation.feature.security.no_fly_inscription'|trans({ - 'strong_tag': '', - 'strong_end_tag': '' - })|raw }} -

- {# Bloc 6: Formulaire de Contact Sécurisé (Mail Check) #} -
-
- - - -

{{ 'page.presentation.feature.contact.title'|trans }}

+ {# Bloc 6: Contact #} +
+
+
+ +
+

{{ 'page.presentation.feature.contact.title'|trans }}

-

- {{ 'page.presentation.feature.contact.description'|trans }} -
{{ 'page.presentation.feature.contact.disclaimer'|trans}}{{ 'page.presentation.feature.contact.policy_text'|trans }} -

+

{{ 'page.presentation.feature.contact.description'|trans }}

+ {{ 'page.presentation.feature.contact.policy_text'|trans }}
- {# Bloc 7: Personalisation (Palette) #} -
-
- - - -

{{ 'page.presentation.feature.customization.title'|trans }}

-
-

{{ 'page.presentation.feature.customization.description'|trans({ - 'page_span': 'EPage' - })|raw }}

-
- - {# Bloc 8: Suivi / Analytics (Activity) #} -
-
- - - -

{{ 'page.presentation.feature.analytics.title'|trans }}

-
-

{{ 'page.presentation.feature.analytics.description'|trans }}

-
- {# BLOC : OFFRE SANS ENGAGEMENT #} -
-

- +
+
+ PRO MISSION +
+

{{ 'page.presentation.flexibility.title'|trans }}

-

+

{{ 'page.presentation.flexibility.no_commitment'|trans({ - 'page_span': 'EPage', - 'strong_tag': '', - 'strong_end_tag': '' + 'page_span': 'EPage', + 'strong_tag': '', + 'strong_end_tag': '' })|raw }} -

-

- {{ 'page.presentation.flexibility.renewal_auto'|trans|raw }} - {{ 'page.presentation.flexibility.periods_cancel'|trans }} -

+
- {# Appel à l'action pour les étapes #} -
-

{{ 'page.presentation.call_to_action'|trans }}

+ {# Appel à l'action étapes #} +
+

+ {{ 'page.presentation.call_to_action'|trans }} +

- {# CONTENEUR DE GRILLE POUR LES 3 BLOCS D'INFORMATION #} -
- - {# BLOC 1: INFO TECHNIQUE NOM DE DOMAINE #} -
-

- + {# GRILLE INFOS TECHNIQUES #} +
+ {# Bloc 1: Domaine #} +
+

{{ 'page.presentation.domain_info.title'|trans }}

-

- {{ 'page.presentation.domain_info.no_domain_question'|trans }} -
{{ 'page.presentation.domain_info.default_url'|trans({ - 'url_part': 'votre_pseudo.e-cosplay.com' - })|raw }} -

-

- {{ 'page.presentation.domain_info.has_domain_question'|trans }} -
{{ 'page.presentation.domain_info.cname_guide'|trans({ - 'page_span': 'EPage' - })|raw }} -

-

- {{ 'page.presentation.domain_info.purchase_title'|trans }} -
{{ 'page.presentation.domain_info.partner_purchase'|trans({ - 'partner_strong': 'SARL SITECONSEIL' - })|raw }} -

+
+

{{ 'page.presentation.domain_info.no_domain_question'|trans }}

+ + votre_pseudo.e-cosplay.com + +

{{ 'page.presentation.domain_info.has_domain_question'|trans }}

+

{{ 'page.presentation.domain_info.cname_guide'|trans({'page_span': 'EPage'})|raw }}

+
- {# BLOC 2: INFO LÉGALE COPYRIGHT #} -
-

- + {# Bloc 2: Copyright #} +
+

{{ 'page.presentation.copyright_info.title'|trans }}

-

+

{{ 'page.presentation.copyright_info.responsibility'|trans({ - 'page_span': 'EPage', - 'strong_tag': '', - 'strong_end_tag': '', - 'red_strong': '' + 'page_span': 'EPage', + 'strong_tag': '', + 'strong_end_tag': '', + 'red_strong': '' })|raw }}

-

- {{ 'page.presentation.copyright_info.help_team'|trans }} -
{{ 'page.presentation.copyright_info.contact_us'|trans }} -

- {# BLOC 3: INFO FONCTIONNALITÉS SUPPLÉMENTAIRES #} -
-

- + {# Bloc 3: Add-ons #} +
+

{{ 'page.presentation.additional_features.title'|trans }}

-

+

{{ 'page.presentation.additional_features.request_support'|trans({ - 'page_span': 'EPage', - 'strong_tag': '', - 'strong_end_tag': '' + 'page_span': 'EPage', + 'strong_tag': '', + 'strong_end_tag': '' })|raw }}

-

- {{ 'page.presentation.additional_features.siteconseil_referral'|trans({ - 'partner_strong_cyan': 'SARL SITECONSEIL' - })|raw }} +

+ PARTNER_REFERRAL: SARL SITECONSEIL

-

- {# BLOC DE TARIFICATION EPage (CARTE UNIQUE AVEC SÉLECTEUR) - CENTRÉ ET RESPONSIVE #} -

- - +
{% endblock %}