poluser commited on
Commit
2b6805d
·
verified ·
1 Parent(s): 4768c87

make it better

Browse files
Files changed (2) hide show
  1. README.md +8 -4
  2. index.html +375 -18
README.md CHANGED
@@ -1,10 +1,14 @@
1
  ---
2
- title: Undefined
3
- emoji: 🦀
4
  colorFrom: gray
5
- colorTo: gray
 
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
1
  ---
2
+ title: undefined
 
3
  colorFrom: gray
4
+ colorTo: blue
5
+ emoji: 🐳
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite-v3
10
  ---
11
 
12
+ # Welcome to your new DeepSite project!
13
+ This project was created with [DeepSite](https://deepsite.hf.co).
14
+
index.html CHANGED
@@ -1,19 +1,376 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
19
  </html>
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>TaskNinja Master - Slice Through Tasks! ⚔️</title>
7
+ <link rel="icon" type="image/x-icon" href="/static/favicon.ico">
8
+ <script src="https://cdn.tailwindcss.com"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
10
+ <script src="https://unpkg.com/feather-icons"></script>
11
+ <script src="https://cdn.jsdelivr.net/npm/vanta@latest/dist/vanta.globe.min.js"></script>
12
+ <script src="https://cdn.jsdelivr.net/npm/animejs/lib/anime.min.js"></script>
13
+ <script>
14
+ tailwind.config = {
15
+ theme: {
16
+ extend: {
17
+ colors: {
18
+ primary: '#6366f1',
19
+ secondary: '#f59e0b'
20
+ }
21
+ }
22
+ }
23
+ }
24
+ </script>
25
+ <style>
26
+ .vanta-bg {
27
+ position: fixed;
28
+ top: 0;
29
+ left: 0;
30
+ width: 100%;
31
+ height: 100%;
32
+ z-index: -1;
33
+ }
34
+ .glass-effect {
35
+ background: rgba(255, 255, 255, 0.1);
36
+ backdrop-filter: blur(10px);
37
+ border: 1px solid rgba(255, 255, 255, 0.2);
38
+ }
39
+ .task-card {
40
+ transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
41
+ box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
42
+ }
43
+ .task-card:hover {
44
+ transform: translateY(-5px);
45
+ box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
46
+ }
47
+ .fade-in {
48
+ animation: fadeIn 0.5s ease-in;
49
+ }
50
+ @keyframes fadeIn {
51
+ from { opacity: 0; transform: translateY(20px); }
52
+ to { opacity: 1; transform: translateY(0); }
53
+ }
54
+ </style>
55
+ </head>
56
+ <body class="min-h-screen bg-gradient-to-br from-gray-900 to-gray-800 text-white">
57
+ <div id="vanta-bg" class="vanta-bg"></div>
58
+
59
+ <!-- Navigation -->
60
+ <nav class="glass-effect sticky top-0 z-50">
61
+ <div class="container mx-auto px-4 py-4">
62
+ <div class="flex justify-between items-center">
63
+ <div class="flex items-center space-x-2">
64
+ <i data-feather="check-circle" class="text-primary"></i>
65
+ <h1 class="text-2xl font-bold">TaskNinja <span class="text-primary">Master</span> <span class="text-secondary">⚔️</span></h1>
66
+ </div>
67
+ <div class="flex space-x-4">
68
+ <button id="tasks-tab" class="px-4 py-2 rounded-lg bg-primary text-white font-semibold transition-all duration-300">Tasks</button>
69
+ <button id="history-tab" class="px-4 py-2 rounded-lg bg-gray-700 hover:bg-gray-600 text-white font-semibold transition-all duration-300">History</button>
70
+ </div>
71
+ </div>
72
+ </div>
73
+ </nav>
74
+
75
+ <!-- Main Content -->
76
+ <main class="container mx-auto px-4 py-8">
77
+ <!-- Tasks Section -->
78
+ <section id="tasks-section" class="fade-in">
79
+ <div class="max-w-4xl mx-auto">
80
+ <!-- Add Task Form -->
81
+ <div class="glass-effect rounded-2xl p-6 mb-8">
82
+ <h2 class="text-2xl font-bold mb-6 flex items-center">
83
+ <i data-feather="plus-circle" class="mr-3 text-primary animate-pulse"></i>
84
+ <span class="bg-clip-text text-transparent bg-gradient-to-r from-primary to-secondary">Throw a New Task Star</span> <span class="ml-2 text-secondary">✨</span>
85
+ </h2>
86
+ <form id="task-form" class="space-y-4">
87
+ <div class="grid md:grid-cols-2 gap-4">
88
+ <div>
89
+ <label class="block text-sm font-medium mb-2">Task Title</label>
90
+ <input type="text" id="task-title" placeholder="What needs to be done?" class="w-full px-4 py-3 rounded-lg bg-gray-800 border border-gray-600 focus:border-primary focus:ring-2 focus:ring-primary outline-none transition-all duration-300">
91
+ </div>
92
+ <div>
93
+ <label class="block text-sm font-medium mb-2">Priority</label>
94
+ <select id="task-priority" class="w-full px-4 py-3 rounded-lg bg-gray-800 border border-gray-600 focus:border-primary focus:ring-2 focus:ring-primary outline-none transition-all duration-300">
95
+ <option value="low">Low</option>
96
+ <option value="medium">Medium</option>
97
+ <option value="high">High</option>
98
+ </select>
99
+ </div>
100
+ </div>
101
+ <div>
102
+ <label class="block text-sm font-medium mb-2">Description</label>
103
+ <textarea id="task-description" placeholder="Add some details..." rows="3" class="w-full px-4 py-3 rounded-lg bg-gray-800 border border-gray-600 focus:border-primary focus:ring-2 focus:ring-primary outline-none transition-all duration-300"></textarea>
104
+ </div>
105
+ <button type="submit" class="w-full bg-primary hover:bg-indigo-600 text-white font-semibold py-3 px-6 rounded-lg transition-all duration-300 transform hover:scale-105 flex items-center justify-center">
106
+ <i data-feather="plus" class="mr-2"></i>
107
+ Add Task
108
+ </button>
109
+ </form>
110
+ </div>
111
+
112
+ <!-- Task List -->
113
+ <div class="glass-effect rounded-2xl p-6">
114
+ <h2 class="text-2xl font-bold mb-6 flex items-center">
115
+ <i data-feather="list" class="mr-3 text-secondary animate-spin" style="animation-duration: 3s"></i>
116
+ <span class="bg-clip-text text-transparent bg-gradient-to-r from-secondary to-primary">Dojo Tasks</span>
117
+ <span id="task-count" class="ml-3 bg-secondary text-white px-3 py-1 rounded-full text-sm">0 tasks</span>
118
+ </h2>
119
+ <div id="task-list" class="space-y-4">
120
+ <!-- Tasks will be dynamically added here -->
121
+ </div>
122
+ </div>
123
+ </div>
124
+ </section>
125
+
126
+ <!-- History Section -->
127
+ <section id="history-section" class="hidden fade-in">
128
+ <div class="max-w-4xl mx-auto">
129
+ <div class="glass-effect rounded-2xl p-6">
130
+ <h2 class="text-2xl font-bold mb-6 flex items-center">
131
+ <i data-feather="clock" class="mr-3 text-secondary animate-bounce" style="animation-duration: 2s"></i>
132
+ <span class="bg-clip-text text-transparent bg-gradient-to-r from-gray-400 to-gray-300">Ninja Scroll Archive</span> <span class="ml-2">📜</span>
133
+ <span id="history-count" class="ml-3 bg-gray-600 text-white px-3 py-1 rounded-full text-sm">0 completed</span>
134
+ </h2>
135
+ <div id="history-list" class="space-y-4">
136
+ <!-- Completed tasks will be dynamically added here -->
137
+ </div>
138
+ </div>
139
+ </div>
140
+ </section>
141
+ </main>
142
+
143
+ <!-- Footer -->
144
+ <footer class="glass-effect mt-12">
145
+ <div class="container mx-auto px-4 py-6 text-center text-gray-400">
146
+ <p class="text-sm">Crafted by <span class="font-bold text-primary">Ninja Developers</span> with <i data-feather="heart" class="inline w-4 h-4 text-red-500 animate-pulse"></i> | Sharpen your productivity katana daily!</p>
147
+ </div>
148
+ </footer>
149
+
150
+ <script>
151
+ // Initialize Vanta.js background
152
+ VANTA.GLOBE({
153
+ el: "#vanta-bg",
154
+ mouseControls: true,
155
+ touchControls: true,
156
+ gyroControls: false,
157
+ minHeight: 200.00,
158
+ minWidth: 200.00,
159
+ scale: 1.00,
160
+ scaleMobile: 1.00,
161
+ color: 0x6366f1,
162
+ backgroundColor: 0x111827
163
+ });
164
+
165
+ // Task management functionality
166
+ // Ninja-themed task storage with sound effects
167
+ const taskSound = new Audio('https://assets.mixkit.co/sfx/preview/mixkit-positive-interface-beep-221.mp3');
168
+ const completeSound = new Audio('https://assets.mixkit.co/sfx/preview/mixkit-unlock-game-notification-253.mp3');
169
+
170
+ let tasks = JSON.parse(localStorage.getItem('ninjaTasks')) || [];
171
+ let completedTasks = JSON.parse(localStorage.getItem('ninjaCompletedTasks')) || [];
172
+ // Tab switching
173
+ document.getElementById('tasks-tab').addEventListener('click', () => {
174
+ document.getElementById('tasks-section').classList.remove('hidden');
175
+ document.getElementById('history-section').classList.add('hidden');
176
+ document.getElementById('tasks-tab').classList.add('bg-primary', 'text-white');
177
+ document.getElementById('tasks-tab').classList.remove('bg-gray-700');
178
+ document.getElementById('history-tab').classList.add('bg-gray-700');
179
+ document.getElementById('history-tab').classList.remove('bg-primary', 'text-white');
180
+ });
181
+
182
+ document.getElementById('history-tab').addEventListener('click', () => {
183
+ document.getElementById('history-section').classList.remove('hidden');
184
+ document.getElementById('tasks-section').classList.add('hidden');
185
+ document.getElementById('history-tab').classList.add('bg-primary', 'text-white');
186
+ document.getElementById('history-tab').classList.remove('bg-gray-700');
187
+ document.getElementById('tasks-tab').classList.add('bg-gray-700');
188
+ document.getElementById('tasks-tab').classList.remove('bg-primary', 'text-white');
189
+ updateHistoryDisplay();
190
+ });
191
+
192
+ // Add task form
193
+ document.getElementById('task-form').addEventListener('submit', (e) => {
194
+ e.preventDefault();
195
+ const title = document.getElementById('task-title').value.trim();
196
+ const description = document.getElementById('task-description').value.trim();
197
+ const priority = document.getElementById('task-priority').value;
198
+
199
+ if (title) {
200
+ const newTask = {
201
+ id: Date.now(),
202
+ title,
203
+ description,
204
+ priority,
205
+ createdAt: new Date().toISOString(),
206
+ completed: false
207
+ };
208
+ tasks.push(newTask);
209
+ saveTasks();
210
+ updateTaskDisplay();
211
+ document.getElementById('task-form').reset();
212
+ // Ninja star throw animation
213
+ anime({
214
+ targets: '#task-title',
215
+ translateX: [-20, 0],
216
+ translateY: [-10, 0],
217
+ opacity: [0, 1],
218
+ duration: 800,
219
+ easing: 'spring(1, 80, 10, 0)'
220
+ });
221
+ // Animation for new task
222
+ anime({
223
+ targets: '.task-card:last-child',
224
+ translateY: [50, 0],
225
+ opacity: [0, 1],
226
+ duration: 500,
227
+ easing: 'easeOutQuad'
228
+ });
229
+ }
230
+ });
231
+
232
+ function saveTasks() {
233
+ localStorage.setItem('ninjaTasks', JSON.stringify(tasks));
234
+ localStorage.setItem('ninjaCompletedTasks', JSON.stringify(completedTasks));
235
+ taskSound.play();
236
+ }
237
+
238
+ function updateTaskDisplay() {
239
+ const taskList = document.getElementById('task-list');
240
+ const taskCount = document.getElementById('task-count');
241
+
242
+ const pendingTasks = tasks.filter(task => !task.completed);
243
+ taskCount.textContent = `${pendingTasks.length} ${pendingTasks.length === 1 ? 'task' : 'tasks'}`;
244
+
245
+ taskList.innerHTML = pendingTasks.map(task => `
246
+ <div class="task-card glass-effect rounded-xl p-4 border-l-4 ${
247
+ task.priority === 'high' ? 'border-red-500' :
248
+ task.priority === 'medium' ? 'border-yellow-500' : 'border-green-500'
249
+ }">
250
+ <div class="flex items-center justify-between">
251
+ <div class="flex items-center space-x-4">
252
+ <button onclick="toggleTask(${task.id})" class="w-6 h-6 rounded-full border-2 border-gray-400 hover:border-primary transition-all duration-300 flex items-center justify-center">
253
+ <i data-feather="check" class="w-4 h-4 text-white hidden"></i>
254
+ </button>
255
+ <div>
256
+ <h3 class="font-semibold text-lg">${task.title}</h3>
257
+ ${task.description ? `<p class="text-gray-300 text-sm mt-1">${task.description}</p>` : ''}
258
+ <div class="flex items-center space-x-4 mt-2">
259
+ <span class="px-2 py-1 rounded-full text-xs ${
260
+ task.priority === 'high' ? 'bg-red-500' :
261
+ task.priority === 'medium' ? 'bg-yellow-500' : 'bg-green-500'
262
+ }">${task.priority}</span>
263
+ <span class="text-gray-400 text-xs">${new Date(task.createdAt).toLocaleDateString()}</span>
264
+ </div>
265
+ </div>
266
+ </div>
267
+ <button onclick="deleteTask(${task.id})" class="text-gray-400 hover:text-red-400 transition-colors duration-300">
268
+ <i data-feather="trash-2" class="w-5 h-5"></i>
269
+ </button>
270
+ </div>
271
+ </div>
272
+ `).join('');
273
+
274
+ feather.replace();
275
+ }
276
+
277
+ function updateHistoryDisplay() {
278
+ const historyList = document.getElementById('history-list');
279
+ const historyCount = document.getElementById('history-count');
280
+
281
+ historyCount.textContent = `${completedTasks.length} ${completedTasks.length === 1 ? 'completed' : 'completed'}`;
282
+
283
+ historyList.innerHTML = completedTasks.map(task => `
284
+ <div class="glass-effect rounded-xl p-4 border-l-4 border-gray-500 opacity-75">
285
+ <div class="flex items-center justify-between">
286
+ <div class="flex items-center space-x-4">
287
+ <div class="w-6 h-6 rounded-full bg-green-500 flex items-center justify-center">
288
+ <i data-feather="check" class="w-4 h-4 text-white"></i>
289
+ </div>
290
+ <div>
291
+ <h3 class="font-semibold text-lg line-through">${task.title}</h3>
292
+ ${task.description ? `<p class="text-gray-400 text-sm mt-1 line-through">${task.description}</p>` : ''}
293
+ <div class="flex items-center space-x-4 mt-2">
294
+ <span class="px-2 py-1 rounded-full text-xs bg-gray-600">${task.priority}</span>
295
+ <span class="text-gray-500 text-xs">Completed on ${new Date(task.completedAt).toLocaleDateString()}</span>
296
+ </div>
297
+ </div>
298
+ </div>
299
+ </div>
300
+ </div>
301
+ `).join('');
302
+
303
+ feather.replace();
304
+ }
305
+ function toggleTask(taskId) {
306
+ completeSound.play();
307
+ const task = tasks.find(t => t.id === taskId);
308
+ if (task) {
309
+ task.completed = true;
310
+ task.completedAt = new Date().toISOString();
311
+ completedTasks.push(task);
312
+ tasks = tasks.filter(t => t.id !== taskId);
313
+ saveTasks();
314
+ updateTaskDisplay();
315
+
316
+ // Show completion animation
317
+ anime({
318
+ targets: '.task-card',
319
+ translateX: [0, -100],
320
+ opacity: [1, 0],
321
+ duration: 500,
322
+ easing: 'easeInQuad',
323
+ complete: function() {
324
+ updateTaskDisplay();
325
+ }
326
+ });
327
+ }
328
+ }
329
+
330
+ function deleteTask(taskId) {
331
+ if (confirm('Are you sure you want to delete this task?')) {
332
+ tasks = tasks.filter(t => t.id !== taskId);
333
+ saveTasks();
334
+ updateTaskDisplay();
335
+ }
336
+ }
337
+
338
+ // Initialize display
339
+ updateTaskDisplay();
340
+ feather.replace();
341
+
342
+ // Add some sample tasks if empty
343
+ if (tasks.length === 0 && completedTasks.length === 0) {
344
+ const sampleTasks = [
345
+ {
346
+ id: 1,
347
+ title: "Welcome to TaskNinja Master!",
348
+ description: "Slice through tasks like a true ninja master",
349
+ priority: "high",
350
+ createdAt: new Date().toISOString(),
351
+ completed: false
352
+ },
353
+ {
354
+ id: 2,
355
+ title: "Train your focus",
356
+ description: "Complete 5 tasks without distractions",
357
+ priority: "medium",
358
+ createdAt: new Date().toISOString(),
359
+ completed: false
360
+ },
361
+ {
362
+ id: 3,
363
+ title: "Achieve black belt",
364
+ description: "Complete 20 tasks to earn your black belt",
365
+ priority: "high",
366
+ createdAt: new Date().toISOString(),
367
+ completed: false
368
+ }
369
+ ];
370
+ tasks = sampleTasks;
371
+ saveTasks();
372
+ updateTaskDisplay();
373
+ }
374
+ </script>
375
+ </body>
376
  </html>