From 1d238e034208abfcf8386dc57c6014216d547ce7 Mon Sep 17 00:00:00 2001 From: Nathan Date: Fri, 16 May 2025 19:21:26 +0800 Subject: [PATCH 1/5] remove redundant css files --- src/app/static/css/dashboard.css | 6 ------ src/app/static/css/discover.css | 6 ------ 2 files changed, 12 deletions(-) delete mode 100644 src/app/static/css/dashboard.css delete mode 100644 src/app/static/css/discover.css diff --git a/src/app/static/css/dashboard.css b/src/app/static/css/dashboard.css deleted file mode 100644 index deb6fe0..0000000 --- a/src/app/static/css/dashboard.css +++ /dev/null @@ -1,6 +0,0 @@ -#post:hover { - border: 1px solid lightblue !important; -} -#post { - transition: border 0.3s ease; -} diff --git a/src/app/static/css/discover.css b/src/app/static/css/discover.css deleted file mode 100644 index 1b4cb98..0000000 --- a/src/app/static/css/discover.css +++ /dev/null @@ -1,6 +0,0 @@ -#unit:hover { - border: 2px solid lightblue !important; -} -#unit { - transition: border 0.3s ease; -} From a568e5ffbbcbd3d4d26ff1c98ba24e40fe28e74e Mon Sep 17 00:00:00 2001 From: Nathan Date: Fri, 16 May 2025 19:28:32 +0800 Subject: [PATCH 2/5] move z index attribute search input to tailwind utility class --- src/app/templates/discover_unit.html | 2 +- src/app/templates/friends.html | 2 +- src/app/templates/unitplans.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/templates/discover_unit.html b/src/app/templates/discover_unit.html index d0ef2f5..12762de 100644 --- a/src/app/templates/discover_unit.html +++ b/src/app/templates/discover_unit.html @@ -27,7 +27,7 @@

{{ unit_code }} - {{ unit_name }}

- diff --git a/src/app/templates/friends.html b/src/app/templates/friends.html index 914bf5e..6d57ae6 100644 --- a/src/app/templates/friends.html +++ b/src/app/templates/friends.html @@ -10,7 +10,7 @@ class="w-full px-4 py-3 rounded-lg border border-gray-200 dark:border-dark-border bg-gray-50 dark:bg-dark-fg text-gray-900 dark:text-dark-primary focus:outline-none focus:border-blue-500 dark:focus:border-blue-400 - transition"> + transition relative z-[1]" >
diff --git a/src/app/templates/unitplans.html b/src/app/templates/unitplans.html index 0c48d5c..155b81f 100644 --- a/src/app/templates/unitplans.html +++ b/src/app/templates/unitplans.html @@ -10,7 +10,7 @@ class="w-full px-4 py-3 rounded-lg border border-gray-200 dark:border-dark-border bg-gray-50 dark:bg-dark-fg text-gray-900 dark:text-dark-primary focus:outline-none focus:border-blue-500 dark:focus:border-blue-400 - transition"> + transition relative z-[1]" >
From c4b3a5181004006604d2ae6b725d4ad503e12360 Mon Sep 17 00:00:00 2001 From: Nathan Date: Fri, 16 May 2025 19:33:09 +0800 Subject: [PATCH 3/5] replace dropdown css styling with tailwind class --- src/app/static/css/dropdown.css | 3 --- src/app/templates/discover_unit.html | 2 +- src/app/templates/friends.html | 2 +- src/app/templates/unitplans.html | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/app/static/css/dropdown.css b/src/app/static/css/dropdown.css index a86d849..7c45198 100644 --- a/src/app/static/css/dropdown.css +++ b/src/app/static/css/dropdown.css @@ -1,6 +1,3 @@ -#searchInput { - z-index: 1; -} #results.dropdown-list { list-style: none; padding: 0; diff --git a/src/app/templates/discover_unit.html b/src/app/templates/discover_unit.html index 12762de..e9e68c7 100644 --- a/src/app/templates/discover_unit.html +++ b/src/app/templates/discover_unit.html @@ -31,7 +31,7 @@

{{ unit_code }} - {{ unit_name }}

