ayexpress / admin.html
Aniskhan29's picture
add admin panel - Initial Deployment
f6ebc93 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Admin Panel - AYexpress</title>
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://unpkg.com/feather-icons"></script>
<link href="https://unpkg.com/aos@2.3.1/dist/aos.css" rel="stylesheet">
<script src="https://unpkg.com/aos@2.3.1/dist/aos.js"></script>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
.sidebar {
min-height: 100vh;
width: 280px;
}
.main-content {
margin-left: 280px;
min-height: 100vh;
}
.card-hover {
transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-hover:hover {
transform: translateY(-2px);
box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}
.nav-item.active {
background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 100%);
color: white;
}
</style>
</head>
<body class="bg-gray-100">
<!-- Sidebar -->
<div class="sidebar bg-white fixed left-0 top-0 shadow-lg">
<div class="p-6 border-b border-gray-200">
<div class="flex items-center">
<div class="w-10 h-10 bg-indigo-600 rounded-lg flex items-center justify-center">
<i data-feather="shopping-bag" class="text-white w-6 h-6"></i>
</div>
<div class="ml-3">
<h1 class="text-xl font-bold text-gray-900">AYexpress</h1>
<p class="text-sm text-gray-500">Admin Panel</p>
</div>
</div>
</div>
<nav class="p-4">
<div class="mb-8">
<h3 class="text-xs font-semibold text-gray-500 uppercase tracking-wider mb-3">Main</h3>
<a href="#" class="nav-item active flex items-center px-4 py-3 rounded-lg text-gray-700 hover:bg-indigo-50 hover:text-indigo-600 mb-2">
<i data-feather="home" class="w-5 h-5 mr-3"></i>
Dashboard
</a>
<a href="#" class="nav-item flex items-center px-4 py-3 rounded-lg text-gray-700 hover:bg-indigo-50 hover:text-indigo-600 mb-2">
<i data-feather="shopping-cart" class="w-5 h-5 mr-3"></i>
Orders
</a>
<a href="#" class="nav-item flex items-center px-4 py-3 rounded-lg text-gray-700 hover:bg-indigo-50 hover:text-indigo-600 mb-2">
<i data-feather="package" class="w-5 h-5 mr-3"></i>
Products
</a>
<a href="#" class="nav-item flex items-center px-4 py-3 rounded-lg text-gray-700 hover:bg-indigo-50 hover:text-indigo-600 mb-2">
<i data-feather="users" class="w-5 h-5 mr-3"></i>
Customers
</a>
</div>
<div class="mb-8">
<h3 class="text-xs font-semibold text-gray-500 uppercase tracking-wider mb-3">Content</h3>
<a href="#" class="nav-item flex items-center px-4 py-3 rounded-lg text-gray-700 hover:bg-indigo-50 hover:text-indigo-600 mb-2">
<i data-feather="grid" class="w-5 h-5 mr-3"></i>
Categories
</a>
<a href="#" class="nav-item flex items-center px-4 py-3 rounded-lg text-gray-700 hover:bg-indigo-50 hover:text-indigo-600 mb-2">
<i data-feather="star" class="w-5 h-5 mr-3"></i>
Reviews
</a>
<a href="#" class="nav-item flex items-center px-4 py-3 rounded-lg text-gray-700 hover:bg-indigo-50 hover:text-indigo-600 mb-2">
<i data-feather="truck" class="w-5 h-5 mr-3"></i>
Shipping
</a>
</div>
<div>
<h3 class="text-xs font-semibold text-gray-500 uppercase tracking-wider mb-3">Settings</h3>
<a href="#" class="nav-item flex items-center px-4 py-3 rounded-lg text-gray-700 hover:bg-indigo-50 hover:text-indigo-600 mb-2">
<i data-feather="settings" class="w-5 h-5 mr-3"></i>
General
</a>
<a href="#" class="nav-item flex items-center px-4 py-3 rounded-lg text-gray-700 hover:bg-indigo-50 hover:text-indigo-600 mb-2">
<i data-feather="user" class="w-5 h-5 mr-3"></i>
Profile
</a>
<a href="#" class="nav-item flex items-center px-4 py-3 rounded-lg text-gray-700 hover:bg-indigo-50 hover:text-indigo-600 mb-2">
<i data-feather="log-out" class="w-5 h-5 mr-3"></i>
Logout
</a>
</div>
</nav>
</div>
<!-- Main Content -->
<div class="main-content">
<!-- Header -->
<header class="bg-white shadow-sm px-8 py-4 flex justify-between items-center">
<div>
<h1 class="text-2xl font-bold text-gray-900">Dashboard</h1>
<p class="text-gray-600">Welcome back, Admin!</p>
</div>
<div class="flex items-center space-x-4">
<div class="relative">
<input type="text" placeholder="Search..." class="pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-indigo-500 focus:border-transparent">
<i data-feather="search" class="absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400 w-4 h-4"></i>
</div>
<button class="p-2 rounded-full bg-gray-100 hover:bg-gray-200">
<i data-feather="bell" class="w-5 h-5 text-gray-600"></i>
</button>
<div class="flex items-center">
<img src="http://static.photos/people/200x200/10" alt="Admin" class="w-10 h-10 rounded-full object-cover">
<div class="ml-3">
<p class="text-sm font-medium text-gray-900">Admin User</p>
<p class="text-xs text-gray-500">Super Admin</p>
</div>
</div>
</div>
</header>
<!-- Stats Cards -->
<div class="p-8 grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6">
<div class="bg-white rounded-xl p-6 shadow-sm card-hover" data-aos="fade-up">
<div class="flex items-center justify-between">
<div>
<p class="text-sm text-gray-500">Total Revenue</p>
<h2 class="text-2xl font-bold text-gray-900">$45,231.89</h2>
<p class="text-sm text-green-600">+12.5% from last month</p>
</div>
<div class="bg-green-100 p-3 rounded-lg">
<i data-feather="dollar-sign" class="text-green-600 w-6 h-6"></i>
</div>
</div>
</div>
<div class="bg-white rounded-xl p-6 shadow-sm card-hover" data-aos="fade-up" data-aos-delay="100">
<div class="flex items-center justify-between">
<div>
<p class="text-sm text-gray-500">Total Orders</p>
<h2 class="text-2xl font-bold text-gray-900">1,234</h2>
<p class="text-sm text-green-600">+8.2% from last month</p>
</div>
<div class="bg-blue-100 p-3 rounded-lg">
<i data-feather="shopping-cart" class="text-blue-600 w-6 h-6"></i>
</div>
</div>
</div>
<div class="bg-white rounded-xl p-6 shadow-sm card-hover" data-aos="fade-up" data-aos-delay="200">
<div class="flex items-center justify-between">
<div>
<p class="text-sm text-gray-500">Products</p>
<h2 class="text-2xl font-bold text-gray-900">567</h2>
<p class="text-sm text-green-600">+15 new this month</p>
</div>
<div class="bg-purple-100 p-3 rounded-lg">
<i data-feather="package" class="text-purple-600 w-6 h-6"></i>
</div>
</div>
</div>
<div class="bg-white rounded-xl p-6 shadow-sm card-hover" data-aos="fade-up" data-aos-delay="300">
<div class="flex items-center justify-between">
<div>
<p class="text-sm text-gray-500">Customers</p>
<h2 class="text-2xl font-bold text-gray-900">8,912</h2>
<p class="text-sm text-green-600">+234 new this month</p>
</div>
<div class="bg-pink-100 p-3 rounded-lg">
<i data-feather="users" class="text-pink-600 w-6 h-6"></i>
</div>
</div>
</div>
</div>
<!-- Charts & Graphs -->
<div class="px-8 pb-8 grid grid-cols-1 lg:grid-cols-2 gap-6">
<div class="bg-white rounded-xl p-6 shadow-sm" data-aos="fade-up">
<div class="flex justify-between items-center mb-6">
<h3 class="text-lg font-semibold text-gray-900">Revenue Overview</h3>
<select class="border border-gray-300 rounded-lg px-3 py-1 text-sm">
<option>Last 7 days</option>
<option>Last 30 days</option>
<option>Last 90 days</option>
</select>
</div>
<canvas id="revenueChart" height="300"></canvas>
</div>
<div class="bg-white rounded-xl p-6 shadow-sm" data-aos="fade-up" data-aos-delay="100">
<div class="flex justify-between items-center mb-6">
<h3 class="text-lg font-semibold text-gray-900">Top Categories</h3>
<select class="border border-gray-300 rounded-lg px-3 py-1 text-sm">
<option>This Month</option>
<option>Last Month</option>
<option>All Time</option>
</select>
</div>
<canvas id="categoryChart" height="300"></canvas>
</div>
</div>
<!-- Recent Orders -->
<div class="px-8 pb-8">
<div class="bg-white rounded-xl shadow-sm" data-aos="fade-up">
<div class="p-6 border-b border-gray-200">
<h3 class="text-lg font-semibold text-gray-900">Recent Orders</h3>
</div>
<div class="overflow-x-auto">
<table class="w-full">
<thead class="bg-gray-50">
<tr>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Order ID</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Customer</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Amount</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Status</th>
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th>
</tr>
</thead>
<tbody class="divide-y divide-gray-200">
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">#ORD-001</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">John Doe</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Dec 12, 2023</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">$249.99</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 py-1 text-xs font-medium bg-green-100 text-green-800 rounded-full">Completed</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<a href="#" class="text-indigo-600 hover:text-indigo-900 mr-3">View</a>
<a href="#" class="text-red-600 hover:text-red-900">Delete</a>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">#ORD-002</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">Jane Smith</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Dec 11, 2023</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">$89.99</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 py-1 text-xs font-medium bg-yellow-100 text-yellow-800 rounded-full">Processing</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<a href="#" class="text-indigo-600 hover:text-indigo-900 mr-3">View</a>
<a href="#" class="text-red-600 hover:text-red-900">Delete</a>
</td>
</tr>
<tr>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">#ORD-003</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">Mike Johnson</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Dec 10, 2023</td>
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-900">$156.50</td>
<td class="px-6 py-4 whitespace-nowrap">
<span class="px-2 py-1 text-xs font-medium bg-blue-100 text-blue-800 rounded-full">Shipped</span>
</td>
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium">
<a href="#" class="text-indigo-600 hover:text-indigo-900 mr-3">View</a>
<a href="#" class="text-red-600 hover:text-red-900">Delete</a>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
<script>
AOS.init({
duration: 800,
easing: 'ease-in-out',
once: true
});
// Revenue Chart
const revenueCtx = document.getElementById('revenueChart').getContext('2d');
new Chart(revenueCtx, {
type: 'line',
data: {
labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
datasets: [{
label: 'Revenue',
data: [25000, 32000, 28000, 35000, 42000, 38000, 45000, 48000, 52000, 55000, 60000, 65000],
borderColor: '#4f46e5',
backgroundColor: 'rgba(79, 70, 229, 0.1)',
fill: true,
tension: 0.4
}]
},
options: {
responsive: true,
plugins: {
legend: {
display: false
}
},
scales: {
y: {
beginAtZero: true,
grid: {
drawBorder: false
}
},
x: {
grid: {
display: false
}
}
}
}
});
// Category Chart
const categoryCtx = document.getElementById('categoryChart').getContext('2d');
new Chart(categoryCtx, {
type: 'doughnut',
data: {
labels: ['Electronics', 'Fashion', 'Home', 'Books', 'Beauty'],
datasets: [{
data: [35, 25, 20, 12, 8],
backgroundColor: [
'#4f46e5',
'#ec4899',
'#10b981',
'#f59e0b',
'#8b5cf6'
],
borderWidth: 0
}]
},
options: {
responsive: true,
cutout: '70%',
plugins: {
legend: {
position: 'bottom'
}
}
}
});
feather.replace();
</script>
</body>
</html>