Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
355 lines (314 loc) · 23.2 KB
/
Copy pathindex.html
File metadata and controls
355 lines (314 loc) · 23.2 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
<!DOCTYPE html>
<html lang="en" class="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Daily Routine & Schedule Matrix</title>
<!-- Tailwind CSS CDN -->
<script src="https://cdn.tailwindcss.com"></script>
<script>
tailwind.config = {
darkMode: 'class',
theme: {
extend: {
colors: {
brand: {
accent: 'var(--brand-accent)',
darkBg: '#07060b',
}
},
fontFamily: {
sans: ['Inter', '-apple-system', 'BlinkMacSystemFont', 'Segoe UI', 'Roboto', 'sans-serif']
}
}
}
}
</script>
<!-- Phosphor Icons -->
<script src="https://unpkg.com/@phosphor-icons/web"></script>
<link rel="stylesheet" href="styles.css">
</head>
<body id="app-body" class="bg-[#07060b] text-neutral-200 h-screen w-screen overflow-hidden font-sans antialiased selection:bg-indigo-500 selection:text-white p-2 sm:p-4 flex items-center justify-center transition-colors duration-300">
<!-- Canvas overlay for celebration confetti -->
<canvas id="confetti-canvas"></canvas>
<!-- MAIN DASHBOARD FRAME -->
<div class="glass-container w-full h-full max-w-[1480px] max-h-[940px] rounded-[28px] overflow-hidden flex flex-col md:flex-row relative shadow-2xl">
<!-- 1. COLLAPSIBLE LEFT SIDEBAR -->
<aside id="main-sidebar" aria-label="Main Navigation" class="w-full md:w-56 p-4 border-r border-white/5 flex flex-col justify-between shrink-0 bg-black/30 transition-all duration-300 relative z-10">
<button onclick="toggleSidebar()" id="sidebar-toggle-btn" title="Toggle Navigation Sidebar" class="hidden md:flex absolute -right-3 top-6 w-6 h-6 rounded-full glass-card border border-white/10 items-center justify-center text-neutral-400 hover:text-white hover:scale-110 transition-all z-20 shadow-md">
<i id="sidebar-toggle-icon" class="ph ph-caret-left text-xs"></i>
</button>
<div class="flex flex-col h-full justify-between">
<div>
<!-- USER NAME AT LOGO AREA -->
<div class="flex items-center gap-3 mb-8 px-2 pt-2 overflow-hidden">
<div class="w-9 h-9 rounded-xl accent-bg flex items-center justify-center text-white shrink-0 shadow-[0_0_15px_var(--brand-accent)]">
<i class="ph ph-user text-lg"></i>
</div>
<span id="sidebar-username" class="sidebar-text text-base font-extrabold tracking-wide truncate">User</span>
</div>
<nav class="space-y-2">
<button onclick="switchTab('today')" id="nav-today" class="w-full px-3.5 py-3 rounded-xl text-xs font-bold flex items-center gap-3 transition-all glass-card-active">
<i class="ph ph-house text-lg shrink-0"></i>
<span class="sidebar-text truncate">Today</span>
</button>
<button onclick="switchTab('week')" id="nav-week" class="w-full px-3.5 py-3 rounded-xl text-xs font-bold flex items-center gap-3 transition-all text-neutral-400 hover:text-white hover:bg-white/5">
<i class="ph ph-calendar-blank text-lg shrink-0"></i>
<span class="sidebar-text truncate">Week View</span>
</button>
<button onclick="switchTab('settings')" id="nav-settings" class="w-full px-3.5 py-3 rounded-xl text-xs font-bold flex items-center gap-3 transition-all text-neutral-400 hover:text-white hover:bg-white/5">
<i class="ph ph-gear text-lg shrink-0"></i>
<span class="sidebar-text truncate">Settings</span>
</button>
</nav>
</div>
<!-- ADD TASK OPTION MOVED TO BOTTOM LEFT -->
<div class="pt-4 border-t border-white/5">
<button onclick="openTaskModal()" class="w-full accent-bg hover:brightness-110 px-4 py-3 rounded-xl text-xs font-bold flex items-center justify-center gap-2 text-white transition-all hover:scale-[1.02] active:scale-95 shadow-[0_0_15px_var(--brand-accent)]">
<i class="ph ph-plus text-base font-bold shrink-0"></i>
<span class="sidebar-text truncate">Add Task</span>
</button>
</div>
</div>
</aside>
<!-- 2. CENTER WORKSPACE -->
<main class="flex-1 p-5 md:p-6 overflow-hidden flex flex-col justify-between relative bg-black/10">
<!-- VIEW A: TODAY / TIMELINE VIEW -->
<section id="view-today" aria-label="Today Workspace" class="view-content flex flex-col h-full overflow-hidden">
<!-- Top Header: Quote Centered -->
<header class="flex items-center justify-center mb-3 shrink-0">
<p id="user-subtitle-heading" class="text-xs sm:text-sm text-neutral-300 italic font-medium tracking-wide text-center">"Discipline today, freedom tomorrow."</p>
</header>
<!-- Date & Progress Bar -->
<div class="flex flex-col sm:flex-row sm:items-center justify-between gap-3 mb-4 shrink-0">
<div>
<h2 id="header-date" class="text-xs font-bold tracking-widest uppercase text-neutral-400">Daily Routine Matrix</h2>
<div class="flex items-center gap-3 mt-1">
<span id="completion-text" class="text-xs sm:text-sm font-bold text-neutral-300">0 / 0 completed</span>
<div class="w-36 h-2 bg-neutral-800 rounded-full overflow-hidden">
<div id="progress-bar" class="h-full accent-bg rounded-full shadow-[0_0_12px_var(--brand-accent)] transition-all duration-500" style="width: 0%;"></div>
</div>
</div>
</div>
<!-- Day Selector -->
<div id="day-selector" class="flex items-center gap-1.5 glass-card p-1.5 rounded-2xl border border-white/10 shadow-md">
<!-- Rendered by JS -->
</div>
</div>
<!-- ENLARGED MAIN TASK LIST AREA (Shifted Upwards) -->
<div class="relative pl-12 pr-2 py-1 flex-1 overflow-y-auto custom-scroll" id="timeline-container">
<div class="timeline-line"></div>
<div id="timeline-list" class="space-y-3">
<!-- Dynamic Tasks -->
</div>
</div>
</section>
<!-- VIEW B: WEEK OVERVIEW -->
<section id="view-week" aria-label="Weekly Schedule Matrix" class="view-content hidden flex-col h-full overflow-hidden">
<header class="flex items-center justify-between mb-4 shrink-0">
<div>
<h2 class="text-xl font-bold tracking-tight">Weekly Schedule Matrix</h2>
<p class="text-xs text-neutral-400">Manage tasks for specific days or use the SVG button to mirror your routine across all days.</p>
</div>
</header>
<div id="week-grid" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 overflow-y-auto custom-scroll pr-1 flex-1 pb-2">
<!-- Populated dynamically -->
</div>
</section>
<!-- VIEW C: SETTINGS -->
<section id="view-settings" aria-label="Settings" class="view-content hidden flex-col h-full overflow-y-auto custom-scroll pr-2">
<h2 class="text-xl font-bold mb-4 tracking-tight">Settings</h2>
<div class="glass-card rounded-2xl p-6 space-y-6">
<!-- Profile -->
<div class="space-y-3 pb-5 border-b border-white/5">
<h3 class="text-xs font-bold text-neutral-400 uppercase tracking-wider">Profile Configuration</h3>
<div class="grid grid-cols-1 sm:grid-cols-2 gap-4">
<div>
<label class="block text-xs text-neutral-400 mb-1">Your Name</label>
<input type="text" id="setting-username" oninput="updateProfileSettings()" class="w-full glass-input rounded-xl px-3.5 py-2.5 text-xs focus:outline-none">
</div>
<div>
<label class="block text-xs text-neutral-400 mb-1">Subtitle Quote</label>
<input type="text" id="setting-subtitle" oninput="updateProfileSettings()" class="w-full glass-input rounded-xl px-3.5 py-2.5 text-xs focus:outline-none">
</div>
</div>
</div>
<!-- Appearance -->
<div class="space-y-3 pb-5 border-b border-white/5">
<h3 class="text-xs font-bold text-neutral-400 uppercase tracking-wider">Appearance & Theme Settings</h3>
<div class="grid grid-cols-1 sm:grid-cols-3 gap-4">
<div>
<label class="block text-xs text-neutral-400 mb-1">Accent Glow Color</label>
<input type="color" id="setting-accent-color" onchange="updateThemeSettings()" class="w-full h-10 rounded-xl glass-input p-1 cursor-pointer">
</div>
<div>
<label class="block text-xs text-neutral-400 mb-1">Font Size</label>
<select id="setting-font-size" onchange="updateThemeSettings()" class="w-full glass-input rounded-xl px-3 py-2 text-xs bg-neutral-900 text-white focus:outline-none">
<option value="14px">Compact (14px)</option>
<option value="16px" selected>Default (16px)</option>
<option value="18px">Large (18px)</option>
</select>
</div>
</div>
</div>
<!-- Backup & Reset -->
<div class="space-y-3">
<h3 class="text-xs font-bold text-neutral-400 uppercase tracking-wider">Data Backup & Restore</h3>
<div class="flex flex-wrap gap-3">
<button onclick="exportData()" class="px-4 py-2.5 rounded-xl glass-input hover:bg-white/10 text-xs font-semibold transition-all">Export JSON Backup</button>
<button onclick="triggerImport()" class="px-4 py-2.5 rounded-xl glass-input hover:bg-white/10 text-xs font-semibold transition-all">Import JSON Backup</button>
<input type="file" id="import-file-input" class="hidden" accept=".json" onchange="importData(event)">
<button onclick="openConfirmModal('resetAll')" class="px-4 py-2.5 rounded-xl bg-red-500/20 text-red-300 border border-red-500/30 text-xs font-semibold hover:bg-red-500/30 transition-all">Reset All Local Data</button>
</div>
</div>
</div>
</section>
</main>
<!-- 3. RIGHT WIDGET PANEL -->
<aside aria-label="Selected Task and Calendar Panel" class="w-full md:w-80 p-5 border-l border-white/5 flex flex-col gap-4 shrink-0 bg-black/30 overflow-y-auto custom-scroll z-10">
<!-- CURRENT TASK WIDGET -->
<div class="glass-card rounded-2xl p-4 relative overflow-hidden flex flex-col justify-between shadow-lg">
<div class="flex items-center justify-between mb-3">
<span class="text-[10px] font-extrabold tracking-wider text-neutral-400 uppercase">SELECTED / ACTIVE TASK</span>
</div>
<div class="text-center py-2">
<div id="widget-now-icon-wrapper" class="w-16 h-16 rounded-2xl glass-card border border-white/20 flex items-center justify-center mx-auto mb-3 shadow-xl overflow-hidden p-3 active-task-svg-glow transition-all duration-300">
<i class="ph ph-clock text-3xl"></i>
</div>
<h3 id="widget-now-title" class="text-lg font-extrabold truncate text-white">No Task</h3>
<p id="widget-now-time" class="text-xs font-mono font-bold text-neutral-400 mt-0.5">--:--</p>
</div>
<div class="mt-3">
<div class="glass-input rounded-xl p-3 border border-white/10">
<div class="flex items-center justify-between mb-1.5">
<span class="text-[10px] font-extrabold tracking-wider text-neutral-400 uppercase">Task Notes</span>
<span id="note-saved-indicator" class="text-[10px] accent-text font-bold opacity-0 transition-opacity duration-300">Saved</span>
</div>
<textarea id="widget-now-notes-input" oninput="saveRightPanelNote()" rows="3" placeholder="Write quick notes for this task..." class="w-full bg-transparent text-xs text-neutral-200 focus:outline-none resize-none font-light leading-snug"></textarea>
</div>
</div>
</div>
<!-- ENGLISH CALENDAR WIDGET -->
<div class="glass-card rounded-2xl p-4 shadow-lg">
<div class="flex items-center justify-between mb-3">
<div class="flex items-center gap-1.5">
<span id="calendar-month-year" class="text-xs font-bold tracking-wide text-white">AUGUST 2026</span>
<span id="calendar-type-badge" class="text-[9px] px-1.5 py-0.5 rounded bg-white/10 text-neutral-300 font-mono">AD</span>
</div>
<div class="flex items-center gap-1 text-neutral-400 text-xs">
<button onclick="navigateMonth(-1)" class="p-1 hover:text-white transition-colors" title="Previous Month"><i class="ph ph-caret-left"></i></button>
<button onclick="navigateMonth(1)" class="p-1 hover:text-white transition-colors" title="Next Month"><i class="ph ph-caret-right"></i></button>
</div>
</div>
<div id="calendar-week-headers" class="grid grid-cols-7 text-center text-[10px] font-bold text-neutral-400 mb-2">
<span>S</span><span>M</span><span>T</span><span>W</span><span>T</span><span>F</span><span>S</span>
</div>
<div id="calendar-days-grid" class="grid grid-cols-7 text-center text-xs gap-y-1.5 font-mono">
<!-- Dynamic Calendar Grid -->
</div>
</div>
<!-- CURRENT TIME WIDGET -->
<div class="glass-card rounded-2xl p-4 shadow-lg flex items-center justify-between border border-white/10">
<div class="flex items-center gap-3">
<i class="ph ph-clock accent-text text-2xl"></i>
<div>
<span class="text-[10px] font-extrabold tracking-wider text-neutral-400 uppercase block">CURRENT TIME</span>
<span id="header-time" class="text-base sm:text-lg font-mono font-bold tracking-widest text-white">09:00:00 PM</span>
</div>
</div>
</div>
</aside>
</div>
<!-- TASK EDIT MODAL -->
<div id="task-modal" class="fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/80 backdrop-blur-md opacity-0 pointer-events-none transition-all duration-200">
<div class="glass-container rounded-3xl p-6 max-w-md w-full border border-white/10 shadow-2xl transform scale-95 transition-transform duration-200" id="modal-content">
<div class="flex items-center justify-between mb-4">
<h3 id="modal-title" class="text-lg font-bold">New Task</h3>
<button onclick="closeTaskModal()" class="text-neutral-400 hover:text-white p-1 transition-colors">
<i class="ph ph-x text-lg"></i>
</button>
</div>
<form id="task-form" onsubmit="saveTask(event)" class="space-y-4">
<input type="hidden" id="task-id">
<div>
<label class="block text-xs font-bold text-neutral-400 mb-1">Task Title</label>
<input type="text" id="task-name" required placeholder="e.g. Build REST API, Cybersecurity, Gym" class="w-full glass-input rounded-xl px-3.5 py-2.5 text-xs focus:outline-none focus:border-[var(--brand-accent)]">
</div>
<div class="grid grid-cols-2 gap-3">
<div>
<label class="block text-xs font-bold text-neutral-400 mb-1">Start Time</label>
<input type="time" id="task-start" required class="w-full glass-input rounded-xl px-3 py-2 text-xs focus:outline-none focus:border-[var(--brand-accent)]">
</div>
<div>
<label class="block text-xs font-bold text-neutral-400 mb-1">End Time</label>
<input type="time" id="task-end" class="w-full glass-input rounded-xl px-3 py-2 text-xs focus:outline-none focus:border-[var(--brand-accent)]">
</div>
</div>
<div>
<label class="block text-xs font-bold text-neutral-400 mb-1">Assigned Days</label>
<div id="modal-days-selector" class="flex justify-between gap-1">
<!-- Rendered by JS -->
</div>
</div>
<div>
<label class="block text-xs font-bold text-neutral-400 mb-1">Task Notes</label>
<input type="text" id="task-notes" placeholder="e.g. Clean code, review endpoints" class="w-full glass-input rounded-xl px-3.5 py-2.5 text-xs focus:outline-none focus:border-[var(--brand-accent)]">
</div>
<div>
<label class="block text-xs font-bold text-neutral-400 mb-1">Task Icon / Tech SVG Gallery</label>
<select id="task-icon-type" onchange="toggleIconInputType()" class="w-full glass-input rounded-xl px-3 py-2 text-xs bg-neutral-900 text-white focus:outline-none mb-2">
<option value="preset">Select from CS & Tech SVG Gallery</option>
<option value="custom_svg">Paste Custom Raw SVG Code</option>
</select>
<div id="preset-icon-container">
<input type="text" id="icon-search-input" oninput="filterIconGallery()" placeholder="Search icons (e.g. linux, js, api, ai, python...)" class="w-full glass-input rounded-xl px-3 py-2 text-xs focus:outline-none mb-2">
<div id="icon-gallery-grid" class="grid grid-cols-6 sm:grid-cols-8 gap-2 max-h-36 overflow-y-auto custom-scroll p-2 glass-card rounded-xl">
<!-- Rendered by JS -->
</div>
<input type="hidden" id="selected-icon-preset" value="linux">
</div>
<div id="custom-svg-container" class="hidden">
<textarea id="task-custom-svg" placeholder="Paste raw <svg>...</svg> code here" rows="3" class="w-full glass-input rounded-xl px-3 py-2 text-xs font-mono focus:outline-none"></textarea>
</div>
</div>
<div class="flex items-center justify-between pt-3 border-t border-white/5">
<button type="button" id="delete-task-btn" onclick="deleteCurrentTask()" class="hidden px-3.5 py-2 rounded-xl text-xs font-bold text-red-400 hover:bg-red-500/20 transition-all">Delete Task</button>
<div class="flex items-center gap-2 ml-auto">
<button type="button" onclick="closeTaskModal()" class="px-4 py-2 rounded-xl text-xs font-semibold text-neutral-400 hover:text-white transition-all">Cancel</button>
<button type="submit" class="px-5 py-2 rounded-xl accent-bg text-white text-xs font-bold shadow-lg hover:brightness-110 active:scale-95 transition-all">Save Task</button>
</div>
</div>
</form>
</div>
</div>
<!-- ALL TASKS COMPLETED VICTORY TROPHY CELEBRATION MODAL -->
<div id="victory-modal" class="fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/80 backdrop-blur-lg opacity-0 pointer-events-none transition-all duration-300">
<div id="victory-modal-card" class="glass-container rounded-3xl p-8 max-w-sm w-full border border-yellow-500/30 text-center shadow-[0_0_50px_rgba(234,179,8,0.3)] transform scale-90 transition-all duration-300">
<div class="w-24 h-24 mx-auto mb-4 flex items-center justify-center animate-trophy">
<i class="ph-fill ph-trophy text-7xl text-yellow-400"></i>
</div>
<h3 class="text-xl font-black text-white tracking-tight">Congrats!</h3>
<p class="text-sm font-semibold text-yellow-300 mt-1 mb-2">All work done for the day!</p>
<p class="text-xs text-neutral-400 leading-relaxed mb-6 font-light">You checked off every target on your schedule today. Great job keeping the momentum going!</p>
<button onclick="closeVictoryModal()" class="w-full py-3 rounded-2xl bg-gradient-to-r from-yellow-500 to-amber-600 text-black font-extrabold text-sm shadow-xl hover:brightness-110 active:scale-95 transition-all">
Thanks!
</button>
</div>
</div>
<!-- CONFIRMATION MODAL -->
<div id="confirm-modal" class="fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/80 backdrop-blur-md opacity-0 pointer-events-none transition-all duration-200">
<div class="glass-container rounded-3xl p-6 max-w-sm w-full border border-white/10 text-center shadow-2xl">
<div class="w-12 h-12 rounded-2xl bg-red-500/20 text-red-400 flex items-center justify-center mx-auto mb-3 border border-red-500/30">
<i class="ph ph-warning text-2xl"></i>
</div>
<h3 id="confirm-modal-title" class="text-base font-bold">Are you sure?</h3>
<p id="confirm-modal-msg" class="text-xs text-neutral-400 mt-1 mb-5">This action will reset your stored data.</p>
<div class="flex items-center justify-center gap-2">
<button onclick="closeConfirmModal()" class="w-1/2 py-2.5 rounded-xl text-xs font-semibold glass-input hover:bg-white/10 transition-all">Cancel</button>
<button id="confirm-modal-action-btn" class="w-1/2 py-2.5 rounded-xl text-xs font-semibold bg-red-500 text-white shadow-lg hover:bg-red-600 transition-all">Yes, Proceed</button>
</div>
</div>
</div>
<script src="script.js"></script>
</body>
</html>