From 93f437b0869e7cc12d5c883db66f06049cc487b3 Mon Sep 17 00:00:00 2001 From: zuma Date: Sat, 12 Apr 2025 19:28:25 +0200 Subject: [PATCH] Feat: Add mobile menu --- frontend/src/lib/components/Accordion.svelte | 18 +++ frontend/src/lib/components/Navbar.svelte | 138 ++++++++++++++---- .../lib/components/icons/ChevronRight.svelte | 3 + frontend/src/routes/+layout.svelte | 2 +- frontend/src/routes/bset/[slug]/+page.ts | 3 +- 5 files changed, 132 insertions(+), 32 deletions(-) create mode 100644 frontend/src/lib/components/Accordion.svelte create mode 100644 frontend/src/lib/components/icons/ChevronRight.svelte diff --git a/frontend/src/lib/components/Accordion.svelte b/frontend/src/lib/components/Accordion.svelte new file mode 100644 index 0000000..a001bf0 --- /dev/null +++ b/frontend/src/lib/components/Accordion.svelte @@ -0,0 +1,18 @@ + + + +
+ +
+ {title} + +
+
+
+ {@render children()} +
+
diff --git a/frontend/src/lib/components/Navbar.svelte b/frontend/src/lib/components/Navbar.svelte index 1001bae..fe91d41 100644 --- a/frontend/src/lib/components/Navbar.svelte +++ b/frontend/src/lib/components/Navbar.svelte @@ -1,5 +1,5 @@ -
+
- @@ -133,33 +135,111 @@ - + {:else} - Connexion - Inscription + + {/if} - +
  • + + + +
  • +
  • Règles
  • +
  • F.A.Q
  • +
  • + {#if isLoggedIn} +
  • {username}
  • + {:else} +
  • Connexion
  • +
  • Inscription
  • + {/if} + +
    +
    diff --git a/frontend/src/lib/components/icons/ChevronRight.svelte b/frontend/src/lib/components/icons/ChevronRight.svelte new file mode 100644 index 0000000..35d807d --- /dev/null +++ b/frontend/src/lib/components/icons/ChevronRight.svelte @@ -0,0 +1,3 @@ + + + diff --git a/frontend/src/routes/+layout.svelte b/frontend/src/routes/+layout.svelte index 8be6a08..1b26158 100644 --- a/frontend/src/routes/+layout.svelte +++ b/frontend/src/routes/+layout.svelte @@ -8,7 +8,7 @@
    -
    +
    {@render children()}