Skip to content
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

Improved the navbar and added the profile section #289

Closed
wants to merge 1 commit into from
Closed
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
1 change: 1 addition & 0 deletions Css-files/login1.css
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ body {
height: 45px;
border-radius: 15px;
border: none;
margin: 8px;
background-color: #aa6a6a;
color: rgb(190, 135, 135);
font-size: 16px;
Expand Down
Binary file added Images/profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 11 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -383,13 +383,17 @@

<div class="navbar-right">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" onclick="redirectLogin()"
style="color: black; font-family: var(--ff-philosopher);">Login</a>
</li>
<li class="nav-item">
<a class="nav-link" onclick="redirectSignup()"
style="color: black; font-family: var(--ff-philosopher);">Signup</a>
<li class="nav-item dropdown" style="list-style-type: none;">
<button class="dropbtn">
<img width="30px" src="Images/profile.png" alt="Profile" class="profile-icon"
onclick="toggleDropdown()">
</button>
<div id="profile-dropdown" class="dropdown-content">
<div class="login-signup-form">
<a href="Html-files/login.html">Log In</a>
<a href="Html-files/signup.html">Sign Up</a>
</div>
</div>
</li>
<li class="nav-item" style="list-style-type: none;">
<a class="nav-link" href="Html-files/cart.html" style="color: black;"><i
Expand Down
65 changes: 62 additions & 3 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,65 @@ body {
transition: background-color 0.5s ease, backdrop-filter 0.5s ease;
}
*/
.navbar {
padding: fixed;
top: 0;
width: 100%;
z-index: 1030;
padding: 15px 28px 0;
background-color: rgba(245, 190, 190, 0.7);
backdrop-filter: blur(8px);
transition: background-color 0.5s ease, backdrop-filter 0.5s ease;
/* overflow: hidden; */
}
.navbar-nav{
align-items: center;
}
.navbar-collapse{
margin-left: 450px;
}

.nav-item:nth-child(6){
margin-left: 268px;
}

.dropdown{
float: left;
color: black;
}

.dropbtn{
padding-right: 13px;
}
.dropdown .dropbtn{
border: none;
background-color: rgba(245, 190, 190, 0.7);

}
.dropdown:hover .dropbtn{
border-bottom: 1px solid #fff;
}
.dropdown-content{
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
.dropdown-content a{
float: none;
padding: 12px;
color: black;
display: block;
text-align: left;
}
.dropdown-content a:hover{
background-color: #dddddd;
}
.dropdown:hover .dropdown-content{
display: block;
}

.navbar a {
text-decoration: none;
Expand All @@ -34,11 +93,11 @@ body {
}

/* Navbar link hover effect */
/*.navbar a:hover{
color: #fff;
.navbar a:hover{
color: #c83072;
border-bottom: 1px solid #fff;
}
*/


.navbar.fixed-top {
position: fixed;
Expand Down