v2
This commit is contained in:
@@ -24,17 +24,16 @@
|
|||||||
|
|
||||||
/* ===== Page Content ===== */
|
/* ===== Page Content ===== */
|
||||||
.agent-body {
|
.agent-body {
|
||||||
margin-top: 60px; /* ✅ header height */
|
margin-top: 60px; /* header height */
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
padding-bottom: 85px; /* ✅ bottom nav (55px) + safe gap (30px) */
|
padding-bottom: 100px; /* reserve space for nav */
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ===== Bottom Nav ===== */
|
/* ===== Bottom Navigation ===== */
|
||||||
.agent-bottom-nav {
|
.agent-bottom-nav {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
bottom: 0; /* ✅ Always stick above system bar */
|
|
||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
height: 55px;
|
height: 55px;
|
||||||
@@ -42,8 +41,12 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-around;
|
justify-content: space-around;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
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;
|
||||||
|
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 {
|
||||||
@@ -69,14 +72,17 @@
|
|||||||
<div class="agent-header">
|
<div class="agent-header">
|
||||||
<div>Agent Panel</div>
|
<div>Agent Panel</div>
|
||||||
<?php if(isset($_SESSION) && !empty($_SESSION['user_id'])){ ?>
|
<?php if(isset($_SESSION) && !empty($_SESSION['user_id'])){ ?>
|
||||||
<button onclick="window.location.href='/Agent/logout'" style="background:none;border:none;color:#fff;font-size:16px;cursor:pointer;">Logout</button>
|
<button onclick="window.location.href='/Agent/logout'"
|
||||||
|
style="background:none;border:none;color:#fff;font-size:16px;cursor:pointer;">
|
||||||
|
Logout
|
||||||
|
</button>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- ===== Content ===== -->
|
<!-- ===== Content ===== -->
|
||||||
<div class="agent-body">
|
<div class="agent-body">
|
||||||
<h2>Dashboard Content</h2>
|
<h2>Dashboard Content</h2>
|
||||||
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque habitant morbi.</p>
|
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
|
||||||
<p>Scroll down to test bottom nav spacing...</p>
|
<p>Scroll down to test bottom nav spacing...</p>
|
||||||
<p style="margin-bottom:1000px;">Dummy long content...</p>
|
<p style="margin-bottom:1000px;">Dummy long content...</p>
|
||||||
</div>
|
</div>
|
||||||
@@ -102,3 +108,26 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|
||||||
|
<!-- ===== JS Fix for Android Devices ===== -->
|
||||||
|
<script>
|
||||||
|
function fixBottomNav() {
|
||||||
|
const nav = document.querySelector(".agent-bottom-nav");
|
||||||
|
if (!nav) return;
|
||||||
|
|
||||||
|
// viewport height vs document height
|
||||||
|
let vh = window.innerHeight;
|
||||||
|
let docH = document.documentElement.clientHeight;
|
||||||
|
|
||||||
|
let extra = vh - docH;
|
||||||
|
|
||||||
|
if (extra > 0) {
|
||||||
|
nav.style.bottom = extra + "px"; // lift nav above system bar
|
||||||
|
} else {
|
||||||
|
nav.style.bottom = "0px";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
window.addEventListener("resize", fixBottomNav);
|
||||||
|
window.addEventListener("load", fixBottomNav);
|
||||||
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user