From a8e49cf47fe0fb6fa357e22810d1517ff0e273da Mon Sep 17 00:00:00 2001 From: WhyKorp <117651228+whykorp@users.noreply.github.com> Date: Mon, 11 Mar 2024 20:07:36 +0100 Subject: [PATCH] Add features --- ruty/styles/styletodo.css | 16 +++++- ruty/todo.php | 112 +++++++++++++++++++++++--------------- 2 files changed, 83 insertions(+), 45 deletions(-) diff --git a/ruty/styles/styletodo.css b/ruty/styles/styletodo.css index 5bab4e8..89fa8e2 100644 --- a/ruty/styles/styletodo.css +++ b/ruty/styles/styletodo.css @@ -139,4 +139,18 @@ li.nav2:hover { .checkbox-wrapper input[type="checkbox"]:checked + .terms-label .checkbox-tick { stroke-dashoffset: 0; } - \ No newline at end of file + +/* Styles CSS pour le menu contextuel */ +.task-menu { + display: none; + position: absolute; + background-color: #f9f9f9; + min-width: 150px; + box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2); + padding: 12px; + z-index: 1; +} +.task-menu-item { + padding: 8px 12px; + cursor: pointer; +} \ No newline at end of file diff --git a/ruty/todo.php b/ruty/todo.php index 12e8993..3dea36b 100644 --- a/ruty/todo.php +++ b/ruty/todo.php @@ -1,31 +1,5 @@
- connect_error) { - die("Erreur de connexion à la base de données : " . $conn->connect_error); - } - - // Sélectionner les tâches depuis la base de données - $sql = "SELECT id, task_name, completed FROM tasks"; - $result = $conn->query($sql); - - if ($result->num_rows > 0) { - while($row = $result->fetch_assoc()) { - $taskId = $row["id"]; - $taskName = $row["task_name"]; - $completed = $row["completed"] ? "checked" : ""; - - echo "