-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex-ultimate.html
More file actions
370 lines (346 loc) ยท 17.8 KB
/
Copy pathindex-ultimate.html
File metadata and controls
370 lines (346 loc) ยท 17.8 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
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
<!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="Modern Expense Tracker with Multi-Currency Support">
<meta name="theme-color" content="#FF9900">
<title>๐ฐ Expense Tracker Ultimate - Multi-Currency Edition</title>
<link rel="stylesheet" href="styles-ultimate.css">
</head>
<body>
<!-- Animated Background -->
<div class="animated-bg"></div>
<!-- Top Navigation -->
<header class="app-nav" aria-label="Primary navigation">
<div class="app-nav-inner">
<div class="app-logo">โน Flow</div>
<nav class="app-nav-links" aria-label="Main sections">
<button class="app-nav-link app-nav-link-active" data-section="home">Home</button>
<button class="app-nav-link" data-section="tracker">Tracker</button>
<button class="app-nav-link" data-section="insights">Insights</button>
<button class="app-nav-link" data-section="auth">Account</button>
</nav>
<div class="app-nav-user" id="nav-user"></div>
</div>
</header>
<div class="container">
<!-- Home / Hero Section -->
<section id="home" class="hero-section" aria-label="Home">
<div class="hero-card">
<p class="hero-kicker">PERSONAL MONEY DASHBOARD</p>
<h1 class="hero-title">See your spending as simple streaks and stories.</h1>
<p class="hero-subtitle">
Switch between fast entry, weekly streaks, and longโterm trends.
Designed to feel like a habit app, not a spreadsheet.
</p>
<div class="hero-cta-row">
<button class="hero-cta-button app-nav-link" data-section="tracker">
Open Tracker
</button>
<div class="hero-pill">
<span class="hero-dot"></span>
<span>Backed by PostgreSQL ยท TypeScript API</span>
</div>
</div>
</div>
</section>
<!-- Auth Section -->
<section id="auth" class="auth-section" aria-label="Account">
<div class="auth-card">
<h2 class="auth-title">Sign in to sync your flow</h2>
<p class="auth-subtitle">
Choose how you want to log in. This demo keeps it simple: no passwords, just your email or phone.
</p>
<div class="auth-grid">
<div class="auth-column">
<h3 class="auth-column-title">Login with Google</h3>
<form id="google-login-form" class="auth-form">
<label for="google-email" class="auth-label">Google email</label>
<input
id="google-email"
type="email"
class="auth-input"
placeholder="you@gmail.com"
required
>
<button type="submit" class="auth-button auth-google-button">
Continue with Google
</button>
</form>
</div>
<div class="auth-column">
<h3 class="auth-column-title">Login with Phone</h3>
<form id="phone-login-form" class="auth-form">
<label for="phone-number" class="auth-label">Phone number</label>
<input
id="phone-number"
type="tel"
class="auth-input"
placeholder="+91 98765 43210"
required
>
<button type="submit" class="auth-button auth-phone-button">
Continue with Phone
</button>
</form>
</div>
</div>
<div class="auth-footer">
<p id="auth-status" class="auth-status" aria-live="polite"></p>
<button id="logout-button" class="auth-logout-button" hidden>
Logout
</button>
</div>
</div>
</section>
<!-- Header Section -->
<header class="manga-header">
<div class="header-content">
<div class="header-icon">โน</div>
<h1 class="manga-title">EXPENSE TRACKER</h1>
<p class="manga-subtitle"> MASTER YOUR SPENDING! ๐ฅ</p>
<div class="header-actions">
<button id="auth-logout" class="manga-button" style="margin-left:auto">Logout</button>
</div>
</div>
</header>
<!-- Currency Selector Section -->
<section id="tracker" class="currency-section" aria-label="Currency Selection">
<div class="currency-box">
<label for="currency-select" class="currency-label">๐ SELECT CURRENCY</label>
<select id="currency-select" class="currency-select" aria-label="Choose currency">
<option value="USD">๐บ๐ธ USD - US Dollar</option>
<option value="EUR">๐ฆ๐บ EUR - Euro</option>
<option value="GBP">๐ฌ๐ง GBP - British Pound</option>
<option value="JPY">๐ฏ๐ต JPY - Japanese Yen</option>
<option value="INR">๐ฎ๐ณ INR - Indian Rupee</option>
<option value="AUD">๐ฆ๐บ AUD - Australian Dollar</option>
<option value="CAD">๐จ๐ฆ CAD - Canadian Dollar</option>
<option value="CHF">๐จ๐ญ CHF - Swiss Franc</option>
<option value="CNY">๐จ๐ณ CNY - Chinese Yuan</option>
<option value="MXN">๐ฒ๐ฝ MXN - Mexican Peso</option>
</select>
</div>
</section>
<!-- Weekly Overview Section -->
<section id="insights" class="weekly-section" aria-label="Weekly Overview">
<div class="weekly-container">
<div class="weekly-header">
<h2 class="weekly-title">Weekly Overview</h2>
<p class="weekly-subtitle">Last 7 days by category</p>
</div>
<div class="weekly-legend" aria-hidden="true">
<div class="weekly-legend-item">
<span class="legend-dot legend-low"></span>
<span class="legend-label">Light spend</span>
</div>
<div class="weekly-legend-item">
<span class="legend-dot legend-medium"></span>
<span class="legend-label">Moderate</span>
</div>
<div class="weekly-legend-item">
<span class="legend-dot legend-high"></span>
<span class="legend-label">High spend</span>
</div>
</div>
<div class="weekly-day-header" id="weekly-day-header" aria-hidden="true"></div>
<div id="weekly-grid" class="weekly-grid" role="region" aria-live="polite">
<p class="loading-text">Loading weekly overview...</p>
</div>
</div>
</section>
<!-- Statistics Section -->
<section class="stats-grid" aria-label="Expense Statistics">
<article class="stat-card stat-card-1">
<div class="stat-label">๐ Total Spent</div>
<div class="stat-value" id="total-spent">$0.00</div>
<div class="stat-meta" id="total-count">0 expenses</div>
</article>
<article class="stat-card stat-card-2">
<div class="stat-label">๐ Average</div>
<div class="stat-value" id="average-spent">$0.00</div>
<div class="stat-meta">per transaction</div>
</article>
<article class="stat-card stat-card-3">
<div class="stat-label">๐ฅ Highest</div>
<div class="stat-value" id="highest-spent">$0.00</div>
<div class="stat-meta">single expense</div>
</article>
</section>
<!-- Trends Section -->
<section class="trend-section" aria-label="Monthly Trends">
<div class="trend-container">
<div class="trend-header">
<h2 class="trend-title">Spending Trends</h2>
<div class="trend-range-toggle" role="radiogroup" aria-label="Select trend range">
<button class="trend-range-button" data-trend-months="2" aria-pressed="false">2M</button>
<button class="trend-range-button" data-trend-months="6" aria-pressed="false">6M</button>
<button class="trend-range-button trend-range-active" data-trend-months="12" aria-pressed="true">1Y</button>
</div>
</div>
<p class="trend-subtitle">Monthly totals ยท Uses selected category when set</p>
<div class="trend-chart-wrapper">
<canvas id="monthly-chart" aria-label="Monthly expense chart" role="img"></canvas>
</div>
</div>
</section>
<!-- Form Section -->
<section class="form-section" aria-label="Add New Expense">
<div class="form-container">
<h2 class="form-title">โ ADD NEW EXPENSE</h2>
<form id="expense-form" class="expense-form" novalidate>
<div class="form-row">
<div class="form-group">
<label for="description">DESCRIPTION</label>
<input
type="text"
id="description"
placeholder="e.g., Coffee โ"
class="form-input"
required
aria-required="true"
>
</div>
<div class="form-group">
<label for="amount">AMOUNT</label>
<input
type="number"
id="amount"
placeholder="0.00"
class="form-input"
step="0.01"
min="0"
required
aria-required="true"
>
</div>
</div>
<div class="form-row">
<div class="form-group">
<label for="category">CATEGORY</label>
<select id="category" class="form-input" required aria-required="true">
<option value="">-- Select Category --</option>
<option value=" Food & Dining">๐ Food & Dining</option>
<option value=" Transportation">๐ Transportation</option>
<option value=" Shopping">๐๏ธ Shopping</option>
<option value=" Entertainment">๐ฌ Entertainment</option>
<option value=" Healthcare">๐ Healthcare</option>
<option value=" Education">๐ Education</option>
<option value=" Housing">๐ Housing</option>
<option value=" Utilities">โก Utilities</option>
<option value=" Travel">โ๏ธ Travel</option>
<option value=" Gaming">๐ฎ Gaming</option>
<option value=" Electronics">๐ฑ Electronics</option>
<option value=" EMI"> EMI </option>
<option value=" Other">๐ฐ Other</option>
</select>
</div>
<div class="form-group">
<label for="expense-date">DATE</label>
<input
type="date"
id="expense-date"
class="form-input"
required
aria-required="true"
>
</div>
</div>
<button type="submit" class="submit-btn manga-button">
<span class="button-text"> ADD EXPENSE </span>
</button>
</form>
</div>
</section>
<!-- Filter Section -->
<section class="filter-section" aria-label="Filter Expenses">
<div class="filter-container">
<h2 class="filter-title">๐ FILTER EXPENSES</h2>
<div class="filter-controls">
<div class="filter-group">
<label for="filter-category">CATEGORY</label>
<select id="filter-category" class="form-input">
<option value="">-- Select Category --</option>
<option value=" Food & Dining">๐ Food & Dining</option>
<option value=" Transportation">๐ Transportation</option>
<option value=" Shopping">๐๏ธ Shopping</option>
<option value=" Entertainment">๐ฌ Entertainment</option>
<option value=" Healthcare">๐ Healthcare</option>
<option value=" Education">๐ Education</option>
<option value=" Housing">๐ Housing</option>
<option value=" Utilities">โก Utilities</option>
<option value=" Travel">โ๏ธ Travel</option>
<option value=" Gaming">๐ฎ Gaming</option>
<option value=" Electronics">๐ฑ Electronics</option>
<option value=" EMI"> EMI </option>
<option value=" Other">๐ฐ Other</option>
</select>
</div>
<div class="filter-group">
<label for="filter-start-date">START DATE</label>
<input type="date" id="filter-start-date" class="form-input">
</div>
<div class="filter-group">
<label for="filter-end-date">END DATE</label>
<input type="date" id="filter-end-date" class="form-input">
</div>
<div class="filter-buttons">
<button id="apply-filter" class="manga-button filter-btn">
โ
APPLY
</button>
<button id="reset-filter" class="manga-button reset-btn">
โบ RESET
</button>
</div>
</div>
</div>
</section>
<!-- Category Breakdown Section -->
<section class="breakdown-section" aria-label="Spending by Category">
<div class="breakdown-container">
<h2 class="breakdown-title">๐ SPENDING BY CATEGORY</h2>
<div id="category-breakdown" class="category-grid" role="region" aria-live="polite">
<p class="loading-text">Loading categories...</p>
</div>
</div>
</section>
<!-- Expenses List Section -->
<section class="expenses-section" aria-label="Expense History">
<div class="expenses-container">
<h2 class="expenses-title">๐ณ EXPENSE HISTORY</h2>
<div id="expenses-list" class="expenses-list" role="region" aria-live="polite" aria-label="List of expenses">
<p class="loading-text">Loading expenses...</p>
</div>
</div>
</section>
<!-- Notification -->
<div id="notification" class="notification" role="status" aria-live="assertive"></div>
</div>
<!-- Scripts -->
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.1/dist/chart.umd.min.js"></script>
<script src="script-enhanced.js"></script>
<script>
async function initAuth() {
try {
const r = await fetch('/api/auth/me');
const j = await r.json();
const btn = document.getElementById('auth-logout');
if (!j.user) {
btn!.textContent = 'Login';
btn!.addEventListener('click', () => { window.location.href = '/'; });
} else {
btn!.textContent = 'Logout';
btn!.addEventListener('click', async () => {
await fetch('/api/auth/logout', { method: 'POST' });
window.location.href = '/';
});
}
} catch (e) {
/* ignore */
}
}
initAuth();
</script>
</body>
</html>