From d72430e8cecb76990e0f33646d94e26ef0e29d84 Mon Sep 17 00:00:00 2001 From: Thomas Makin Date: Mon, 6 May 2024 00:02:42 -0400 Subject: [PATCH] make light mode not awful --- app/globals.css | 4 ++-- components/filter.tsx | 14 +++++++------- components/searchbar.tsx | 7 ++++++- components/settingsform.tsx | 17 ++++++++--------- 4 files changed, 23 insertions(+), 19 deletions(-) diff --git a/app/globals.css b/app/globals.css index e6699d5..77c00ed 100644 --- a/app/globals.css +++ b/app/globals.css @@ -48,8 +48,8 @@ body { } .filterwindow-wrapper { - top: calc(100% + 20px); - right: 0px; + top: 100%; + right: -1.25rem; height: 30dvh; } diff --git a/components/filter.tsx b/components/filter.tsx index b54cce9..1c365ae 100644 --- a/components/filter.tsx +++ b/components/filter.tsx @@ -51,13 +51,13 @@ export default function Filter(props: FilterProps) { duration={500} height={props.filterHeight} // see props documentation below > -
+

Filters

-
- {dormsList.map((dormName) => (
-
- {yearsList.map((year) => (
-
- +
+
diff --git a/components/searchbar.tsx b/components/searchbar.tsx index efccd8f..2167314 100644 --- a/components/searchbar.tsx +++ b/components/searchbar.tsx @@ -36,6 +36,11 @@ export default function SearchBar() { const [filterHeight, setFilterHeight] = useState(0); + const style = { + transform: filterHeight ? 'rotate(180deg)' : '', + transition: 'transform 150ms ease-in-out', // smooth transition + } + return (
@@ -57,7 +62,7 @@ export default function SearchBar() { - setFilterHeight(filterHeight === 0 ? '100%' : 0)} width="30" height="30" viewBox="0 0 36 36" fill="none" xmlns="http://www.w3.org/2000/svg"> diff --git a/components/settingsform.tsx b/components/settingsform.tsx index c673997..60b3bee 100644 --- a/components/settingsform.tsx +++ b/components/settingsform.tsx @@ -43,13 +43,12 @@ export default function SettingsForm(props: { inData: StudentInfo, pending: bool
-

Edit Profile

-
+

Edit Profile

{ setUserData( @@ -63,7 +62,7 @@ export default function SettingsForm(props: { inData: StudentInfo, pending: bool { setUserData( @@ -77,7 +76,7 @@ export default function SettingsForm(props: { inData: StudentInfo, pending: bool { setUserData( @@ -91,7 +90,7 @@ export default function SettingsForm(props: { inData: StudentInfo, pending: bool
- +