Spaces:
Running
Running
Download index.html from Stakal/paytracker2: direct link, hf CLI and curl.
- Browser
- Download file 39.5 kB
-
https://huggingface.co/spaces/Stakal/paytracker2/resolve/main/index.html
- Command line
-
hf download hf://spaces/Stakal/paytracker2/index.html
-
curl -L -o index.html https://huggingface.co/spaces/Stakal/paytracker2/resolve/main/index.html
39.5 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>FinTrack - Income & Expenses Tracker</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"> | |
| <style> | |
| :root { | |
| --primary: #4f46e5; | |
| --primary-light: #6366f1; | |
| --secondary: #10b981; | |
| --danger: #ef4444; | |
| --warning: #f59e0b; | |
| } | |
| .sidebar { | |
| transition: all 0.3s ease; | |
| } | |
| .sidebar.collapsed { | |
| width: 70px; | |
| } | |
| .sidebar.collapsed .nav-text { | |
| display: none; | |
| } | |
| .sidebar.collapsed .logo-text { | |
| display: none; | |
| } | |
| .sidebar.collapsed .expand-icon { | |
| transform: rotate(180deg); | |
| } | |
| .chart-container { | |
| height: 300px; | |
| } | |
| .transaction-card:hover { | |
| transform: translateY(-2px); | |
| box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); | |
| } | |
| .progress-bar { | |
| height: 8px; | |
| border-radius: 4px; | |
| background-color: #e5e7eb; | |
| } | |
| .progress-bar-fill { | |
| height: 100%; | |
| border-radius: 4px; | |
| transition: width 0.5s ease; | |
| } | |
| .dropdown-content { | |
| display: none; | |
| position: absolute; | |
| right: 0; | |
| min-width: 160px; | |
| z-index: 1; | |
| } | |
| .dropdown:hover .dropdown-content { | |
| display: block; | |
| } | |
| @media (max-width: 768px) { | |
| .sidebar { | |
| position: fixed; | |
| z-index: 50; | |
| transform: translateX(-100%); | |
| } | |
| .sidebar.active { | |
| transform: translateX(0); | |
| } | |
| .main-content { | |
| margin-left: 0; | |
| } | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-50"> | |
| <div class="flex h-screen overflow-hidden"> | |
| <!-- Sidebar --> | |
| <div class="sidebar bg-white shadow-lg w-64 flex flex-col"> | |
| <div class="p-4 flex items-center justify-between border-b"> | |
| <div class="flex items-center"> | |
| <div class="w-10 h-10 rounded-full bg-indigo-100 flex items-center justify-center"> | |
| <i class="fas fa-wallet text-indigo-600"></i> | |
| </div> | |
| <span class="logo-text ml-3 text-xl font-semibold text-gray-800">FinTrack</span> | |
| </div> | |
| <button id="toggleSidebar" class="expand-icon text-gray-500 hover:text-gray-700 transition-transform"> | |
| <i class="fas fa-chevron-left"></i> | |
| </button> | |
| </div> | |
| <div class="flex-1 overflow-y-auto"> | |
| <nav class="p-4"> | |
| <div class="mb-6"> | |
| <p class="text-xs uppercase text-gray-500 font-semibold mb-2 nav-text">Main</p> | |
| <ul> | |
| <li> | |
| <a href="#" class="flex items-center p-2 text-indigo-600 rounded-lg bg-indigo-50"> | |
| <i class="fas fa-home"></i> | |
| <span class="nav-text ml-3">Dashboard</span> | |
| </a> | |
| </li> | |
| <li> | |
| <a href="#" class="flex items-center p-2 text-gray-600 hover:text-indigo-600 hover:bg-indigo-50 rounded-lg"> | |
| <i class="fas fa-exchange-alt"></i> | |
| <span class="nav-text ml-3">Transactions</span> | |
| </a> | |
| </li> | |
| <li> | |
| <a href="#" class="flex items-center p-2 text-gray-600 hover:text-indigo-600 hover:bg-indigo-50 rounded-lg"> | |
| <i class="fas fa-chart-pie"></i> | |
| <span class="nav-text ml-3">Reports</span> | |
| </a> | |
| </li> | |
| </ul> | |
| </div> | |
| <div class="mb-6"> | |
| <p class="text-xs uppercase text-gray-500 font-semibold mb-2 nav-text">Management</p> | |
| <ul> | |
| <li> | |
| <a href="#" class="flex items-center p-2 text-gray-600 hover:text-indigo-600 hover:bg-indigo-50 rounded-lg"> | |
| <i class="fas fa-tags"></i> | |
| <span class="nav-text ml-3">Categories</span> | |
| </a> | |
| </li> | |
| <li> | |
| <a href="#" class="flex items-center p-2 text-gray-600 hover:text-indigo-600 hover:bg-indigo-50 rounded-lg"> | |
| <i class="fas fa-users"></i> | |
| <span class="nav-text ml-3">Clients</span> | |
| </a> | |
| </li> | |
| <li> | |
| <a href="#" class="flex items-center p-2 text-gray-600 hover:text-indigo-600 hover:bg-indigo-50 rounded-lg"> | |
| <i class="fas fa-truck"></i> | |
| <span class="nav-text ml-3">Suppliers</span> | |
| </a> | |
| </li> | |
| </ul> | |
| </div> | |
| <div class="mb-6"> | |
| <p class="text-xs uppercase text-gray-500 font-semibold mb-2 nav-text">Settings</p> | |
| <ul> | |
| <li> | |
| <a href="#" class="flex items-center p-2 text-gray-600 hover:text-indigo-600 hover:bg-indigo-50 rounded-lg"> | |
| <i class="fas fa-cog"></i> | |
| <span class="nav-text ml-3">Preferences</span> | |
| </a> | |
| </li> | |
| <li> | |
| <a href="#" class="flex items-center p-2 text-gray-600 hover:text-indigo-600 hover:bg-indigo-50 rounded-lg"> | |
| <i class="fas fa-user-shield"></i> | |
| <span class="nav-text ml-3">Account</span> | |
| </a> | |
| </li> | |
| </ul> | |
| </div> | |
| </nav> | |
| </div> | |
| <div class="p-4 border-t"> | |
| <div class="flex items-center"> | |
| <img src="https://randomuser.me/api/portraits/women/44.jpg" alt="User" class="w-10 h-10 rounded-full"> | |
| <div class="ml-3 nav-text"> | |
| <p class="text-sm font-medium text-gray-800">Sarah Johnson</p> | |
| <p class="text-xs text-gray-500">Admin</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Main Content --> | |
| <div class="main-content flex-1 overflow-auto"> | |
| <!-- Top Navigation --> | |
| <header class="bg-white shadow-sm"> | |
| <div class="px-6 py-4 flex items-center justify-between"> | |
| <div class="flex items-center"> | |
| <button id="mobileMenuButton" class="md:hidden text-gray-500 mr-4"> | |
| <i class="fas fa-bars text-xl"></i> | |
| </button> | |
| <h1 class="text-xl font-semibold text-gray-800">Dashboard</h1> | |
| </div> | |
| <div class="flex items-center space-x-4"> | |
| <div class="relative"> | |
| <button class="text-gray-500 hover:text-gray-700"> | |
| <i class="fas fa-bell text-xl"></i> | |
| <span class="absolute top-0 right-0 w-2 h-2 bg-red-500 rounded-full"></span> | |
| </button> | |
| </div> | |
| <div class="dropdown relative"> | |
| <button class="flex items-center space-x-2"> | |
| <span class="text-gray-700 font-medium hidden md:inline">Sarah J.</span> | |
| <img src="https://randomuser.me/api/portraits/women/44.jpg" alt="User" class="w-8 h-8 rounded-full"> | |
| </button> | |
| <div class="dropdown-content mt-2 py-2 bg-white rounded-md shadow-lg"> | |
| <a href="#" class="block px-4 py-2 text-gray-700 hover:bg-gray-100">Profile</a> | |
| <a href="#" class="block px-4 py-2 text-gray-700 hover:bg-gray-100">Settings</a> | |
| <a href="#" class="block px-4 py-2 text-gray-700 hover:bg-gray-100">Logout</a> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </header> | |
| <!-- Dashboard Content --> | |
| <main class="p-6"> | |
| <!-- Summary Cards --> | |
| <div class="grid grid-cols-1 md:grid-cols-3 gap-6 mb-6"> | |
| <div class="bg-white rounded-xl shadow-sm p-6"> | |
| <div class="flex items-center justify-between"> | |
| <div> | |
| <p class="text-sm font-medium text-gray-500">Total Income</p> | |
| <p class="text-2xl font-bold text-green-600 mt-1">$12,450.00</p> | |
| <p class="text-xs text-green-500 mt-1"><i class="fas fa-arrow-up mr-1"></i> 12% from last month</p> | |
| </div> | |
| <div class="w-12 h-12 rounded-full bg-green-100 flex items-center justify-center"> | |
| <i class="fas fa-money-bill-wave text-green-600 text-xl"></i> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-xl shadow-sm p-6"> | |
| <div class="flex items-center justify-between"> | |
| <div> | |
| <p class="text-sm font-medium text-gray-500">Total Expenses</p> | |
| <p class="text-2xl font-bold text-red-600 mt-1">$8,720.50</p> | |
| <p class="text-xs text-red-500 mt-1"><i class="fas fa-arrow-up mr-1"></i> 8% from last month</p> | |
| </div> | |
| <div class="w-12 h-12 rounded-full bg-red-100 flex items-center justify-center"> | |
| <i class="fas fa-shopping-cart text-red-600 text-xl"></i> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-xl shadow-sm p-6"> | |
| <div class="flex items-center justify-between"> | |
| <div> | |
| <p class="text-sm font-medium text-gray-500">Balance</p> | |
| <p class="text-2xl font-bold text-indigo-600 mt-1">$3,729.50</p> | |
| <p class="text-xs text-indigo-500 mt-1"><i class="fas fa-arrow-up mr-1"></i> 4% from last month</p> | |
| </div> | |
| <div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center"> | |
| <i class="fas fa-wallet text-indigo-600 text-xl"></i> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Charts Section --> | |
| <div class="grid grid-cols-1 lg:grid-cols-2 gap-6 mb-6"> | |
| <div class="bg-white rounded-xl shadow-sm p-6"> | |
| <div class="flex items-center justify-between mb-4"> | |
| <h2 class="text-lg font-semibold text-gray-800">Income vs Expenses</h2> | |
| <select class="text-sm border-gray-300 rounded-md focus:ring-indigo-500 focus:border-indigo-500"> | |
| <option>This Month</option> | |
| <option>Last Month</option> | |
| <option>This Year</option> | |
| </select> | |
| </div> | |
| <div class="chart-container"> | |
| <canvas id="incomeExpenseChart"></canvas> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-xl shadow-sm p-6"> | |
| <div class="flex items-center justify-between mb-4"> | |
| <h2 class="text-lg font-semibold text-gray-800">Expense Categories</h2> | |
| <select class="text-sm border-gray-300 rounded-md focus:ring-indigo-500 focus:border-indigo-500"> | |
| <option>This Month</option> | |
| <option>Last Month</option> | |
| <option>This Year</option> | |
| </select> | |
| </div> | |
| <div class="chart-container"> | |
| <canvas id="expenseCategoriesChart"></canvas> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Recent Transactions --> | |
| <div class="bg-white rounded-xl shadow-sm p-6 mb-6"> | |
| <div class="flex items-center justify-between mb-6"> | |
| <h2 class="text-lg font-semibold text-gray-800">Recent Transactions</h2> | |
| <button class="bg-indigo-600 text-white px-4 py-2 rounded-md text-sm font-medium hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500"> | |
| <i class="fas fa-plus mr-2"></i> Add Transaction | |
| </button> | |
| </div> | |
| <div class="overflow-x-auto"> | |
| <table class="min-w-full divide-y divide-gray-200"> | |
| <thead class="bg-gray-50"> | |
| <tr> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Date</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Description</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Category</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Amount</th> | |
| <th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">Actions</th> | |
| </tr> | |
| </thead> | |
| <tbody class="bg-white divide-y divide-gray-200"> | |
| <tr class="hover:bg-gray-50"> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Jun 12, 2023</td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="flex items-center"> | |
| <div class="flex-shrink-0 h-10 w-10 rounded-full bg-green-100 flex items-center justify-center"> | |
| <i class="fas fa-money-bill-wave text-green-600"></i> | |
| </div> | |
| <div class="ml-4"> | |
| <div class="text-sm font-medium text-gray-900">Freelance Payment</div> | |
| <div class="text-sm text-gray-500">Client: ABC Corp</div> | |
| </div> | |
| </div> | |
| </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"> | |
| Income | |
| </span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-green-600">$1,250.00</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-edit"></i></button> | |
| <button class="text-red-600 hover:text-red-900"><i class="fas fa-trash"></i></button> | |
| </td> | |
| </tr> | |
| <tr class="hover:bg-gray-50"> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Jun 10, 2023</td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="flex items-center"> | |
| <div class="flex-shrink-0 h-10 w-10 rounded-full bg-red-100 flex items-center justify-center"> | |
| <i class="fas fa-utensils text-red-600"></i> | |
| </div> | |
| <div class="ml-4"> | |
| <div class="text-sm font-medium text-gray-900">Dinner with Client</div> | |
| <div class="text-sm text-gray-500">Supplier: Gourmet Restaurant</div> | |
| </div> | |
| </div> | |
| </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"> | |
| Food & Dining | |
| </span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-red-600">$85.50</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-edit"></i></button> | |
| <button class="text-red-600 hover:text-red-900"><i class="fas fa-trash"></i></button> | |
| </td> | |
| </tr> | |
| <tr class="hover:bg-gray-50"> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Jun 8, 2023</td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="flex items-center"> | |
| <div class="flex-shrink-0 h-10 w-10 rounded-full bg-blue-100 flex items-center justify-center"> | |
| <i class="fas fa-lightbulb text-blue-600"></i> | |
| </div> | |
| <div class="ml-4"> | |
| <div class="text-sm font-medium text-gray-900">Electricity Bill</div> | |
| <div class="text-sm text-gray-500">Supplier: Power Company</div> | |
| </div> | |
| </div> | |
| </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"> | |
| Utilities | |
| </span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-red-600">$120.75</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-edit"></i></button> | |
| <button class="text-red-600 hover:text-red-900"><i class="fas fa-trash"></i></button> | |
| </td> | |
| </tr> | |
| <tr class="hover:bg-gray-50"> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm text-gray-500">Jun 5, 2023</td> | |
| <td class="px-6 py-4 whitespace-nowrap"> | |
| <div class="flex items-center"> | |
| <div class="flex-shrink-0 h-10 w-10 rounded-full bg-green-100 flex items-center justify-center"> | |
| <i class="fas fa-money-bill-wave text-green-600"></i> | |
| </div> | |
| <div class="ml-4"> | |
| <div class="text-sm font-medium text-gray-900">Consulting Fee</div> | |
| <div class="text-sm text-gray-500">Client: XYZ Ltd</div> | |
| </div> | |
| </div> | |
| </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"> | |
| Income | |
| </span> | |
| </td> | |
| <td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-green-600">$2,500.00</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-edit"></i></button> | |
| <button class="text-red-600 hover:text-red-900"><i class="fas fa-trash"></i></button> | |
| </td> | |
| </tr> | |
| </tbody> | |
| </table> | |
| </div> | |
| <div class="mt-4 flex items-center justify-between"> | |
| <div class="text-sm text-gray-500"> | |
| Showing <span class="font-medium">1</span> to <span class="font-medium">4</span> of <span class="font-medium">24</span> transactions | |
| </div> | |
| <div class="flex space-x-2"> | |
| <button class="px-3 py-1 border rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50"> | |
| Previous | |
| </button> | |
| <button class="px-3 py-1 border rounded-md text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700"> | |
| 1 | |
| </button> | |
| <button class="px-3 py-1 border rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50"> | |
| 2 | |
| </button> | |
| <button class="px-3 py-1 border rounded-md text-sm font-medium text-gray-700 bg-white hover:bg-gray-50"> | |
| Next | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Budget Overview --> | |
| <div class="bg-white rounded-xl shadow-sm p-6"> | |
| <div class="flex items-center justify-between mb-6"> | |
| <h2 class="text-lg font-semibold text-gray-800">Budget Overview</h2> | |
| <button class="text-indigo-600 hover:text-indigo-800 text-sm font-medium"> | |
| <i class="fas fa-plus mr-1"></i> Add Budget | |
| </button> | |
| </div> | |
| <div class="space-y-4"> | |
| <div> | |
| <div class="flex justify-between mb-1"> | |
| <span class="text-sm font-medium text-gray-700">Food & Dining</span> | |
| <span class="text-sm text-gray-500">$320 / $500</span> | |
| </div> | |
| <div class="progress-bar"> | |
| <div class="progress-bar-fill bg-yellow-500" style="width: 64%"></div> | |
| </div> | |
| </div> | |
| <div> | |
| <div class="flex justify-between mb-1"> | |
| <span class="text-sm font-medium text-gray-700">Transportation</span> | |
| <span class="text-sm text-gray-500">$150 / $300</span> | |
| </div> | |
| <div class="progress-bar"> | |
| <div class="progress-bar-fill bg-blue-500" style="width: 50%"></div> | |
| </div> | |
| </div> | |
| <div> | |
| <div class="flex justify-between mb-1"> | |
| <span class="text-sm font-medium text-gray-700">Entertainment</span> | |
| <span class="text-sm text-gray-500">$75 / $200</span> | |
| </div> | |
| <div class="progress-bar"> | |
| <div class="progress-bar-fill bg-purple-500" style="width: 37.5%"></div> | |
| </div> | |
| </div> | |
| <div> | |
| <div class="flex justify-between mb-1"> | |
| <span class="text-sm font-medium text-gray-700">Utilities</span> | |
| <span class="text-sm text-gray-500">$210 / $250</span> | |
| </div> | |
| <div class="progress-bar"> | |
| <div class="progress-bar-fill bg-red-500" style="width: 84%"></div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </main> | |
| </div> | |
| </div> | |
| <!-- Add Transaction Modal (hidden by default) --> | |
| <div id="transactionModal" class="fixed inset-0 z-50 hidden overflow-y-auto"> | |
| <div class="flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0"> | |
| <div class="fixed inset-0 transition-opacity" aria-hidden="true"> | |
| <div class="absolute inset-0 bg-gray-500 opacity-75"></div> | |
| </div> | |
| <span class="hidden sm:inline-block sm:align-middle sm:h-screen" aria-hidden="true">​</span> | |
| <div class="inline-block align-bottom bg-white rounded-lg text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full"> | |
| <div class="bg-white px-4 pt-5 pb-4 sm:p-6 sm:pb-4"> | |
| <div class="sm:flex sm:items-start"> | |
| <div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left w-full"> | |
| <h3 class="text-lg leading-6 font-medium text-gray-900 mb-4" id="modal-title"> | |
| Add New Transaction | |
| </h3> | |
| <div class="mt-2"> | |
| <div class="grid grid-cols-1 gap-y-4"> | |
| <div> | |
| <label for="transactionType" class="block text-sm font-medium text-gray-700">Type</label> | |
| <select id="transactionType" class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md"> | |
| <option value="income">Income</option> | |
| <option value="expense">Expense</option> | |
| </select> | |
| </div> | |
| <div> | |
| <label for="amount" class="block text-sm font-medium text-gray-700">Amount</label> | |
| <input type="number" id="amount" class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"> | |
| </div> | |
| <div> | |
| <label for="description" class="block text-sm font-medium text-gray-700">Description</label> | |
| <input type="text" id="description" class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"> | |
| </div> | |
| <div> | |
| <label for="category" class="block text-sm font-medium text-gray-700">Category</label> | |
| <select id="category" class="mt-1 block w-full pl-3 pr-10 py-2 text-base border-gray-300 focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm rounded-md"> | |
| <option value="">Select a category</option> | |
| <optgroup label="Income"> | |
| <option value="salary">Salary</option> | |
| <option value="freelance">Freelance</option> | |
| <option value="investment">Investment</option> | |
| </optgroup> | |
| <optgroup label="Expenses"> | |
| <option value="food">Food & Dining</option> | |
| <option value="transport">Transportation</option> | |
| <option value="utilities">Utilities</option> | |
| <option value="entertainment">Entertainment</option> | |
| </optgroup> | |
| </select> | |
| </div> | |
| <div> | |
| <label for="date" class="block text-sm font-medium text-gray-700">Date</label> | |
| <input type="date" id="date" class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"> | |
| </div> | |
| <div> | |
| <label for="attachment" class="block text-sm font-medium text-gray-700">Attachment (optional)</label> | |
| <input type="file" id="attachment" class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md"> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-gray-50 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse"> | |
| <button type="button" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-indigo-600 text-base font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:ml-3 sm:w-auto sm:text-sm"> | |
| Save | |
| </button> | |
| <button type="button" id="cancelTransaction" class="mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-base font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"> | |
| Cancel | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <script src="https://cdn.jsdelivr.net/npm/chart.js"></script> | |
| <script> | |
| // Toggle sidebar | |
| document.getElementById('toggleSidebar').addEventListener('click', function() { | |
| document.querySelector('.sidebar').classList.toggle('collapsed'); | |
| }); | |
| // Mobile menu toggle | |
| document.getElementById('mobileMenuButton').addEventListener('click', function() { | |
| document.querySelector('.sidebar').classList.toggle('active'); | |
| }); | |
| // Transaction modal | |
| const transactionModal = document.getElementById('transactionModal'); | |
| const cancelTransaction = document.getElementById('cancelTransaction'); | |
| // Open modal when "Add Transaction" button is clicked | |
| document.querySelectorAll('button').forEach(button => { | |
| if (button.textContent.includes('Add Transaction')) { | |
| button.addEventListener('click', function() { | |
| transactionModal.classList.remove('hidden'); | |
| }); | |
| } | |
| }); | |
| // Close modal | |
| cancelTransaction.addEventListener('click', function() { | |
| transactionModal.classList.add('hidden'); | |
| }); | |
| // Close modal when clicking outside | |
| window.addEventListener('click', function(event) { | |
| if (event.target === transactionModal) { | |
| transactionModal.classList.add('hidden'); | |
| } | |
| }); | |
| // Charts | |
| document.addEventListener('DOMContentLoaded', function() { | |
| // Income vs Expenses Chart | |
| const incomeExpenseCtx = document.getElementById('incomeExpenseChart').getContext('2d'); | |
| const incomeExpenseChart = new Chart(incomeExpenseCtx, { | |
| type: 'bar', | |
| data: { | |
| labels: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun'], | |
| datasets: [ | |
| { | |
| label: 'Income', | |
| data: [1200, 1900, 1500, 2000, 1800, 2200], | |
| backgroundColor: '#10B981', | |
| borderRadius: 4 | |
| }, | |
| { | |
| label: 'Expenses', | |
| data: [800, 1100, 900, 1200, 1000, 1400], | |
| backgroundColor: '#EF4444', | |
| borderRadius: 4 | |
| } | |
| ] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| scales: { | |
| y: { | |
| beginAtZero: true | |
| } | |
| }, | |
| plugins: { | |
| legend: { | |
| position: 'top', | |
| } | |
| } | |
| } | |
| }); | |
| // Expense Categories Chart | |
| const expenseCategoriesCtx = document.getElementById('expenseCategoriesChart').getContext('2d'); | |
| const expenseCategoriesChart = new Chart(expenseCategoriesCtx, { | |
| type: 'doughnut', | |
| data: { | |
| labels: ['Food & Dining', 'Transportation', 'Utilities', 'Entertainment', 'Shopping'], | |
| datasets: [{ | |
| data: [320, 150, 210, 75, 120], | |
| backgroundColor: [ | |
| '#F59E0B', | |
| '#3B82F6', | |
| '#EF4444', | |
| '#8B5CF6', | |
| '#EC4899' | |
| ], | |
| borderWidth: 0 | |
| }] | |
| }, | |
| options: { | |
| responsive: true, | |
| maintainAspectRatio: false, | |
| plugins: { | |
| legend: { | |
| position: 'right', | |
| } | |
| } | |
| } | |
| }); | |
| }); | |
| </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=Stakal/paytracker2" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |