From 53878e467a9d562e47bb5bc2bf2e0c62a5ef4b70 Mon Sep 17 00:00:00 2001 From: Serreau Jovann Date: Fri, 30 Jan 2026 12:34:51 +0100 Subject: [PATCH] =?UTF-8?q?```=20=E2=9C=A8=20feat(workflow.twig):=20Ajoute?= =?UTF-8?q?=20animations=20AOS=20pour=20un=20effet=20visuel=20am=C3=A9lior?= =?UTF-8?q?=C3=A9.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✨ feat(app.js): Initialise la librairie AOS pour les animations. ➕ chore(package.json): Ajoute AOS comme dépendance. ✨ feat(reserve.js): Initialise AOS pour les animations. ✨ feat(formules.twig): Ajoute animations AOS pour améliorer l'UX. ✨ feat(catalogue.twig): Ajoute animations AOS pour une meilleure UX. ✨ feat(dashboard/base.twig): Améliore la mise en page du dashboard. ✨ feat(base.twig): Ajoute macros pour les liens de navigation. ✨ feat(home.twig): Ajoute animations AOS et macros pour la page d'accueil. ``` --- assets/app.js | 10 + assets/reserve.js | 8 + package.json | 1 + templates/dashboard/base.twig | 4 +- templates/revervation/base.twig | 48 +++-- templates/revervation/catalogue.twig | 12 +- templates/revervation/formules.twig | 14 +- templates/revervation/home.twig | 270 ++++++++++++++------------- templates/revervation/workflow.twig | 26 +-- 9 files changed, 223 insertions(+), 170 deletions(-) diff --git a/assets/app.js b/assets/app.js index 4f4b480..3b77b21 100644 --- a/assets/app.js +++ b/assets/app.js @@ -1,6 +1,8 @@ import './app.scss'; import * as Turbo from "@hotwired/turbo"; import * as Sentry from "@sentry/browser"; +import AOS from 'aos'; +import 'aos/dist/aos.css'; // --- INITIALISATION SENTRY --- // On initialise Sentry immédiatement sans attendre le DOM pour capturer les erreurs précoces @@ -29,6 +31,14 @@ const initApp = () => { }, 5000); }); + // Initialize AOS + AOS.init({ + duration: 800, + once: true, + // offset: 120, // Optional: offset (in px) from the original trigger point + // easing: 'ease', // Optional: default easing for AOS animations + }); + // Exemple : Init d'un bouton de retour en haut de page // initBackToTop(); }; diff --git a/assets/reserve.js b/assets/reserve.js index 923aa4e..82303c8 100644 --- a/assets/reserve.js +++ b/assets/reserve.js @@ -3,6 +3,8 @@ import { UtmEvent, UtmAccount } from "./tools/UtmEvent.js"; import { CookieBanner } from "./tools/CookieBanner.js"; import * as Turbo from "@hotwired/turbo"; import { onLCP, onINP, onCLS } from 'web-vitals'; +import AOS from 'aos'; +import 'aos/dist/aos.css'; // --- CONFIGURATION & ÉTAT --- const CONFIG = { @@ -271,6 +273,12 @@ document.addEventListener('turbo:load', () => { initMobileMenu(); initRegisterLogic(); initCatalogueSearch(); + + // Initialize AOS + AOS.init({ + duration: 800, + once: true, + }); const payContainer = document.getElementById('payment-check-container'); if (payContainer?.dataset.autoRedirect) { diff --git a/package.json b/package.json index 19417cb..0cbe860 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,7 @@ "@preact/preset-vite": "^2.10.2", "@sentry/browser": "^10.34.0", "@tailwindcss/vite": "^4.1.18", + "aos": "^2.3.4", "autoprefixer": "^10.4.23", "body-scroll-lock": "^4.0.0-beta.0", "react-email-editor": "^1.7.11", diff --git a/templates/dashboard/base.twig b/templates/dashboard/base.twig index 5f9bbba..cfc2523 100644 --- a/templates/dashboard/base.twig +++ b/templates/dashboard/base.twig @@ -108,7 +108,7 @@ {# CONTENT #} -
+

Ludikevent Intranet

@@ -170,7 +170,7 @@ {% endfor %}
-
+
{% block body %}{% endblock %} {# FOOTER #} diff --git a/templates/revervation/base.twig b/templates/revervation/base.twig index 1edeb38..0133969 100644 --- a/templates/revervation/base.twig +++ b/templates/revervation/base.twig @@ -47,6 +47,25 @@ {% endif %} +{# --- MACROS --- #} +{% macro nav_link(route_name, label_key, is_external = false) %} + + {{ label_key|trans }} + +{% endmacro %} + +{% macro mobile_nav_link(route_name, label_key, is_external = false) %} + + {{ label_key|trans }} + +{% endmacro %} + +{% import _self as macros %} + {# --- NAVIGATION --- #}