-
Notifications
You must be signed in to change notification settings - Fork 35
Expand file tree
/
Copy pathindex.html
More file actions
385 lines (362 loc) · 17.5 KB
/
index.html
File metadata and controls
385 lines (362 loc) · 17.5 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
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Fsoc-Medium | Smart Task Manager & Weather Dashboard</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@400;500;600;700&display=swap" rel="stylesheet" />
<script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous" ></script>
<meta name="description" content="Smart Task Manager & Weather Dashboard with accessibility features" />
<!-- Add this line for high contrast stylesheet -->
<link rel="stylesheet" href="high-contrast.css" disabled id="high-contrast-stylesheet" />
</head>
<body>
<div class="sidebar" id="sidebar">
<button class="close-btn" id="close-btn">×</button>
<ul>
<li><a href="#dashboard" id="hamburger-tabs">Home</a></li>
<li><a href="about.html" id="hamburger-tabs">About</a></li>
<li><a href="contact.html" id="hamburger-tabs">Contact</a></li>
</ul>
</div>
<header>
<!-- Accessibility Toolbar -->
<div id="accessibility-controls" aria-label="Accessibility Settings">
<button id="increase-font">A+</button>
<button id="decrease-font">A-</button>
<button id="toggle-contrast">High Contrast</button>
<button id="toggle-animations">Toggle Animations</button>
<label for="text-spacing">Text Spacing:</label>
<select id="text-spacing">
<option value="normal">Normal</option>
<option value="wide">Wide</option>
<option value="wider">Wider</option>
</select>
</div>
<nav>
<div class="logo">Fsoc-Medium</div>
<div class="hamburger" id="hamburger">☰</div>
<ul class="nav-links">
<li>
<a href="#dashboard" class="nav-link active"
>Dashboard</a
>
</li>
<li><a href="about.html" class="nav-link">About</a></li>
<li><a href="contact.html" class="nav-link">Contact</a></li>
</ul>
<button id="theme-toggle" class="theme-btn">
Toggle Theme
</button>
</nav>
</header>
<main class="container">
<section class="card task-manager">
<h2>My Tasks</h2>
<div class="task-input-container">
<input
type="text"
id="task-input"
placeholder="Ready to crush your next goal?"
aria-label="Task description"
role="textbox"
/>
<input type="text" id="task-tags" placeholder="Add tags (space separated)" aria-label="Task tags" />
<input
type="date"
id="due-date-input"
placeholder="Due date"
aria-label="Task Due Date"
style="max-width: 160px;"
/>
<select id="priority-select" aria-label="Task Priority">
<option value="3">🟢 Low</option>
<option value="2" selected>🟡 Medium</option>
<option value="1">🔴 High</option>
</select>
<button id="add-task-btn" aria-label="Add new task">Add Task</button>
</div>
<div class="tags-row">
<div id="tag-suggestions" class="tag-suggestions" aria-live="polite"></div>
<div id="popular-tags" class="popular-tags"></div>
<div id="active-tag-filter" class="active-tag-filter"></div>
<select id="tag-filter-select" aria-label="Filter by tag"></select>
<button id="clear-tag-filter-btn" class="manage-tags-btn">Clear</button>
</div>
<div id="tag-manager" class="tag-manager" style="display:none; margin-bottom:0.75rem;"></div>
<div class="task-search-area">
<input type="text" id="task-search" placeholder="Search tasks..." />
<div class="search-controls">
<button id="search-btn">Search</button>
<button id="clear-search-btn">Clear</button>
<span id="search-count"></span>
</div>
</div>
<div class="advanced-filter-panel">
<div class="filter-header">
<h3>Advanced Filters</h3>
<button id="toggle-filters-btn" class="toggle-filters-btn">
Show Filters
</button>
</div>
<div class="filter-content" id="filter-content" style="display: none;">
<div class="filter-row">
<div class="filter-group">
<label for="filter-status">Status:</label>
<select id="filter-status" class="filter-select">
<option value="">All</option>
<option value="active">Active</option>
<option value="completed">Completed</option>
</select>
</div>
<div class="filter-group">
<label for="filter-priority">Priority:</label>
<select id="filter-priority" class="filter-select">
<option value="">All</option>
<option value="1">🔴 High</option>
<option value="2">🟡 Medium</option>
<option value="3">🟢 Low</option>
</select>
</div>
<div class="filter-group">
<label for="filter-category">Category:</label>
<select id="filter-category" class="filter-select">
<option value="">All Tags</option>
</select>
</div>
</div>
<div class="filter-row">
<div class="filter-group">
<label for="filter-date-from">Due Date From:</label>
<input type="date" id="filter-date-from" class="filter-input" />
</div>
<div class="filter-group">
<label for="filter-date-to">Due Date To:</label>
<input type="date" id="filter-date-to" class="filter-input" />
</div>
<div class="filter-group filter-actions">
<button id="apply-filters-btn" class="apply-filters-btn">
Apply Filters
</button>
<button id="clear-all-filters-btn" class="clear-filters-btn">
Clear All Filters
</button>
</div>
</div>
<div class="active-filters-display" id="active-filters-display"></div>
</div>
</div>
<div class="task-filters">
<button class="filter-btn active" data-filter="all">
All
</button>
<button
class="filter-btn"
id="filter-active"
data-filter="active"
>
Active
</button>
<button
class="filter-btn"
id="filter-completed"
data-filter="completed"
>
Completed
</button>
<button class="filter-btn priority-filter" data-filter="priority-1">
🔴 High
</button>
<button class="filter-btn priority-filter" data-filter="priority-2">
🟡 Medium
</button>
<button class="filter-btn priority-filter" data-filter="priority-3">
🟢 Low
</button>
</div>
<div class="task-progress-container">
<div class="task-progress-bar-bg">
<div class="task-progress-bar-fill" id="task-progress-bar"></div>
</div>
<div class="task-progress-info">
<span id="task-progress-percent" class="task-progress-percent">0%</span>
<span id="task-progress-summary" class="task-progress-summary"></span>
<div class="task-progress-ring">
<svg width="60" height="60">
<circle cx="30" cy="30" r="26" stroke="#e0e0e0" stroke-width="6" fill="none"/>
<circle id="task-progress-ring" cx="30" cy="30" r="26" stroke="#4f8cff" stroke-width="6" fill="none" stroke-linecap="round" />
</svg>
<span id="task-progress-ring-label" class="task-progress-ring-label">0%</span>
</div>
</div>
</div>
<div class="view-mode-toggle">
<button class="view-mode-btn" id="list-mode-btn">List</button>
<button class="view-mode-btn" id="grid-mode-btn">Grid</button>
<button class="view-mode-btn" id="compact-mode-btn">Compact</button>
</div>
<ul id="task-list" role="list" aria-label="Task List" tabindex="0"></ul>
<div class="task-actions">
<button id="sort-priority-btn">Sort by Priority</button>
<button id="sort-date-btn">Sort by Date</button>
<button id="sort-tasks-btn">Sort A-Z</button>
<button id="export-data-btn">Export Data</button>
<button id="import-data-btn">Import Data</button>
<button id="clear-all-btn">Clear All</button>
</div>
<input
type="file"
id="import-file-input"
accept=".json"
style="display: none"
/>
</section>
<section class="card weather-widget">
<h2>Weather Report</h2>
<div class="weather-search" style="justify-content: center">
<input
type="text"
id="city-input"
placeholder="Search city..."
/>
<button id="search-weather-btn">Search</button>
<button id="get-location-btn">
Get My Location Weather
</button>
</div>
<div id="weather-info" role="status" aria-live="polite">
<p class="loading-text">
Search for a city or use your location to see the
weather...
</p>
</div>
</section>
<section class="card toast-demo-section">
<h2>Toast Notifications Demo</h2>
<p style="margin-bottom: 1rem; font-size: 14px; opacity: 0.85;">Test the custom toast notification system with different types and positioning:</p>
<div class="toast-demo-buttons">
<button id="toast-success-btn" class="demo-btn success-btn">Success Toast</button>
<button id="toast-error-btn" class="demo-btn error-btn">Error Toast</button>
<button id="toast-warning-btn" class="demo-btn warning-btn">Warning Toast</button>
<button id="toast-info-btn" class="demo-btn info-btn">Info Toast</button>
</div>
<div style="margin-top: 1rem;">
<label for="toast-position-select" style="font-weight: 500; margin-right: 0.5rem;">Position:</label>
<select id="toast-position-select" style="padding: 0.5rem; border-radius: 6px; border: 1px solid var(--border-color); background: var(--card-bg-color); color: var(--text-color);">
<option value="top-right">Top Right</option>
<option value="top-left">Top Left</option>
<option value="bottom-right">Bottom Right</option>
<option value="bottom-left">Bottom Left</option>
<option value="top-center">Top Center</option>
<option value="bottom-center">Bottom Center</option>
</select>
<button id="clear-all-toasts-btn" class="demo-btn" style="margin-left: 1rem;">Clear All Toasts</button>
</div>
</section>
<!-- Add this right before the closing </main> tag -->
<div id="shortcut-modal" class="modal">
<div class="modal-content">
<h3>Keyboard Shortcuts</h3>
<ul>
<li><b>Enter</b>: Add Task (when input focused)</li>
<li><b>Ctrl+N</b>: Add Task</li>
<li><b>/</b>: Focus Task Input</li>
<li><b>Arrow Up/Down</b>: Navigate Tasks</li>
<li><b>Ctrl+Enter</b>: Complete Selected Task</li>
<li><b>Delete</b>: Delete Selected Task</li>
<li><b>Ctrl+S</b>: Sort Tasks</li>
<li><b>Ctrl+Shift+C</b>: Clear All Tasks</li>
<li><b>?</b>: Show Shortcut Help</li>
<li><b>Esc</b>: Close Shortcut Help</li>
</ul>
<button id="close-shortcut-modal">Close</button>
</div>
</div>
</main>
<footer>
<p>
© <span id="year"></span> Fsoc-Medium Project. All rights
reserved.
</p>
<div class="footer-nav">
<a href="index.html">Dashboard</a> |
<a href="about.html">About</a> | <a href="#contact">Contact</a>
</div>
</footer>
<!-- Toast Notification Container -->
<div id="toast-container" class="toast-container"></div>
<!-- Scripts consolidated -->
<script src="script.js"></script>
<script>
// =========================
// ACCESSIBILITY FEATURES
// =========================
// --- Font Size Controls ---
const increaseFontBtn = document.getElementById('increase-font');
const decreaseFontBtn = document.getElementById('decrease-font');
let fontSize = 100;
increaseFontBtn.addEventListener('click', () => {
fontSize += 10;
document.body.style.fontSize = fontSize + '%';
});
decreaseFontBtn.addEventListener('click', () => {
if (fontSize > 60) {
fontSize -= 10;
document.body.style.fontSize = fontSize + '%';
}
});
// --- High Contrast Mode ---
const toggleContrastBtn = document.getElementById('toggle-contrast');
const highContrastStylesheet = document.getElementById('high-contrast-stylesheet');
toggleContrastBtn.addEventListener("click", () => {
if (contrastStylesheet.disabled) {
contrastStylesheet.disabled = false; // enable contrast mode
document.body.classList.add("high-contrast-active");
} else {
contrastStylesheet.disabled = true; // disable contrast mode
document.body.classList.remove("high-contrast-active");
}
});
if (localStorage.getItem('highContrast') === 'true') {
highContrastStylesheet.disabled = false;
}
// --- Animation Toggle ---
const toggleAnimationsBtn = document.getElementById('toggle-animations');
toggleAnimationsBtn.addEventListener('click', () => {
const animationsDisabled = document.body.classList.toggle('reduce-motion');
localStorage.setItem('reduceMotion', animationsDisabled);
});
if (localStorage.getItem('reduceMotion') === 'true') {
document.body.classList.add('reduce-motion');
}
// --- Text Spacing Control ---
const textSpacingSelect = document.getElementById('text-spacing');
textSpacingSelect.addEventListener('change', (e) => {
const spacing = e.target.value;
if (spacing === 'normal') {
document.body.style.letterSpacing = 'normal';
document.body.style.lineHeight = 'normal';
} else if (spacing === 'wide') {
document.body.style.letterSpacing = '1px';
document.body.style.lineHeight = '1.6';
} else if (spacing === 'wider') {
document.body.style.letterSpacing = '2px';
document.body.style.lineHeight = '1.8';
}
});
// --- Keyboard Navigation Focus Indicator ---
document.body.addEventListener('keyup', (e) => {
if (e.key === 'Tab') {
document.body.classList.add('user-is-tabbing');
}
});
document.body.addEventListener('mousedown', () => {
document.body.classList.remove('user-is-tabbing');
});
</script>
</body>
</body>
</html>