-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.html
More file actions
189 lines (178 loc) · 7.69 KB
/
settings.html
File metadata and controls
189 lines (178 loc) · 7.69 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Settings - Expense Tracker</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" href="styles.css">
<script src="scripts.js" defer></script>
<style>
/* Dark theme styles */
.dark-theme {
background-color: #121212;
color: #9c2adf;
}
.dark-theme .navbar, .dark-theme .btn {
background-color: #333;
color: rgb(216, 213, 28);
}
</style>
</head>
<body>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<a class="navbar-brand" href="#">Expense Tracker</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNav">
<ul class="navbar-nav ms-auto">
<li class="nav-item">
<a class="nav-link" href="index.html"><i class="bi bi-house-fill"></i> Dashboard</a>
</li>
<li class="nav-item">
<a class="nav-link" href="analytics.html"><i class="bi bi-bar-chart-fill"></i> Analytics</a>
</li>
<li class="nav-item">
<a class="nav-link" href="transactions.html"><i class="bi bi-wallet2"></i> Transactions</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="settings.html"><i class="bi bi-gear-fill"></i> Settings</a>
</li>
<li class="nav-item">
<a class="nav-link text-danger" href="login.html"><i class="bi bi-box-arrow-right"></i> Logout</a>
</li>
</ul>
</div>
</div>
</nav>
<div class="container my-4">
<h1 class="text-center">Settings</h1>
<div class="row g-4 my-4">
<div class="col-md-12">
<div class="card">
<div class="card-body">
<button class="btn btn-primary" id="settingsTab" onclick="showSection('accountSettingsSection')">Account Settings</button>
<button class="btn btn-primary" id="preferencesTab" onclick="showSection('preferencesSection')">Preferences</button>
<button class="btn btn-primary" id="themeTab" onclick="showSection('themeSection')">Theme</button>
<button class="btn btn-primary" id="notificationsTab" onclick="showSection('notificationsSection')">Notifications</button>
<button class="btn btn-primary" id="categoriesTab" onclick="showSection('categoriesSection')">Categories</button>
</div>
</div>
</div>
</div>
<!-- Account Settings Section -->
<div id="accountSettingsSection" class="section">
<h2>Account Settings</h2>
<form id="accountSettingsForm">
<div class="mb-3">
<label for="username" class="form-label">Username</label>
<input type="text" id="username" class="form-control" value="JohnDoe" required>
</div>
<div class="mb-3">
<label for="email" class="form-label">Email</label>
<input type="email" id="email" class="form-control" value="[email protected]" required>
</div>
<div class="mb-3">
<label for="password" class="form-label">Password</label>
<input type="password" id="password" class="form-control" required>
</div>
<button type="submit" class="btn btn-primary w-100">Save Changes</button>
</form>
</div>
<!-- Preferences Section -->
<div id="preferencesSection" class="section" style="display:none;">
<h2>Preferences</h2>
<form id="preferencesForm">
<div class="mb-3">
<label for="currency" class="form-label">Currency</label>
<select id="currency" class="form-select" required>
<option value="INR" selected>INR (₹)</option>
<option value="USD">USD ($)</option>
<option value="EUR">EUR (€)</option>
<option value="GBP">GBP (£)</option>
</select>
</div>
<div class="mb-3">
<label for="language" class="form-label">Language</label>
<select id="language" class="form-select" required>
<option value="en" selected>English</option>
<option value="es">Spanish</option>
<option value="fr">French</option>
</select>
</div>
<button type="submit" class="btn btn-primary w-100">Save Preferences</button>
</form>
</div>
<!-- Theme Section -->
<div id="themeSection" class="section" style="display:none;">
<h2>Theme</h2>
<div class="form-check form-switch">
<input class="form-check-input" type="checkbox" id="themeToggle" onclick="toggleTheme()">
<label class="form-check-label" for="themeToggle">Dark Mode</label>
</div>
</div>
<!-- Notification Preferences Section -->
<div id="notificationsSection" class="section" style="display:none;">
<h2>Notification Preferences</h2>
<form id="notificationsForm">
<div class="form-check">
<input class="form-check-input" type="checkbox" id="emailNotifications" checked>
<label class="form-check-label" for="emailNotifications">Email Notifications</label>
</div>
<div class="form-check">
<input class="form-check-input" type="checkbox" id="smsNotifications">
<label class="form-check-label" for="smsNotifications">SMS Notifications</label>
</div>
<button type="submit" class="btn btn-primary mt-3 w-100">Save Notification Preferences</button>
</form>
</div>
<!-- Category Management Section -->
<div id="categoriesSection" class="section" style="display:none;">
<h2>Manage Categories</h2>
<div class="mb-3">
<label for="newCategory" class="form-label">Add New Category</label>
<div class="input-group">
<input type="text" id="newCategory" class="form-control" placeholder="Enter category name">
<button class="btn btn-success" id="addCategoryBtn">Add</button>
</div>
</div>
<ul id="categoriesList" class="list-group">
<li class="list-group-item d-flex justify-content-between align-items-center">
Groceries
<button class="btn btn-danger btn-sm delete-category-btn">Delete</button>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
Utilities
<button class="btn btn-danger btn-sm delete-category-btn">Delete</button>
</li>
<li class="list-group-item d-flex justify-content-between align-items-center">
Entertainment
<button class="btn btn-danger btn-sm delete-category-btn">Delete</button>
</li>
</ul>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
<script>
function showSection(sectionId) {
const sections = document.querySelectorAll('.section');
sections.forEach(section => {
section.style.display = 'none';
});
const activeSection = document.getElementById(sectionId);
activeSection.style.display = 'block';
}
function toggleTheme() {
const body = document.body;
const themeToggle = document.getElementById('themeToggle');
if (themeToggle.checked) {
body.classList.add('dark-theme');
} else {
body.classList.remove('dark-theme');
}
}
</script>
</body>
</html>