From b62df873101b92d1bfd74cd482a5ee409e2fb630 Mon Sep 17 00:00:00 2001 From: sivaprasath2004 Date: Thu, 6 Jun 2024 11:15:50 +0530 Subject: [PATCH] fixed --- src/components/Cards/Card.jsx | 4 ++-- src/components/Footer/Footer.jsx | 4 ++-- src/components/Sidebar/SideBar.jsx | 19 +++++++++++++++++-- src/components/Sidebar/sidebar.css | 21 +++++++++++++++++++-- 4 files changed, 40 insertions(+), 8 deletions(-) diff --git a/src/components/Cards/Card.jsx b/src/components/Cards/Card.jsx index 0113f790..0fa667a7 100644 --- a/src/components/Cards/Card.jsx +++ b/src/components/Cards/Card.jsx @@ -24,11 +24,11 @@ const Card = (props) => {

{description}

- + {(tech !== 'Vanilla-JS-Projects' && tech !== 'Front-end-Projects')? '' : } diff --git a/src/components/Footer/Footer.jsx b/src/components/Footer/Footer.jsx index 00e9a17a..bba54d30 100644 --- a/src/components/Footer/Footer.jsx +++ b/src/components/Footer/Footer.jsx @@ -7,12 +7,12 @@ const Footer = () => {
- +
-

Web Master Log

+

Web Master Log

WebMasterLog serves as a comprehensive record of various web development endeavors, highlighting the versatility and capabilities of projects built with Front-end and Back-end Web development technologies. From interactive and responsive user interfaces to dynamic web diff --git a/src/components/Sidebar/SideBar.jsx b/src/components/Sidebar/SideBar.jsx index bc669f42..ff7ef634 100644 --- a/src/components/Sidebar/SideBar.jsx +++ b/src/components/Sidebar/SideBar.jsx @@ -43,7 +43,7 @@ const showAnimation = { const SideBar = ({ routes, children }) => { const [isOpen, setIsOpen] = useState(false); const location = useLocation(); - + const [modes,setModes]=useState("Dark") useEffect(() => { const currentCategory = getCurrentCategory(); const scrollbarColor = getScrollbarColor(currentCategory); @@ -94,6 +94,16 @@ const SideBar = ({ routes, children }) => { const toggle = () => setIsOpen(!isOpen); + const modes_control=()=>{ + document.body.classList.toggle('light') + if(document.body.classList.contains('light')){ + setModes("Light") + } + else{ + setModes("Dark") + } + } + console.log(modes) return ( <>

@@ -140,6 +150,7 @@ const SideBar = ({ routes, children }) => { setIsOpen={setIsOpen} routes={routes} // Pass the routes prop here /> + ); } @@ -158,7 +169,11 @@ const SideBar = ({ routes, children }) => { ); })} - +
modes_control()}> + Dark_light_mode + {isOpen?

{modes}

:<>} +
+
{children}
diff --git a/src/components/Sidebar/sidebar.css b/src/components/Sidebar/sidebar.css index 803044ae..22ea9e98 100644 --- a/src/components/Sidebar/sidebar.css +++ b/src/components/Sidebar/sidebar.css @@ -3,7 +3,9 @@ padding: 0; box-sizing: border-box; } - +.light{filter: invert(1);} +.light img,.light svg,.light .button-group button,.light #Ui{filter: invert(1);} +.light #svg{filter: invert(0%);} .main-container { display: flex; background-color: black; @@ -17,8 +19,23 @@ color: #6c7293; padding: 10px 0; overflow-y: auto; + position: relative; +} +.Dark_Light_mode,.opened_menu_bar{ + position: absolute; + bottom: 2%; + right: 0; + left: 0; + margin: auto; + cursor: pointer; + display: flex; + gap: 10px; } - +.Dark_Light_mode{justify-content: center;align-items: center;} +.Dark_Light_mode img,.opened_menu_bar img{filter: invert(1); height: 30px;width: 30px;} +.opened_menu_bar{padding-left: 2rem;} +.opened_menu_bar:hover,.Dark_Light_mode:hover{color: white;} +.opened_menu_bar p{margin-top: 2px;} .top_section { display: flex; align-items: center;