Spaces:
Running
Running
File size: 7,350 Bytes
07b8f66 | 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 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>TaskMaster Pro</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script src="https://unpkg.com/feather-icons"></script>
<script>
tailwind.config = {
theme: {
extend: {
colors: {
primary: '#6366f1',
secondary: '#8b5cf6',
}
}
}
}
</script>
</head>
<body class="bg-gray-50 min-h-screen flex flex-col">
<custom-navbar></custom-navbar>
<main class="flex-1 container mx-auto px-4 py-8">
<div class="max-w-6xl mx-auto">
<div class="flex justify-between items-center mb-8">
<h1 class="text-3xl font-bold text-gray-800">Your Tasks</h1>
<button id="addTaskBtn" class="bg-primary hover:bg-primary-600 text-white px-4 py-2 rounded-lg flex items-center gap-2 transition">
<i data-feather="plus"></i> Add Task
</button>
</div>
<div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-8">
<div class="bg-white p-6 rounded-xl shadow-sm border border-gray-100">
<h3 class="text-gray-500 text-sm font-medium mb-1">Total Tasks</h3>
<p id="totalTasks" class="text-3xl font-bold text-gray-800">0</p>
</div>
<div class="bg-white p-6 rounded-xl shadow-sm border border-gray-100">
<h3 class="text-gray-500 text-sm font-medium mb-1">Completed</h3>
<p id="completedTasks" class="text-3xl font-bold text-green-500">0</p>
</div>
<div class="bg-white p-6 rounded-xl shadow-sm border border-gray-100">
<h3 class="text-gray-500 text-sm font-medium mb-1">Pending</h3>
<p id="pendingTasks" class="text-3xl font-bold text-yellow-500">0</p>
</div>
<div class="bg-white p-6 rounded-xl shadow-sm border border-gray-100">
<h3 class="text-gray-500 text-sm font-medium mb-1">High Priority</h3>
<p id="highPriorityTasks" class="text-3xl font-bold text-red-500">0</p>
</div>
</div>
<div class="bg-white rounded-xl shadow-sm border border-gray-100 overflow-hidden">
<div class="flex justify-between items-center p-4 border-b border-gray-100">
<div class="flex gap-2">
<button id="filterAll" class="filter-btn active px-4 py-2 rounded-lg bg-primary text-white">
All
</button>
<button id="filterPending" class="filter-btn px-4 py-2 rounded-lg bg-gray-100 hover:bg-gray-200 text-gray-700">
Pending
</button>
<button id="filterCompleted" class="filter-btn px-4 py-2 rounded-lg bg-gray-100 hover:bg-gray-200 text-gray-700">
Completed
</button>
</div>
<div class="relative">
<input type="text" id="searchTasks" placeholder="Search tasks..." class="pl-10 pr-4 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary focus:border-primary outline-none">
<i data-feather="search" class="absolute left-3 top-2.5 text-gray-400"></i>
</div>
</div>
<div id="tasksContainer" class="divide-y divide-gray-100">
<!-- Tasks will be loaded here -->
<div class="p-6 text-center text-gray-500">
<i data-feather="inbox" class="w-12 h-12 mx-auto text-gray-300 mb-2"></i>
<p>No tasks found. Add your first task!</p>
</div>
</div>
</div>
</div>
</main>
<!-- Add/Edit Task Modal -->
<div id="taskModal" class="fixed inset-0 bg-black bg-opacity-50 flex items-center justify-center z-50 hidden">
<div class="bg-white rounded-xl shadow-lg w-full max-w-md mx-4">
<div class="flex justify-between items-center border-b border-gray-200 p-4">
<h3 class="text-lg font-semibold text-gray-800" id="modalTitle">Add New Task</h3>
<button id="closeModalBtn" class="text-gray-500 hover:text-gray-700">
<i data-feather="x"></i>
</button>
</div>
<form id="taskForm" class="p-4 space-y-4">
<input type="hidden" id="taskId">
<div>
<label for="taskTitle" class="block text-sm font-medium text-gray-700 mb-1">Title</label>
<input type="text" id="taskTitle" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-primary focus:border-primary outline-none" required>
</div>
<div>
<label for="taskDescription" class="block text-sm font-medium text-gray-700 mb-1">Description</label>
<textarea id="taskDescription" rows="3" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-primary focus:border-primary outline-none"></textarea>
</div>
<div class="grid grid-cols-2 gap-4">
<div>
<label for="taskPriority" class="block text-sm font-medium text-gray-700 mb-1">Priority</label>
<select id="taskPriority" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-primary focus:border-primary outline-none">
<option value="high">High</option>
<option value="medium">Medium</option>
<option value="low">Low</option>
</select>
</div>
<div>
<label for="taskDueDate" class="block text-sm font-medium text-gray-700 mb-1">Due Date</label>
<input type="date" id="taskDueDate" class="w-full px-3 py-2 border border-gray-300 rounded-md focus:ring-primary focus:border-primary outline-none">
</div>
</div>
<div class="flex justify-end gap-2 pt-4">
<button type="button" id="cancelModalBtn" class="px-4 py-2 border border-gray-300 rounded-md text-gray-700 hover:bg-gray-50">Cancel</button>
<button type="submit" class="px-4 py-2 bg-primary hover:bg-primary-600 text-white rounded-md">Save Task</button>
</div>
</form>
</div>
</div>
<custom-footer></custom-footer>
<script src="components/navbar.js"></script>
<script src="components/footer.js"></script>
<script src="script.js"></script>
<script>
feather.replace();
</script>
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
</body>
</html> |