Skip to content

Commit

Permalink
Merge pull request #28 from fs-jun24-team-3/feature/burger-menu-layout
Browse files Browse the repository at this point in the history
implemented burger menu layout and logic
  • Loading branch information
k-marchuk authored Sep 18, 2024
2 parents a75118b + 6da50df commit c01459e
Show file tree
Hide file tree
Showing 8 changed files with 367 additions and 168 deletions.
354 changes: 219 additions & 135 deletions src/components/Header/Header.module.scss
Original file line number Diff line number Diff line change
@@ -1,135 +1,219 @@
.header {
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid $elemnts-color;
position: relative;
background-color: $white-color;

&__menu {
display: flex;
align-items: center;
}

&__logo {
cursor: default;
width: 64px;
height: 20px;
margin-right: 32px;
margin-left: 16px;

@include onDesktop {
width: 80px;
height: 28px;
margin-right: 48px;
margin-left: 24px;
}
}

&__icons {
cursor: default;
display: flex;

&--like {
cursor: default;
display: none;
width: 16px;
height: 16px;
background-image: url(../../img/headerIcon/like.png);
background-size: cover;
background-repeat: no-repeat;
background-position: center;
margin: 16px;

@include onTablet {
margin: 16px;
display: block;
}

@include onDesktop {
margin: 24px;
display: block;
}
}

&--basket {
cursor: default;
display: none;
width: 16px;
height: 16px;
background-image: url(../../img/headerIcon/basket.png);
background-size: cover;
background-repeat: no-repeat;
background-position: center;
margin: 16px;

@include onTablet {
margin: 16px;
display: block;
}

@include onDesktop {
margin: 24px;
display: block;
}
}

&--menu {
width: 16px;
height: 16px;
background-image: url(../../img/headerIcon/Menu.png);
background-size: cover;
background-repeat: no-repeat;
background-position: center;
margin: 16px;

@include onTablet {
display: none;
}
}
}

&__icon--like {
display: block;
border-right: 1px solid $elemnts-color;
border-left: 1px solid $elemnts-color;
display: none;

@include onTablet {
display: block;
}
}

&__icon--menu {
display: block;
border-right: 1px solid $elemnts-color;
border-left: 1px solid $elemnts-color;

@include onTablet {
display: none;
}
}
&__icon--basket {
cursor: default;
position: relative;
}

&__icon--active {
&::after {
content: '';
position: absolute;
display: block;
width: 100%;
height: 3px;
background-color: #000;

@include onTablet {
bottom: 0px;
}

@include onDesktop {
bottom: 0px;
}
}
}
}
.header {
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid $elemnts-color;
position: relative;
background-color: $white-color;
z-index: 5;



&__menu {
display: flex;
align-items: center;
}

&__logo {
cursor: default;
width: 64px;
height: 20px;
margin-right: 32px;
margin-left: 16px;

@include onDesktop {
width: 80px;
height: 28px;
margin-right: 48px;
margin-left: 24px;
}
}

&__icons {
cursor: default;
display: flex;

&--like {
cursor: default;
display: none;
width: 16px;
height: 16px;
background-image: url(../../img/headerIcon/like.png);
background-size: cover;
background-repeat: no-repeat;
background-position: center;
margin: 16px;

@include onTablet {
margin: 16px;
display: block;
}

@include onDesktop {
margin: 24px;
display: block;
}
}

&--basket {
cursor: default;
display: none;
width: 16px;
height: 16px;
background-image: url(../../img/headerIcon/basket.png);
background-size: cover;
background-repeat: no-repeat;
background-position: center;
margin: 16px;

@include onTablet {
margin: 16px;
display: block;
}

@include onDesktop {
margin: 24px;
display: block;
}
}

&--menu {
cursor: default;
width: 16px;
height: 16px;
background-image: url(../../img/headerIcon/Menu.png);
background-size: cover;
background-repeat: no-repeat;
background-position: center;
margin: 16px;
}

&--close {
cursor: default;
width: 16px;
height: 16px;
background-image: url(../../img/closeButton/Close.png);
background-size: cover;
background-repeat: no-repeat;
background-position: center;
margin: 16px;
}
}

&__icon--like {
display: block;
border-right: 1px solid $elemnts-color;
border-left: 1px solid $elemnts-color;
display: none;

@include onTablet {
display: block;
}
}

&__icon--menu {
display: block;
border-right: 1px solid $elemnts-color;
border-left: 1px solid $elemnts-color;
}

&__icon--basket {
cursor: default;
position: relative;
}

&__icon--active {
&::after {
content: '';
position: absolute;
display: block;
width: 100%;
height: 3px;
background-color: #000;

@include onTablet {
bottom: -18px;
}
@include onDesktop {
bottom: 0px;
}
}
}

&__icon--close {
display: block;
border-right: 1px solid $elemnts-color;
border-left: 1px solid $elemnts-color;
}
}

.dropdown {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
z-index: 4;
background-color: $white-color;
flex-direction: column;
justify-content: space-between;

&-content {
display: flex;
flex-direction: column;
align-items: center;
padding-top: 72px;
}

&-icons {
display: flex;
border-top: 1px solid $elemnts-color;
}

&__icons {
&--like {
cursor: default;
width: 16px;
height: 16px;
background-image: url(../../img/headerIcon/like.png);
background-size: cover;
background-repeat: no-repeat;
background-position: center;
margin: 16px 50%;
}

&--basket {
cursor: default;
width: 16px;
height: 16px;
background-image: url(../../img/headerIcon/basket.png);
background-size: cover;
background-repeat: no-repeat;
background-position: center;
margin: 16px 50%;
}
}

&__icon--like {
display: block;
border-right: 1px solid $elemnts-color;
width: 50%;
}

&__icon--basket {
display: block;
width: 50%;
}

&__icon--active {
&::after {
content: '';
position: absolute;
display: block;
width: 100%;
height: 3px;
background-color: #000;
}
}
}
Loading

0 comments on commit c01459e

Please sign in to comment.