- Express + EJS server-rendered app - Supabase PostgreSQL database - Auth: username/password with bcrypt - Dashboard with business stats - Load CRUD with filters - WhatsApp message parser - Payment tracking - Shipper & vehicle management - Reports (monthly, top shippers, routes) - Government-app aesthetic (tricolor theme) - Dark mode support - Docker + Coolify deployment ready - Seed data from existing business ledger (88 loads, 41 shippers, 70 vehicles)
68 lines
3.4 KiB
Text
68 lines
3.4 KiB
Text
<!DOCTYPE html>
|
|
<html lang="en" data-theme="light">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title><%= typeof title !== 'undefined' ? title + ' — ' : '' %><%= appName %> · <%= appNameHi %></title>
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Noto+Sans+Devanagari:wght@400;600;700&family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
|
|
<link rel="stylesheet" href="/css/style.css">
|
|
<% if (typeof extraCss !== 'undefined') { <% for (const css of extraCss) { %> <link rel="stylesheet" href="<%= css %>"> <% } %> <% } %>
|
|
</head>
|
|
<body>
|
|
<% if (typeof user !== 'undefined' && user) { %>
|
|
<nav class="topbar">
|
|
<div class="topbar-brand">
|
|
<div class="emblem">🇮🇳</div>
|
|
<div class="brand-text">
|
|
<span class="brand-hi"><%= appNameHi %></span>
|
|
<span class="brand-en"><%= appName %></span>
|
|
<span class="brand-tagline">भारत सरकार प्रायोजित · Govt. of India Initiative</span>
|
|
</div>
|
|
</div>
|
|
<div class="topbar-actions">
|
|
<button onclick="toggleTheme()" class="btn-icon" title="Toggle theme">☀</button>
|
|
<span class="user-name">👤 <%= user.username %></span>
|
|
<a href="/logout" class="btn btn-sm btn-outline">Logout</a>
|
|
</div>
|
|
</nav>
|
|
|
|
<div class="layout">
|
|
<aside class="sidebar">
|
|
<div class="sidebar-section">
|
|
<span class="sidebar-title">Main</span>
|
|
<a href="/" class="sidebar-link <%= typeof activeMenu !== 'undefined' && activeMenu === 'dashboard' ? 'active' : '' %>">📊 Dashboard</a>
|
|
<a href="/loads" class="sidebar-link <%= typeof activeMenu !== 'undefined' && activeMenu === 'loads' ? 'active' : "" %>">🚚 Loads</a>
|
|
<a href="/payments" class="sidebar-link <%= typeof activeMenu !== 'undefined' && activeMenu === 'payments' ? 'active' : "" %>">💰 Payments</a>
|
|
</div>
|
|
<div class="sidebar-section">
|
|
<span class="sidebar-title">Contacts</span>
|
|
<a href="/shippers" class="sidebar-link <%= typeof activeMenu !== 'undefined' && activeMenu === 'shippers' ? 'active' : "" %>">🏢 Shippers</a>
|
|
<a href="/vehicles" class="sidebar-link <%= typeof activeMenu !== 'undefined' && activeMenu === 'vehicles' ? 'active' : "" %>">🚚 Vehicles</a>
|
|
</div>
|
|
<div class="sidebar-section">
|
|
<span class="sidebar-title">Reports</span>
|
|
<a href="/reports" class="sidebar-link <%= typeof activeMenu !== 'undefined' && activeMenu === 'reports' ? 'active' : "" %>">📈 Reports</a>
|
|
</div>
|
|
</aside>
|
|
|
|
<main class="content">
|
|
<%- content %>
|
|
</main>
|
|
</div>
|
|
|
|
<footer class="govt-footer">
|
|
<div class="footer-tricolor"><span></span><span></span><span></span></div>
|
|
<p>This is an official platform under the <strong>Ministry of Road Transport & Highways</strong>, Government of India initiative.</p>
|
|
<p class="footer-muted">© <%= year %> <%= appName %> (<%= appNameHi %>). All rights reserved.</p>
|
|
</footer>
|
|
|
|
<% } else { %>
|
|
<%- content %>
|
|
<% } %>
|
|
|
|
<script src="/js/app.js"></script>
|
|
<% if (typeof extraJs !== 'undefined') { <% for (const js of extraJs) { %><script src="<%= js %>"></script><% } %> <% } %>
|
|
</body>
|
|
</html>
|