Spaces:
Running

File size: 9,974 Bytes
90ebc2a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
<!DOCTYPE html>
<html lang="tr">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>TaskMaster Pro - Panel</title>
    <link rel="icon" type="image/x-icon" href="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'><text y='.9em' font-size='90'>📝</text></svg>">
    <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: {
                            50: '#fff7ed',
                            100: '#ffedd5',
                            200: '#fed7aa',
                            300: '#fdba74',
                            400: '#fb923c',
                            500: '#f97316',
                            600: '#ea580c',
                            700: '#c2410c',
                            800: '#9a3412',
                            900: '#7c2d12',
                        }
                    }
                }
            }
        }
    </script>
</head>
<body class="bg-gray-50">
    <custom-navbar></custom-navbar>

    <div class="container mx-auto px-4 py-8">
        <div class="mb-8">
            <h1 class="text-3xl font-bold text-gray-900 mb-2">Hoş Geldin, <span id="userName">Kullanıcı</span>!</h1>
            <p class="text-gray-600">Bugün yapılacaklar listesini yönet</p>
        </div>

        <div class="grid grid-cols-1 md:grid-cols-4 gap-6 mb-8">
            <div class="bg-white rounded-xl shadow-sm p-6 border border-gray-100">
                <div class="flex items-center justify-between">
                    <div>
                        <p class="text-gray-500 text-sm">Toplam Görev</p>
                        <p class="text-2xl font-bold text-gray-900" id="totalTasks">0</p>
                    </div>
                    <div class="bg-blue-100 p-3 rounded-lg">
                        <i data-feather="list" class="text-blue-600 w-6 h-6"></i>
                    </div>
                </div>
            </div>
            <div class="bg-white rounded-xl shadow-sm p-6 border border-gray-100">
                <div class="flex items-center justify-between">
                    <div>
                        <p class="text-gray-500 text-sm">Tamamlandı</p>
                        <p class="text-2xl font-bold text-green-600" id="completedTasks">0</p>
                    </div>
                    <div class="bg-green-100 p-3 rounded-lg">
                        <i data-feather="check-circle" class="text-green-600 w-6 h-6"></i>
                    </div>
                </div>
            </div>
            <div class="bg-white rounded-xl shadow-sm p-6 border border-gray-100">
                <div class="flex items-center justify-between">
                    <div>
                        <p class="text-gray-500 text-sm">Devam Eden</p>
                        <p class="text-2xl font-bold text-orange-600" id="pendingTasks">0</p>
                    </div>
                    <div class="bg-orange-100 p-3 rounded-lg">
                        <i data-feather="clock" class="text-orange-600 w-6 h-6"></i>
                    </div>
                </div>
            </div>
            <div class="bg-white rounded-xl shadow-sm p-6 border border-gray-100">
                <div class="flex items-center justify-between">
                    <div>
                        <p class="text-gray-500 text-sm">Yüksek Öncelik</p>
                        <p class="text-2xl font-bold text-red-600" id="highPriorityTasks">0</p>
                    </div>
                    <div class="bg-red-100 p-3 rounded-lg">
                        <i data-feather="alert-circle" class="text-red-600 w-6 h-6"></i>
                    </div>
                </div>
            </div>
        </div>

        <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
            <div class="lg:col-span-2">
                <div class="bg-white rounded-xl shadow-sm p-6">
                    <div class="flex items-center justify-between mb-6">
                        <h2 class="text-xl font-semibold text-gray-900">Görevlerim</h2>
                        <button onclick="openAddTaskModal()" class="bg-primary-500 text-white px-4 py-2 rounded-lg hover:bg-primary-600 transition-colors flex items-center gap-2">
                            <i data-feather="plus" class="w-4 h-4"></i>
                            Yeni Görev
                        </button>
                    </div>

                    <div class="flex flex-wrap gap-2 mb-4">
                        <button onclick="filterTasks('all')" class="filter-btn px-3 py-1 rounded-full text-sm font-medium bg-primary-100 text-primary-700 transition-colors">
                            Tümü
                        </button>
                        <button onclick="filterTasks('pending')" class="filter-btn px-3 py-1 rounded-full text-sm font-medium text-gray-600 hover:bg-gray-100 transition-colors">
                            Devam Eden
                        </button>
                        <button onclick="filterTasks('completed')" class="filter-btn px-3 py-1 rounded-full text-sm font-medium text-gray-600 hover:bg-gray-100 transition-colors">
                            Tamamlandı
                        </button>
                        <button onclick="filterTasks('high')" class="filter-btn px-3 py-1 rounded-full text-sm font-medium text-gray-600 hover:bg-gray-100 transition-colors">
                            Yüksek Öncelik
                        </button>
                    </div>

                    <div id="tasksList" class="space-y-3">
                        <!-- Tasks will be added here dynamically -->
                    </div>
                </div>
            </div>

            <div>
                <div class="bg-white rounded-xl shadow-sm p-6">
                    <h3 class="text-lg font-semibold text-gray-900 mb-4">Kategoriler</h3>
                    <div class="space-y-2" id="categoriesList">
                        <!-- Categories will be added here -->
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- Add/Edit Task Modal -->
    <div id="taskModal" class="fixed inset-0 bg-black bg-opacity-50 hidden flex items-center justify-center p-4 z-50">
        <div class="bg-white rounded-xl max-w-md w-full p-6">
            <h3 class="text-xl font-semibold text-gray-900 mb-4" id="modalTitle">Yeni Görev Ekle</h3>
            <form id="taskForm" class="space-y-4">
                <div>
                    <label class="block text-sm font-medium text-gray-700 mb-1">Görev Başlığı</label>
                    <input type="text" id="taskTitle" required
                        class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500">
                </div>
                <div>
                    <label class="block text-sm font-medium text-gray-700 mb-1">Açıklama</label>
                    <textarea id="taskDescription" rows="3"
                        class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500"></textarea>
                </div>
                <div class="grid grid-cols-2 gap-4">
                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-1">Kategori</label>
                        <select id="taskCategory" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500">
                            <option value="İş">İş</option>
                            <option value="Kişisel">Kişisel</option>
                            <option value="Alışveriş">Alışveriş</option>
                            <option value="Sağlık">Sağlık</option>
                            <option value="Eğitim">Eğitim</option>
                            <option value="Diğer">Diğer</option>
                        </select>
                    </div>
                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-1">Öncelik</label>
                        <select id="taskPriority" class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500">
                            <option value="low">Düşük</option>
                            <option value="medium">Orta</option>
                            <option value="high">Yüksek</option>
                        </select>
                    </div>
                </div>
                <div>
                    <label class="block text-sm font-medium text-gray-700 mb-1">Tarih</label>
                    <input type="date" id="taskDate"
                        class="w-full px-3 py-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500">
                </div>
                <div class="flex gap-3 pt-4">
                    <button type="submit" class="flex-1 bg-primary-500 text-white py-2 rounded-lg hover:bg-primary-600 transition-colors">
                        Kaydet
                    </button>
                    <button type="button" onclick="closeTaskModal()" class="flex-1 bg-gray-200 text-gray-800 py-2 rounded-lg hover:bg-gray-300 transition-colors">
                        İptal
                    </button>
                </div>
            </form>
        </div>
    </div>

    <script src="components/navbar.js"></script>
    <script src="script.js"></script>
    <script>feather.replace();</script>
</body>
</html>