diff --git a/frontend/src/Login.tsx b/frontend/src/Login.tsx index 282bbd9f..4bcbb317 100644 --- a/frontend/src/Login.tsx +++ b/frontend/src/Login.tsx @@ -52,7 +52,7 @@ const Login = observer(() => { required onChange={(e) => setUsername(e.target.value)} placeholder="Enter your email" - className="block min-w-0 rounded-md grow bg-white py-1.5 pr-3 pl-4 text-base placeholder:text-gray-500 border border-medium-gray" + className="block min-w-0 rounded-md grow bg-white py-1.5 pr-3 pl-4 text-base placeholder:text-gray-500 border border-grey-400" /> @@ -69,14 +69,14 @@ const Login = observer(() => { required onChange={(e) => setPassword(e.target.value)} placeholder="Enter your password" - className="block min-w-0 rounded-md grow bg-white py-1.5 pr-3 pl-4 text-base placeholder:text-gray-500 border border-medium-gray" + className="block min-w-0 rounded-md grow bg-white py-1.5 pr-3 pl-4 text-base placeholder:text-gray-500 border border-grey-400" />
Warning
+
{warningMessage}
{_errorMessage}
padding */ - border: 0.1rem solid #F26624; + border: 0.1rem solid var(--color-primary-900); border-radius: 15px; transition: border-color 0.3s ease; overflow-y: auto; diff --git a/frontend/src/main-page/grants/styles/GrantItem.css b/frontend/src/main-page/grants/styles/GrantItem.css index 4b558640..ec7b8bc9 100644 --- a/frontend/src/main-page/grants/styles/GrantItem.css +++ b/frontend/src/main-page/grants/styles/GrantItem.css @@ -9,10 +9,10 @@ /* justify-content: space-between; */ border-radius: 15px; - background-color: #f2ebe4; + background-color: var(--color-tan); /* margin: 0; Remove margin */ transition: background-color 0.2s ease; - border: 0.1rem solid #f26624; + border: 0.1rem solid var(--color-primary-900); } .grant-summary.expanded { @@ -52,7 +52,7 @@ .grant-body.expanded { max-height: 100%; padding: 1rem; - border: 0.1rem solid #f26624; + border: 0.1rem solid var(--color-primary-900); border-top-width: 0cap; } @@ -67,20 +67,7 @@ padding-top: 1rem; /* Optional: Add some space above the button */ } -.done-button { - bottom: 1rem; - right: 1rem; - padding: 0.5rem 1rem; - background-color: #3191cf; - color: black; - border: none; - border-radius: 15px; - cursor: pointer; - font-size: 1rem; - transition: background-color 0.3s ease; -} - .gray-label { color: black; - background-color: "#D3D3D3"; + background-color: var(--color-grey-400); } diff --git a/frontend/src/main-page/grants/styles/GrantList.css b/frontend/src/main-page/grants/styles/GrantList.css index f62df063..ddc90dd9 100644 --- a/frontend/src/main-page/grants/styles/GrantList.css +++ b/frontend/src/main-page/grants/styles/GrantList.css @@ -4,6 +4,6 @@ flex-direction: column; justify-content: space-around; border-radius: 15px; -background: #F7A781; + background: var(--color-primary-700); /* padding: 0.5em; */ } diff --git a/frontend/src/main-page/grants/styles/GrantPage.css b/frontend/src/main-page/grants/styles/GrantPage.css index 7e59bac0..597c8175 100644 --- a/frontend/src/main-page/grants/styles/GrantPage.css +++ b/frontend/src/main-page/grants/styles/GrantPage.css @@ -10,7 +10,7 @@ html, body { display: flex; flex-direction: column; justify-content: flex-start; - background-color: #F2EBE4; + background-color: -var(--color-tan); width: 100%; height: 100%; overflow-y: auto; diff --git a/frontend/src/main-page/grants/styles/GrantSearch.css b/frontend/src/main-page/grants/styles/GrantSearch.css index 85e4f23c..fe6b4fba 100644 --- a/frontend/src/main-page/grants/styles/GrantSearch.css +++ b/frontend/src/main-page/grants/styles/GrantSearch.css @@ -28,37 +28,10 @@ .search-input:focus { outline: none !important; - border:0.1rem solid #F58D5C; + border:0.1rem solid var(--color-primary-800); } .filter-state { color: whitesmoke; -} - -.dropdown-container { - position: absolute; - top: 100%; - left: 0; - width: 100%; - background: white; - border: 0.1rem solid #ddd; - border-radius: 15px; - box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2); - z-index: 10; - max-height: 200px; - overflow-y: auto; -} - -.dropdown-item { - padding: 8px; - cursor: pointer; - border-bottom: 0.1rem solid #eee; - transition: background 0.2s ease; - color: black; -} - -.dropdown-item:hover { - background: #f1f1f1; - color: black; } \ No newline at end of file diff --git a/frontend/src/main-page/grants/styles/NewGrantModal.css b/frontend/src/main-page/grants/styles/NewGrantModal.css index ce6331b7..4621571a 100644 --- a/frontend/src/main-page/grants/styles/NewGrantModal.css +++ b/frontend/src/main-page/grants/styles/NewGrantModal.css @@ -91,14 +91,6 @@ text-align: left; } -/* Error message styling */ -.error-message { - grid-column: 1 / span 2; /* span across both columns */ - margin: 0.5rem 0; - color: #d9534f; - font-weight: bold; -} - /* For text inputs, selects, textareas */ .modal-content input, .modal-content select, @@ -107,11 +99,11 @@ padding: 0.6rem; font-size: 1rem; margin-bottom: 0.25rem; - border: 0.1rem solid #ccc; + border: 0.075rem solid black; border-radius: 15px; box-sizing: border-box; - background-color: #fff; - color: #000; + background-color: var(--color-tan); + color: black; } /* Make textareas bigger by default */ @@ -182,17 +174,11 @@ Buttons */ .modal-content button { - background-color: #007bff; /* typical “primary” color */ - border: none; - color: #fff; + border: black 0.075rem solid; + color: black; padding: 0.75rem 1.25rem; font-size: 1rem; border-radius: 15px; cursor: pointer; transition: background-color 0.2s ease; } - -/* Hover effect for buttons */ -.modal-content button:hover { - background-color: #0056b3; -} diff --git a/frontend/src/main-page/grants/styles/UserDropdown.css b/frontend/src/main-page/grants/styles/UserDropdown.css index a34ef7b7..3cae3eba 100644 --- a/frontend/src/main-page/grants/styles/UserDropdown.css +++ b/frontend/src/main-page/grants/styles/UserDropdown.css @@ -6,19 +6,19 @@ .user-dropdown-input { height: 48px; width: 100%; - background-color: #F2EBE4; + background-color: var(--color-tan); border-style: solid; border-color: black; border-width: 1px; border-radius: 4px; padding: 0 12px; cursor: pointer; - color: #374151; + color: var(--color-grey-800); } .user-dropdown-input:focus { outline: none; - border-color: #F58D5C; + border-color: var(--color-primary-800); } .user-dropdown-menu { @@ -28,7 +28,7 @@ right: 0; max-height: 200px; overflow-y: auto; - background-color: #F2EBE4; + background-color: var(--color-tan); border-style: solid; border-color: black; border-width: 1px; @@ -42,12 +42,12 @@ .user-dropdown-item { padding: 12px; cursor: pointer; - border-bottom: 1px solid #D3D3D3; + border-bottom: 1px solid var(--color-grey-400); transition: background-color 0.2s; } .user-dropdown-item:hover { - background-color: #D3D3D3; + background-color: var(--color-grey-400); } .user-dropdown-item:last-child { @@ -62,7 +62,7 @@ .user-dropdown-email { font-size: 14px; - color: #666; + color: gray; margin-top: 2px; font-family: helvetica; white-space: nowrap; @@ -72,6 +72,6 @@ .user-dropdown-empty { padding: 12px; - color: #666; + color: gray; text-align: center; } \ No newline at end of file diff --git a/frontend/src/main-page/header/Bell.tsx b/frontend/src/main-page/header/Bell.tsx index 827d8c99..ed8f0b3f 100644 --- a/frontend/src/main-page/header/Bell.tsx +++ b/frontend/src/main-page/header/Bell.tsx @@ -45,7 +45,7 @@ const BellButton: React.FC = observer(({ setOpenModal, openModa return ( { return ( - + @@ -61,7 +61,7 @@ const Header: React.FC = observer(() => { {item.name} diff --git a/frontend/src/main-page/header/UserButton.tsx b/frontend/src/main-page/header/UserButton.tsx index 95a1b654..eee16ac9 100644 --- a/frontend/src/main-page/header/UserButton.tsx +++ b/frontend/src/main-page/header/UserButton.tsx @@ -18,7 +18,7 @@ const UserButton: React.FC = ({ setOpenModal, openModal }) => { return ( { logout() }} diff --git a/frontend/src/main-page/users/ApprovedUserCard.tsx b/frontend/src/main-page/users/ApprovedUserCard.tsx index aff33797..866518b3 100644 --- a/frontend/src/main-page/users/ApprovedUserCard.tsx +++ b/frontend/src/main-page/users/ApprovedUserCard.tsx @@ -155,7 +155,7 @@ const ApprovedUserCard = ({ setIsChangeGroupModalOpen(true)} > Change to {position === UserStatus.Admin ? "employee" : "admin"} @@ -164,7 +164,7 @@ const ApprovedUserCard = ({ setIsDeleteUserModalOpen(true)} > Delete user{" "} diff --git a/frontend/src/main-page/users/PendingUserCard.tsx b/frontend/src/main-page/users/PendingUserCard.tsx index a2b89560..447857db 100644 --- a/frontend/src/main-page/users/PendingUserCard.tsx +++ b/frontend/src/main-page/users/PendingUserCard.tsx @@ -97,13 +97,13 @@ const PendingUserCard = ({ diff --git a/frontend/src/main-page/users/UserPositionCard.tsx b/frontend/src/main-page/users/UserPositionCard.tsx index 184f917a..fa739a33 100644 --- a/frontend/src/main-page/users/UserPositionCard.tsx +++ b/frontend/src/main-page/users/UserPositionCard.tsx @@ -9,12 +9,12 @@ const UserPositionCard = ({ position }: UserPositionCardProps) => { const cardStyles = useMemo(() => { switch (position) { case UserStatus.Admin: - return "bg-[#BCFFD8] border-[#119548] text-[#119548]"; + return "bg-green-light border-green-dark text-green-dark"; case UserStatus.Employee: - return "bg-[#FFF8CA] border-[#F8CC16] text-[#8a710c]"; + return "bg-yellow-light border-yellow text-yellow-dark"; case UserStatus.Inactive: default: - return "bg-[#D3D3D3] border-[#666666] text-[#666666]"; + return "bg-grey-400 border-gray text-gray"; } }, [position]); diff --git a/frontend/src/main-page/users/Users.tsx b/frontend/src/main-page/users/Users.tsx index 7d94f4b5..d04e8d8d 100644 --- a/frontend/src/main-page/users/Users.tsx +++ b/frontend/src/main-page/users/Users.tsx @@ -96,15 +96,15 @@ const Users = observer(() => { ? "All Users" : "Pending Users"} - {numInactiveUsers} new users + {numInactiveUsers} new users - + { setUsersTabStatus(UsersTab.PendingUsers); @@ -116,8 +116,8 @@ const Users = observer(() => { { setUsersTabStatus(UsersTab.CurrentUsers); @@ -130,7 +130,7 @@ const Users = observer(() => { {usersTabStatus === UsersTab.CurrentUsers ? ( <> - + User ID Email Position @@ -146,7 +146,7 @@ const Users = observer(() => { > ) : ( <> - + User ID Email Position @@ -186,7 +186,7 @@ const Users = observer(() => { key={index} className={ currentPage === page.value - ? "text-dark-blue underline" + ? "text-secondary-500 underline" : "ghost" } onClick={() => setCurrentPage(page.value)} diff --git a/frontend/src/styles/Footer.css b/frontend/src/styles/Footer.css index a8d3132a..4911d45a 100644 --- a/frontend/src/styles/Footer.css +++ b/frontend/src/styles/Footer.css @@ -7,23 +7,14 @@ flex-grow: 1; - background-color: #ffffff; - border-color: rgb(228, 228, 231); + background-color: white; + border-color: var(--color-grey-100); width: 100%; padding: 1em; /* Text */ font-size: 1.3rem; - color: rgb(74 73 81) + 1; -} - -.bcan-link { - background-color: "#0b303b"; - border: "0.1rem solid #ccc"; - border-width: 0; - border-radius: "100px"; - color: "#fff"; - text-transform: "uppercase"; + color: var(--color-grey-700); } .text-block { @@ -36,5 +27,5 @@ flex-grow: 1; .northeastern-uni-caption { font-size: 0.90rem; line-height: 1rem; - color: rgb(153 151 162); + color: var(--color-grey-600); } \ No newline at end of file diff --git a/frontend/src/styles/button.css b/frontend/src/styles/button.css index b9392dd3..1d556b9c 100644 --- a/frontend/src/styles/button.css +++ b/frontend/src/styles/button.css @@ -1,34 +1,3 @@ -/* Custom dropdown container */ -.custom-dropdown-wrapper { - position: relative; - display: inline-block; -} - -/* The dropdown menu styling */ -.custom-dropdown { - position: absolute; - top: 100%; - left: 0; - z-index: 10; - background-color: #fff; - border: 0.1rem solid #ddd; - border-radius: 15px; - padding: 0.5rem; - display: flex; - flex-direction: column; - gap: 0.25rem; - box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1); -} - -/* Each dropdown option */ -.custom-dropdown-option { - cursor: pointer; -} - -.custom-dropdown-option:hover { - opacity: 0.85; -} - /* Optional: styling for the preview of the status button */ .status-button-preview { cursor: pointer; @@ -36,27 +5,9 @@ /* Button preview defaults */ .button-default { - color: #000000; - width: 168.42px; + color: black; text-align: center; padding: 0.5rem 0; border-radius: 15px; z-index: 0; -} - -/* Custom button color classes */ -.green-button { - background-color: #5ab911; -} - -.gray-button { - background-color: #d3d3d3; -} - -.orange-button { - background-color: #f7a781; -} - -.navy-button { - background-color: #0b303b; -} +} \ No newline at end of file diff --git a/frontend/src/styles/index.css b/frontend/src/styles/index.css index 548ff0f3..0bb78ce4 100644 --- a/frontend/src/styles/index.css +++ b/frontend/src/styles/index.css @@ -1,15 +1,64 @@ -@import "tailwindcss/base"; -@import "tailwindcss/components"; -@import "tailwindcss/utilities"; +@tailwind base; +@tailwind components; +@tailwind utilities; :root { + --color-green-dark: #119548; + --color-green: #5ab911; + --color-green-light: #c6fbd3; + + --color-yellow: #f8cc16; + --color-yellow-light: #fff8ca; + --color-yellow-dark: #8a710c; + + --color-red: #d33221; + --color-red-dark: #771505; + --color-red-light: #ff6b6b; + --color-red-lighter: #ffa399; + --color-red-lightest: #ffdfdf; + + --color-tan: #f2ebe4; + + --color-orange: #ffa500; + --color-orange-light: #ffceb6; + --color-orange-lightest: #fff1eb; + + --color-primary-900: #e16f39; + --color-primary-800: #e78c61; + --color-primary-700: #eca380; + + --color-secondary-900: #001733; + --color-secondary-800: #002f66; + --color-secondary-700: #004899; + --color-secondary-600: #0061cc; + --color-secondary-500: #007aff; + --color-secondary-400: #3b98ff; + --color-secondary-300: #75b6ff; + --color-secondary-200: #b0d5ff; + --color-secondary-100: #ebf4ff; + + --color-accent: #5f5ac6; + + --color-grey-900: #212529; + --color-grey-800: #343a40; + --color-grey-700: #495057; + --color-grey-600: #6c757d; + --color-grey-500: #adb5bd; + --color-grey-400: #ced4da; + --color-grey-300: #dee2e6; + --color-grey-200: #e9ecef; + --color-grey-100: #f8f9fa; + + --color-black: #000000; + --color-white: #ffffff; + font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif; line-height: 1.5; font-weight: 400; color-scheme: light dark; color: rgba(0, 0, 0, 0.87); - background-color: #F2EBE4; + background-color: var(--color-tan); font-synthesis: none; text-rendering: optimizeLegibility; @@ -19,11 +68,11 @@ a { font-weight: 500; - color: #646cff; + color: var(--color-secondary-500); text-decoration: inherit; } a:hover { - color: #535bf2; + color: var(--color-secondary-500); } body { @@ -46,17 +95,17 @@ button { font-size: 1em; font-weight: 500; font-family: inherit; - background-color: #1a1a1a; + background-color: black; cursor: pointer; transition: border-color 0.25s; } textarea { - border-color: darkorange; + border-color: var(--color-primary-900); } button:hover { - border-color: darkorange; + border-color: var(--color-primary-900); } button:focus, button:focus-visible { @@ -65,17 +114,17 @@ button:focus-visible { @media (prefers-color-scheme: light) { :root { - color: #213547; - background-color: #ffffff; + color: var(--color-grey-800); + background-color: white; } a:hover { - color: #747bff; + color: var(--color-secondary-500); } button { - background-color: #f9f9f9; + background-color: var(--color-grey-100); } } - input:focus { - outline: 1px solid darkorange; - } \ No newline at end of file +input:focus { + outline: 1px solid var(--color-primary-900); +} diff --git a/frontend/src/styles/notification.css b/frontend/src/styles/notification.css index e73e0026..2fbd93fa 100644 --- a/frontend/src/styles/notification.css +++ b/frontend/src/styles/notification.css @@ -4,7 +4,7 @@ top: 75px; width: min(340px, 70%); background-color: white; - border: 1px solid #343131; + border: 1px solid black; border-radius: 6px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); padding: 0.5rem; @@ -17,7 +17,7 @@ justify-content: space-between; align-items: center; padding: 0.5rem 0.5rem; - border-bottom: 1px solid #ddd; + border-bottom: 1px solid var(--color-grey-400); } @@ -35,10 +35,10 @@ border: none; font-size: 1rem; cursor: pointer; - color: #777; + color: gray; } .close-button:hover { - color: #e74c3c; + color: var(--color-red); } @@ -53,7 +53,7 @@ .grant-notification { position: relative; - border-bottom: 0.2px solid #dfd9d9; + border-bottom: 0.2px solid var(--color-grey-400); border-radius: 0px; padding: 8px 10px; padding-right: 35px; @@ -65,7 +65,7 @@ .bell-notif { margin-right: 10px; - background-color: rgb(225, 225, 225); + background-color: var(--color-grey-100); padding: 10px; border-radius: 100%; scale: 73%; @@ -84,30 +84,30 @@ .notification-title { font-weight: 600; font-size: 13px; - color: #101010; + color: black; line-height: 1.15; } .notification-message { font-size: 12.5px; - color: #555; + color: var(--color-grey-600); margin-top: 4px; line-height: 1.2; } .grant-notification:hover { - background-color: #f1f1f1; + background-color: var(--color-grey-100); } .notification-trash-icon { position: absolute; bottom: 8px; right: 10px; - color: #aaa; + color: gray; cursor: pointer; font-size: 0.9rem } .notification-trash-icon:hover { - color: #e74c3c + color: var(--color-red) } diff --git a/frontend/tailwind.config.ts b/frontend/tailwind.config.ts index a40726dd..b2ddf0be 100644 --- a/frontend/tailwind.config.ts +++ b/frontend/tailwind.config.ts @@ -1,40 +1,89 @@ import type { Config } from "tailwindcss"; export default { - content: ["./src/**/*.{js,ts,jsx,tsx,mdx}"], + content: ["./src/**/*.{js,ts,jsx,tsx,mdx,html}"], theme: { colors: { - 'dark-blue': '#3191CF', - 'light-blue': '#90c4e5', - 'green': '#119548', - 'yellow': '#F8CC16', - 'black': '#000000', - 'red': '#ff0000', - 'tan': '#F2EBE4', - 'dark-orange': "#F26624", - 'light-orange': "#f7a781", - 'medium-orange': '#F58D5C', - 'white': "#FFFFFF", - 'light-gray': '#F8F8F8', - 'gray': '#808080', - 'pale-orange':'#FFCEB6', - 'white-orange': '#FFF1EB', - 'medium-gray': '#D9D9D9', + tan: "#F2EBE4", + + orange: { + DEFAULT: "#ffa500", + light: "#FFCEB6", + lightest: "#FFF1EB", + }, + + green: { + dark: "#119548", + DEFAULT: "#5AB911", + light: "#c6fbd3", + }, + + yellow: { + dark: "#8A710C", + DEFAULT: "#F8CC16", + light: "#FFF8CA", + }, + + red: { + dark: "#771505", + DEFAULT: "#d33221", + light: "#FF6B6B", + lighter: "#FFA399", + lightest: "#FFDFDF", + }, + + primary: { + 900: "#E16F39", + 800: "#E78C61", + DEFAULT: "#E78C61", + 700: "#ECA380", + }, + + secondary: { + 900: "#001733", + 800: "#002F66", + 700: "#004899", + 600: "#0061CC", + DEFAULT: "#0061CC", + 500: "#007AFF", + 400: "#3B98FF", + 300: "#75B6FF", + 200: "#B0D5FF", + 100: "#EBF4FF", + }, + + accent: "#5F5AC6", + + grey: { + 900: "#212529", + 800: "#343A40", + 700: "#495057", + 600: "#6C757D", + DEFAULT: "#6C757D", + 500: "#ADB5BD", + 400: "#CED4DA", + 300: "#DEE2E6", + 200: "#E9ECEF", + 100: "#F8F9FA", + }, + + white: "#FFFFFF", + black: "#000000", }, fontFamily: { - sans: ['Montserrat', 'sans-serif'], - serif: ['Georgia', 'serif'], + sans: ["Montserrat", "sans-serif"], + serif: ["Georgia", "serif"], }, extend: { spacing: { - '8xl': '96rem', - '9xl': '128rem', + "8xl": "96rem", + "9xl": "128rem", }, borderRadius: { - '4xl': '2rem', - 'md': '0.75rem', + "4xl": "2rem", + md: "0.75rem", }, - } + }, }, plugins: [], } satisfies Config; diff --git a/middle-layer/types/Status.ts b/middle-layer/types/Status.ts index 5f5f0b0b..977a6934 100644 --- a/middle-layer/types/Status.ts +++ b/middle-layer/types/Status.ts @@ -41,13 +41,13 @@ export function statusToString(status : Status): string { // color associated with status on UI, represented as a string export function getColorStatus(status: string) { switch (status) { - case "Active": return "#5AB911"; // green - case "Inactive": return "#A9A9A9" // gray - case "Potential": return "#E6CA15" // TODO: no color given for potential yet + case "Active": return "var(--color-green)"; // green + case "Inactive": return "var(--color-grey-500)" // gray + case "Potential": return "var(--color-yellow)" // TODO: no color given for potential yet // TODO add colors for rejected and pending - case "Rejected": return "#FF0000" // red - case "Pending": return "#FFA500" // orange - default: return '#A9A9A9'; + case "Rejected": return "var(--color-red)" // red + case "Pending": return "var(--color-orange)" // orange + default: return 'gray'; } }
{numInactiveUsers} new users
User ID
Email
Position