Skip to content

Commit

Permalink
add files
Browse files Browse the repository at this point in the history
  • Loading branch information
Oanekrif committed Jun 1, 2024
0 parents commit b1157f9
Show file tree
Hide file tree
Showing 4 changed files with 163 additions and 0 deletions.
Binary file added avatar.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added facebook.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
51 changes: 51 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://unicons.iconscout.com/release/v4.0.8/css/line.css">
<link rel="stylesheet" href="style.css">
<link rel="shortcut icon" href="" type="image/x-icon">
<title>Facebooc navbar</title>
</head>
<body>
<nav class="navbar">
<span class="navbar-badge">20+</span>
<div class="navbar-end">
<img src="facebook.png" alt="facebook" class="navbar-logo">
<button class="icon-button">
<i class="uil uil-search"></i>
</button>
</div>
<div class="navbar-center">
<button class="active">
<i class="uil uil-estate"></i>
</button>
<button>
<i class="uil uil-play-circle"></i>
</button>
<button>
<i class="uil uil-store"></i>
</button>
<button>
<i class="uil uil-users-alt"></i>
</button>
<button>
<i class="uil uil-bars"></i>
</button>
</div>
<div class="navbar-end">
<button class="icon-button">
<i class="uil uil-plus"></i>
</button>
<button class="icon-button">
<i class="uil uil-facebook-messenger-alt"></i>
</button>
<button class="icon-button">
<i class="uil uil-bell"></i>
</button>
<img src="avatar.jpg" alt="my avatar" class="navbar-avatar">
</div>
</nav>
</body>
</html>
112 changes: 112 additions & 0 deletions style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
* {
box-sizing: border-box;
}
html,body{
height: 100%;
}
body{
margin: 0;
background: #f0f2f5;
}
button{
display: grid;
place-items: center;
background: transparent;
color: #606770;
border: 0;
}
button > i {
font-size: 20px;
}
.navbar{
position: fixed;
top: 0;
left: 0;
display: flex;
align-items: center;
justify-content: space-between;
height: 72px;
width: 100%;
padding: 0 20px;
border-bottom: 1px solid #e8e8e8;
background: #fff;
box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}
.navbar-logo, .navbar-avatar {
height: 40px;
width: 40px;
border-radius: 50%;
}
.navbar-end{
display: flex;
gap: 6px;
flex: 0 0 178px;
}
.icon-button{
width: 40px;
height: 40px;
border-radius: 50%;
background: #f0f2f5;
}
.navbar-badge{
position: absolute;
top: 8px;
right: 54px;
background: #e41e3f;
color: #f9f9f9;
font-size: 12px;
padding: 1px 4px;
border-radius: 10px;
}
.navbar-center{
display: flex;
flex: 1 1 auto;
padding: 0 10px;
}
.navbar-center > button {
height: 72px;
padding-top: 4px;
border-bottom: 4px solid transparent;
flex:1 1 auto;
}
.navbar-center > button.active {
border-bottom-color: #1a74e5;
}
.navbar-center > button.active > i {
color: #1a74e5;
}
.navbar-center > button > i {
font-size: 24px;
}
.navbar .navbar-end:last-child > button > i{
color: #050505;
}

@media (width <= 600px){
.navbar-end{
flex: 0 0 auto;
}
.navbar-center > button{
display: none;
}
.navbar-center > button:last-child {
display: block;
position: absolute;
left: 110px;
top: 50%;
translate: 0 -50%;
}
}
@media (width <= 400px){
.navbar .navbar-end:last-child > button:nth-child(n+2){
display: none;
}
.navbar-badge{
right: 10px;
}
}
@media (width <= 250px){
.navbar .navbar-end:last-child > button:first-child{
display: none;
}
}

0 comments on commit b1157f9

Please sign in to comment.