Spaces:
Running
Running
Giriş sistemini kaldır
Browse filesFiles changed (3)
- components/navbar.js+14-54
- index.html+142-98
- script.js+5-91
123456741 unmodified lines495051525354555657585960616263646566676869707172737475767778798081828384858687887 unmodified lines969798991001011026 unmodified lines1091101111121131141151161171181191201211221231241 unmodified line1261271281291301311321331341351361371381391401411424 unmodified lines147148149150151152153class CustomNavbar extends HTMLElement {connectedCallback() {this.attachShadow({ mode: 'open' });const currentUser = JSON.parse(localStorage.getItem('currentUser')) || {};this.shadowRoot.innerHTML = `<style>41 unmodified linesgap: 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;7 unmodified linesgap: 0.5rem;}.logout-btn:hover {background: #fca5a5;transform: translateY(-1px);}6 unmodified lines.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>1 unmodified line</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>4 unmodified linescustomElements.define('custom-navbar', CustomNavbar);function logout() {localStorage.removeItem('currentUser');window.location.href = 'index.html';}123456741 unmodified lines495051525354557 unmodified lines636465666768696 unmodified lines7677787980818283848586871 unmodified line89909192939495969798991004 unmodified lines105106107108109110111112113class CustomNavbar extends HTMLElement {connectedCallback() {this.attachShadow({ mode: 'open' });this.shadowRoot.innerHTML = `<style>41 unmodified linesgap: 1rem;}.clear-btn {padding: 0.5rem 1rem;background: #fee2e2;color: #dc2626;7 unmodified linesgap: 0.5rem;}.clear-btn:hover {background: #fca5a5;transform: translateY(-1px);}6 unmodified lines.logo {font-size: 1.25rem;}}</style><nav><div class="nav-container"><a href="index.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>1 unmodified line</a><div class="nav-menu"><button class="clear-btn" onclick="clearAllTasks()"><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>Tümünü Temizle</button></div></div>4 unmodified linescustomElements.define('custom-navbar', CustomNavbar);function clearAllTasks() {if (confirm('Tüm görevleri silmek istediğinizden emin misiniz?')) {localStorage.removeItem('tasks');location.reload();}}
12345678922 unmodified lines3233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149<!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>22 unmodified lines}</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>1234567891022 unmodified lines33343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193<!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>22 unmodified lines}</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!</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" requiredclass="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><script src="https://huggingface.co/deepsite/deepsite-badge.js"></script></body></html>
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106// Authentication Logicdocument.addEventListener('DOMContentLoaded', function() {// Check if user is logged inconst 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 switchingconst 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 submissionif (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 submissionif (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 functionalityif (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();1234567891011121314151617181920document.addEventListener('DOMContentLoaded', function() {// Dashboard functionalityif (window.location.pathname.endsWith('index.html')) {initDashboard();}if (window.location.pathname.endsWith('dashboard.html')) {initDashboard();}});// Dashboard functionalitylet tasks = [];let currentFilter = 'all';let editingTaskId = null;function initDashboard() {loadTasks();renderTasks();updateStatistics();updateCategories();
components/navbar.js+14-54
index.html+142-98
script.js+5-91