Skip to content

Commit

Permalink
update navbar after active sidebar
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhildeshmukh170 committed Jul 3, 2024
1 parent 288a5a1 commit 07a634e
Show file tree
Hide file tree
Showing 189 changed files with 102 additions and 352,372 deletions.
15 changes: 15 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
"react-scripts": "^5.0.1",
"react-spinners": "^0.13.8",
"react-toastify": "^10.0.5",
"run": "^1.5.0",
"styled-components": "^6.1.11",
"web-vitals": "^2.1.4"
},
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/Component/Navbar/Navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ function Navbar(props) {
<header>
<div className="navbar">
<NavbarLeft showSideNav={showSideNav} setShowSideNav={setShowSideNav} />
<NavbarCenter />
<NavbarCenter showSideNav={showSideNav} />

{/* Pass setSearchQuery directly
<NavbarRight setSearchQuery={props.setSearchQuery} />
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/Component/Navbar/NavbarCenter.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
} from "@fortawesome/free-solid-svg-icons";
import { Modal, Backdrop, Box } from "@mui/material";

function NavbarCenter() {
function NavbarCenter( ) {
const totalBookmarks =
useSelector((state) => state.SourceReducer.totalBookmarks) || 0;
const [isModalOpen, setIsModalOpen] = useState(false);
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/Component/Navbar/NavbarLeft.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { IoReorderThree, IoClose } from "react-icons/io5";
import "../../style/Navbar.css"
import logo from "../../image/logo1.png";

function NavbarLeft(props) {
function NavbarLeft(props, showSideNav) {
useEffect(() => {
const handleDocumentClick = (e) => {
if (!e.target.closest('.navbar-left')) {
Expand All @@ -29,7 +29,7 @@ function NavbarLeft(props) {
}

return (
<span className="navbar-left">
<span className="navbar-left" style={{marginTop : showSideNav ? "0px":"0px"}}>
<a
onClick={handleClick}
className="navbar-brand sdbar-logo"
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/style/Navbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@

.navbar-content ul li a.active {
color: white;
background-color: green;
background-color: rgb(0, 128, 0);
}

.nav-item {
Expand All @@ -205,14 +205,13 @@
height: 92%;
background-color: #8b5cf6;
position: fixed;
top: 4.4rem;
z-index: 3;
top: 4.6rem;
z-index: 4;
display: flex;
flex-direction: column;
font-size: 1.4rem;
overflow-y: scroll;
transition: width 0.3s;
z-index: 4;
}

.nav-item::before {
Expand Down Expand Up @@ -475,3 +474,4 @@
.nav-item a, .navbar-content ul li a {
text-decoration: none !important;
}

8 changes: 4 additions & 4 deletions frontend/src/style/faq.css
Original file line number Diff line number Diff line change
Expand Up @@ -147,18 +147,18 @@
}
@keyframes open-animation {
from {
height: 55px;
height: 60px;
}
to {
height: 140px;
height: 60px;
}
}

@keyframes close-animation {
from {
height: 140px;
height: 60px;
}
to {
height: 55px;
height: 60px;
}
}
16 changes: 0 additions & 16 deletions node_modules/.bin/loose-envify

This file was deleted.

17 changes: 0 additions & 17 deletions node_modules/.bin/loose-envify.cmd

This file was deleted.

28 changes: 0 additions & 28 deletions node_modules/.bin/loose-envify.ps1

This file was deleted.

43 changes: 0 additions & 43 deletions node_modules/.package-lock.json

This file was deleted.

21 changes: 0 additions & 21 deletions node_modules/loose-envify/LICENSE

This file was deleted.

45 changes: 0 additions & 45 deletions node_modules/loose-envify/README.md

This file was deleted.

16 changes: 0 additions & 16 deletions node_modules/loose-envify/cli.js

This file was deleted.

4 changes: 0 additions & 4 deletions node_modules/loose-envify/custom.js

This file was deleted.

3 changes: 0 additions & 3 deletions node_modules/loose-envify/index.js

This file was deleted.

36 changes: 0 additions & 36 deletions node_modules/loose-envify/loose-envify.js

This file was deleted.

Loading

0 comments on commit 07a634e

Please sign in to comment.