anycoder-25514126 / index.html
shivay00001's picture
Upload folder using huggingface_hub
b914f21 verified
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Kirana Ecosystem</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
:root {
--primary-color: #3b82f6;
--primary-dark: #1d4ed8;
--secondary-color: #64748b;
--success-color: #10b981;
--warning-color: #f59e0b;
--danger-color: #ef4444;
--info-color: #06b6d4;
--light-bg: #f8fafc;
--white: #ffffff;
--dark-text: #1e293b;
--light-text: #64748b;
--border-color: #e2e8f0;
--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
background-color: var(--light-bg);
color: var(--dark-text);
display: flex;
min-height: 100vh;
}
/* Sidebar */
.sidebar {
width: 250px;
background-color: var(--white);
border-right: 1px solid var(--border-color);
position: fixed;
height: 100vh;
overflow-y: auto;
transition: transform 0.3s ease;
z-index: 1000;
}
.sidebar-header {
padding: 1.5rem;
border-bottom: 1px solid var(--border-color);
}
.sidebar-header h1 {
font-size: 1.25rem;
font-weight: 700;
color: var(--primary-color);
margin-bottom: 0.5rem;
}
.sidebar-header p {
font-size: 0.875rem;
color: var(--light-text);
}
.sidebar-menu {
padding: 1rem 0;
}
.sidebar-item {
padding: 0.75rem 1.5rem;
display: flex;
align-items: center;
color: var(--light-text);
text-decoration: none;
transition: all 0.2s ease;
}
.sidebar-item:hover {
background-color: var(--primary-color);
color: var(--white);
}
.sidebar-item.active {
background-color: var(--primary-color);
color: var(--white);
border-left: 3px solid var(--primary-dark);
}
.sidebar-item i {
margin-right: 0.75rem;
font-size: 1rem;
width: 20px;
text-align: center;
}
/* Main Content */
.main-content {
flex: 1;
margin-left: 250px;
padding: 1.5rem;
}
/* Navbar */
.navbar {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1.5rem;
padding-bottom: 1rem;
border-bottom: 1px solid var(--border-color);
}
.search-container {
position: relative;
max-width: 400px;
width: 100%;
}
.search-input {
width: 100%;
padding: 0.5rem 1rem 0.5rem 2.5rem;
border: 1px solid var(--border-color);
border-radius: 0.375rem;
background-color: var(--white);
transition: border-color 0.2s ease;
}
.search-input:focus {
outline: none;
border-color: var(--primary-color);
}
.search-icon {
position: absolute;
left: 0.75rem;
top: 50%;
transform: translateY(-50%);
color: var(--light-text);
}
.user-profile {
display: flex;
align-items: center;
gap: 0.75rem;
}
.user-avatar {
width: 36px;
height: 36px;
border-radius: 50%;
background-color: var(--primary-color);
color: var(--white);
display: flex;
align-items: center;
justify-content: center;
font-weight: 600;
}
/* Dashboard Stats */
.stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1.5rem;
margin-bottom: 2rem;
}
.stat-card {
background-color: var(--white);
border-radius: 0.5rem;
padding: 1.5rem;
box-shadow: var(--shadow-sm);
transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-md);
}
.stat-icon {
width: 40px;
height: 40px;
border-radius: 0.5rem;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 1rem;
font-size: 1.25rem;
}
.stat-value {
font-size: 1.75rem;
font-weight: 700;
margin-bottom: 0.25rem;
}
.stat-label {
font-size: 0.875rem;
color: var(--light-text);
}
/* Recent Orders */
.section {
background-color: var(--white);
border-radius: 0.5rem;
padding: 1.5rem;
box-shadow: var(--shadow-sm);
margin-bottom: 2rem;
}
.section-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 1.5rem;
}
.section-title {
font-size: 1.25rem;
font-weight: 600;
}
.view-all {
color: var(--primary-color);
text-decoration: none;
font-size: 0.875rem;
font-weight: 500;
}
.table-responsive {
overflow-x: auto;
}
.order-table {
width: 100%;
border-collapse: collapse;
}
.order-table th {
text-align: left;
padding: 0.75rem;
font-size: 0.875rem;
font-weight: 600;
color: var(--light-text);
border-bottom: 1px solid var(--border-color);
}
.order-table td {
padding: 1rem 0.75rem;
border-bottom: 1px solid var(--border-color);
}
.status-badge {
padding: 0.25rem 0.75rem;
border-radius: 9999px;
font-size: 0.75rem;
font-weight: 500;
text-align: center;
}
.status-delivered {
background-color: rgba(16, 185, 129, 0.1);
color: var(--success-color);
}
.status-cancelled {
background-color: rgba(239, 68, 68, 0.1);
color: var(--danger-color);
}
.status-preparing {
background-color: rgba(245, 158, 11, 0.1);
color: var(--warning-color);
}
/* Quick Actions */
.actions-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
gap: 1rem;
}
.action-card {
background-color: var(--white);
border-radius: 0.5rem;
padding: 1.5rem;
text-align: center;
transition: transform 0.2s ease, box-shadow 0.2s ease;
cursor: pointer;
}
.action-card:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-md);
}
.action-icon {
width: 50px;
height: 50px;
border-radius: 50%;
margin: 0 auto 1rem;
display: flex;
align-items: center;
justify-content: center;
font-size: 1.5rem;
color: var(--white);
}
.action-label {
font-size: 0.875rem;
font-weight: 500;
}
/* Loading Spinner */
.loading {
display: none;
text-align: center;
padding: 2rem;
}
.spinner {
border: 3px solid rgba(59, 130, 246, 0.2);
border-radius: 50%;
border-top: 3px solid var(--primary-color);
width: 40px;
height: 40px;
animation: spin 1s linear infinite;
margin: 0 auto;
}
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
/* Responsive Design */
@media (max-width: 768px) {
.sidebar {
transform: translateX(-100%);
}
.sidebar.active {
transform: translateX(0);
}
.main-content {
margin-left: 0;
padding: 1rem;
}
.navbar {
flex-direction: column;
gap: 1rem;
align-items: flex-start;
}
.search-container {
max-width: 100%;
}
.stats-grid {
grid-template-columns: repeat(2, 1fr);
}
.actions-grid {
grid-template-columns: repeat(2, 1fr);
}
}
/* Mobile Menu Toggle */
.mobile-menu-toggle {
display: none;
background: none;
border: none;
font-size: 1.5rem;
cursor: pointer;
color: var(--dark-text);
}
@media (max-width: 768px) {
.mobile-menu-toggle {
display: block;
position: fixed;
top: 1rem;
left: 1rem;
z-index: 1001;
}
.sidebar-header {
padding: 1rem;
}
}
/* Overlay for mobile sidebar */
.sidebar-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background-color: rgba(0, 0, 0, 0.5);
z-index: 999;
}
.sidebar-overlay.active {
display: block;
}
</style>
</head>
<body>
<!-- Sidebar Overlay for Mobile -->
<div class="sidebar-overlay" id="sidebarOverlay"></div>
<!-- Sidebar -->
<aside class="sidebar" id="sidebar">
<div class="sidebar-header">
<h1>Kirana Ecosystem</h1>
<p>Manage your store efficiently</p>
<a href="https://huggingface.co/spaces/akhaliq/anycoder" style="font-size: 0.75rem; color: var(--primary-color);">Built with anycoder</a>
</div>
<nav class="sidebar-menu">
<a href="#" class="sidebar-item active">
<i class="fas fa-home"></i>
Dashboard
</a>
<a href="#" class="sidebar-item">
<i class="fas fa-shopping-cart"></i>
Orders
</a>
<a href="#" class="sidebar-item">
<i class="fas fa-box"></i>
Products
</a>
<a href="#" class="sidebar-item">
<i class="fas fa-users"></i>
Customers
</a>
<a href="#" class="sidebar-item">
<i class="fas fa-truck"></i>
Delivery Partners
</a>
<a href="#" class="sidebar-item">
<i class="fas fa-chart-line"></i>
Reports
</a>
<a href="#" class="sidebar-item">
<i class="fas fa-cog"></i>
Settings
</a>
</nav>
</aside>
<!-- Mobile Menu Toggle -->
<button class="mobile-menu-toggle" id="mobileMenuToggle">
<i class="fas fa-bars"></i>
</button>
<!-- Main Content -->
<main class="main-content">
<!-- Navbar -->
<div class="navbar">
<div class="search-container">
<i class="fas fa-search search-icon"></i>
<input type="text" class="search-input" placeholder="Search orders, products...">
</div>
<div class="user-profile">
<div class="user-avatar">JD</div>
<div>
<div style="font-weight: 600; font-size: 0.875rem;">John Doe</div>
<div style="font-size: 0.75rem; color: var(--light-text);">Store Owner</div>
</div>
</div>
</div>
<!-- Dashboard Stats -->
<div class="stats-grid">
<div class="stat-card">
<div class="stat-icon" style="background-color: rgba(59, 130, 246, 0.1); color: var(--primary-color);">
<i class="fas fa-shopping-cart"></i>
</div>
<div class="stat-value">1,245</div>
<div class="stat-label">Total Orders</div>
</div>
<div class="stat-card">
<div class="stat-icon" style="background-color: rgba(16, 185, 129, 0.1); color: var(--success-color);">
<i class="fas fa-box"></i>
</div>
<div class="stat-value">345</div>
<div class="stat-label">Products</div>
</div>
<div class="stat-card">
<div class="stat-icon" style="background-color: rgba(6, 182, 212, 0.1); color: var(--info-color);">
<i class="fas fa-users"></i>
</div>
<div class="stat-value">2,345</div>
<div class="stat-label">Customers</div>
</div>
<div class="stat-card">
<div class="stat-icon" style="background-color: rgba(245, 158, 11, 0.1); color: var(--warning-color);">
<i class="fas fa-truck"></i>
</div>
<div class="stat-value">45</div>
<div class="stat-label">Delivery Partners</div>
</div>
<div class="stat-card">
<div class="stat-icon" style="background-color: rgba(16, 185, 129, 0.1); color: var(--success-color);">
<i class="fas fa-rupee-sign"></i>
</div>
<div class="stat-value">₹1,24,560</div>
<div class="stat-label">Revenue</div>
</div>
<div class="stat-card">
<div class="stat-icon" style="background-color: rgba(239, 68, 68, 0.1); color: var(--danger-color);">
<i class="fas fa-clock"></i>
</div>
<div class="stat-value">12</div>
<div class="stat-label">Pending Orders</div>
</div>
</div>
<!-- Recent Orders Section -->
<div class="section">
<div class="section-header">
<h2 class="section-title">Recent Orders</h2>
<a href="#" class="view-all">View All</a>
</div>
<div class="loading" id="ordersLoading">
<div class="spinner"></div>
<p style="margin-top: 0.5rem; color: var(--light-text);">Loading orders...</p>
</div>
<div class="table-responsive">
<table class="order-table" id="ordersTable">
<thead>
<tr>
<th>Order ID</th>
<th>Customer</th>
<th>Amount</th>
<th>Status</th>
<th>Date</th>
</tr>
</thead>
<tbody>
<tr>
<td>#ORD12345</td>
<td>Rahul Sharma</td>
<td>₹1,250</td>
<td><span class="status-badge status-delivered">Delivered</span></td>
<td>2023-11-15</td>
</tr>
<tr>
<td>#ORD12344</td>
<td>Priya Patel</td>
<td>₹850</td>
<td><span class="status-badge status-preparing">Preparing</span></td>
<td>2023-11-14</td>
</tr>
<tr>
<td>#ORD12343</td>
<td>Amit Kumar</td>
<td>₹2,100</td>
<td><span class="status-badge status-delivered">Delivered</span></td>
<td>2023-11-13</td>
</tr>
<tr>
<td>#ORD12342</td>
<td>Sneha Reddy</td>
<td>₹1,500</td>
<td><span class="status-badge status-cancelled">Cancelled</span></td>
<td>2023-11-12</td>
</tr>
<tr>
<td>#ORD12341</td>
<td>Vikram Singh</td>
<td>₹950</td>
<td><span class="status-badge status-preparing">Preparing</span></td>
<td>2023-11-11</td>
</tr>
</tbody>
</table>
</div>
</div>
<!-- Quick Actions Section -->
<div class="section">
<div class="section-header">
<h2 class="section-title">Quick Actions</h2>
</div>
<div class="actions-grid">
<div class="action-card" style="--action-color: #3b82f6;">
<div class="action-icon" style="background-color: #3b82f6;">
<i class="fas fa-plus"></i>
</div>
<div class="action-label">Add Product</div>
</div>
<div class="action-card" style="--action-color: #10b981;">
<div class="action-icon" style="background-color: #10b981;">
<i class="fas fa-cart-plus"></i>
</div>
<div class="action-label">New Order</div>
</div>
<div class="action-card" style="--action-color: #8b5cf6;">
<div class="action-icon" style="background-color: #8b5cf6;">
<i class="fas fa-chart-bar"></i>
</div>
<div class="action-label">View Reports</div>
</div>
<div class="action-card" style="--action-color: #6366f1;">
<div class="action-icon" style="background-color: #6366f1;">
<i class="fas fa-users-cog"></i>
</div>
<div class="action-label">Manage Users</div>
</div>
</div>
</div>
</main>
<script>
// Mobile sidebar toggle functionality
const mobileMenuToggle = document.getElementById('mobileMenuToggle');
const sidebar = document.getElementById('sidebar');
const sidebarOverlay = document.getElementById('sidebarOverlay');
mobileMenuToggle.addEventListener('click', () => {
sidebar.classList.toggle('active');
sidebarOverlay.classList.toggle('active');
});
sidebarOverlay.addEventListener('click', () => {
sidebar.classList.remove('active');
sidebarOverlay.classList.remove('active');
});
// Simulate loading orders
document.addEventListener('DOMContentLoaded', () => {
const ordersLoading = document.getElementById('ordersLoading');
const ordersTable = document.getElementById('ordersTable');
// Show loading spinner for 1 second
ordersLoading.style.display = 'block';
ordersTable.style.display = 'none';
setTimeout(() => {
ordersLoading.style.display = 'none';
ordersTable.style.display = 'table';
}, 1000);
});
// Add click handlers for action cards
document.querySelectorAll('.action-card').forEach(card => {
card.addEventListener('click', () => {
const action = card.querySelector('.action-label').textContent;
alert(`Action: ${action} clicked!`);
});
});
// Add hover effects to sidebar items
document.querySelectorAll('.sidebar-item').forEach(item => {
item.addEventListener('click', (e) => {
e.preventDefault();
document.querySelectorAll('.sidebar-item').forEach(i => i.classList.remove('active'));
item.classList.add('active');
});
});
</script>
</body>
</html>