Spaces:
Running
Running
bi to do uygulaması yap giriş çıkış olsun
Browse filesFiles changed (6)
- README.md+7-4
- components/navbar.jsAdded+153
- dashboard.htmlAdded+191
- index.html+149-19
- script.jsAdded+343
- style.css+181-19
12345678910---title: Taskmaster Proemoji: 🚀colorFrom: pinkcolorTo: greensdk: staticpinned: false---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference12345678910111213---title: TaskMaster Pro 🍊colorFrom: redcolorTo: greenemoji: 🐳sdk: staticpinned: falsetags:- deepsite-v3---# Welcome to your new DeepSite project!This project was created with [DeepSite](https://huggingface.co/deepsite).
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153class CustomNavbar extends HTMLElement { connectedCallback() { this.attachShadow({ mode: 'open' }); const currentUser = JSON.parse(localStorage.getItem('currentUser')) || {}; this.shadowRoot.innerHTML = ` <style> * { margin: 0; padding: 0; box-sizing: border-box; } nav { background: white; box-shadow: 0 1px 3px rgba(0,0,0,0.1); position: sticky; top: 0; z-index: 40; } .nav-container { max-width: 1200px; margin: 0 auto; padding: 1rem 1.5rem; display: flex; justify-content: space-between; align-items: center; } .logo { display: flex; align-items: center; gap: 0.5rem; font-size: 1.5rem; font-weight: bold; color: #ea580c; text-decoration: none; transition: transform 0.2s; } .logo:hover { transform: scale(1.05); } .nav-menu { display: flex; align-items: center; gap: 1rem; } .user-info { display: flex; align-items: center; gap: 0.75rem; padding: 0.5rem 1rem; background: #fff7ed; border-radius: 0.75rem; cursor: pointer; transition: all 0.3s; } .user-info:hover { background: #fed7aa; transform: translateY(-1px); } .user-avatar { width: 2rem; height: 2rem; border-radius: 50%; background: linear-gradient(135deg, #f97316, #fb923c); display: flex; align-items: center; justify-content: center; color: white; font-weight: bold; } .user-name { font-weight: 500; color: #1f2937; } .logout-btn { padding: 0.5rem 1rem; background: #fee2e2; color: #dc2626; border: none; border-radius: 0.5rem; cursor: pointer; font-weight: 500; transition: all 0.3s; display: flex; align-items: center; gap: 0.5rem; } .logout-btn:hover { background: #fca5a5; transform: translateY(-1px); } @media (max-width: 768px) { .nav-container { padding: 0.75rem 1rem; } .logo { font-size: 1.25rem; } .user-name { display: none; } } </style> <nav> <div class="nav-container"> <a href="dashboard.html" class="logo"> <svg width="32" height="32" viewBox="0 0 24 24" fill="currentColor"> <path d="M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z"/> </svg> TaskMaster Pro </a> <div class="nav-menu"> <div class="user-info"> <div class="user-avatar">${currentUser.name ? currentUser.name.charAt(0).toUpperCase() : 'U'}</div> <span class="user-name">${currentUser.name || 'Kullanıcı'}</span> </div> <button class="logout-btn" onclick="logout()"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M9 21H5a2 2 0 01-2-2V5a2 2 0 012-2h4"/> <polyline points="16 17 21 12 16 7"/> <line x1="21" y1="12" x2="9" y2="12"/> </svg> Çıkış </button> </div> </div> </nav> `; }}
customElements.define('custom-navbar', CustomNavbar);
function logout() { localStorage.removeItem('currentUser'); window.location.href = 'index.html';}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191<!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>12345678910111213141516171819<!doctype html><html><head><meta charset="utf-8" /><meta name="viewport" content="width=device-width" /><title>My static Space</title><link rel="stylesheet" href="style.css" /></head><body><div class="card"><h1>Welcome to your static Space!</h1><p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p><p>Also don't forget to check the<a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.</p></div></body></html>123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149<!DOCTYPE html><html lang="tr"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>TaskMaster Pro - Giriş Yap</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-gradient-to-br from-orange-50 to-white min-h-screen"><div class="min-h-screen flex items-center justify-center px-4"><div class="max-w-md w-full space-y-8"><div class="text-center"><div class="mx-auto h-16 w-16 bg-primary-500 rounded-full flex items-center justify-center"><i data-feather="check-square" class="text-white w-8 h-8"></i></div><h2 class="mt-6 text-3xl font-extrabold text-gray-900">TaskMaster Pro</h2><p class="mt-2 text-sm text-gray-600">Görevlerinizi kolayca yönetin</p></div><div class="bg-white shadow-xl rounded-2xl p-8"><div class="space-y-6"><div class="flex bg-gray-100 rounded-lg p-1"><button id="loginTab" class="flex-1 py-2 px-4 bg-white rounded-md text-primary-600 font-medium transition-all duration-200">Giriş Yap</button><button id="registerTab" class="flex-1 py-2 px-4 text-gray-500 font-medium transition-all duration-200 hover:text-gray-700">Kayıt Ol</button></div><!-- Login Form --><form id="loginForm" class="space-y-6"><div><label class="block text-sm font-medium text-gray-700 mb-2">E-posta</label><div class="relative"><input type="email" id="loginEmail" requiredclass="w-full px-4 py-3 pl-10 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500 transition-all"placeholder="ornek@email.com"><i data-feather="mail" class="absolute left-3 top-3.5 text-gray-400 w-4 h-4"></i></div></div><div><label class="block text-sm font-medium text-gray-700 mb-2">Şifre</label><div class="relative"><input type="password" id="loginPassword" requiredclass="w-full px-4 py-3 pl-10 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500 transition-all"placeholder="••••••••"><i data-feather="lock" class="absolute left-3 top-3.5 text-gray-400 w-4 h-4"></i></div></div><button type="submit"class="w-full bg-primary-500 text-white py-3 px-4 rounded-lg font-medium hover:bg-primary-600 transition-all duration-200 transform hover:scale-105">Giriş Yap</button></form><!-- Register Form --><form id="registerForm" class="space-y-6 hidden"><div><label class="block text-sm font-medium text-gray-700 mb-2">Ad Soyad</label><div class="relative"><input type="text" id="registerName" requiredclass="w-full px-4 py-3 pl-10 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500 transition-all"placeholder="John Doe"><i data-feather="user" class="absolute left-3 top-3.5 text-gray-400 w-4 h-4"></i></div></div><div><label class="block text-sm font-medium text-gray-700 mb-2">E-posta</label><div class="relative"><input type="email" id="registerEmail" requiredclass="w-full px-4 py-3 pl-10 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500 transition-all"placeholder="ornek@email.com"><i data-feather="mail" class="absolute left-3 top-3.5 text-gray-400 w-4 h-4"></i></div></div><div><label class="block text-sm font-medium text-gray-700 mb-2">Şifre</label><div class="relative"><input type="password" id="registerPassword" requiredclass="w-full px-4 py-3 pl-10 border border-gray-300 rounded-lg focus:ring-2 focus:ring-primary-500 focus:border-primary-500 transition-all"placeholder="En az 6 karakter"><i data-feather="lock" class="absolute left-3 top-3.5 text-gray-400 w-4 h-4"></i></div></div><button type="submit"class="w-full bg-primary-500 text-white py-3 px-4 rounded-lg font-medium hover:bg-primary-600 transition-all duration-200 transform hover:scale-105">Kayıt Ol</button></form></div></div><div class="text-center text-sm text-gray-500">© 2024 TaskMaster Pro. Tüm hakları saklıdır.</div></div></div><script src="script.js"></script><script>feather.replace();</script><script src="https://huggingface.co/deepsite/deepsite-badge.js"></script></body></html>
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343// Authentication Logicdocument.addEventListener('DOMContentLoaded', function() { // Check if user is logged in const currentUser = localStorage.getItem('currentUser'); if (window.location.pathname.endsWith('dashboard.html') && !currentUser) { window.location.href = 'index.html'; } if (window.location.pathname.endsWith('index.html') && currentUser) { window.location.href = 'dashboard.html'; }
// Tab switching const loginTab = document.getElementById('loginTab'); const registerTab = document.getElementById('registerTab'); const loginForm = document.getElementById('loginForm'); const registerForm = document.getElementById('registerForm');
if (loginTab && registerTab) { loginTab.addEventListener('click', () => { loginForm.classList.remove('hidden'); registerForm.classList.add('hidden'); loginTab.classList.add('tab-active'); registerTab.classList.remove('tab-active'); });
registerTab.addEventListener('click', () => { registerForm.classList.remove('hidden'); loginForm.classList.add('hidden'); registerTab.classList.add('tab-active'); loginTab.classList.remove('tab-active'); }); }
// Login form submission if (document.getElementById('loginForm')) { document.getElementById('loginForm').addEventListener('submit', function(e) { e.preventDefault(); const email = document.getElementById('loginEmail').value; const password = document.getElementById('loginPassword').value;
const users = JSON.parse(localStorage.getItem('users')) || []; const user = users.find(u => u.email === email && u.password === password);
if (user) { localStorage.setItem('currentUser', JSON.stringify(user)); showToast('Başarıyla giriş yapıldı!', 'success'); setTimeout(() => { window.location.href = 'dashboard.html'; }, 1000); } else { showToast('E-posta veya şifre hatalı!', 'error'); } }); }
// Register form submission if (document.getElementById('registerForm')) { document.getElementById('registerForm').addEventListener('submit', function(e) { e.preventDefault(); const name = document.getElementById('registerName').value; const email = document.getElementById('registerEmail').value; const password = document.getElementById('registerPassword').value;
if (password.length < 6) { showToast('Şifre en az 6 karakter olmalı!', 'error'); return; }
const users = JSON.parse(localStorage.getItem('users')) || []; if (users.find(u => u.email === email)) { showToast('Bu e-posta zaten kayıtlı!', 'error'); return; }
const newUser = { name, email, password }; users.push(newUser); localStorage.setItem('users', JSON.stringify(users)); localStorage.setItem('currentUser', JSON.stringify(newUser));
showToast('Başarıyla kayıt olundu!', 'success'); setTimeout(() => { window.location.href = 'dashboard.html'; }, 1000); }); }
// Dashboard functionality if (window.location.pathname.endsWith('dashboard.html')) { initDashboard(); }});
// Dashboard functionalitylet tasks = [];let currentFilter = 'all';let editingTaskId = null;
function initDashboard() { const currentUser = JSON.parse(localStorage.getItem('currentUser')); document.getElementById('userName').textContent = currentUser.name || 'Kullanıcı'; loadTasks(); renderTasks(); updateStatistics(); updateCategories();
// Task form submission document.getElementById('taskForm').addEventListener('submit', function(e) { e.preventDefault(); saveTask(); });}
function loadTasks() { tasks = JSON.parse(localStorage.getItem('tasks')) || [];}
function saveTasks() { localStorage.setItem('tasks', JSON.stringify(tasks));}
function generateId() { return Date.now().toString(36) + Math.random().toString(36).substr(2);}
function openAddTaskModal() { editingTaskId = null; document.getElementById('modalTitle').textContent = 'Yeni Görev Ekle'; document.getElementById('taskForm').reset(); document.getElementById('taskModal').classList.remove('hidden');}
function closeTaskModal() { document.getElementById('taskModal').classList.add('hidden'); document.getElementById('taskForm').reset(); editingTaskId = null;}
function saveTask() { const title = document.getElementById('taskTitle').value; const description = document.getElementById('taskDescription').value; const category = document.getElementById('taskCategory').value; const priority = document.getElementById('taskPriority').value; const date = document.getElementById('taskDate').value;
if (editingTaskId) { const taskIndex = tasks.findIndex(t => t.id === editingTaskId); tasks[taskIndex] = { ...tasks[taskIndex], title, description, category, priority, date }; showToast('Görev güncellendi!', 'success'); } else { const newTask = { id: generateId(), title, description, category, priority, date, completed: false, createdAt: new Date().toISOString() }; tasks.unshift(newTask); showToast('Görev eklendi!', 'success'); }
saveTasks(); renderTasks(); updateStatistics(); updateCategories(); closeTaskModal();}
function editTask(id) { const task = tasks.find(t => t.id === id); if (task) { editingTaskId = id; document.getElementById('modalTitle').textContent = 'Görevi Düzenle'; document.getElementById('taskTitle').value = task.title; document.getElementById('taskDescription').value = task.description; document.getElementById('taskCategory').value = task.category; document.getElementById('taskPriority').value = task.priority; document.getElementById('taskDate').value = task.date; document.getElementById('taskModal').classList.remove('hidden'); }}
function deleteTask(id) { if (confirm('Bu görevi silmek istediğinizden emin misiniz?')) { tasks = tasks.filter(t => t.id !== id); saveTasks(); renderTasks(); updateStatistics(); updateCategories(); showToast('Görev silindi!', 'success'); }}
function toggleTask(id) { const task = tasks.find(t => t.id === id); if (task) { task.completed = !task.completed; saveTasks(); renderTasks(); updateStatistics(); updateCategories(); }}
function filterTasks(filter) { currentFilter = filter; // Update filter buttons document.querySelectorAll('.filter-btn').forEach(btn => { btn.classList.remove('bg-primary-100', 'text-primary-700'); btn.classList.add('text-gray-600', 'hover:bg-gray-100'); }); event.target.classList.remove('text-gray-600', 'hover:bg-gray-100'); event.target.classList.add('bg-primary-100', 'text-primary-700'); renderTasks();}
function renderTasks() { const tasksList = document.getElementById('tasksList'); let filteredTasks = tasks;
if (currentFilter === 'completed') { filteredTasks = tasks.filter(t => t.completed); } else if (currentFilter === 'pending') { filteredTasks = tasks.filter(t => !t.completed); } else if (currentFilter === 'high') { filteredTasks = tasks.filter(t => t.priority === 'high'); }
if (filteredTasks.length === 0) { tasksList.innerHTML = ` <div class="empty-state"> <svg width="64" height="64" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8z"/> <polyline points="14 2 14 8 20 8"/> <line x1="16" y1="13" x2="8" y2="13"/> <line x1="16" y1="17" x2="8" y2="17"/> <polyline points="10 9 9 9 8 9"/> </svg> <p class="text-gray-500">Henüz görev bulunmuyor</p> </div> `; return; }
tasksList.innerHTML = filteredTasks.map(task => ` <div class="task-item bg-white border border-gray-200 rounded-lg p-4 ${task.completed ? 'opacity-60' : ''} animate-slide-in"> <div class="flex items-start gap-3"> <input type="checkbox" ${task.completed ? 'checked' : ''} onchange="toggleTask('${task.id}')" class="task-checkbox mt-1 w-5 h-5 text-primary-500 rounded focus:ring-primary-500"> <div class="flex-1"> <h4 class="font-medium text-gray-900 ${task.completed ? 'line-through' : ''}">${task.title}</h4> ${task.description ? `<p class="text-sm text-gray-600 mt-1">${task.description}</p>` : ''} <div class="flex items-center gap-2 mt-2"> <span class="category-${task.category} text-xs px-2 py-1 rounded-full">${task.category}</span> <span class="priority-badge priority-${task.priority}">${ task.priority === 'high' ? 'Yüksek' : task.priority === 'medium' ? 'Orta' : 'Düşük' }</span> ${task.date ? `<span class="text-xs text-gray-500">📅 ${task.date}</span>` : ''} </div> </div> <div class="flex gap-1"> <button onclick="editTask('${task.id}')" class="p-2 text-gray-500 hover:text-primary-500 hover:bg-primary-50 rounded transition-colors"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M11 4H4a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7"/> <path d="M18.5 2.5a2.121 2.121 0 013 3L12 15l-4 1 1-4 9.5-9.5z"/> </svg> </button> <button onclick="deleteTask('${task.id}')" class="p-2 text-gray-500 hover:text-red-500 hover:bg-red-50 rounded transition-colors"> <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <polyline points="3 6 5 6 21 6"/> <path d="M19 6v14a2 2 0 01-2 2H7a2 2 0 01-2-2V6m3 0V4a2 2 0 012-2h4a2 2 0 012 2v2"/> </svg> </button> </div> </div> </div> `).join('');}
function updateStatistics() { const total = tasks.length; const completed = tasks.filter(t => t.completed).length; const pending = tasks.filter(t => !t.completed).length; const highPriority = tasks.filter(t => t.priority === 'high' && !t.completed).length;
document.getElementById('totalTasks').textContent = total; document.getElementById('completedTasks').textContent = completed; document.getElementById('pendingTasks').textContent = pending; document.getElementById('highPriorityTasks').textContent = highPriority;}
function updateCategories() { const categories = {}; tasks.forEach(task => { categories[task.category] = (categories[task.category] || 0) + 1; });
const categoriesList = document.getElementById('categoriesList'); categoriesList.innerHTML = Object.entries(categories).map(([category, count]) => ` <div class="flex items-center justify-between p-2 rounded-lg hover:bg-gray-50 transition-colors"> <span class="category-${category} text-sm px-2 py-1 rounded-full">${category}</span> <span class="text-gray-600 font-medium">${count}</span> </div> `).join('');}
function showToast(message, type = 'success') { const toast = document.createElement('div'); toast.className = `toast toast-${type} animate-slide-in`; toast.innerHTML = ` ${type === 'success' ? '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#10b981" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 11-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></svg>' : '<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="#ef4444" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/></svg>' } <span>${message}</span> `; document.body.appendChild(toast); setTimeout(() => { toast.style.opacity = '0'; setTimeout(() => { document.body.removeChild(toast); }, 300); }, 3000);}12345678910111213141516171819202122232425262728body {padding: 2rem;font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;}h1 {font-size: 16px;margin-top: 0;}p {color: rgb(107, 114, 128);font-size: 15px;margin-bottom: 10px;margin-top: 5px;}.card {max-width: 620px;margin: 0 auto;padding: 16px;border: 1px solid lightgray;border-radius: 16px;}.card p:last-child {margin-bottom: 0;}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');* {font-family: 'Inter', sans-serif;}/* Scrollbar Styles */::-webkit-scrollbar {width: 8px;height: 8px;}::-webkit-scrollbar-track {background: #f1f5f9;}::-webkit-scrollbar-thumb {background: #cbd5e1;border-radius: 4px;}::-webkit-scrollbar-thumb:hover {background: #94a3b8;}/* Animation Classes */@keyframes slideInUp {from {transform: translateY(20px);opacity: 0;}to {transform: translateY(0);opacity: 1;}}@keyframes fadeIn {from {opacity: 0;}to {opacity: 1;}}@keyframes scaleIn {from {transform: scale(0.95);opacity: 0;}to {transform: scale(1);opacity: 1;}}.animate-slide-in {animation: slideInUp 0.3s ease-out;}.animate-fade-in {animation: fadeIn 0.3s ease-out;}.animate-scale-in {animation: scaleIn 0.2s ease-out;}/* Task Item Styles */.task-item {transition: all 0.3s ease;}.task-item:hover {transform: translateX(4px);}.task-checkbox {transition: all 0.2s ease;}.task-checkbox:checked {animation: scaleIn 0.2s ease;}/* Modal Styles */.modal-backdrop {backdrop-filter: blur(4px);}/* Button Hover Effects */.btn-hover {transition: all 0.2s ease;}.btn-hover:hover {transform: translateY(-1px);box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);}/* Loading Spinner */@keyframes spin {to {transform: rotate(360deg);}}.spinner {animation: spin 1s linear infinite;}/* Priority Badge Styles */.priority-badge {font-size: 0.75rem;padding: 0.25rem 0.5rem;border-radius: 9999px;font-weight: 500;}.priority-high {background: #fee2e2;color: #dc2626;}.priority-medium {background: #fed7aa;color: #ea580c;}.priority-low {background: #dbeafe;color: #2563eb;}/* Category Colors */.category-İş { background: #e0e7ff; color: #4338ca; }.category-Kişisel { background: #fce7f3; color: #be185d; }.category-Alışveriş { background: #d1fae5; color: #047857; }.category-Sağlık { background: #fee2e2; color: #dc2626; }.category-Eğitim { background: #fef3c7; color: #d97706; }.category-Diğer { background: #f3f4f6; color: #4b5563; }/* Tab Active State */.tab-active {background: white;color: #ea580c;box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);}/* Form Input Focus Effects */.form-input:focus {box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);}/* Success Toast */.toast {position: fixed;bottom: 2rem;right: 2rem;padding: 1rem 1.5rem;background: white;border-radius: 0.5rem;box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);display: flex;align-items: center;gap: 0.75rem;z-index: 1000;animation: slideInUp 0.3s ease-out;}.toast-success {border-left: 4px solid #10b981;}.toast-error {border-left: 4px solid #ef4444;}/* Empty State */.empty-state {text-align: center;padding: 3rem 1rem;color: #6b7280;}.empty-state svg {margin: 0 auto 1rem;opacity: 0.3;}
README.md+7-4
components/navbar.jsAdded+153
dashboard.htmlAdded+191
index.html+149-19
script.jsAdded+343
style.css+181-19