diff --git a/add_task.php b/add_task.php new file mode 100644 index 0000000..75d857b --- /dev/null +++ b/add_task.php @@ -0,0 +1,23 @@ +prepare("INSERT INTO tasks (title, description) VALUES (?, ?)"); + $stmt->execute([$title, $description]); + } catch (PDOException $e) { + header("Location: index.php?error=" . urlencode("Database error: " . $e->getMessage())); + exit; + } + } + header("Location: index.php?success=1"); + exit; +} else { + header("Location: index.php"); + exit; +} diff --git a/assets/css/custom.css b/assets/css/custom.css new file mode 100644 index 0000000..bc80560 --- /dev/null +++ b/assets/css/custom.css @@ -0,0 +1,40 @@ +body { + background-color: #f8f9fa; + font-family: 'Inter', sans-serif; +} + +.kanban-board { + display: flex; + gap: 1rem; + overflow-x: auto; + padding-bottom: 1rem; +} + +.kanban-column { + background-color: #e9ecef; + border-radius: 0.5rem; + padding: 1rem; + width: 320px; + flex-shrink: 0; +} + +.kanban-column h3 { + font-size: 1.2rem; + font-weight: 600; + margin-bottom: 1rem; +} + +.task-card { + background-color: #fff; + border: 1px solid #dee2e6; + border-radius: 0.25rem; + padding: 1rem; + margin-bottom: 1rem; + cursor: grab; + box-shadow: 0 1px 3px rgba(0,0,0,0.05); +} + +.task-card:active { + cursor: grabbing; + background-color: #f1f3f5; +} diff --git a/assets/js/main.js b/assets/js/main.js new file mode 100644 index 0000000..c9f2177 --- /dev/null +++ b/assets/js/main.js @@ -0,0 +1 @@ +// Will be used for drag and drop functionality later. \ No newline at end of file diff --git a/db/migrations/001_create_initial_tables.sql b/db/migrations/001_create_initial_tables.sql new file mode 100644 index 0000000..a516a08 --- /dev/null +++ b/db/migrations/001_create_initial_tables.sql @@ -0,0 +1,16 @@ +CREATE TABLE IF NOT EXISTS users ( + id INT AUTO_INCREMENT PRIMARY KEY, + username VARCHAR(50) NOT NULL UNIQUE, + password VARCHAR(255) NOT NULL, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP +); + +CREATE TABLE IF NOT EXISTS tasks ( + id INT AUTO_INCREMENT PRIMARY KEY, + title VARCHAR(255) NOT NULL, + description TEXT, + status VARCHAR(50) NOT NULL DEFAULT 'To Do', + user_id INT, + created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP, + FOREIGN KEY (user_id) REFERENCES users(id) +); \ No newline at end of file diff --git a/footer.php b/footer.php new file mode 100644 index 0000000..98a2193 --- /dev/null +++ b/footer.php @@ -0,0 +1,31 @@ + + + +
+ + + +