Spaces:
Running
Running
make app have a dark mode and change color background to red instead of purple - Initial Deployment
ed2f5a3 verified Download index.html from Alexandro556/my-app: direct link, hf CLI and curl.
- Browser
- Download file 22.8 kB
-
https://huggingface.co/spaces/Alexandro556/my-app/resolve/main/index.html
- Command line
-
hf download hf://spaces/Alexandro556/my-app/index.html
-
curl -L -o index.html https://huggingface.co/spaces/Alexandro556/my-app/resolve/main/index.html
22.8 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Sales Tracker</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script> | |
| tailwind.config = { | |
| darkMode: 'class', | |
| theme: { | |
| extend: { | |
| colors: { | |
| primary: { | |
| 100: '#fee2e2', | |
| 200: '#fecaca', | |
| 300: '#fca5a5', | |
| 400: '#f87171', | |
| 500: '#ef4444', | |
| 600: '#dc2626', | |
| 700: '#b91c1c', | |
| 800: '#991b1b', | |
| 900: '#7f1d1d', | |
| } | |
| } | |
| } | |
| } | |
| } | |
| </script> | |
| <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| .sidebar { | |
| transition: all 0.3s ease; | |
| } | |
| @media (max-width: 768px) { | |
| .sidebar { | |
| transform: translateX(-100%); | |
| position: absolute; | |
| z-index: 10; | |
| } | |
| .sidebar.open { | |
| transform: translateX(0); | |
| } | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-100 font-sans"> | |
| <div class="flex h-screen overflow-hidden"> | |
| <!-- Sidebar --> | |
| <div class="sidebar bg-primary-800 text-white w-64 flex-shrink-0"> | |
| <div class="p-4 border-b border-primary-700"> | |
| <h1 class="text-2xl font-bold flex items-center"> | |
| <i class="fas fa-chart-line mr-2"></i> SalesTrack | |
| </h1> | |
| </div> | |
| <nav class="p-4"> | |
| <ul> | |
| <li class="mb-2"> | |
| <a href="#" class="flex items-center p-2 rounded hover:bg-indigo-700 bg-indigo-700"> | |
| <i class="fas fa-tachometer-alt mr-3"></i> Dashboard | |
| </a> | |
| </li> | |
| <li class="mb-2"> | |
| <a href="#" class="flex items-center p-2 rounded hover:bg-indigo-700"> | |
| <i class="fas fa-shopping-cart mr-3"></i> Sales | |
| </a> | |
| </li> | |
| <li class="mb-2"> | |
| <a href="#" class="flex items-center p-2 rounded hover:bg-indigo-700"> | |
| <i class="fas fa-users mr-3"></i> Customers | |
| </a> | |
| </li> | |
| <li class="mb-2"> | |
| <a href="#" class="flex items-center p-2 rounded hover:bg-indigo-700"> | |
| <i class="fas fa-box-open mr-3"></i> Products | |
| </a> | |
| </li> | |
| <li class="mb-2"> | |
| <a href="#" class="flex items-center p-2 rounded hover:bg-indigo-700"> | |
| <i class="fas fa-chart-pie mr-3"></i> Reports | |
| </a> | |
| </li> | |
| <li class="mb-2"> | |
| <a href="#" class="flex items-center p-2 rounded hover:bg-indigo-700"> | |
| <i class="fas fa-cog mr-3"></i> Settings | |
| </a> | |
| </li> | |
| </ul> | |
| </nav> | |
| </div> | |
| <!-- Main Content --> | |
| <div class="flex-1 overflow-auto"> | |
| <!-- Header --> | |
| <header class="bg-white shadow-sm"> | |
| <div class="flex items-center justify-between p-4"> | |
| <button id="menu-toggle" class="md:hidden text-gray-600"> | |
| <i class="fas fa-bars text-xl"></i> | |
| </button> | |
| <div class="flex items-center space-x-4"> | |
| <button id="dark-mode-toggle" class="p-2 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700"> | |
| <i class="fas fa-moon dark:hidden"></i> | |
| <i class="fas fa-sun hidden dark:block"></i> | |
| </button> | |
| <div class="relative"> | |
| <input type="text" placeholder="Search..." class="pl-10 pr-4 py-2 rounded-full border border-gray-300 focus:outline-none focus:ring-2 focus:ring-indigo-500"> | |
| <i class="fas fa-search absolute left-3 top-3 text-gray-400"></i> | |
| </div> | |
| <div class="relative"> | |
| <i class="fas fa-bell text-xl text-gray-600"></i> | |
| <span class="absolute -top-1 -right-1 bg-red-500 text-white text-xs rounded-full h-4 w-4 flex items-center justify-center">3</span> | |
| </div> | |
| <div class="flex items-center"> | |
| <img src="https://randomuser.me/api/portraits/men/1.jpg" alt="Profile" class="h-8 w-8 rounded-full"> | |
| <span class="ml-2 font-medium">John Doe</span> | |
| </div> | |
| </div> | |
| </div> | |
| </header> | |
| <!-- Dashboard Content --> | |
| <main class="p-6"> | |
| <div class="flex justify-between items-center mb-6"> | |
| <h2 class="text-2xl font-bold text-gray-800">Dashboard</h2> | |
| <div class="flex space-x-2"> | |
| <button class="px-4 py-2 bg-primary-600 text-white rounded hover:bg-primary-700"> | |
| <i class="fas fa-plus mr-2"></i> Add Sale | |
| </button> | |
| <button class="px-4 py-2 border border-gray-300 rounded hover:bg-gray-100"> | |
| <i class="fas fa-download mr-2"></i> Export | |
| </button> | |
| </div> | |
| </div> | |
| <!-- Stats Cards --> | |
| <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 gap-6 mb-6"> | |
| <div class="bg-white p-6 rounded-lg shadow"> | |
| <div class="flex items-center justify-between"> | |
| <div> | |
| <p class="text-gray-500">Total Sales</p> | |
| <h3 class="text-2xl font-bold">$24,780</h3> | |
| <p class="text-green-500 text-sm mt-1"><i class="fas fa-arrow-up mr-1"></i> 12.5% from last month</p> | |
| </div> | |
| <div class="bg-indigo-100 p-3 rounded-full"> | |
| <i class="fas fa-dollar-sign text-indigo-600 text-xl"></i> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white p-6 rounded-lg shadow"> | |
| <div class="flex items-center justify-between"> | |
| <div> | |
| <p class="text-gray-500">Total Orders</p> | |
| <h3 class="text-2xl font-bold">1,248</h3> | |
| <p class="text-green-500 text-sm mt-1"><i class="fas fa-arrow-up mr-1"></i> 8.3% from last month</p> | |
| </div> | |
| <div class="bg-blue-100 p-3 rounded-full"> | |
| <i class="fas fa-shopping-bag text-blue-600 text-xl"></i> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white p-6 rounded-lg shadow"> | |
| <div class="flex items-center justify-between"> | |
| <div> | |
| <p class="text-gray-500">Avg. Order Value</p> | |
| <h3 class="text-2xl font-bold">$19.85</h3> | |
| <p class="text-red-500 text-sm mt-1"><i class="fas fa-arrow-down mr-1"></i> 2.1% from last month</p> | |
| </div> | |
| <div class="bg-green-100 p-3 rounded-full"> | |
| <i class="fas fa-chart-bar text-green-600 text-xl"></i> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white p-6 rounded-lg shadow"> | |
| <div class="flex items-center justify-between"> | |
| <div> | |
| <p class="text-gray-500">Conversion Rate</p> | |
| <h3 class="text-2xl font-bold">3.42%</h3> | |
| <p class="text-green-500 text-sm mt-1"><i class="fas fa-arrow-up mr-1"></i> 1.2% from last month</p> | |
| </div> | |
| <div class="bg-purple-100 p-3 rounded-full"> | |
| <i class="fas fa-percentage text-purple-600 text-xl"></i> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Charts --> | |
| <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6"> | |
| <div class="bg-white p-6 rounded-lg shadow"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <h3 class="font-semibold text-lg">Sales Overview</h3> | |
| <select class="border border-gray-300 rounded px-3 py-1 text-sm"> | |
| <option>Last 7 Days</option> | |
| <option>Last 30 Days</option> | |
| <option selected>Last 90 Days</option> | |
| <option>This Year</option> | |
| </select> | |
| </div> | |
| <canvas id="salesChart" height="250"></canvas> | |
| </div> | |
| <div class="bg-white p-6 rounded-lg shadow"> | |
| <div class="flex justify-between items-center mb-4"> | |
| <h3 class="font-semibold text-lg">Revenue Sources</h3> | |
| <select class="border border-gray-300 rounded px-3 py-1 text-sm"> | |
| <option selected>This Month</option> | |
| <option>Last Month</option> | |
| <option>This Quarter</option> | |
| </select> | |
| </div> | |
| <canvas id="revenueChart" height="250"></canvas> | |
| </div> | |
| </div> | |
| <!-- Recent Transactions --> | |
| <div class="bg-white rounded-lg shadow overflow-hidden"> | |
| <div class="p-6 border-b border-gray-200"> | |
| <div class="flex justify-between items-center"> | |
| <h3 class="font-semibold text-lg">Recent Transactions</h3> | |
| <button class="text-indigo-600 hover:text-indigo-800 text-sm font-medium">View All</button> | |
| </div> | |
| </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">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">Action</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-gray-900">#ORD-2023-001</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Sarah Johnson</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">May 15, 2023</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$125.99</td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-green-100 text-green-800">Completed</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> | |
| <button class="text-indigo-600 hover:text-indigo-900 mr-3"><i class="fas fa-eye"></i></button> | |
| <button class="text-gray-600 hover:text-gray-900"><i class="fas fa-ellipsis-v"></i></button> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">#ORD-2023-002</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Michael Chen</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">May 14, 2023</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$89.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-yellow-100 text-yellow-800">Processing</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> | |
| <button class="text-indigo-600 hover:text-indigo-900 mr-3"><i class="fas fa-eye"></i></button> | |
| <button class="text-gray-600 hover:text-gray-900"><i class="fas fa-ellipsis-v"></i></button> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">#ORD-2023-003</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Emma Rodriguez</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">May 13, 2023</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$215.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-green-100 text-green-800">Completed</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> | |
| <button class="text-indigo-600 hover:text-indigo-900 mr-3"><i class="fas fa-eye"></i></button> | |
| <button class="text-gray-600 hover:text-gray-900"><i class="fas fa-ellipsis-v"></i></button> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">#ORD-2023-004</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">David Wilson</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">May 12, 2023</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$42.99</td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <span class="px-2 inline-flex text-xs leading-5 font-semibold rounded-full bg-red-100 text-red-800">Cancelled</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> | |
| <button class="text-indigo-600 hover:text-indigo-900 mr-3"><i class="fas fa-eye"></i></button> | |
| <button class="text-gray-600 hover:text-gray-900"><i class="fas fa-ellipsis-v"></i></button> | |
| </td> | |
| </tr> | |
| <tr> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-900">#ORD-2023-005</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Lisa Thompson</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">May 11, 2023</td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">$179.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-blue-100 text-blue-800">Shipped</span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500"> | |
| <button class="text-indigo-600 hover:text-indigo-900 mr-3"><i class="fas fa-eye"></i></button> | |
| <button class="text-gray-600 hover:text-gray-900"><i class="fas fa-ellipsis-v"></i></button> | |
| </td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| </div> | |
| </main> | |
| </div> | |
| </div> | |
| <script> | |
| // Toggle mobile menu | |
| document.getElementById('menu-toggle').addEventListener('click', function() { | |
| const sidebar = document.querySelector('.sidebar'); | |
| sidebar.classList.toggle('open'); | |
| }); | |
| // Sales Chart | |
| const salesCtx = document.getElementById('salesChart').getContext('2d'); | |
| const salesChart = new Chart(salesCtx, { | |
| type: 'line', | |
| data: { | |
| labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], | |
| datasets: [{ | |
| label: 'Sales', | |
| data: [4500, 5200, 4800, 6100, 7800, 8500, 9200, 8800, 9500, 10200, 11500, 12500], | |
| borderColor: '#ef4444', | |
| backgroundColor: 'rgba(239, 68, 68, 0.1)', | |
| borderWidth: 2, | |
| fill: true, | |
| tension: 0.4 | |
| }] | |
| }, | |
| options: { | |
| responsive: true, | |
| plugins: { | |
| legend: { | |
| display: false | |
| } | |
| }, | |
| scales: { | |
| y: { | |
| beginAtZero: true, | |
| grid: { | |
| drawBorder: false | |
| } | |
| }, | |
| x: { | |
| grid: { | |
| display: false | |
| } | |
| } | |
| } | |
| } | |
| }); | |
| // Revenue Chart | |
| const revenueCtx = document.getElementById('revenueChart').getContext('2d'); | |
| const revenueChart = new Chart(revenueCtx, { | |
| type: 'doughnut', | |
| data: { | |
| labels: ['Product A', 'Product B', 'Product C', 'Product D'], | |
| datasets: [{ | |
| data: [35, 25, 20, 20], | |
| backgroundColor: [ | |
| '#ef4444', | |
| '#dc2626', | |
| '#b91c1c', | |
| '#991b1b' | |
| ], | |
| borderWidth: 0 | |
| }] | |
| }, | |
| options: { | |
| responsive: true, | |
| cutout: '70%', | |
| plugins: { | |
| legend: { | |
| position: 'bottom' | |
| } | |
| } | |
| } | |
| }); | |
| // Dark mode toggle | |
| const darkModeToggle = document.getElementById('dark-mode-toggle'); | |
| darkModeToggle.addEventListener('click', function() { | |
| document.documentElement.classList.toggle('dark'); | |
| localStorage.setItem('darkMode', document.documentElement.classList.contains('dark')); | |
| }); | |
| // Check for saved dark mode preference | |
| if (localStorage.getItem('darkMode') === 'true') { | |
| document.documentElement.classList.add('dark'); | |
| } | |
| // Sample data for adding new sales | |
| document.querySelector('button.bg-indigo-600').addEventListener('click', function() { | |
| alert('Add new sale functionality would go here. In a real app, this would open a form to add a new sale record.'); | |
| }); | |
| </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=Alexandro556/my-app" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |