Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions src/components/menus/MobileMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import CloseButton from '@/components/ui/CloseButton.svelte';
import * as m from '@/lib/paraglide/messages';
import { Drawer } from 'vaul-svelte';
import { onMount, onDestroy } from 'svelte';
</script>

<Drawer.Root
Expand All @@ -14,15 +15,18 @@
>
<Drawer.Portal>
<Drawer.Content
class="after:h-0! duration-150! touch-auto! fixed z-10 w-full h-full overflow-y-scroll bottom-0 pointer-events-auto overscroll-contain"
style="{getOpenedMenu() === 'scout' ? 'height: fit-content !important;' : '' }; -webkit-overflow-scrolling: touch; touch-action: pan-y;"
class="absolute left-0 bottom-0 z-10 pointer-events-none h-full w-full"
style="{getOpenedMenu() === 'scout' ? 'height: fit-content !important;' : ''}"
>
<div
class="pb-20 px-2 pt-2 mt-40 min-h-full rounded-t-xl border border-t-border bg-card/60 backdrop-blur-sm"
out:slide={{ duration: 70, axis: 'y' }}
class="h-full overflow-y-auto"
style="-webkit-overflow-scrolling: touch;"
>
<div class="sticky top-2 z-20">
<div class="w-full py-1 flex items-center justify-between bg-card/60 backdrop-blur-sm rounded-lg border border-border">
<div
class="pb-20 px-2 pt-2 mt-40 min-h-full rounded-t-xl border border-t-border bg-card/60 backdrop-blur-sm pointer-events-auto"
out:slide={{ duration: 70, axis: 'y' }}
>
<div class="w-full py-1 sticky top-2 flex items-center justify-between z-10 bg-card/60 backdrop-blur-sm rounded-lg border border-border">
<Drawer.Title
level="h1"
class="font-bold text-base tracking-tight mx-4"
Expand All @@ -34,9 +38,9 @@
class="mr-1 hover:bg-accent/90! active:bg-accent/90!"
/>
</div>
</div>

<MenuContainer />
<MenuContainer />
</div>
</div>
</Drawer.Content>
</Drawer.Portal>
Expand Down