Skip to content

Refactor Navbar component and CSS #271

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion client/src/component/Navbar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function Navbar(props) {
id="navbarSupportedContent"
>
<ul
className="navbar-nav mb-2 mb-lg-0 gap-3 fw-medium"
className="navbar-nav mb-2 mb-lg-0 gap-3 fw-medium menu2"
style={{ position: "absolute", left: "36%" }}
>
<li className="nav-item fs-4 fw-medium">
Expand Down
53 changes: 52 additions & 1 deletion client/src/css/Navbar.css
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
}

#navbar ul li:hover {
box-shadow: 0 5px 15px rgb(137, 137, 255);
/* box-shadow: 0 5px 15px rgb(137, 137, 255); */
border-radius: 1rem;
transform: scale(1.025);
}
Expand All @@ -140,6 +140,57 @@
text-align: center;
}

.menu2 li{
display: block;
height: 100%;
font-size: 20px;
position: relative;
display: flex;
align-items: center;
justify-content: center;
color: #fff;
text-transform: uppercase;
transition: all 300ms cubic-bezier(0.075, 0.82, 0.165, 1);
text-align: center;
padding: 0 10px;
}

.menu2 li:after,
.menu2 li:before {
content: "";
position: absolute;
display: block;
border: 0px solid transparent;
width: 0%;
height: 0%;
transition: all 0.5s ease;
}

.menu2 li:after {
width: 0%;
height: 0%;
top: 0;
left: 0;
border-top: 3px solid transparent;
border-left: 3px solid transparent;
}

.menu2 li:before {
width: 0%;
height: 0%;
right: 0;
bottom: 0;
border-bottom: 3px solid transparent;
border-right: 3px solid transparent;
}

.menu2 li:hover::before,
.menu2 li:hover::after {
width: 100%;
height: 100%;
border-color: #777;
}

.profile-img img {
width: 45px;
border-radius: 50%;
Expand Down
Loading