ns77@siliconpin.com 2025-09-03 14:42:36 +00:00
parent ede9937da7
commit 9c700687c2
1 changed files with 11 additions and 10 deletions

View File

@ -44,9 +44,7 @@
border-top: 1px solid rgba(255,255,255,0.2);
z-index: 999;
bottom: 0;
padding-bottom: constant(safe-area-inset-bottom); /* old iOS */
padding-bottom: env(safe-area-inset-bottom, 20px); /* fallback 20px gap */
bottom: 0; /* JS দ্বারা adjust হবে */
}
.agent-bottom-link {
@ -89,7 +87,7 @@
<!-- ===== Bottom Navigation ===== -->
<?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">
<i class="fa-solid fa-house"></i>
Home
@ -112,17 +110,20 @@
<!-- ===== JS Fix for Android Devices ===== -->
<script>
function fixBottomNav() {
const nav = document.querySelector(".agent-bottom-nav");
const nav = document.getElementById("bottomNav");
if (!nav) return;
// viewport height vs document height
// পুরো window height (system bar সহ)
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 {
nav.style.bottom = "0px";
}