From b0d7bfefd77127f5698fb135bffc7e46c2a31d6f Mon Sep 17 00:00:00 2001 From: Brock H Caldwell Date: Wed, 23 Jul 2025 09:40:05 -0500 Subject: [PATCH] fix: animates mobile menu transition --- assets/controllers/navbar_controller.js | 2 ++ tailwind.config.js | 3 +++ templates/components/NavBar.html.twig | 2 +- 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/assets/controllers/navbar_controller.js b/assets/controllers/navbar_controller.js index 91713c7..011118d 100644 --- a/assets/controllers/navbar_controller.js +++ b/assets/controllers/navbar_controller.js @@ -24,6 +24,8 @@ export default class extends Controller { toggle() { this.element.parentElement.classList.toggle('hidden'); + this.element.classList.toggle('animate__slideInLeft'); + this.element.classList.toggle('z-30'); this.element.classList.toggle('fixed'); this.element.classList.toggle('z-20'); } diff --git a/tailwind.config.js b/tailwind.config.js index f6d15ff..599a018 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -34,6 +34,9 @@ module.exports = { "rounded-sm", "rounded-md", "r-tablecell", + "animate__animated", + "animate__slideInLeft", + "animate__animateFaster" ], theme: { extend: { diff --git a/templates/components/NavBar.html.twig b/templates/components/NavBar.html.twig index 6de8e87..a0a3e9a 100644 --- a/templates/components/NavBar.html.twig +++ b/templates/components/NavBar.html.twig @@ -1,4 +1,4 @@ -