Spaces:
Running
Running
File size: 25,372 Bytes
07688b1 7bb82cc | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>ExpenseSync - Track Shared Expenses</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>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#3B82F6',
secondary: '#10B981',
accent: '#8B5CF6',
dark: '#1F2937',
light: '#F9FAFB'
}
}
}
}
</script>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
body {
font-family: 'Inter', sans-serif;
}
.gradient-bg {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.glass-effect {
background: rgba(255, 255, 255, 0.1);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.2);
}
.expense-card {
transition: all 0.3s ease;
}
.expense-card:hover {
transform: translateY(-5px);
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
.chart-container {
position: relative;
height: 300px;
}
</style>
</head>
<body class="bg-gray-50">
<!-- Navigation -->
<nav class="bg-white shadow-sm border-b border-gray-200">
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8">
<div class="flex justify-between h-16">
<div class="flex items-center">
<div class="flex-shrink-0 flex items-center">
<i data-feather="dollar-sign" class="h-8 w-8 text-primary"></i>
<span class="ml-2 text-xl font-bold text-gray-900">ExpenseSync</span>
</div>
<div class="hidden sm:ml-6 sm:flex sm:space-x-8">
<a href="index.html" class="border-primary text-gray-900 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
Dashboard
</a>
<a href="#" class="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
Expenses
</a>
<a href="#" class="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
Reports
</a>
<a href="settings.html" class="border-transparent text-gray-500 hover:border-gray-300 hover:text-gray-700 inline-flex items-center px-1 pt-1 border-b-2 text-sm font-medium">
Settings
</a>
</div>
</div>
<div class="flex items-center">
<button class="bg-primary text-white px-4 py-2 rounded-md text-sm font-medium hover:bg-blue-600 transition duration-200">
<i data-feather="plus" class="w-4 h-4 inline mr-1"></i>
Add Expense
</button>
<div class="ml-3 relative">
<div>
<button class="bg-gray-800 flex text-sm rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-800 focus:ring-white">
<img class="h-8 w-8 rounded-full" src="http://static.photos/people/200x200/1" alt="Profile">
</button>
</div>
</div>
</div>
</div>
</div>
</nav>
<!-- Main Content -->
<div class="max-w-7xl mx-auto py-6 sm:px-6 lg:px-8">
<!-- Header -->
<div class="px-4 py-6 sm:px-0">
<div class="flex flex-col md:flex-row md:items-center md:justify-between">
<div>
<h1 class="text-3xl font-bold text-gray-900">Expense Dashboard</h1>
<p class="mt-2 text-gray-600">Track and manage your shared expenses with your partner</p>
</div>
<div class="mt-4 md:mt-0">
<div class="flex space-x-3">
<div class="bg-white rounded-lg shadow-sm p-4 border border-gray-200">
<div class="flex items-center">
<div class="flex-shrink-0">
<i data-feather="user" class="h-6 w-6 text-blue-500"></i>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-500">You owe</p>
<p class="text-lg font-semibold text-gray-900">$42.50</p>
</div>
</div>
</div>
<div class="bg-white rounded-lg shadow-sm p-4 border border-gray-200">
<div class="flex items-center">
<div class="flex-shrink-0">
<i data-feather="users" class="h-6 w-6 text-green-500"></i>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-500">Partner owes</p>
<p class="text-lg font-semibold text-gray-900">$28.75</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Stats and Recent Expenses -->
<div class="mt-8 grid grid-cols-1 gap-6 lg:grid-cols-3">
<!-- Recent Expenses -->
<div class="lg:col-span-2">
<div class="bg-white shadow-sm rounded-lg overflow-hidden">
<div class="px-6 py-4 border-b border-gray-200">
<h3 class="text-lg font-medium text-gray-900">Recent Expenses</h3>
</div>
<div class="divide-y divide-gray-200">
<!-- Expense Item -->
<div class="px-6 py-4 expense-card">
<div class="flex items-center justify-between">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10 bg-blue-100 rounded-lg flex items-center justify-center">
<i data-feather="shopping-bag" class="h-5 w-5 text-blue-600"></i>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-900">Grocery Shopping</p>
<p class="text-sm text-gray-500">Paid by You • For Both</p>
</div>
</div>
<div class="text-right">
<p class="text-sm font-medium text-gray-900">$85.40</p>
<p class="text-sm text-gray-500">Today</p>
</div>
</div>
</div>
<!-- Expense Item -->
<div class="px-6 py-4 expense-card">
<div class="flex items-center justify-between">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10 bg-green-100 rounded-lg flex items-center justify-center">
<i data-feather="home" class="h-5 w-5 text-green-600"></i>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-900">Electricity Bill</p>
<p class="text-sm text-gray-500">Paid by Partner • For Both</p>
</div>
</div>
<div class="text-right">
<p class="text-sm font-medium text-gray-900">$120.00</p>
<p class="text-sm text-gray-500">Yesterday</p>
</div>
</div>
</div>
<!-- Expense Item -->
<div class="px-6 py-4 expense-card">
<div class="flex items-center justify-between">
<div class="flex items-center">
<div class="flex-shrink-0 h-10 w-10 bg-purple-100 rounded-lg flex items-center justify-center">
<i data-feather="coffee" class="h-5 w-5 text-purple-600"></i>
</div>
<div class="ml-4">
<p class="text-sm font-medium text-gray-900">Coffee</p>
<p class="text-sm text-gray-500">Paid by You • For Yourself</p>
</div>
</div>
<div class="text-right">
<p class="text-sm font-medium text-gray-900">$4.50</p>
<p class="text-sm text-gray-500">2 days ago</p>
</div>
</div>
</div>
</div>
<div class="px-6 py-4 bg-gray-50 border-t border-gray-200">
<button class="w-full flex justify-center items-center px-4 py-2 border border-gray-300 shadow-sm text-sm font-medium rounded-md text-gray-700 bg-white hover:bg-gray-50">
View All Expenses
</button>
</div>
</div>
</div>
<!-- Quick Add Expense & Categories -->
<div class="space-y-6">
<!-- Quick Add Form -->
<div class="bg-white shadow-sm rounded-lg p-6">
<h3 class="text-lg font-medium text-gray-900 mb-4">Quick Add Expense</h3>
<form class="space-y-4">
<div>
<label for="amount" class="block text-sm font-medium text-gray-700">Amount</label>
<input type="number" id="amount" name="amount" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-primary focus:border-primary">
</div>
<div>
<label for="description" class="block text-sm font-medium text-gray-700">Description</label>
<input type="text" id="description" name="description" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-primary focus:border-primary">
</div>
<div class="grid grid-cols-2 gap-4">
<div>
<label for="paidBy" class="block text-sm font-medium text-gray-700">Paid By</label>
<select id="paidBy" name="paidBy" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-primary focus:border-primary">
<option>You</option>
<option>Partner</option>
</select>
</div>
<div>
<label for="forWhom" class="block text-sm font-medium text-gray-700">For Whom</label>
<select id="forWhom" name="forWhom" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-primary focus:border-primary">
<option>Both</option>
<option>Yourself</option>
<option>Partner</option>
</select>
</div>
</div>
<button type="submit" class="w-full flex justify-center py-2 px-4 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-primary hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary">
Add Expense
</button>
</form>
</div>
<!-- Category Breakdown -->
<div class="bg-white shadow-sm rounded-lg p-6">
<h3 class="text-lg font-medium text-gray-900 mb-4">Spending by Category</h3>
<div class="space-y-3">
<div class="flex items-center justify-between">
<div class="flex items-center">
<div class="w-3 h-3 rounded-full bg-blue-500 mr-2"></div>
<span class="text-sm text-gray-700">Food & Dining</span>
</div>
<span class="text-sm font-medium text-gray-900">$245.60</span>
</div>
<div class="flex items-center justify-between">
<div class="flex items-center">
<div class="w-3 h-3 rounded-full bg-green-500 mr-2"></div>
<span class="text-sm text-gray-700">Utilities</span>
</div>
<span class="text-sm font-medium text-gray-900">$189.30</span>
</div>
<div class="flex items-center justify-between">
<div class="flex items-center">
<div class="w-3 h-3 rounded-full bg-purple-500 mr-2"></div>
<span class="text-sm text-gray-700">Entertainment</span>
</div>
<span class="text-sm font-medium text-gray-900">$75.00</span>
</div>
<div class="flex items-center justify-between">
<div class="flex items-center">
<div class="w-3 h-3 rounded-full bg-yellow-500 mr-2"></div>
<span class="text-sm text-gray-700">Transportation</span>
</div>
<span class="text-sm font-medium text-gray-900">$42.50</span>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Add Expense Modal -->
<div id="expenseModal" class="fixed inset-0 overflow-y-auto hidden" aria-labelledby="modal-title" role="dialog" aria-modal="true">
<div class="flex items-end justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0">
<div class="fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity" aria-hidden="true"></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 px-4 pt-5 pb-4 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full sm:p-6">
<div>
<div class="mt-3 text-center sm:mt-5">
<h3 class="text-lg leading-6 font-medium text-gray-900" id="modal-title">
Add New Expense
</h3>
<div class="mt-6 space-y-4">
<div class="grid grid-cols-2 gap-4">
<div>
<label for="modal-date" class="block text-sm font-medium text-gray-700">Date</label>
<input type="date" id="modal-date" name="date" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-primary focus:border-primary">
</div>
<div>
<label for="modal-amount" class="block text-sm font-medium text-gray-700">Amount</label>
<input type="number" id="modal-amount" name="amount" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-primary focus:border-primary">
</div>
</div>
<div>
<label for="modal-account" class="block text-sm font-medium text-gray-700">Account</label>
<select id="modal-account" name="account" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-primary focus:border-primary">
<option>Cash</option>
<option>Credit Card</option>
<option>Debit Card</option>
<option>Bank Transfer</option>
</select>
</div>
<div>
<label for="modal-description" class="block text-sm font-medium text-gray-700">Description</label>
<input type="text" id="modal-description" name="description" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-primary focus:border-primary">
</div>
<div>
<label for="modal-payment" class="block text-sm font-medium text-gray-700">Payment Mode</label>
<select id="modal-payment" name="payment" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-primary focus:border-primary">
<option>Online</option>
<option>Cash</option>
<option>Card</option>
<option>UPI</option>
</select>
</div>
<div>
<label for="modal-location" class="block text-sm font-medium text-gray-700">Location</label>
<input type="text" id="modal-location" name="location" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-primary focus:border-primary">
</div>
<div>
<label for="modal-category" class="block text-sm font-medium text-gray-700">Category</label>
<select id="modal-category" name="category" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-primary focus:border-primary">
<option>Food & Dining</option>
<option>Utilities</option>
<option>Entertainment</option>
<option>Transportation</option>
<option>Shopping</option>
<option>Healthcare</option>
<option>Other</option>
</select>
</div>
<div class="grid grid-cols-2 gap-4">
<div>
<label for="modal-paidBy" class="block text-sm font-medium text-gray-700">Paid By</label>
<select id="modal-paidBy" name="paidBy" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-primary focus:border-primary">
<option>You</option>
<option>Partner</option>
</select>
</div>
<div>
<label for="modal-forWhom" class="block text-sm font-medium text-gray-700">For Whom</label>
<select id="modal-forWhom" name="forWhom" class="mt-1 block w-full border border-gray-300 rounded-md shadow-sm py-2 px-3 focus:outline-none focus:ring-primary focus:border-primary">
<option>Both</option>
<option>Yourself</option>
<option>Partner</option>
</select>
</div>
</div>
</div>
</div>
<div class="mt-5 sm:mt-6 sm:grid sm:grid-cols-2 sm:gap-3 sm:grid-flow-row-dense">
<button type="button" class="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-primary text-base font-medium text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-primary sm:text-sm">
Add Expense
</button>
<button type="button" 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-primary sm:mt-0 sm:text-sm">
Cancel
</button>
</div>
</div>
</div>
</div>
</div>
<script>
// Initialize Feather Icons
feather.replace();
// Modal functionality
const modal = document.getElementById('expenseModal');
const addExpenseBtn = document.querySelector('button.bg-primary');
const cancelBtn = modal.querySelector('button[type="button"]:nth-child(2)');
const modalCloseBtn = modal.querySelector('.bg-gray-500');
addExpenseBtn.addEventListener('click', () => {
modal.classList.remove('hidden');
});
// Close modal when clicking cancel or outside
cancelBtn.addEventListener('click', () => {
modal.classList.add('hidden');
});
modalCloseBtn.addEventListener('click', () => {
modal.classList.add('hidden');
});
modal.addEventListener('click', (e) => {
if (e.target === modal) {
modal.classList.add('hidden');
}
});
// Set today's date as default
document.getElementById('modal-date').valueAsDate = new Date();
// Simple animations for cards
document.addEventListener('DOMContentLoaded', function() {
const cards = document.querySelectorAll('.expense-card');
cards.forEach((card, index) => {
card.style.opacity = '0';
card.style.transform = 'translateY(20px)';
setTimeout(() => {
card.style.transition = 'all 0.5s ease';
card.style.opacity = '1';
card.style.transform = 'translateY(0)';
}, index * 100);
});
// Set form values
document.getElementById('modal-date').valueAsDate = new Date();
document.getElementById('modal-amount').value = '';
document.getElementById('modal-description').value = '';
});
</script>
</body>
</html>
|