From d4a6c2c7cd6e74fbd9af90113aa31b9e786170a8 Mon Sep 17 00:00:00 2001 From: EvanLin3141 Date: Tue, 18 Feb 2025 17:47:21 +0000 Subject: [PATCH] UPDATE: Theme Design for Quick Settings --- frontend/src/assets/styles/index.css | 55 +++++++++++++++++-- frontend/src/components/Layout/ListRow.tsx | 3 + .../src/components/Navigation/Sidebar.tsx | 2 +- .../src/components/Settings/QuickSettings.tsx | 11 ++-- frontend/src/pages/HomePage.tsx | 5 +- 5 files changed, 62 insertions(+), 14 deletions(-) diff --git a/frontend/src/assets/styles/index.css b/frontend/src/assets/styles/index.css index 9766b6f..5cb5730 100644 --- a/frontend/src/assets/styles/index.css +++ b/frontend/src/assets/styles/index.css @@ -5,11 +5,6 @@ :root { --sideBar-LightBG: white; --sideBar-LightText: black; - - --sideBar-DarkBG: black; - --sideBar-DarkText: white; - - --quickBar-DarkBG: rgb(0,0,0,0.5) } @@ -35,26 +30,74 @@ body[data-theme="light"] { --bg-color: white; --text-color: black; + + --sideBar-bg: white; + --sideBar-text: black; + + --liveNow: rgba(46, 16, 16, 0.6); + --recommend: rgba(5, 46, 22, 0.6); + + --quickBar-title: rgba(21, 21, 21, 1); + --quickBar-title-bg: rgb(255, 255, 255); + --quickBar-bg: #ffffff; + --quickBar-text: #000000; + --quickBar-border: #000000; } body[data-theme="dark"] { --bg-color: black; --text-color: white; + + --sideBar-bg: black; + --sideBar-text: white; + + --quickBar-title: rgb(255, 255, 255); + --quickBar-title-bg: rgb(0, 0, 0); + --quickBar-bg: #000000d3; + --quickBar-text: #ffffff; + --quickBar-border: #ffffff; } body[data-theme="blue"] { --bg-color: #e0f7fa; - --text-color: #004d40; + --text-color: #00539b; + + --sideBar-bg: #ADD8E6; + --sideBar-text: #002147; + + --quickBar-title: #ffffff; + --quickBar-title-bg: #003571; + --quickBar-bg: #eefafffb; + --quickBar-text: #003571; + --quickBar-border: #ffffff; } body[data-theme="green"] { --bg-color: #e8f5e9; --text-color: #2e7d32; + + --sideBar-bg: rgb(131, 179, 154); + --sideBar-text: #2e7d32; + + --quickBar-title: rgb(226, 255, 240); + --quickBar-title-bg: rgb(0, 78, 38); + --quickBar-bg: #e8f5e9; + --quickBar-text: #2e7d32; + --quickBar-border: #ffffff; } body[data-theme="orange"] { --bg-color: #ffe0b2; --text-color: #e65100; + + --sideBar-bg: #ffe0b2; + --sideBar-text: #4d3b31; + + --quickBar-title-bg: #E67E22; + --quickBar-title: #ffffff; + --quickBar-bg: #fff3dc; + --quickBar-text: #ff8800; + --quickBar-border: #ffffff; } body { diff --git a/frontend/src/components/Layout/ListRow.tsx b/frontend/src/components/Layout/ListRow.tsx index 12b8504..b13e31d 100644 --- a/frontend/src/components/Layout/ListRow.tsx +++ b/frontend/src/components/Layout/ListRow.tsx @@ -15,6 +15,7 @@ interface ListRowProps { onClick: (itemName: string) => void; extraClasses?: string; children?: React.ReactNode; + style?: React.CSSProperties; } // Row of entries @@ -26,6 +27,7 @@ const ListRow: React.FC = ({ onClick, extraClasses = "", children, + style, }) => { const slider = useRef(null); const scrollAmount = window.innerWidth * 0.3; @@ -45,6 +47,7 @@ const ListRow: React.FC = ({ return (

{title}

diff --git a/frontend/src/components/Navigation/Sidebar.tsx b/frontend/src/components/Navigation/Sidebar.tsx index ae49990..3c4d401 100644 --- a/frontend/src/components/Navigation/Sidebar.tsx +++ b/frontend/src/components/Navigation/Sidebar.tsx @@ -65,7 +65,7 @@ const Sidebar: React.FC = ({ extraClasses }) => { return (