1
0
mirror of https://github.com/amir20/dozzle.git synced 2025-12-21 21:33:18 +01:00

fix: fixes mobile menu having the wrong margin in pwa (#3826)

This commit is contained in:
Amir Raminfar
2025-04-21 12:13:28 -07:00
committed by GitHub
parent 757c1385f7
commit 3645100402
5 changed files with 28 additions and 22 deletions

View File

@@ -2,7 +2,7 @@
<section :class="{ 'h-screen min-h-0': scrollable }" class="flex flex-col"> <section :class="{ 'h-screen min-h-0': scrollable }" class="flex flex-col">
<header <header
v-if="$slots.header" v-if="$slots.header"
class="border-base-content/10 bg-base-200 sticky top-[55px] z-2 border-b py-2 shadow-[1px_1px_2px_0_rgb(0,0,0,0.05)] md:top-0" class="border-base-content/10 bg-base-200 sticky top-[calc(55px+env(safe-area-inset-top))] z-2 border-b py-2 shadow-[1px_1px_2px_0_rgb(0,0,0,0.05)] md:top-0"
> >
<slot name="header"></slot> <slot name="header"></slot>
</header> </header>

View File

@@ -1,5 +1,6 @@
<template> <template>
<nav class="border-base-content/20 bg-base-200 fixed top-0 z-10 w-full border-b p-2" data-testid="navigation"> <nav class="border-base-content/20 bg-base-200 fixed top-0 z-10 w-full border-b" data-testid="navigation">
<div class="p-2">
<div class="flex items-center"> <div class="flex items-center">
<router-link :to="{ name: '/' }"> <router-link :to="{ name: '/' }">
<Logo class="logo [&_.secondary-fill]:fill-secondary h-8" /> <Logo class="logo [&_.secondary-fill]:fill-secondary h-8" />
@@ -22,6 +23,7 @@
<SideMenu class="flex-1" /> <SideMenu class="flex-1" />
</div> </div>
</transition> </transition>
</div>
</nav> </nav>
</template> </template>
@@ -55,4 +57,8 @@ watch(route, () => {
.fade-leave-to > div { .fade-leave-to > div {
@apply -translate-y-10; @apply -translate-y-10;
} }
nav {
padding-top: env(safe-area-inset-top);
}
</style> </style>

View File

@@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<mobile-menu v-if="isMobile && !forceMenuHidden" @search="showFuzzySearch"></mobile-menu> <MobileMenu v-if="isMobile && !forceMenuHidden" @search="showFuzzySearch"></MobileMenu>
<Splitpanes @resized="onResized($event)"> <Splitpanes @resized="onResized($event)">
<Pane min-size="10" :size="menuWidth" v-if="!isMobile && !collapseNav && !forceMenuHidden"> <Pane min-size="10" :size="menuWidth" v-if="!isMobile && !collapseNav && !forceMenuHidden">
<SidePanel @search="showFuzzySearch" /> <SidePanel @search="showFuzzySearch" />

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB