File size: 64,266 Bytes
cad75a9 | 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 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FinTrack - Smart Financial Management</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 src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<style>
.gradient-bg {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.dashboard-card {
transition: all 0.3s ease;
}
.dashboard-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
.progress-bar {
height: 8px;
border-radius: 4px;
background-color: #e0e0e0;
}
.progress-fill {
height: 100%;
border-radius: 4px;
background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
transition: width 0.5s ease;
}
.tab-active {
border-bottom: 3px solid #4f46e5;
color: #4f46e5;
font-weight: 600;
}
.input-highlight {
border-color: #4f46e5;
box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}
</style>
</head>
<body class="bg-gray-50 font-sans">
<!-- Header -->
<header class="gradient-bg text-white">
<div class="container mx-auto px-4 py-6">
<div class="flex justify-between items-center">
<div class="flex items-center space-x-2">
<i class="fas fa-wallet text-2xl"></i>
<h1 class="text-2xl font-bold">FinTrack</h1>
</div>
<nav class="hidden md:flex space-x-8">
<a href="#features" class="hover:text-indigo-200 transition">Features</a>
<a href="#pricing" class="hover:text-indigo-200 transition">Pricing</a>
<a href="#testimonials" class="hover:text-indigo-200 transition">Testimonials</a>
</nav>
<div class="flex space-x-4">
<button onclick="toggleAuthModal()" class="px-4 py-2 rounded-lg bg-white text-indigo-600 font-medium hover:bg-indigo-50 transition">Sign In</button>
<button class="md:hidden" onclick="toggleMobileMenu()">
<i class="fas fa-bars text-2xl"></i>
</button>
</div>
</div>
</div>
</header>
<!-- Mobile Menu -->
<div id="mobileMenu" class="hidden bg-white shadow-lg rounded-b-lg">
<div class="container mx-auto px-4 py-3 flex flex-col space-y-3">
<a href="#features" class="py-2 hover:text-indigo-600 transition">Features</a>
<a href="#pricing" class="py-2 hover:text-indigo-600 transition">Pricing</a>
<a href="#testimonials" class="py-2 hover:text-indigo-600 transition">Testimonials</a>
</div>
</div>
<!-- Hero Section -->
<section class="gradient-bg text-white py-16">
<div class="container mx-auto px-4 flex flex-col md:flex-row items-center">
<div class="md:w-1/2 mb-10 md:mb-0">
<h2 class="text-4xl md:text-5xl font-bold mb-6">Take Control of Your Finances</h2>
<p class="text-xl mb-8 text-indigo-100">Track income, expenses, set savings goals, and achieve financial freedom with our intuitive platform.</p>
<div class="flex flex-col sm:flex-row space-y-3 sm:space-y-0 sm:space-x-4">
<button onclick="toggleAuthModal('signup')" class="px-6 py-3 bg-white text-indigo-600 rounded-lg font-medium hover:bg-indigo-50 transition">Start Free Trial</button>
<button class="px-6 py-3 border border-white rounded-lg font-medium hover:bg-white hover:bg-opacity-10 transition">Learn More</button>
</div>
</div>
<div class="md:w-1/2 flex justify-center">
<div class="bg-white rounded-xl shadow-2xl p-4 w-full max-w-md">
<img src="https://images.unsplash.com/photo-1554224155-6726b3ff858f?ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=80" alt="Dashboard Preview" class="rounded-lg w-full">
</div>
</div>
</div>
</section>
<!-- Features Section -->
<section id="features" class="py-16 bg-white">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-12">Powerful Features</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
<div class="dashboard-card bg-gray-50 p-6 rounded-xl shadow-sm">
<div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center mb-4">
<i class="fas fa-chart-line text-indigo-600 text-xl"></i>
</div>
<h3 class="text-xl font-semibold mb-3">Income & Expense Tracking</h3>
<p class="text-gray-600">Easily record all your financial transactions and get real-time insights with beautiful visualizations.</p>
</div>
<div class="dashboard-card bg-gray-50 p-6 rounded-xl shadow-sm">
<div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center mb-4">
<i class="fas fa-bullseye text-indigo-600 text-xl"></i>
</div>
<h3 class="text-xl font-semibold mb-3">Savings Goals</h3>
<p class="text-gray-600">Set financial goals and track your progress with automatic reminders and visual progress indicators.</p>
</div>
<div class="dashboard-card bg-gray-50 p-6 rounded-xl shadow-sm">
<div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center mb-4">
<i class="fas fa-piggy-bank text-indigo-600 text-xl"></i>
</div>
<h3 class="text-xl font-semibold mb-3">Auto-Saving</h3>
<p class="text-gray-600">Automatically save a percentage of your income with our smart auto-save feature.</p>
</div>
<div class="dashboard-card bg-gray-50 p-6 rounded-xl shadow-sm">
<div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center mb-4">
<i class="fas fa-mobile-alt text-indigo-600 text-xl"></i>
</div>
<h3 class="text-xl font-semibold mb-3">Bank Integration</h3>
<p class="text-gray-600">Optional integration with your mobile banking to track transactions automatically.</p>
</div>
<div class="dashboard-card bg-gray-50 p-6 rounded-xl shadow-sm">
<div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center mb-4">
<i class="fas fa-calendar-alt text-indigo-600 text-xl"></i>
</div>
<h3 class="text-xl font-semibold mb-3">Future Planning</h3>
<p class="text-gray-600">Plan for future expenses like clothing, subscriptions, and other needs with our forecasting tools.</p>
</div>
<div class="dashboard-card bg-gray-50 p-6 rounded-xl shadow-sm">
<div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center mb-4">
<i class="fas fa-chart-pie text-indigo-600 text-xl"></i>
</div>
<h3 class="text-xl font-semibold mb-3">Profit Analysis</h3>
<p class="text-gray-600">Get clear percentage-based insights into your profit margins and financial health.</p>
</div>
</div>
</div>
</section>
<!-- Pricing Section -->
<section id="pricing" class="py-16 bg-gray-50">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-4">Simple, Transparent Pricing</h2>
<p class="text-center text-gray-600 max-w-2xl mx-auto mb-12">Start with a 7-day free trial. No credit card required.</p>
<div class="max-w-md mx-auto bg-white rounded-xl shadow-md overflow-hidden">
<div class="gradient-bg p-6 text-white">
<h3 class="text-xl font-semibold">Monthly Membership</h3>
<p class="text-indigo-200">Perfect for individuals who want full financial control</p>
</div>
<div class="p-6">
<div class="flex items-baseline mb-4">
<span class="text-4xl font-bold">$9.99</span>
<span class="ml-2 text-gray-600">/month</span>
</div>
<ul class="space-y-3 mb-6">
<li class="flex items-center">
<i class="fas fa-check-circle text-green-500 mr-2"></i>
<span>Unlimited income & expense tracking</span>
</li>
<li class="flex items-center">
<i class="fas fa-check-circle text-green-500 mr-2"></i>
<span>Interactive financial charts</span>
</li>
<li class="flex items-center">
<i class="fas fa-check-circle text-green-500 mr-2"></i>
<span>Savings goals & auto-saving</span>
</li>
<li class="flex items-center">
<i class="fas fa-check-circle text-green-500 mr-2"></i>
<span>Optional bank integration</span>
</li>
<li class="flex items-center">
<i class="fas fa-check-circle text-green-500 mr-2"></i>
<span>Future expense planning</span>
</li>
</ul>
<button onclick="toggleAuthModal('signup')" class="w-full gradient-bg text-white py-3 rounded-lg font-medium hover:opacity-90 transition">Start 7-Day Free Trial</button>
</div>
</div>
</div>
</section>
<!-- Testimonials Section -->
<section id="testimonials" class="py-16 bg-white">
<div class="container mx-auto px-4">
<h2 class="text-3xl font-bold text-center mb-12">What Our Members Say</h2>
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
<div class="bg-gray-50 p-6 rounded-xl shadow-sm">
<div class="flex items-center mb-4">
<div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center mr-4">
<span class="text-indigo-600 font-bold">JD</span>
</div>
<div>
<h4 class="font-semibold">John Doe</h4>
<p class="text-gray-500 text-sm">Small Business Owner</p>
</div>
</div>
<p class="text-gray-600">"FinTrack has completely transformed how I manage my business finances. The profit percentage feature is incredibly insightful."</p>
</div>
<div class="bg-gray-50 p-6 rounded-xl shadow-sm">
<div class="flex items-center mb-4">
<div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center mr-4">
<span class="text-indigo-600 font-bold">AS</span>
</div>
<div>
<h4 class="font-semibold">Alice Smith</h4>
<p class="text-gray-500 text-sm">Freelancer</p>
</div>
</div>
<p class="text-gray-600">"The auto-saving feature helped me build my emergency fund without even thinking about it. Highly recommended!"</p>
</div>
<div class="bg-gray-50 p-6 rounded-xl shadow-sm">
<div class="flex items-center mb-4">
<div class="w-12 h-12 rounded-full bg-indigo-100 flex items-center justify-center mr-4">
<span class="text-indigo-600 font-bold">RJ</span>
</div>
<div>
<h4 class="font-semibold">Robert Johnson</h4>
<p class="text-gray-500 text-sm">Financial Advisor</p>
</div>
</div>
<p class="text-gray-600">"I recommend FinTrack to all my clients. The bank integration makes tracking transactions effortless."</p>
</div>
</div>
</div>
</section>
<!-- Auth Modal -->
<div id="authModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
<div class="bg-white rounded-xl shadow-2xl w-full max-w-md overflow-hidden">
<div class="flex justify-between items-center border-b p-4">
<h3 class="text-xl font-semibold" id="modalTitle">Sign In</h3>
<button onclick="toggleAuthModal()" class="text-gray-500 hover:text-gray-700">
<i class="fas fa-times"></i>
</button>
</div>
<div class="p-6">
<div class="flex border-b mb-6">
<button id="signinTab" class="px-4 py-2 tab-active" onclick="switchAuthTab('signin')">Sign In</button>
<button id="signupTab" class="px-4 py-2 text-gray-600" onclick="switchAuthTab('signup')">Sign Up</button>
</div>
<!-- Sign In Form -->
<form id="signinForm" class="space-y-4">
<div>
<label for="loginEmail" class="block text-sm font-medium text-gray-700 mb-1">Email</label>
<input type="email" id="loginEmail" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500">
</div>
<div>
<label for="loginPassword" class="block text-sm font-medium text-gray-700 mb-1">Password</label>
<input type="password" id="loginPassword" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500">
</div>
<div class="flex items-center justify-between">
<div class="flex items-center">
<input type="checkbox" id="rememberMe" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded">
<label for="rememberMe" class="ml-2 block text-sm text-gray-700">Remember me</label>
</div>
<a href="#" class="text-sm text-indigo-600 hover:text-indigo-500">Forgot password?</a>
</div>
<button type="button" onclick="login()" class="w-full gradient-bg text-white py-2 rounded-lg font-medium hover:opacity-90 transition">Sign In</button>
</form>
<!-- Sign Up Form -->
<form id="signupForm" class="space-y-4 hidden">
<div>
<label for="signupName" class="block text-sm font-medium text-gray-700 mb-1">Full Name</label>
<input type="text" id="signupName" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500">
</div>
<div>
<label for="signupEmail" class="block text-sm font-medium text-gray-700 mb-1">Email</label>
<input type="email" id="signupEmail" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500">
</div>
<div>
<label for="signupPassword" class="block text-sm font-medium text-gray-700 mb-1">Password</label>
<input type="password" id="signupPassword" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500">
</div>
<div>
<label for="signupConfirmPassword" class="block text-sm font-medium text-gray-700 mb-1">Confirm Password</label>
<input type="password" id="signupConfirmPassword" class="w-full px-4 py-2 border rounded-lg focus:outline-none focus:ring-2 focus:ring-indigo-500">
</div>
<div class="flex items-center">
<input type="checkbox" id="acceptTerms" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded">
<label for="acceptTerms" class="ml-2 block text-sm text-gray-700">I agree to the <a href="#" class="text-indigo-600 hover:text-indigo-500">Terms of Service</a> and <a href="#" class="text-indigo-600 hover:text-indigo-500">Privacy Policy</a></label>
</div>
<button type="button" onclick="signup()" class="w-full gradient-bg text-white py-2 rounded-lg font-medium hover:opacity-90 transition">Start Free Trial</button>
</form>
<div class="mt-6 text-center">
<p class="text-sm text-gray-600">Or continue with</p>
<div class="mt-4 flex justify-center space-x-4">
<button class="w-10 h-10 rounded-full border flex items-center justify-center hover:bg-gray-50">
<i class="fab fa-google text-red-500"></i>
</button>
<button class="w-10 h-10 rounded-full border flex items-center justify-center hover:bg-gray-50">
<i class="fab fa-apple text-gray-800"></i>
</button>
<button class="w-10 h-10 rounded-full border flex items-center justify-center hover:bg-gray-50">
<i class="fab fa-facebook-f text-blue-600"></i>
</button>
</div>
</div>
</div>
</div>
</div>
<!-- Dashboard (Hidden by default) -->
<div id="dashboard" class="hidden">
<!-- Dashboard Header -->
<header class="bg-white shadow-sm">
<div class="container mx-auto px-4 py-4 flex justify-between items-center">
<div class="flex items-center space-x-2">
<i class="fas fa-wallet text-2xl text-indigo-600"></i>
<h1 class="text-xl font-bold">FinTrack</h1>
</div>
<div class="flex items-center space-x-4">
<div class="relative">
<button id="notificationsBtn" class="p-2 rounded-full hover:bg-gray-100">
<i class="fas fa-bell text-gray-600"></i>
<span class="absolute top-0 right-0 w-2 h-2 bg-red-500 rounded-full"></span>
</button>
<div id="notificationsDropdown" class="hidden absolute right-0 mt-2 w-64 bg-white rounded-md shadow-lg z-10">
<div class="p-4 border-b">
<h4 class="font-semibold">Notifications</h4>
</div>
<div class="max-h-60 overflow-y-auto">
<a href="#" class="block px-4 py-3 hover:bg-gray-50 border-b">
<p class="text-sm">Your savings goal is 75% complete!</p>
<p class="text-xs text-gray-500 mt-1">2 hours ago</p>
</a>
<a href="#" class="block px-4 py-3 hover:bg-gray-50 border-b">
<p class="text-sm">Auto-save transferred $50 to your savings</p>
<p class="text-xs text-gray-500 mt-1">Yesterday</p>
</a>
<a href="#" class="block px-4 py-3 hover:bg-gray-50">
<p class="text-sm">Subscription renewal in 3 days</p>
<p class="text-xs text-gray-500 mt-1">2 days ago</p>
</a>
</div>
</div>
</div>
<div class="relative">
<button id="profileBtn" class="flex items-center space-x-2">
<div class="w-8 h-8 rounded-full bg-indigo-100 flex items-center justify-center">
<span class="text-indigo-600 font-medium">U</span>
</div>
<span class="hidden md:inline">User</span>
</button>
<div id="profileDropdown" class="hidden absolute right-0 mt-2 w-48 bg-white rounded-md shadow-lg z-10">
<a href="#" class="block px-4 py-2 hover:bg-gray-50">Profile</a>
<a href="#" class="block px-4 py-2 hover:bg-gray-50">Settings</a>
<a href="#" class="block px-4 py-2 hover:bg-gray-50 border-t" onclick="logout()">Sign Out</a>
</div>
</div>
</div>
</div>
</header>
<!-- Main Content -->
<main class="container mx-auto px-4 py-6">
<div class="flex flex-col md:flex-row space-y-6 md:space-y-0 md:space-x-6">
<!-- Sidebar -->
<aside class="md:w-1/4">
<div class="bg-white rounded-lg shadow-sm p-4 sticky top-6">
<nav class="space-y-2">
<a href="#" class="block px-4 py-2 rounded-lg bg-indigo-50 text-indigo-600 font-medium">
<i class="fas fa-home mr-2"></i> Dashboard
</a>
<a href="#" class="block px-4 py-2 rounded-lg hover:bg-gray-50">
<i class="fas fa-chart-pie mr-2"></i> Analytics
</a>
<a href="#" class="block px-4 py-2 rounded-lg hover:bg-gray-50">
<i class="fas fa-exchange-alt mr-2"></i> Transactions
</a>
<a href="#" class="block px-4 py-2 rounded-lg hover:bg-gray-50">
<i class="fas fa-bullseye mr-2"></i> Goals
</a>
<a href="#" class="block px-4 py-2 rounded-lg hover:bg-gray-50">
<i class="fas fa-piggy-bank mr-2"></i> Savings
</a>
<a href="#" class="block px-4 py-2 rounded-lg hover:bg-gray-50">
<i class="fas fa-cog mr-2"></i> Settings
</a>
</nav>
<div class="mt-8 pt-4 border-t">
<h3 class="font-medium mb-2">Quick Actions</h3>
<button onclick="toggleTransactionModal()" class="w-full flex items-center justify-center px-4 py-2 gradient-bg text-white rounded-lg mb-2">
<i class="fas fa-plus mr-2"></i> Add Transaction
</button>
<button onclick="toggleGoalModal()" class="w-full flex items-center justify-center px-4 py-2 border border-indigo-600 text-indigo-600 rounded-lg">
<i class="fas fa-bullseye mr-2"></i> Create Goal
</button>
</div>
</div>
</aside>
<!-- Main Content Area -->
<div class="md:w-3/4 space-y-6">
<!-- Summary Cards -->
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<div class="dashboard-card bg-white p-4 rounded-lg shadow-sm">
<div class="flex justify-between items-start">
<div>
<p class="text-gray-500">Total Balance</p>
<h3 class="text-2xl font-bold mt-1">$5,280.50</h3>
</div>
<div class="p-2 rounded-full bg-green-100 text-green-600">
<i class="fas fa-wallet"></i>
</div>
</div>
<div class="mt-4">
<div class="flex justify-between text-sm">
<span class="text-gray-500">Income</span>
<span class="font-medium">$3,500.00</span>
</div>
<div class="flex justify-between text-sm mt-1">
<span class="text-gray-500">Expenses</span>
<span class="font-medium">$1,219.50</span>
</div>
</div>
</div>
<div class="dashboard-card bg-white p-4 rounded-lg shadow-sm">
<div class="flex justify-between items-start">
<div>
<p class="text-gray-500">Savings</p>
<h3 class="text-2xl font-bold mt-1">$1,750.25</h3>
</div>
<div class="p-2 rounded-full bg-blue-100 text-blue-600">
<i class="fas fa-piggy-bank"></i>
</div>
</div>
<div class="mt-4">
<p class="text-sm text-gray-500 mb-1">Auto-save: 10% of income</p>
<div class="progress-bar">
<div class="progress-fill" style="width: 65%"></div>
</div>
</div>
</div>
<div class="dashboard-card bg-white p-4 rounded-lg shadow-sm">
<div class="flex justify-between items-start">
<div>
<p class="text-gray-500">Net Profit</p>
<h3 class="text-2xl font-bold mt-1">$2,280.50</h3>
</div>
<div class="p-2 rounded-full bg-purple-100 text-purple-600">
<i class="fas fa-chart-line"></i>
</div>
</div>
<div class="mt-4">
<p class="text-sm text-gray-500">Profit margin: <span class="font-medium text-green-600">65.2%</span></p>
<div class="progress-bar mt-1">
<div class="progress-fill" style="width: 65%"></div>
</div>
</div>
</div>
</div>
<!-- Charts -->
<div class="grid grid-cols-1 lg:grid-cols-2 gap-4">
<div class="dashboard-card bg-white p-4 rounded-lg shadow-sm">
<div class="flex justify-between items-center mb-4">
<h3 class="font-medium">Income vs Expenses</h3>
<select class="text-sm border rounded px-2 py-1">
<option>This Month</option>
<option>Last Month</option>
<option>Last 3 Months</option>
</select>
</div>
<canvas id="incomeExpenseChart" height="250"></canvas>
</div>
<div class="dashboard-card bg-white p-4 rounded-lg shadow-sm">
<div class="flex justify-between items-center mb-4">
<h3 class="font-medium">Expense Categories</h3>
<select class="text-sm border rounded px-2 py-1">
<option>This Month</option>
<option>Last Month</option>
<option>Last 3 Months</option>
</select>
</div>
<canvas id="expenseCategoryChart" height="250"></canvas>
</div>
</div>
<!-- Recent Transactions -->
<div class="dashboard-card bg-white rounded-lg shadow-sm overflow-hidden">
<div class="p-4 border-b flex justify-between items-center">
<h3 class="font-medium">Recent Transactions</h3>
<button onclick="toggleTransactionModal()" class="text-sm gradient-bg text-white px-3 py-1 rounded hover:opacity-90">
<i class="fas fa-plus mr-1"></i> Add New
</button>
</div>
<div class="divide-y">
<div class="p-4 flex justify-between items-center hover:bg-gray-50">
<div class="flex items-center">
<div class="w-10 h-10 rounded-full bg-red-100 flex items-center justify-center mr-3">
<i class="fas fa-shopping-bag text-red-500"></i>
</div>
<div>
<p class="font-medium">Grocery Shopping</p>
<p class="text-sm text-gray-500">May 15, 2023</p>
</div>
</div>
<div class="text-right">
<p class="font-medium text-red-500">-$85.75</p>
<p class="text-sm text-gray-500">Food & Dining</p>
</div>
</div>
<div class="p-4 flex justify-between items-center hover:bg-gray-50">
<div class="flex items-center">
<div class="w-10 h-10 rounded-full bg-green-100 flex items-center justify-center mr-3">
<i class="fas fa-money-bill-wave text-green-500"></i>
</div>
<div>
<p class="font-medium">Freelance Payment</p>
<p class="text-sm text-gray-500">May 14, 2023</p>
</div>
</div>
<div class="text-right">
<p class="font-medium text-green-500">+$1,200.00</p>
<p class="text-sm text-gray-500">Income</p>
</div>
</div>
<div class="p-4 flex justify-between items-center hover:bg-gray-50">
<div class="flex items-center">
<div class="w-10 h-10 rounded-full bg-blue-100 flex items-center justify-center mr-3">
<i class="fas fa-subway text-blue-500"></i>
</div>
<div>
<p class="font-medium">Transportation</p>
<p class="text-sm text-gray-500">May 14, 2023</p>
</div>
</div>
<div class="text-right">
<p class="font-medium text-red-500">-$45.50</p>
<p class="text-sm text-gray-500">Transport</p>
</div>
</div>
<div class="p-4 flex justify-between items-center hover:bg-gray-50">
<div class="flex items-center">
<div class="w-10 h-10 rounded-full bg-purple-100 flex items-center justify-center mr-3">
<i class="fas fa-film text-purple-500"></i>
</div>
<div>
<p class="font-medium">Netflix Subscription</p>
<p class="text-sm text-gray-500">May 10, 2023</p>
</div>
</div>
<div class="text-right">
<p class="font-medium text-red-500">-$14.99</p>
<p class="text-sm text-gray-500">Entertainment</p>
</div>
</div>
</div>
<div class="p-4 border-t text-center">
<a href="#" class="text-indigo-600 hover:text-indigo-800 text-sm font-medium">View All Transactions</a>
</div>
</div>
<!-- Goals -->
<div class="dashboard-card bg-white rounded-lg shadow-sm overflow-hidden">
<div class="p-4 border-b flex justify-between items-center">
<h3 class="font-medium">Your Goals</h3>
<button onclick="toggleGoalModal()" class="text-sm gradient-bg text-white px-3 py-1 rounded hover:opacity-90">
<i class="fas fa-plus mr-1"></i> New Goal
</button>
</div>
<div class="divide-y">
<div class="p-4 hover:bg-gray-50">
<div class="flex justify-between items-center mb-2">
<h4 class="font-medium">Emergency Fund</h4>
<span class="text-sm font-medium">$3,500 / $5,000</span>
</div>
<div class="progress-bar">
<div class="progress-fill" style="width: 70%"></div>
</div>
<div class="flex justify-between text-xs text-gray-500 mt-1">
<span>70% complete</span>
<span>Target: June 2023</span>
</div>
</div>
<div class="p-4 hover:bg-gray-50">
<div class="flex justify-between items-center mb-2">
<h4 class="font-medium">New Laptop</h4>
<span class="text-sm font-medium">$800 / $1,200</span>
</div>
<div class="progress-bar">
<div class="progress-fill" style="width: 66%"></div>
</div>
<div class="flex justify-between text-xs text-gray-500 mt-1">
<span>66% complete</span>
<span>Target: August 2023</span>
</div>
</div>
<div class="p-4 hover:bg-gray-50">
<div class="flex justify-between items-center mb-2">
<h4 class="font-medium">Vacation Fund</h4>
<span class="text-sm font-medium">$1,200 / $2,500</span>
</div>
<div class="progress-bar">
<div class="progress-fill" style="width: 48%"></div>
</div>
<div class="flex justify-between text-xs text-gray-500 mt-1">
<span>48% complete</span>
<span>Target: December 2023</span>
</div>
</div>
</div>
<div class="p-4 border-t text-center">
<a href="#" class="text-indigo-600 hover:text-indigo-800 text-sm font-medium">View All Goals</a>
</div>
</div>
</div>
</div>
</main>
</div>
<!-- Transaction Modal -->
<div id="transactionModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
<div class="bg-white rounded-xl shadow-2xl w-full max-w-md">
<div class="flex justify-between items-center border-b p-4">
<h3 class="text-xl font-semibold">Add Transaction</h3>
<button onclick="toggleTransactionModal()" class="text-gray-500 hover:text-gray-700">
<i class="fas fa-times"></i>
</button>
</div>
<div class="p-6">
<form id="transactionForm" class="space-y-4">
<div>
<label class="block text-sm font-medium text-gray-700 mb-1">Transaction Type</label>
<div class="flex space-x-4">
<label class="flex items-center">
<input type="radio" name="transactionType" value="income" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500" checked>
<span class="ml-2 text-gray-700">Income</span>
</label>
<label class="flex items-center">
<input type="radio" name="transactionType" value="expense" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500">
<span class="ml-2 text-gray-700">Expense</span>
</label>
</div>
</div>
<div>
<label for="transactionAmount" class="block text-sm font-medium text-gray-700 mb-1">Amount</label>
<div class="relative rounded-md shadow-sm">
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<span class="text-gray-500 sm:text-sm">$</span>
</div>
<input type="number" id="transactionAmount" class="focus:ring-indigo-500 focus:border-indigo-500 block w-full pl-7 pr-12 sm:text-sm border-gray-300 rounded-md" placeholder="0.00">
</div>
</div>
<div>
<label for="transactionCategory" class="block text-sm font-medium text-gray-700 mb-1">Category</label>
<select id="transactionCategory" 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>Select a category</option>
<optgroup label="Income">
<option>Salary</option>
<option>Freelance</option>
<option>Investment</option>
<option>Gift</option>
</optgroup>
<optgroup label="Expenses">
<option>Food & Dining</option>
<option>Transportation</option>
<option>Housing</option>
<option>Entertainment</option>
<option>Shopping</option>
<option>Utilities</option>
<option>Healthcare</option>
</optgroup>
</select>
</div>
<div>
<label for="transactionDate" class="block text-sm font-medium text-gray-700 mb-1">Date</label>
<input type="date" id="transactionDate" 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="transactionDescription" class="block text-sm font-medium text-gray-700 mb-1">Description</label>
<input type="text" id="transactionDescription" class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md" placeholder="Optional">
</div>
<div class="flex items-center">
<input type="checkbox" id="autoSaveTransaction" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded">
<label for="autoSaveTransaction" class="ml-2 block text-sm text-gray-700">Auto-save 10% of this income</label>
</div>
<div class="pt-4">
<button type="button" onclick="addTransaction()" class="w-full gradient-bg text-white py-2 rounded-lg font-medium hover:opacity-90 transition">Add Transaction</button>
</div>
</form>
</div>
</div>
</div>
<!-- Goal Modal -->
<div id="goalModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
<div class="bg-white rounded-xl shadow-2xl w-full max-w-md">
<div class="flex justify-between items-center border-b p-4">
<h3 class="text-xl font-semibold">Create New Goal</h3>
<button onclick="toggleGoalModal()" class="text-gray-500 hover:text-gray-700">
<i class="fas fa-times"></i>
</button>
</div>
<div class="p-6">
<form id="goalForm" class="space-y-4">
<div>
<label for="goalName" class="block text-sm font-medium text-gray-700 mb-1">Goal Name</label>
<input type="text" id="goalName" class="mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md" placeholder="e.g. Vacation Fund">
</div>
<div>
<label for="goalTarget" class="block text-sm font-medium text-gray-700 mb-1">Target Amount</label>
<div class="relative rounded-md shadow-sm">
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<span class="text-gray-500 sm:text-sm">$</span>
</div>
<input type="number" id="goalTarget" class="focus:ring-indigo-500 focus:border-indigo-500 block w-full pl-7 pr-12 sm:text-sm border-gray-300 rounded-md" placeholder="0.00">
</div>
</div>
<div>
<label for="goalCurrent" class="block text-sm font-medium text-gray-700 mb-1">Current Amount</label>
<div class="relative rounded-md shadow-sm">
<div class="absolute inset-y-0 left-0 pl-3 flex items-center pointer-events-none">
<span class="text-gray-500 sm:text-sm">$</span>
</div>
<input type="number" id="goalCurrent" class="focus:ring-indigo-500 focus:border-indigo-500 block w-full pl-7 pr-12 sm:text-sm border-gray-300 rounded-md" placeholder="0.00">
</div>
</div>
<div>
<label for="goalDate" class="block text-sm font-medium text-gray-700 mb-1">Target Date</label>
<input type="date" id="goalDate" 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 class="flex items-center">
<input type="checkbox" id="autoSaveGoal" class="h-4 w-4 text-indigo-600 focus:ring-indigo-500 border-gray-300 rounded">
<label for="autoSaveGoal" class="ml-2 block text-sm text-gray-700">Set up auto-saving for this goal</label>
</div>
<div id="autoSaveOptions" class="hidden pl-6 space-y-2">
<div>
<label for="autoSavePercentage" class="block text-sm font-medium text-gray-700 mb-1">Percentage of income</label>
<div class="flex items-center">
<input type="range" id="autoSavePercentage" min="1" max="50" value="10" class="w-full">
<span id="percentageValue" class="ml-2 text-sm font-medium">10%</span>
</div>
</div>
<div>
<label for="autoSaveFrequency" class="block text-sm font-medium text-gray-700 mb-1">Frequency</label>
<select id="autoSaveFrequency" 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>Every income transaction</option>
<option>Weekly</option>
<option>Monthly</option>
</select>
</div>
</div>
<div class="pt-4">
<button type="button" onclick="addGoal()" class="w-full gradient-bg text-white py-2 rounded-lg font-medium hover:opacity-90 transition">Create Goal</button>
</div>
</form>
</div>
</div>
</div>
<!-- Bank Integration Modal -->
<div id="bankModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
<div class="bg-white rounded-xl shadow-2xl w-full max-w-md">
<div class="flex justify-between items-center border-b p-4">
<h3 class="text-xl font-semibold">Connect Your Bank</h3>
<button onclick="toggleBankModal()" class="text-gray-500 hover:text-gray-700">
<i class="fas fa-times"></i>
</button>
</div>
<div class="p-6">
<div class="mb-6">
<p class="text-gray-600 mb-4">Securely connect your bank account to automatically track transactions.</p>
<div class="flex items-center p-3 border rounded-lg mb-3 hover:border-indigo-500 cursor-pointer">
<div class="w-10 h-10 rounded-full bg-blue-100 flex items-center justify-center mr-3">
<i class="fas fa-university text-blue-500"></i>
</div>
<div>
<p class="font-medium">Bank Account</p>
<p class="text-sm text-gray-500">Connect directly to your bank</p>
</div>
</div>
<div class="flex items-center p-3 border rounded-lg hover:border-indigo-500 cursor-pointer">
<div class="w-10 h-10 rounded-full bg-green-100 flex items-center justify-center mr-3">
<i class="fas fa-mobile-alt text-green-500"></i>
</div>
<div>
<p class="font-medium">Mobile Banking</p>
<p class="text-sm text-gray-500">Link with your m-banking app</p>
</div>
</div>
</div>
<div class="border-t pt-4">
<p class="text-sm text-gray-500 mb-4">We use bank-level security to protect your data. Your login details are never stored.</p>
<button class="w-full border border-indigo-600 text-indigo-600 py-2 rounded-lg font-medium hover:bg-indigo-50 transition">Continue</button>
</div>
</div>
</div>
</div>
<!-- Footer -->
<footer class="bg-gray-800 text-white py-12">
<div class="container mx-auto px-4">
<div class="grid grid-cols-1 md:grid-cols-4 gap-8">
<div>
<div class="flex items-center space-x-2 mb-4">
<i class="fas fa-wallet text-2xl text-indigo-400"></i>
<h3 class="text-xl font-bold">FinTrack</h3>
</div>
<p class="text-gray-400">Take control of your finances with our intuitive money management platform.</p>
</div>
<div>
<h4 class="text-lg font-semibold mb-4">Product</h4>
<ul class="space-y-2">
<li><a href="#" class="text-gray-400 hover:text-white transition">Features</a></li>
<li><a href="#" class="text-gray-400 hover:text-white transition">Pricing</a></li>
<li><a href="#" class="text-gray-400 hover:text-white transition">FAQ</a></li>
</ul>
</div>
<div>
<h4 class="text-lg font-semibold mb-4">Company</h4>
<ul class="space-y-2">
<li><a href="#" class="text-gray-400 hover:text-white transition">About Us</a></li>
<li><a href="#" class="text-gray-400 hover:text-white transition">Careers</a></li>
<li><a href="#" class="text-gray-400 hover:text-white transition">Contact</a></li>
</ul>
</div>
<div>
<h4 class="text-lg font-semibold mb-4">Legal</h4>
<ul class="space-y-2">
<li><a href="#" class="text-gray-400 hover:text-white transition">Privacy Policy</a></li>
<li><a href="#" class="text-gray-400 hover:text-white transition">Terms of Service</a></li>
<li><a href="#" class="text-gray-400 hover:text-white transition">Security</a></li>
</ul>
</div>
</div>
<div class="border-t border-gray-700 mt-8 pt-8 flex flex-col md:flex-row justify-between items-center">
<p class="text-gray-400 mb-4 md:mb-0">© 2023 FinTrack. All rights reserved.</p>
<div class="flex space-x-6">
<a href="#" class="text-gray-400 hover:text-white transition"><i class="fab fa-facebook-f"></i></a>
<a href="#" class="text-gray-400 hover:text-white transition"><i class="fab fa-twitter"></i></a>
<a href="#" class="text-gray-400 hover:text-white transition"><i class="fab fa-instagram"></i></a>
<a href="#" class="text-gray-400 hover:text-white transition"><i class="fab fa-linkedin-in"></i></a>
</div>
</div>
</div>
</footer>
<script>
// Mobile menu toggle
function toggleMobileMenu() {
const menu = document.getElementById('mobileMenu');
menu.classList.toggle('hidden');
}
// Auth modal functions
function toggleAuthModal(tab = 'signin') {
const modal = document.getElementById('authModal');
modal.classList.toggle('hidden');
if (tab === 'signup') {
switchAuthTab('signup');
}
}
function switchAuthTab(tab) {
const signinForm = document.getElementById('signinForm');
const signupForm = document.getElementById('signupForm');
const signinTab = document.getElementById('signinTab');
const signupTab = document.getElementById('signupTab');
const modalTitle = document.getElementById('modalTitle');
if (tab === 'signin') {
signinForm.classList.remove('hidden');
signupForm.classList.add('hidden');
signinTab.classList.add('tab-active');
signinTab.classList.remove('text-gray-600');
signupTab.classList.remove('tab-active');
signupTab.classList.add('text-gray-600');
modalTitle.textContent = 'Sign In';
} else {
signinForm.classList.add('hidden');
signupForm.classList.remove('hidden');
signinTab.classList.remove('tab-active');
signinTab.classList.add('text-gray-600');
signupTab.classList.add('tab-active');
signupTab.classList.remove('text-gray-600');
modalTitle.textContent = 'Sign Up';
}
}
// Login function
function login() {
const email = document.getElementById('loginEmail').value;
const password = document.getElementById('loginPassword').value;
if (email && password) {
// In a real app, you would validate and send to server
toggleAuthModal();
document.getElementById('dashboard').classList.remove('hidden');
document.querySelector('body > section').classList.add('hidden');
document.querySelector('footer').classList.add('hidden');
// Initialize charts
initCharts();
} else {
alert('Please enter both email and password');
}
}
// Signup function
function signup() {
const name = document.getElementById('signupName').value;
const email = document.getElementById('signupEmail').value;
const password = document.getElementById('signupPassword').value;
const confirmPassword = document.getElementById('signupConfirmPassword').value;
const acceptTerms = document.getElementById('acceptTerms').checked;
if (!name || !email || !password || !confirmPassword) {
alert('Please fill in all fields');
return;
}
if (password !== confirmPassword) {
alert('Passwords do not match');
return;
}
if (!acceptTerms) {
alert('You must accept the terms and conditions');
return;
}
// In a real app, you would send to server
toggleAuthModal();
document.getElementById('dashboard').classList.remove('hidden');
document.querySelector('body > section').classList.add('hidden');
document.querySelector('footer').classList.add('hidden');
// Initialize charts
initCharts();
}
// Logout function
function logout() {
document.getElementById('dashboard').classList.add('hidden');
document.querySelector('body > section').classList.remove('hidden');
document.querySelector('footer').classList.remove('hidden');
}
// Transaction modal
function toggleTransactionModal() {
const modal = document.getElementById('transactionModal');
modal.classList.toggle('hidden');
}
function addTransaction() {
// In a real app, you would add to database
toggleTransactionModal();
alert('Transaction added successfully!');
// Refresh charts or data
}
// Goal modal
function toggleGoalModal() {
const modal = document.getElementById('goalModal');
modal.classList.toggle('hidden');
}
function addGoal() {
// In a real app, you would add to database
toggleGoalModal();
alert('Goal created successfully!');
// Refresh goals list
}
// Bank modal
function toggleBankModal() {
const modal = document.getElementById('bankModal');
modal.classList.toggle('hidden');
}
// Auto-save options toggle
document.getElementById('autoSaveGoal').addEventListener('change', function() {
const options = document.getElementById('autoSaveOptions');
if (this.checked) {
options.classList.remove('hidden');
} else {
options.classList.add('hidden');
}
});
// Percentage slider
document.getElementById('autoSavePercentage').addEventListener('input', function() {
document.getElementById('percentageValue').textContent = this.value + '%';
});
// Notification dropdown
document.getElementById('notificationsBtn').addEventListener('click', function(e) {
e.stopPropagation();
document.getElementById('notificationsDropdown').classList.toggle('hidden');
document.getElementById('profileDropdown').classList.add('hidden');
});
// Profile dropdown
document.getElementById('profileBtn').addEventListener('click', function(e) {
e.stopPropagation();
document.getElementById('profileDropdown').classList.toggle('hidden');
document.getElementById('notificationsDropdown').classList.add('hidden');
});
// Close dropdowns when clicking elsewhere
document.addEventListener('click', function() {
document.getElementById('notificationsDropdown').classList.add('hidden');
document.getElementById('profileDropdown').classList.add('hidden');
});
// Initialize charts
function initCharts() {
// Income vs Expense 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: [2500, 2800, 3200, 2900, 3500, 3800],
backgroundColor: '#4ade80',
borderRadius: 4
},
{
label: 'Expenses',
data: [1800, 2100, 2400, 2200, 2500, 2700],
backgroundColor: '#f87171',
borderRadius: 4
}
]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'top',
},
tooltip: {
mode: 'index',
intersect: false,
}
},
scales: {
x: {
grid: {
display: false
}
},
y: {
beginAtZero: true,
grid: {
drawBorder: false
}
}
}
}
});
// Expense Category Chart
const expenseCategoryCtx = document.getElementById('expenseCategoryChart').getContext('2d');
const expenseCategoryChart = new Chart(expenseCategoryCtx, {
type: 'doughnut',
data: {
labels: ['Housing', 'Food', 'Transport', 'Entertainment', 'Utilities', 'Others'],
datasets: [{
data: [35, 25, 15, 10, 10, 5],
backgroundColor: [
'#6366f1',
'#8b5cf6',
'#ec4899',
'#f43f5e',
'#f97316',
'#f59e0b'
],
borderWidth: 0
}]
},
options: {
responsive: true,
plugins: {
legend: {
position: 'right',
}
},
cutout: '70%'
}
});
}
// Highlight input fields on focus
document.querySelectorAll('input, select, textarea').forEach(input => {
input.addEventListener('focus', function() {
this.classList.add('input-highlight');
});
input.addEventListener('blur', function() {
this.classList.remove('input-highlight');
});
});
</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=Triovance/finance" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
</html> |