mirror of
https://github.com/joaovitoriasilva/endurain.git
synced 2026-01-12 09:17:58 -05:00
Attempt fix for PWA
This commit is contained in:
@@ -15,14 +15,6 @@
|
||||
<link rel="icon" href="/logo/favicon-16x16.png" type="image/png" sizes="16x16">
|
||||
<link rel="apple-touch-icon" href="/logo/apple-touch-icon.png">
|
||||
<link rel="manifest" href="/manifest.webmanifest">
|
||||
<style>
|
||||
body {
|
||||
/* Try constant() first as it's the older syntax */
|
||||
padding: constant(safe-area-inset-top) constant(safe-area-inset-right) constant(safe-area-inset-bottom) constant(safe-area-inset-left);
|
||||
/* Then fallback to env() for newer iOS versions */
|
||||
padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -22,12 +22,12 @@ import {
|
||||
</Notivue>
|
||||
<div class="d-flex flex-column min-vh-100">
|
||||
<!-- Top Navbar with safe-area padding -->
|
||||
<div class="bg-body-tertiary shadow-sm">
|
||||
<NavbarComponent class="container"/>
|
||||
<div class="bg-body-tertiary shadow-sm safe-area-top">
|
||||
<NavbarComponent class="container safe-area-container"/>
|
||||
</div>
|
||||
|
||||
<!-- Main content -->
|
||||
<main class="container py-4 flex-grow-1">
|
||||
<main class="container safe-area-container py-4 flex-grow-1">
|
||||
<RouterView />
|
||||
</main>
|
||||
|
||||
@@ -36,7 +36,30 @@ import {
|
||||
|
||||
<!-- Bottom Mobile Navbar with safe-area padding -->
|
||||
<NavbarBottomMobileComponent
|
||||
class="d-lg-none d-block sticky-bottom shadow-sm"
|
||||
class="d-lg-none d-block sticky-bottom shadow-sm safe-area-bottom"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<style>
|
||||
/* Top navbar safe area */
|
||||
.safe-area-top {
|
||||
padding-top: constant(safe-area-inset-top);
|
||||
padding-top: env(safe-area-inset-top);
|
||||
}
|
||||
|
||||
/* Bottom mobile navbar safe area */
|
||||
.safe-area-bottom {
|
||||
padding-bottom: constant(safe-area-inset-bottom);
|
||||
padding-bottom: env(safe-area-inset-bottom);
|
||||
background-clip: padding-box;
|
||||
}
|
||||
|
||||
/* Main container safe areas */
|
||||
.safe-area-container {
|
||||
padding-left: max(0.75rem, constant(safe-area-inset-left));
|
||||
padding-left: max(0.75rem, env(safe-area-inset-left));
|
||||
padding-right: max(0.75rem, constant(safe-area-inset-right));
|
||||
padding-right: max(0.75rem, env(safe-area-inset-right));
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user