freightdesk/webapp/src/views/layouts/main.ejs
FreightDesk 1a4eaaa040 Initial commit: FreightDesk v1.0
- 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)
2026-06-07 18:57:24 +00:00

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">&#9728;</button>
<span class="user-name">&#128100; <%= 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' : '' %>">&#128202; Dashboard</a>
<a href="/loads" class="sidebar-link <%= typeof activeMenu !== 'undefined' && activeMenu === 'loads' ? 'active' : "" %>">&#128666; Loads</a>
<a href="/payments" class="sidebar-link <%= typeof activeMenu !== 'undefined' && activeMenu === 'payments' ? 'active' : "" %>">&#128176; 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' : "" %>">&#127970; Shippers</a>
<a href="/vehicles" class="sidebar-link <%= typeof activeMenu !== 'undefined' && activeMenu === 'vehicles' ? 'active' : "" %>">&#128666; 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' : "" %>">&#128200; 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 &amp; Highways</strong>, Government of India initiative.</p>
<p class="footer-muted">&copy; <%= 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>