bg-gray-50 dark:bg-dark-fg text-gray-900 dark:text-dark-primary focus:outline-none focus:border-blue-500 dark:focus:border-blue-400 transition"> - +
diff --git a/src/app/templates/friends.html b/src/app/templates/friends.html index 6d57ae6..8869955 100644 --- a/src/app/templates/friends.html +++ b/src/app/templates/friends.html @@ -11,7 +11,7 @@ bg-gray-50 dark:bg-dark-fg text-gray-900 dark:text-dark-primary focus:outline-none focus:border-blue-500 dark:focus:border-blue-400 transition relative z-[1]" > - +
diff --git a/src/app/templates/unitplans.html b/src/app/templates/unitplans.html index 155b81f..c43aa35 100644 --- a/src/app/templates/unitplans.html +++ b/src/app/templates/unitplans.html @@ -11,7 +11,7 @@ bg-gray-50 dark:bg-dark-fg text-gray-900 dark:text-dark-primary focus:outline-none focus:border-blue-500 dark:focus:border-blue-400 transition relative z-[1]" > - +
From 60f8a627c11e9ed65b36ff331bc9b67e9288783b Mon Sep 17 00:00:00 2001 From: Nathan Date: Fri, 16 May 2025 19:43:56 +0800 Subject: [PATCH 4/5] translate final css to tailwind utility classes --- src/app/static/css/colours.css | 8 -------- src/app/static/css/dropdown.css | 20 -------------------- src/app/static/css/tailwindglobals.css | 8 ++++++++ src/app/static/js/friends.js | 1 + 4 files changed, 9 insertions(+), 28 deletions(-) delete mode 100644 src/app/static/css/colours.css delete mode 100644 src/app/static/css/dropdown.css diff --git a/src/app/static/css/colours.css b/src/app/static/css/colours.css deleted file mode 100644 index c534401..0000000 --- a/src/app/static/css/colours.css +++ /dev/null @@ -1,8 +0,0 @@ -:root { - --success: #22c55e; - --info: #0ea5e9; - --warning: #f97316; - --help: #a855f7; - --error: #ef4444; - --default-dark-theme-text: #d1d7e0; - } \ No newline at end of file diff --git a/src/app/static/css/dropdown.css b/src/app/static/css/dropdown.css deleted file mode 100644 index 7c45198..0000000 --- a/src/app/static/css/dropdown.css +++ /dev/null @@ -1,20 +0,0 @@ -#results.dropdown-list { - list-style: none; - padding: 0; - margin: 0; - top: 100%; - position: absolute; - width: 200px; - background-color: #111; - z-index: 2; -} - -#results li { - padding: 8px 12px; - cursor: pointer; - color: white; -} - -#results li:hover { - background-color: #333; -} \ No newline at end of file diff --git a/src/app/static/css/tailwindglobals.css b/src/app/static/css/tailwindglobals.css index d07e561..e2ae5ff 100644 --- a/src/app/static/css/tailwindglobals.css +++ b/src/app/static/css/tailwindglobals.css @@ -1,3 +1,11 @@ +:root { + --success: #22c55e; + --info: #0ea5e9; + --warning: #f97316; + --help: #a855f7; + --error: #ef4444; + --default-dark-theme-text: #d1d7e0; +} body { font-family: 'Inter', sans-serif; } diff --git a/src/app/static/js/friends.js b/src/app/static/js/friends.js index ba7cc90..9e340ec 100644 --- a/src/app/static/js/friends.js +++ b/src/app/static/js/friends.js @@ -28,6 +28,7 @@ document.addEventListener("DOMContentLoaded", function() { results.innerHTML = ''; data.forEach(person => { const li = document.createElement('li'); + li.classList.add("px-3", "py-2", "cursor-pointer", "text-white", "hover:bg-[#333]"); li.textContent = `${person.username}`; li.addEventListener('click', () => { input.value = ''; From 7bb3088c74ea1e1cf1a07703d9a4cee43825b45d Mon Sep 17 00:00:00 2001 From: Nathan Date: Fri, 16 May 2025 19:46:25 +0800 Subject: [PATCH 5/5] remove redundant stylesheets --- src/app/templates/base.html | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/app/templates/base.html b/src/app/templates/base.html index b5a99b2..ff2f712 100644 --- a/src/app/templates/base.html +++ b/src/app/templates/base.html @@ -15,9 +15,6 @@ - - -