diff --git a/README.md b/README.md index 1d0c5e1..ca4d5ab 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,7 @@ To run the tests locally, use: ## ✨ Key Features * **Interactive Dashboard**: Real-time summary of pending, overdue, and recently completed tasks with visual charts. +* **Dark Mode Support**: Full dark theme support with persistence across sessions using `localStorage`. * **Full CRUD Cycle**: Create, Read, Update, and Delete tasks. * **Due Date Tracking**: Set deadlines for tasks and track overdue items. * **Quick Status Toggle**: Instantly mark tasks as Done or Undone from the main list view. diff --git a/src/main/resources/static/styles.css b/src/main/resources/static/styles.css index 71496b4..a80b889 100644 --- a/src/main/resources/static/styles.css +++ b/src/main/resources/static/styles.css @@ -1,17 +1,30 @@ /* Custom Task Manager Styles */ +:root { + --task-card-bg: #ffffff; + --task-card-text: #212529; +} + +[data-bs-theme="dark"] { + --task-card-bg: #2b3035; + --task-card-text: #dee2e6; +} + body { - background-color: #f8f9fa; + background-color: var(--bs-body-bg); + color: var(--bs-body-color); } /* Task Card Hover Effects */ .task-card { transition: transform 0.2s, box-shadow 0.2s; + background-color: var(--task-card-bg); + color: var(--task-card-text); } .task-card:hover { transform: translateY(-3px); - box-shadow: 0 4px 15px rgba(0,0,0,0.1); + box-shadow: 0 4px 15px rgba(0,0,0,0.3); } /* Priority Indicator Borders */ @@ -44,3 +57,15 @@ body.auth-page { align-items: center; min-height: 100vh; } + +/* Dark Mode Toggle Button Positioning */ +.theme-toggle { + cursor: pointer; + padding: 5px 10px; + border-radius: 20px; + transition: background-color 0.3s; +} + +.theme-toggle:hover { + background-color: rgba(255, 255, 255, 0.1); +} diff --git a/src/main/resources/templates/dashboard.html b/src/main/resources/templates/dashboard.html index 443235f..c546790 100644 --- a/src/main/resources/templates/dashboard.html +++ b/src/main/resources/templates/dashboard.html @@ -29,6 +29,9 @@