From fcb250869524bbe059673cca65179e4f9d8bfd95 Mon Sep 17 00:00:00 2001 From: Dries Peeters Date: Thu, 18 Sep 2025 09:38:57 +0200 Subject: [PATCH] feat: enhance UI/UX with improved styling and DataTables integration - Add DataTables library integration for enhanced table functionality - Improve navigation bar styling with rounded corners and white background - Fix mobile button widths for better responsive design - Enhance badge styling with proper text wrapping and ellipsis handling - Add table sorting styles for projects and tasks lists - Improve mobile responsiveness across various screen sizes - Update filter button styling for better visual consistency --- app/static/base.css | 2 +- app/static/mobile.css | 2 +- app/templates/base.html | 6 ++ app/templates/tasks/list.html | 21 ++++- templates/projects/list.html | 155 ++++++++++++++++++++++++++-------- 5 files changed, 146 insertions(+), 40 deletions(-) diff --git a/app/static/base.css b/app/static/base.css index 97e77a5..c51c02f 100644 --- a/app/static/base.css +++ b/app/static/base.css @@ -1542,7 +1542,7 @@ main { .navbar-nav.ms-auto { flex: 0 0 auto; } /* Allow wrapping to a second row on tighter widths (desktop too) */ -.navbar-nav { flex-wrap: wrap; row-gap: 0.25rem; column-gap: 0.25rem; } +.navbar-nav { flex-wrap: wrap; row-gap: 0.25rem; column-gap: 0.25rem; background-color: white; border-bottom-left-radius: 25px; border-bottom-right-radius: 25px;} .navbar-nav .nav-item { flex: 0 1 auto; min-width: 0; } /* body attribute now handled by CSS vars above */ diff --git a/app/static/mobile.css b/app/static/mobile.css index 73fcd88..b4b9b70 100644 --- a/app/static/mobile.css +++ b/app/static/mobile.css @@ -568,7 +568,7 @@ } .mobile-btn { - width: 100%; + width: auto; margin-bottom: 0.75rem; padding: 1rem 1.5rem; font-size: 1rem; diff --git a/app/templates/base.html b/app/templates/base.html index 88fadb0..98e3923 100644 --- a/app/templates/base.html +++ b/app/templates/base.html @@ -23,6 +23,12 @@ + + + + + + diff --git a/app/templates/tasks/list.html b/app/templates/tasks/list.html index e147e94..d88a0a3 100644 --- a/app/templates/tasks/list.html +++ b/app/templates/tasks/list.html @@ -107,7 +107,7 @@
{{ _('Filter Tasks') }}
- @@ -327,6 +327,12 @@ position: relative; overflow: hidden; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); + /* Prevent text wrapping and ensure badge fits content */ + white-space: nowrap; + display: inline-block; + flex-shrink: 0; + min-width: fit-content; + max-width: none; } .status-badge::before { @@ -394,7 +400,6 @@ .priority-badge::before { content: ''; - position: absolute; top: 0; left: -100%; width: 100%; @@ -772,6 +777,10 @@ .status-badge, .priority-badge { font-size: 0.7rem; padding: 0.2rem 0.6rem; + /* Ensure badges don't wrap text on medium screens */ + white-space: nowrap; + flex-shrink: 0; + min-width: fit-content; } .task-description { @@ -791,6 +800,14 @@ .status-badge, .priority-badge { font-size: 0.65rem; padding: 0.15rem 0.5rem; + /* Ensure badges don't wrap text on small screens */ + white-space: nowrap; + flex-shrink: 0; + min-width: fit-content; + /* Slightly reduce font size for very long text */ + max-width: 120px; + overflow: hidden; + text-overflow: ellipsis; } .task-title-link { diff --git a/templates/projects/list.html b/templates/projects/list.html index 64f0ec5..c3aa507 100644 --- a/templates/projects/list.html +++ b/templates/projects/list.html @@ -346,6 +346,21 @@ .filter-toggle-transition { transition: all 0.3s ease-in-out; } + +/* Table sorting styles */ +thead th[style*="cursor: pointer"]:hover { + background-color: var(--bs-gray-100); +} + +thead th.sorted-asc::after { + content: " ▲"; + color: var(--bs-primary); +} + +thead th.sorted-desc::after { + content: " ▼"; + color: var(--bs-primary); +}