|
|
<!DOCTYPE html> |
|
|
<html lang="en"> |
|
|
<head> |
|
|
<meta charset="UTF-8"> |
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
|
|
<title>Dolmuş Tracker Admin</title> |
|
|
<link rel="stylesheet" href="style.css"> |
|
|
<script src="https://cdn.tailwindcss.com"></script> |
|
|
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> |
|
|
<script src="https://unpkg.com/feather-icons"></script> |
|
|
<script> |
|
|
tailwind.config = { |
|
|
theme: { |
|
|
extend: { |
|
|
colors: { |
|
|
primary: { |
|
|
light: '#93C5FD', |
|
|
DEFAULT: '#3B82F6', |
|
|
dark: '#1D4ED8' |
|
|
}, |
|
|
secondary: { |
|
|
light: '#A7F3D0', |
|
|
DEFAULT: '#10B981', |
|
|
dark: '#047857' |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</head> |
|
|
<body class="bg-gray-50"> |
|
|
<custom-navbar></custom-navbar> |
|
|
<div class="flex"> |
|
|
<custom-sidebar></custom-sidebar> |
|
|
<main class="flex-1 p-8"> |
|
|
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-8"> |
|
|
<div class="bg-white rounded-lg shadow p-6"> |
|
|
<div class="flex items-center justify-between"> |
|
|
<h3 class="text-gray-500 font-medium">Active Vehicles</h3> |
|
|
<div class="p-3 rounded-full bg-primary-100 text-primary-600"> |
|
|
<i data-feather="truck"></i> |
|
|
</div> |
|
|
</div> |
|
|
<p class="text-3xl font-bold mt-4">42</p> |
|
|
<p class="text-green-500 text-sm mt-2">+5% from yesterday</p> |
|
|
</div> |
|
|
|
|
|
<div class="bg-white rounded-lg shadow p-6"> |
|
|
<div class="flex items-center justify-between"> |
|
|
<h3 class="text-gray-500 font-medium">Online Drivers</h3> |
|
|
<div class="p-3 rounded-full bg-secondary-100 text-secondary-600"> |
|
|
<i data-feather="users"></i> |
|
|
</div> |
|
|
</div> |
|
|
<p class="text-3xl font-bold mt-4">36</p> |
|
|
<p class="text-green-500 text-sm mt-2">+3% from yesterday</p> |
|
|
</div> |
|
|
|
|
|
<div class="bg-white rounded-lg shadow p-6"> |
|
|
<div class="flex items-center justify-between"> |
|
|
<h3 class="text-gray-500 font-medium">Today's Trips</h3> |
|
|
<div class="p-3 rounded-full bg-purple-100 text-purple-600"> |
|
|
<i data-feather="map"></i> |
|
|
</div> |
|
|
</div> |
|
|
<p class="text-3xl font-bold mt-4">128</p> |
|
|
<p class="text-red-500 text-sm mt-2">-2% from yesterday</p> |
|
|
</div> |
|
|
|
|
|
<div class="bg-white rounded-lg shadow p-6"> |
|
|
<div class="flex items-center justify-between"> |
|
|
<h3 class="text-gray-500 font-medium">Active Alerts</h3> |
|
|
<div class="p-3 rounded-full bg-yellow-100 text-yellow-600"> |
|
|
<i data-feather="alert-circle"></i> |
|
|
</div> |
|
|
</div> |
|
|
<p class="text-3xl font-bold mt-4">7</p> |
|
|
<p class="text-yellow-500 text-sm mt-2">3 new alerts</p> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6"> |
|
|
<div class="lg:col-span-2 bg-white rounded-lg shadow p-6"> |
|
|
<div class="flex items-center justify-between mb-6"> |
|
|
<h2 class="text-xl font-bold">Live Vehicle Map</h2> |
|
|
<button class="flex items-center text-primary-600"> |
|
|
<i data-feather="maximize-2" class="w-4 h-4 mr-1"></i> |
|
|
View Fullscreen |
|
|
</button> |
|
|
</div> |
|
|
<div class="h-96 bg-gray-200 rounded-lg flex items-center justify-center"> |
|
|
<p class="text-gray-500">Map visualization will appear here</p> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div class="bg-white rounded-lg shadow p-6"> |
|
|
<div class="flex items-center justify-between mb-6"> |
|
|
<h2 class="text-xl font-bold">Recent Alerts</h2> |
|
|
<button class="text-sm text-primary-600">View All</button> |
|
|
</div> |
|
|
<div class="space-y-4"> |
|
|
<div class="flex items-start"> |
|
|
<div class="p-2 rounded-full bg-red-100 text-red-600 mr-3"> |
|
|
<i data-feather="alert-triangle" class="w-4 h-4"></i> |
|
|
</div> |
|
|
<div> |
|
|
<p class="font-medium">Overspeed detected</p> |
|
|
<p class="text-sm text-gray-500">Vehicle #DOL-42 exceeded 80km/h</p> |
|
|
<p class="text-xs text-gray-400 mt-1">2 minutes ago</p> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div class="flex items-start"> |
|
|
<div class="p-2 rounded-full bg-yellow-100 text-yellow-600 mr-3"> |
|
|
<i data-feather="map-pin" class="w-4 h-4"></i> |
|
|
</div> |
|
|
<div> |
|
|
<p class="font-medium">Route deviation</p> |
|
|
<p class="text-sm text-gray-500">Vehicle #DOL-17 left the route</p> |
|
|
<p class="text-xs text-gray-400 mt-1">15 minutes ago</p> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
<div class="flex items-start"> |
|
|
<div class="p-2 rounded-full bg-blue-100 text-blue-600 mr-3"> |
|
|
<i data-feather="wifi-off" class="w-4 h-4"></i> |
|
|
</div> |
|
|
<div> |
|
|
<p class="font-medium">GPS disconnected</p> |
|
|
<p class="text-sm text-gray-500">Vehicle #DOL-08 lost signal</p> |
|
|
<p class="text-xs text-gray-400 mt-1">32 minutes ago</p> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</main> |
|
|
</div> |
|
|
<script src="components/navbar.js"></script> |
|
|
<script src="components/sidebar.js"></script> |
|
|
<script src="script.js"></script> |
|
|
<script> |
|
|
document.addEventListener('DOMContentLoaded', function() { |
|
|
feather.replace(); |
|
|
|
|
|
|
|
|
const sidebarToggle = this.shadowRoot?.getElementById('sidebar-toggle') || |
|
|
document.getElementById('sidebar-toggle'); |
|
|
const sidebar = document.querySelector('custom-sidebar')?.shadowRoot?.querySelector('.sidebar'); |
|
|
|
|
|
if (sidebarToggle && sidebar) { |
|
|
sidebarToggle.addEventListener('click', function() { |
|
|
sidebar.classList.toggle('open'); |
|
|
}); |
|
|
} |
|
|
}); |
|
|
</script> |
|
|
</body> |
|
|
</html> |