Spaces:
Running
Running
<html lang="fr"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>MajesTech - Tableau de Bord</title> | |
<script src="https://cdn.tailwindcss.com"></script> | |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
<script> | |
tailwind.config = { | |
theme: { | |
extend: { | |
colors: { | |
primary: '#7c4dff', | |
secondary: '#651fff', | |
accent: '#b388ff', | |
dark: '#1e1e2d', | |
light: '#f5f5f5', | |
success: '#4caf50', | |
warning: '#ff9800', | |
danger: '#f44336', | |
info: '#2196f3' | |
} | |
} | |
} | |
} | |
</script> | |
<style> | |
.sidebar { | |
transition: all 0.3s ease; | |
} | |
.sidebar-collapsed { | |
width: 80px; | |
} | |
.sidebar-collapsed .sidebar-text { | |
display: none; | |
} | |
.sidebar-collapsed .logo-text { | |
display: none; | |
} | |
.sidebar-collapsed .nav-item { | |
justify-content: center; | |
} | |
.content { | |
transition: all 0.3s ease; | |
} | |
.content-expanded { | |
margin-left: 80px; | |
} | |
.dropdown:hover .dropdown-menu { | |
display: block; | |
} | |
.chart-container { | |
position: relative; | |
height: 300px; | |
} | |
.notification-badge { | |
position: absolute; | |
top: -5px; | |
right: -5px; | |
} | |
.active-tab { | |
border-bottom: 3px solid #7c4dff; | |
color: #7c4dff; | |
} | |
</style> | |
</head> | |
<body class="bg-gray-100 font-sans"> | |
<!-- Sidebar --> | |
<div class="sidebar fixed inset-y-0 left-0 bg-white shadow-lg w-64 z-50" id="sidebar"> | |
<div class="flex items-center justify-between px-6 py-4 border-b"> | |
<div class="flex items-center"> | |
<i class="fas fa-bag-shopping text-primary text-2xl mr-3"></i> | |
<span class="logo-text text-xl font-bold text-dark">MajesTech</span> | |
</div> | |
<button id="toggleSidebar" class="text-gray-500 hover:text-dark"> | |
<i class="fas fa-bars"></i> | |
</button> | |
</div> | |
<div class="px-4 py-6"> | |
<div class="mb-8"> | |
<div class="flex items-center px-4 py-3 bg-primary bg-opacity-10 rounded-lg"> | |
<div class="w-10 h-10 rounded-full bg-primary flex items-center justify-center text-white"> | |
<i class="fas fa-user"></i> | |
</div> | |
<div class="ml-3 sidebar-text"> | |
<p class="text-sm font-medium text-dark">Admin</p> | |
<p class="text-xs text-gray-500">Administrateur</p> | |
</div> | |
</div> | |
</div> | |
<nav> | |
<div class="mb-2"> | |
<p class="text-xs font-semibold text-gray-500 uppercase tracking-wider sidebar-text px-4 mb-2">Menu Principal</p> | |
<a href="#" class="nav-item flex items-center px-4 py-3 text-sm font-medium rounded-lg text-white bg-primary"> | |
<i class="fas fa-tachometer-alt mr-3"></i> | |
<span class="sidebar-text">Tableau de Bord</span> | |
</a> | |
</div> | |
<div class="mb-2"> | |
<p class="text-xs font-semibold text-gray-500 uppercase tracking-wider sidebar-text px-4 mb-2">Gestion</p> | |
<a href="#" class="nav-item flex items-center px-4 py-3 text-sm font-medium rounded-lg text-gray-700 hover:bg-gray-100"> | |
<i class="fas fa-shopping-cart mr-3"></i> | |
<span class="sidebar-text">Ventes</span> | |
</a> | |
<a href="#" class="nav-item flex items-center px-4 py-3 text-sm font-medium rounded-lg text-gray-700 hover:bg-gray-100"> | |
<i class="fas fa-file-invoice-dollar mr-3"></i> | |
<span class="sidebar-text">Facturation</span> | |
</a> | |
<a href="#" class="nav-item flex items-center px-4 py-3 text-sm font-medium rounded-lg text-gray-700 hover:bg-gray-100"> | |
<i class="fas fa-boxes mr-3"></i> | |
<span class="sidebar-text">Inventaire</span> | |
</a> | |
<a href="#" class="nav-item flex items-center px-4 py-3 text-sm font-medium rounded-lg text-gray-700 hover:bg-gray-100"> | |
<i class="fas fa-users mr-3"></i> | |
<span class="sidebar-text">Clients</span> | |
</a> | |
<a href="#" class="nav-item flex items-center px-4 py-3 text-sm font-medium rounded-lg text-gray-700 hover:bg-gray-100"> | |
<i class="fas fa-user-tie mr-3"></i> | |
<span class="sidebar-text">Employés</span> | |
</a> | |
</div> | |
<div class="mb-2"> | |
<p class="text-xs font-semibold text-gray-500 uppercase tracking-wider sidebar-text px-4 mb-2">Analyse</p> | |
<a href="#" class="nav-item flex items-center px-4 py-3 text-sm font-medium rounded-lg text-gray-700 hover:bg-gray-100"> | |
<i class="fas fa-chart-line mr-3"></i> | |
<span class="sidebar-text">Rapports</span> | |
</a> | |
</div> | |
<div class="mb-2"> | |
<p class="text-xs font-semibold text-gray-500 uppercase tracking-wider sidebar-text px-4 mb-2">Configuration</p> | |
<a href="#" class="nav-item flex items-center px-4 py-3 text-sm font-medium rounded-lg text-gray-700 hover:bg-gray-100"> | |
<i class="fas fa-cog mr-3"></i> | |
<span class="sidebar-text">Paramètres</span> | |
</a> | |
<a href="#" class="nav-item flex items-center px-4 py-3 text-sm font-medium rounded-lg text-gray-700 hover:bg-gray-100"> | |
<i class="fas fa-plug mr-3"></i> | |
<span class="sidebar-text">Intégrations</span> | |
</a> | |
</div> | |
</nav> | |
</div> | |
</div> | |
<!-- Main Content --> | |
<div class="content ml-64 min-h-screen" id="mainContent"> | |
<!-- Top Navigation --> | |
<header class="bg-white shadow-sm"> | |
<div class="flex items-center justify-between px-6 py-4"> | |
<div class="flex items-center"> | |
<h1 class="text-xl font-semibold text-dark">Tableau de Bord</h1> | |
</div> | |
<div class="flex items-center space-x-4"> | |
<div class="relative"> | |
<input type="text" placeholder="Rechercher..." class="pl-10 pr-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent"> | |
<i class="fas fa-search absolute left-3 top-3 text-gray-400"></i> | |
</div> | |
<div class="relative"> | |
<button class="p-2 text-gray-500 hover:text-dark relative"> | |
<i class="fas fa-bell text-xl"></i> | |
<span class="notification-badge bg-danger text-white text-xs rounded-full w-5 h-5 flex items-center justify-center">3</span> | |
</button> | |
<div class="dropdown-menu absolute right-0 mt-2 w-80 bg-white rounded-lg shadow-xl hidden"> | |
<div class="p-4 border-b"> | |
<p class="font-semibold">Notifications (3)</p> | |
</div> | |
<div class="divide-y"> | |
<a href="#" class="flex items-start p-3 hover:bg-gray-50"> | |
<div class="bg-warning bg-opacity-20 p-2 rounded-full mr-3"> | |
<i class="fas fa-exclamation text-warning"></i> | |
</div> | |
<div> | |
<p class="text-sm font-medium">Stock faible</p> | |
<p class="text-xs text-gray-500">Sacs modèle T45 - Brun: 2 unités restantes</p> | |
<p class="text-xs text-gray-400 mt-1">Il y a 15 minutes</p> | |
</div> | |
</a> | |
<a href="#" class="flex items-start p-3 hover:bg-gray-50"> | |
<div class="bg-success bg-opacity-20 p-2 rounded-full mr-3"> | |
<i class="fas fa-check-circle text-success"></i> | |
</div> | |
<div> | |
<p class="text-sm font-medium">Nouvelle vente</p> | |
<p class="text-xs text-gray-500">Vente #1234 pour €155.99</p> | |
<p class="text-xs text-gray-400 mt-1">Il y a 1 heure</p> | |
</div> | |
</a> | |
<a href="#" class="flex items-start p-3 hover:bg-gray-50"> | |
<div class="bg-info bg-opacity-20 p-2 rounded-full mr-3"> | |
<i class="fas fa-truck text-info"></i> | |
</div> | |
<div> | |
<p class="text-sm font-medium">Livraison arrivée</p> | |
<p class="text-xs text-gray-500">50 ceintures de Fournisseur ABC</p> | |
<p class="text-xs text-gray-400 mt-1">Il y a 2 heures</p> | |
</div> | |
</a> | |
</div> | |
<div class="p-3 text-center border-t"> | |
<a href="#" class="text-primary text-sm font-medium">Voir toutes les notifications</a> | |
</div> | |
</div> | |
</div> | |
<div class="dropdown relative"> | |
<button class="flex items-center space-x-2 focus:outline-none"> | |
<div class="w-8 h-8 rounded-full bg-primary flex items-center justify-center text-white"> | |
<i class="fas fa-user"></i> | |
</div> | |
<span class="hidden md:inline-block font-medium">Admin</span> | |
<i class="fas fa-chevron-down text-xs"></i> | |
</button> | |
<div class="dropdown-menu absolute right-0 mt-2 w-48 bg-white rounded-lg shadow-lg hidden"> | |
<a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Profil</a> | |
<a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Paramètres</a> | |
<div class="border-t"></div> | |
<a href="#" class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-100">Déconnexion</a> | |
</div> | |
</div> | |
</div> | |
</div> | |
</header> | |
<!-- Main Content Area --> | |
<main class="p-6"> | |
<!-- Daily Overview --> | |
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-6"> | |
<div class="bg-white rounded-lg shadow p-6"> | |
<div class="flex items-center justify-between"> | |
<div> | |
<p class="text-gray-500 text-sm">Ventes Aujourd'hui</p> | |
<p class="text-2xl font-bold mt-1">€2,567.00</p> | |
</div> | |
<div class="bg-success bg-opacity-10 p-3 rounded-full"> | |
<i class="fas fa-arrow-up text-success"></i> | |
</div> | |
</div> | |
<p class="text-success text-sm mt-2"><span class="font-medium">+12.5%</span> vs hier</p> | |
</div> | |
<div class="bg-white rounded-lg shadow p-6"> | |
<div class="flex items-center justify-between"> | |
<div> | |
<p class="text-gray-500 text-sm">Nouveaux Clients</p> | |
<p class="text-2xl font-bold mt-1">7</p> | |
</div> | |
<div class="bg-success bg-opacity-10 p-3 rounded-full"> | |
<i class="fas fa-arrow-up text-success"></i> | |
</div> | |
</div> | |
<p class="text-success text-sm mt-2"><span class="font-medium">+2</span> vs hier</p> | |
</div> | |
<div class="bg-white rounded-lg shadow p-6"> | |
<div class="flex items-center justify-between"> | |
<div> | |
<p class="text-gray-500 text-sm">Articles Vendus</p> | |
<p class="text-2xl font-bold mt-1">54</p> | |
</div> | |
<div class="bg-gray-200 p-3 rounded-full"> | |
<i class="fas fa-equals text-gray-500"></i> | |
</div> | |
</div> | |
<p class="text-gray-500 text-sm mt-2"><span class="font-medium">0%</span> vs hier</p> | |
</div> | |
<div class="bg-white rounded-lg shadow p-6"> | |
<div class="flex items-center justify-between"> | |
<div> | |
<p class="text-gray-500 text-sm">Alertes Stock</p> | |
<p class="text-2xl font-bold mt-1">5</p> | |
</div> | |
<div class="bg-warning bg-opacity-10 p-3 rounded-full"> | |
<i class="fas fa-exclamation text-warning"></i> | |
</div> | |
</div> | |
<p class="text-danger text-sm mt-2"><span class="font-medium">+2</span> nouvelles</p> | |
</div> | |
</div> | |
<!-- Charts and Recent Activities --> | |
<div class="grid grid-cols-1 lg:grid-cols-3 gap-6 mb-6"> | |
<!-- Sales Chart --> | |
<div class="bg-white rounded-lg shadow p-6 lg:col-span-2"> | |
<div class="flex items-center justify-between mb-4"> | |
<h2 class="text-lg font-semibold">Performances des Ventes</h2> | |
<div class="flex space-x-2"> | |
<button class="px-3 py-1 text-xs bg-primary text-white rounded">7j</button> | |
<button class="px-3 py-1 text-xs bg-gray-100 rounded">30j</button> | |
<button class="px-3 py-1 text-xs bg-gray-100 rounded">90j</button> | |
</div> | |
</div> | |
<div class="chart-container"> | |
<canvas id="salesChart"></canvas> | |
</div> | |
</div> | |
<!-- Recent Activities --> | |
<div class="bg-white rounded-lg shadow p-6"> | |
<div class="flex items-center justify-between mb-4"> | |
<h2 class="text-lg font-semibold">Activités Récentes</h2> | |
<div class="flex space-x-2"> | |
<button class="px-3 py-1 text-xs bg-primary text-white rounded">Aujourd'hui</button> | |
<button class="px-3 py-1 text-xs bg-gray-100 rounded">Semaine</button> | |
<button class="px-3 py-1 text-xs bg-gray-100 rounded">Mois</button> | |
</div> | |
</div> | |
<div class="space-y-4"> | |
<div class="flex items-start"> | |
<div class="bg-success bg-opacity-10 p-2 rounded-full mr-3"> | |
<i class="fas fa-shopping-cart text-success"></i> | |
</div> | |
<div> | |
<p class="text-sm font-medium">Nouvelle vente #1234 par "Boutique Elegance"</p> | |
<p class="text-xs text-gray-500">Il y a 10 minutes</p> | |
</div> | |
</div> | |
<div class="flex items-start"> | |
<div class="bg-info bg-opacity-10 p-2 rounded-full mr-3"> | |
<i class="fas fa-user-plus text-info"></i> | |
</div> | |
<div> | |
<p class="text-sm font-medium">Nouveau client "Cuir Moderne SARL"</p> | |
<p class="text-xs text-gray-500">Il y a 45 minutes</p> | |
</div> | |
</div> | |
<div class="flex items-start"> | |
<div class="bg-primary bg-opacity-10 p-2 rounded-full mr-3"> | |
<i class="fas fa-truck text-primary"></i> | |
</div> | |
<div> | |
<p class="text-sm font-medium">Livraison de 50 ceintures de "Fournisseur ABC"</p> | |
<p class="text-xs text-gray-500">Il y a 2 heures</p> | |
</div> | |
</div> | |
<div class="flex items-start"> | |
<div class="bg-warning bg-opacity-10 p-2 rounded-full mr-3"> | |
<i class="fas fa-exclamation text-warning"></i> | |
</div> | |
<div> | |
<p class="text-sm font-medium">Alerte stock pour "Sacs modèle T45 - Brun"</p> | |
<p class="text-xs text-gray-500">Il y a 3 heures</p> | |
</div> | |
</div> | |
</div> | |
<div class="mt-4 text-center"> | |
<a href="#" class="text-primary text-sm font-medium">Voir toutes les activités</a> | |
</div> | |
</div> | |
</div> | |
<!-- Recent Sales and Top Products --> | |
<div class="grid grid-cols-1 lg:grid-cols-2 gap-6"> | |
<!-- Recent Sales --> | |
<div class="bg-white rounded-lg shadow"> | |
<div class="p-6 border-b"> | |
<h2 class="text-lg font-semibold">Ventes Récentes</h2> | |
</div> | |
<div class="overflow-x-auto"> | |
<table class="min-w-full divide-y divide-gray-200"> | |
<thead class="bg-gray-50"> | |
<tr> | |
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Référence</th> | |
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Client</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">Total</th> | |
<th class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Statut</th> | |
</tr> | |
</thead> | |
<tbody class="bg-white divide-y divide-gray-200"> | |
<tr> | |
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-primary">#VNT-1025</td> | |
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Boutique Elegance</td> | |
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Aujourd'hui, 10:45</td> | |
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">€352.50</td> | |
<td class="px-6 py-4 whitespace-nowrap"> | |
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-success bg-opacity-10 text-success">Payé</span> | |
</td> | |
</tr> | |
<tr> | |
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-primary">#VNT-1024</td> | |
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Maroquinerie Luxe</td> | |
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Hier, 16:30</td> | |
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">€420.75</td> | |
<td class="px-6 py-4 whitespace-nowrap"> | |
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-success bg-opacity-10 text-success">Payé</span> | |
</td> | |
</tr> | |
<tr> | |
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-primary">#VNT-1023</td> | |
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Accessoires Chic</td> | |
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Hier, 14:15</td> | |
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">€275.00</td> | |
<td class="px-6 py-4 whitespace-nowrap"> | |
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-warning bg-opacity-10 text-warning">En attente</span> | |
</td> | |
</tr> | |
<tr> | |
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-primary">#VNT-1022</td> | |
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Cuir & Style</td> | |
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Hier, 11:00</td> | |
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">€189.50</td> | |
<td class="px-6 py-4 whitespace-nowrap"> | |
<span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-danger bg-opacity-10 text-danger">Annulé</span> | |
</td> | |
</tr> | |
</tbody> | |
</table> | |
</div> | |
<div class="p-4 border-t text-center"> | |
<a href="#" class="text-primary text-sm font-medium">Voir toutes les ventes</a> | |
</div> | |
</div> | |
<!-- Top Products --> | |
<div class="bg-white rounded-lg shadow"> | |
<div class="p-6 border-b"> | |
<h2 class="text-lg font-semibold">Produits Populaires</h2> | |
</div> | |
<div class="divide-y"> | |
<div class="p-4 flex items-center"> | |
<div class="w-12 h-12 rounded-md bg-gray-100 flex items-center justify-center mr-4"> | |
<i class="fas fa-bag-shopping text-primary"></i> | |
</div> | |
<div class="flex-1"> | |
<p class="font-medium">Sac à Main Premium</p> | |
<p class="text-sm text-gray-500">Modèle: PM-45</p> | |
</div> | |
<div class="text-right"> | |
<p class="font-medium">€79.99</p> | |
<p class="text-sm text-success">12 vendus</p> | |
</div> | |
</div> | |
<div class="p-4 flex items-center"> | |
<div class="w-12 h-12 rounded-md bg-gray-100 flex items-center justify-center mr-4"> | |
<i class="fas fa-belt text-primary"></i> | |
</div> | |
<div class="flex-1"> | |
<p class="font-medium">Ceinture Classique</p> | |
<p class="text-sm text-gray-500">Modèle: CL-30</p> | |
</div> | |
<div class="text-right"> | |
<p class="font-medium">€25.00</p> | |
<p class="text-sm text-success">8 vendus</p> | |
</div> | |
</div> | |
<div class="p-4 flex items-center"> | |
<div class="w-12 h-12 rounded-md bg-gray-100 flex items-center justify-center mr-4"> | |
<i class="fas fa-bag-shopping text-primary"></i> | |
</div> | |
<div class="flex-1"> | |
<p class="font-medium">Sac Voyage Grand</p> | |
<p class="text-sm text-gray-500">Modèle: VG-60</p> | |
</div> | |
<div class="text-right"> | |
<p class="font-medium">€129.99</p> | |
<p class="text-sm text-success">5 vendus</p> | |
</div> | |
</div> | |
<div class="p-4 flex items-center"> | |
<div class="w-12 h-12 rounded-md bg-gray-100 flex items-center justify-center mr-4"> | |
<i class="fas fa-belt text-primary"></i> | |
</div> | |
<div class="flex-1"> | |
<p class="font-medium">Ceinture Élégante</p> | |
<p class="text-sm text-gray-500">Modèle: EL-25</p> | |
</div> | |
<div class="text-right"> | |
<p class="font-medium">€32.50</p> | |
<p class="text-sm text-success">4 vendus</p> | |
</div> | |
</div> | |
</div> | |
<div class="p-4 border-t text-center"> | |
<a href="#" class="text-primary text-sm font-medium">Voir tous les produits</a> | |
</div> | |
</div> | |
</div> | |
<!-- Quick Actions --> | |
<div class="mt-6 grid grid-cols-1 md:grid-cols-3 gap-6"> | |
<div class="bg-white rounded-lg shadow p-6 flex items-center"> | |
<div class="bg-primary bg-opacity-10 p-4 rounded-full mr-4"> | |
<i class="fas fa-plus text-primary text-xl"></i> | |
</div> | |
<div> | |
<h3 class="font-medium">Nouvelle Vente</h3> | |
<p class="text-sm text-gray-500">Créer une nouvelle vente ou devis</p> | |
</div> | |
</div> | |
<div class="bg-white rounded-lg shadow p-6 flex items-center"> | |
<div class="bg-success bg-opacity-10 p-4 rounded-full mr-4"> | |
<i class="fas fa-user-plus text-success text-xl"></i> | |
</div> | |
<div> | |
<h3 class="font-medium">Ajouter Client</h3> | |
<p class="text-sm text-gray-500">Enregistrer un nouveau client</p> | |
</div> | |
</div> | |
<div class="bg-white rounded-lg shadow p-6 flex items-center"> | |
<div class="bg-info bg-opacity-10 p-4 rounded-full mr-4"> | |
<i class="fas fa-box-open text-info text-xl"></i> | |
</div> | |
<div> | |
<h3 class="font-medium">Gérer Stock</h3> | |
<p class="text-sm text-gray-500">Ajouter ou ajuster l'inventaire</p> | |
</div> | |
</div> | |
</div> | |
</main> | |
</div> | |
<!-- Scripts --> | |
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | |
<script> | |
// Toggle Sidebar | |
document.getElementById('toggleSidebar').addEventListener('click', function() { | |
const sidebar = document.getElementById('sidebar'); | |
const mainContent = document.getElementById('mainContent'); | |
sidebar.classList.toggle('sidebar-collapsed'); | |
mainContent.classList.toggle('content-expanded'); | |
}); | |
// Dropdown functionality | |
document.addEventListener('DOMContentLoaded', function() { | |
// Notification dropdown | |
const notificationBtn = document.querySelector('.relative button'); | |
const notificationDropdown = document.querySelector('.dropdown-menu'); | |
notificationBtn.addEventListener('click', function() { | |
notificationDropdown.classList.toggle('hidden'); | |
}); | |
// User dropdown | |
const userBtn = document.querySelector('.dropdown button'); | |
const userDropdown = document.querySelector('.dropdown .dropdown-menu'); | |
userBtn.addEventListener('click', function() { | |
userDropdown.classList.toggle('hidden'); | |
}); | |
// Close dropdowns when clicking outside | |
document.addEventListener('click', function(event) { | |
if (!notificationBtn.contains(event.target) && !notificationDropdown.contains(event.target)) { | |
notificationDropdown.classList.add('hidden'); | |
} | |
if (!userBtn.contains(event.target) && !userDropdown.contains(event.target)) { | |
userDropdown.classList.add('hidden'); | |
} | |
}); | |
// Sales Chart | |
const ctx = document.getElementById('salesChart').getContext('2d'); | |
const salesChart = new Chart(ctx, { | |
type: 'line', | |
data: { | |
labels: ['Lun', 'Mar', 'Mer', 'Jeu', 'Ven', 'Sam', 'Dim'], | |
datasets: [{ | |
label: 'Ventes (€)', | |
data: [1200, 1900, 1700, 2100, 2300, 1850, 2567], | |
backgroundColor: 'rgba(124, 77, 255, 0.1)', | |
borderColor: 'rgba(124, 77, 255, 1)', | |
borderWidth: 2, | |
tension: 0.4, | |
fill: true | |
}] | |
}, | |
options: { | |
responsive: true, | |
maintainAspectRatio: false, | |
plugins: { | |
legend: { | |
display: false | |
} | |
}, | |
scales: { | |
y: { | |
beginAtZero: true, | |
grid: { | |
drawBorder: false | |
} | |
}, | |
x: { | |
grid: { | |
display: false | |
} | |
} | |
} | |
} | |
}); | |
}); | |
</script> | |
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=kam33/artmoh-spacess" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
</html> |