This commit is contained in:
ns77@siliconpin.com
2025-09-03 14:42:36 +00:00
parent ede9937da7
commit 9c700687c2

View File

@@ -44,9 +44,7 @@
border-top: 1px solid rgba(255,255,255,0.2); border-top: 1px solid rgba(255,255,255,0.2);
z-index: 999; z-index: 999;
bottom: 0; bottom: 0; /* JS দ্বারা adjust হবে */
padding-bottom: constant(safe-area-inset-bottom); /* old iOS */
padding-bottom: env(safe-area-inset-bottom, 20px); /* fallback 20px gap */
} }
.agent-bottom-link { .agent-bottom-link {
@@ -89,7 +87,7 @@
<!-- ===== Bottom Navigation ===== --> <!-- ===== Bottom Navigation ===== -->
<?php if (isset($_SESSION) && !empty($_SESSION['user_id'])) { ?> <?php if (isset($_SESSION) && !empty($_SESSION['user_id'])) { ?>
<div class="agent-bottom-nav"> <div class="agent-bottom-nav" id="bottomNav">
<a href="/Agent/Dashboard" class="agent-bottom-link active"> <a href="/Agent/Dashboard" class="agent-bottom-link active">
<i class="fa-solid fa-house"></i> <i class="fa-solid fa-house"></i>
Home Home
@@ -112,17 +110,20 @@
<!-- ===== JS Fix for Android Devices ===== --> <!-- ===== JS Fix for Android Devices ===== -->
<script> <script>
function fixBottomNav() { function fixBottomNav() {
const nav = document.querySelector(".agent-bottom-nav"); const nav = document.getElementById("bottomNav");
if (!nav) return; if (!nav) return;
// viewport height vs document height // পুরো window height (system bar সহ)
let vh = window.innerHeight; let vh = window.innerHeight;
let docH = document.documentElement.clientHeight;
let extra = vh - docH; // visual viewport height (system bar বাদে)
let realVH = window.visualViewport ? window.visualViewport.height : vh;
if (extra > 0) { // ফারাক
nav.style.bottom = extra + "px"; // lift nav above system bar let diff = vh - realVH;
if (diff > 0) {
nav.style.bottom = diff + "px"; // system nav bar এর উপরে উঠবে
} else { } else {
nav.style.bottom = "0px"; nav.style.bottom = "0px";
} }