feat: full mobile-first responsive overhaul (v13)
Build Curio HMS / build-and-deploy (push) Successful in 46s Details

This commit is contained in:
Deep Koluguri 2026-05-15 00:54:45 -04:00
parent 73f0a897e6
commit c48ddd40f0
3 changed files with 157 additions and 894 deletions

File diff suppressed because it is too large Load Diff

View File

@ -2,10 +2,10 @@
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Dashboard | Curio</title>
<link rel="stylesheet" href="index.css">
<link rel="stylesheet" href="dashboard.css">
<link rel="stylesheet" href="dashboard.css?v=13">
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@600;700&display=swap" rel="stylesheet">
<script src="tenantLoader.js"></script>
</head>
@ -397,6 +397,6 @@
</div>
</div>
<script src="dashboard.js?v=12"></script>
<script src="dashboard.js?v=13"></script>
</body>
</html>

View File

@ -70,6 +70,12 @@ document.addEventListener("DOMContentLoaded", () => {
// 3. Section Switching Logic
window.showSection = (sectionId) => {
// Close sidebar on mobile
const sb = document.getElementById('sidebar');
if (window.innerWidth < 1024 && sb.classList.contains('active')) {
window.toggleSidebar();
}
const sections = ['overview-section', 'patients-section', 'pharmacy-section', 'lab-section', 'doctor-zen-section'];
sections.forEach(id => {
const el = document.getElementById(id);
@ -201,7 +207,24 @@ window.shareSummary = () => alert("📤 Summary sent to Patient's WhatsApp.");
window.printSummary = () => alert("🖨️ Printing Handover Note...");
window.toggleSidebar = () => {
const sb = document.getElementById('sidebar');
sb.style.display = (sb.style.display === 'flex') ? 'none' : 'flex';
if (!sb) return;
sb.classList.toggle('active');
// Add backdrop
if (sb.classList.contains('active')) {
let backdrop = document.getElementById('sidebar-backdrop');
if (!backdrop) {
backdrop = document.createElement('div');
backdrop.id = 'sidebar-backdrop';
backdrop.style = 'position:fixed;top:0;left:0;width:100vw;height:100vh;background:rgba(0,0,0,0.5);z-index:900;';
backdrop.onclick = () => window.toggleSidebar();
document.body.appendChild(backdrop);
}
} else {
const backdrop = document.getElementById('sidebar-backdrop');
if (backdrop) backdrop.remove();
}
};
// Global Listeners