-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
309 lines (295 loc) · 10.6 KB
/
index.html
File metadata and controls
309 lines (295 loc) · 10.6 KB
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
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
content="Track your expenses intelligently with Budget Tracker Pro"
/>
<title>💰 Budget Tracker Pro - Smart Expense Management</title>
<link rel="stylesheet" href="style.css" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap"
rel="stylesheet"
/>
</head>
<body>
<!-- Animated Background -->
<div class="background-animation">
<div class="circle circle-1"></div>
<div class="circle circle-2"></div>
<div class="circle circle-3"></div>
</div>
<!-- Welcome Overlay -->
<div id="welcome-overlay" class="welcome-overlay">
<div class="welcome-content">
<h2>👋 Welcome to Budget Tracker Pro!</h2>
<p>Your intelligent companion for managing expenses</p>
<div class="welcome-features">
<div class="feature-item">
<span class="feature-icon">📊</span>
<h3>Visual Insights</h3>
<p>See your spending patterns at a glance</p>
</div>
<div class="feature-item">
<span class="feature-icon">🎯</span>
<h3>Smart Tracking</h3>
<p>Categorize and filter with ease</p>
</div>
<div class="feature-item">
<span class="feature-icon">🔒</span>
<h3>Secure & Private</h3>
<p>Your data stays on your device</p>
</div>
</div>
<button id="start-tracking" class="btn btn-primary btn-large">
Start Tracking 🚀
</button>
</div>
</div>
<!-- Header -->
<header class="header">
<div class="container">
<div class="header-content">
<div class="logo">
<span class="logo-icon" role="img" aria-label="Money bag">💰</span>
<h1>Budget<span class="highlight">Tracker</span></h1>
</div>
<div class="header-actions">
<button
id="help-btn"
class="icon-btn"
aria-label="Help"
title="Need help?"
>
<span>❓</span>
</button>
<button
id="dark-mode-toggle"
class="theme-toggle"
aria-label="Toggle dark mode"
title="Switch theme"
>
<span class="sun">☀️</span>
<span class="moon">🌙</span>
</button>
</div>
</div>
</div>
</header>
<!-- Main Content -->
<main class="container">
<!-- Dashboard Cards -->
<div class="dashboard-grid">
<div class="stat-card stat-card-1">
<div class="stat-icon">💵</div>
<div class="stat-content">
<h3>Total Spent</h3>
<p class="stat-value">₹<span id="total">0</span></p>
</div>
</div>
<div class="stat-card stat-card-2">
<div class="stat-icon">📅</div>
<div class="stat-content">
<h3>This Month</h3>
<p class="stat-value" id="month-total-simple">₹0</p>
</div>
</div>
<div class="stat-card stat-card-3">
<div class="stat-icon">📊</div>
<div class="stat-content">
<h3>Total Expenses</h3>
<p class="stat-value" id="expense-count">0</p>
</div>
</div>
<div class="stat-card stat-card-4">
<div class="stat-icon">🏆</div>
<div class="stat-content">
<h3>Top Category</h3>
<p class="stat-value-small" id="top-category-simple">N/A</p>
</div>
</div>
</div>
<!-- Add Expense Form -->
<div class="section-card form-section">
<div class="section-header">
<h2>✨ Add New Expense</h2>
<button
class="help-tooltip"
data-tooltip="Quickly track your spending by adding expenses here"
>
<span>ℹ️</span>
</button>
</div>
<form id="expense-form" novalidate>
<div class="form-grid">
<div class="form-group">
<label for="category"
>Category <span class="required">*</span></label
>
<select id="category" required aria-required="true">
<option value="">Select Category</option>
<option value="Food">🍔 Food & Dining</option>
<option value="Travel">✈️ Travel & Transport</option>
<option value="Bills">💡 Bills & Utilities</option>
<option value="Shopping">🛍️ Shopping</option>
<option value="Entertainment">🎮 Entertainment</option>
<option value="Health">🏥 Health & Fitness</option>
<option value="Education">📚 Education</option>
<option value="Other">📦 Other</option>
</select>
<span class="field-hint">Choose what you spent on</span>
<span class="error-message" id="category-error"></span>
</div>
<div class="form-group">
<label for="amount"
>Amount (₹) <span class="required">*</span></label
>
<input
type="number"
id="amount"
placeholder="0.00"
step="0.01"
min="0.01"
required
aria-required="true"
aria-describedby="amount-hint"
/>
<span class="field-hint" id="amount-hint"
>Enter the amount spent</span
>
<span class="error-message" id="amount-error"></span>
</div>
<div class="form-group">
<label for="date">Date <span class="required">*</span></label>
<input
type="date"
id="date"
required
aria-required="true"
aria-describedby="date-hint"
/>
<span class="field-hint" id="date-hint">When did you spend?</span>
<span class="error-message" id="date-error"></span>
</div>
<div class="form-group">
<label for="notes">Notes (Optional)</label>
<input
type="text"
id="notes"
placeholder="Add a description..."
maxlength="100"
aria-describedby="notes-hint"
/>
<span class="field-hint" id="notes-hint">Brief description</span>
</div>
<div class="form-group form-actions">
<button type="submit" class="btn btn-primary" id="submit-btn">
<span>Add Expense</span>
<span class="btn-icon">➕</span>
</button>
<button type="button" class="btn btn-ghost" id="clear-form">
<span>Clear</span>
<span>🗑️</span>
</button>
</div>
</div>
</form>
</div>
<!-- Filters and Actions -->
<div class="section-card">
<div class="section-header">
<h2>🔍 Filter & Export</h2>
</div>
<div class="filter-controls">
<div class="search-box">
<span class="search-icon">🔎</span>
<input
type="text"
id="search-input"
placeholder="Search expenses..."
/>
</div>
<div class="date-filters">
<input type="date" id="filter-start" class="date-input" />
<span class="date-separator">to</span>
<input type="date" id="filter-end" class="date-input" />
<button id="apply-filter" class="btn btn-secondary">
Apply Filter
</button>
</div>
<button id="download-csv" class="btn btn-export">
<span>Export CSV</span>
<span>📥</span>
</button>
</div>
</div>
<!-- Chart and Summary Grid -->
<div class="chart-summary-grid">
<div class="section-card chart-section">
<div class="section-header">
<h2>📊 Expense Breakdown</h2>
</div>
<div class="chart-container">
<canvas id="expense-chart"></canvas>
</div>
</div>
<div class="section-card summary-section">
<div class="section-header">
<h2>📈 Monthly Insights</h2>
</div>
<div class="summary-content">
<div class="summary-item">
<div class="summary-icon">💰</div>
<div class="summary-details">
<p class="summary-label">Total This Month</p>
<p class="summary-value" id="month-total">₹0</p>
</div>
</div>
<div class="summary-item">
<div class="summary-icon">🎯</div>
<div class="summary-details">
<p class="summary-label">Top Spending Category</p>
<p class="summary-value" id="top-category">N/A</p>
</div>
</div>
<div class="summary-item">
<div class="summary-icon">📊</div>
<div class="summary-details">
<p class="summary-label">Average per Day</p>
<p class="summary-value" id="avg-per-day">₹0</p>
</div>
</div>
</div>
</div>
</div>
<!-- Expense List -->
<div class="section-card">
<div class="section-header">
<h2>📝 Recent Expenses</h2>
<span class="expense-badge" id="filtered-count">0 items</span>
</div>
<ul id="expense-list" class="expense-list"></ul>
<div id="empty-state" class="empty-state">
<div class="empty-icon">📭</div>
<h3>No expenses yet</h3>
<p>Start tracking by adding your first expense above!</p>
</div>
</div>
</main>
<!-- Toast Notification -->
<div id="toast" class="toast">
<span class="toast-icon">✓</span>
<span class="toast-message">Action completed!</span>
</div>
<!-- Footer -->
<footer class="footer">
<p>Made with ❤️ | Budget Tracker Pro © 2025</p>
</footer>
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
<script src="app.js"></script>
</body>
</html>