feat: adiciona menu mobile

This commit is contained in:
Cainã Milech 2022-12-06 17:51:04 -03:00
parent 6c166ecfb0
commit 6811b1270b
8 changed files with 166 additions and 13 deletions

View File

@ -18,6 +18,7 @@
@import "./partials/header"; @import "./partials/header";
@import "./partials/menu"; @import "./partials/menu";
@import "./partials/search";
@import "./partials/barraDeVantagens"; @import "./partials/barraDeVantagens";
@import "./partials/footer"; @import "./partials/footer";
@import "./partials/breadcrumb"; @import "./partials/breadcrumb";

View File

@ -11,21 +11,82 @@
} }
} }
.menu-header {
&__top-wrapper {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px;
}
&__text {
display: flex;
align-items: center;
color: $gray-200;
font-size: 12px;
line-height: 15px;
i {
margin-right: 10px;
}
}
&__close-button {
padding: 0;
border: 0;
outline: 0;
background: transparent;
}
&__search-box {
background: $black-500;
.busca {
padding: 16px;
}
}
}
.main-menu { .main-menu {
height: 100%; height: 100%;
@include mq(lg, max) {
display: flex;
flex-direction: column;
position: fixed;
top: 0;
left: 0;
z-index: map-get($z-index, level-5);
width: 100%;
height: 100%;
background: $white-500;
}
&__departments { &__departments {
display: flex; display: flex;
margin: 0; margin: 0;
height: 100%;
@include mq(lg, max) {
flex: 1; /*para empurrar o account para baixo*/
flex-direction: column;
}
@include mq(lg, min) {
height: 100%;
}
} }
&__department { &__department {
display: flex; display: flex;
align-items: center; align-items: center;
margin-right: 40px;
@include mq(lg, max) {
border-bottom: 1px solid $gray-100;
}
@include mq(lg, min) { @include mq(lg, min) {
margin-right: 40px;
&:hover { &:hover {
.main-menu__department-link { .main-menu__department-link {
font-weight: 700; font-weight: 700;
@ -48,6 +109,15 @@
line-height: 15px; line-height: 15px;
color: $white-500; color: $white-500;
@include mq(lg, max) {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
padding: 20px 16px;
color: $black-500;
}
@include mq(lg, min) { @include mq(lg, min) {
&::after { &::after {
content: attr(title); content: attr(title);
@ -59,6 +129,21 @@
} }
} }
} }
&__account-link {
display: flex;
align-items: center;
justify-content: center;
height: 64px;
background: $black-500;
font-size: 10px;
line-height: 12px;
color: $white-500;
i {
margin-right: 16px;
}
}
} }
.submenu { .submenu {

View File

@ -0,0 +1,38 @@
.busca {
display: flex;
align-items: center;
margin: 0;
legend,
label,
select {
display: none;
}
.fulltext-search-box {
flex: 1;
height: 23px;
padding: 0;
border: 0;
background: transparent;
outline: 0;
color: $white-500;
font-size: 10px;
line-height: 12px;
}
.btn-buscar {
width: 23px;
height: 23px;
padding: 0;
border: 0;
outline: 0;
font-size: 0;
background-color: transparent;
/*quando ja tem estrutuura, e temos que substituir*/
@extend .sprite;
@extend .sprite-search-icon;
}
}

View File

@ -9,6 +9,9 @@ $font-height: 1.5;
$black-500: #000; $black-500: #000;
$white-500: #fff; $white-500: #fff;
$blue-500: #00c8ff; $blue-500: #00c8ff;
$gray-100: #e0e0e0;
$gray-200: #828282;
$gray-500: #333; $gray-500: #333;
// universal // universal

Binary file not shown.

After

Width:  |  Height:  |  Size: 348 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 536 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 B

View File

@ -1,7 +1,24 @@
<nav class="main-menu"> <nav class="main-menu">
<div class="menu-header">
<div class="menu-header__top-wrapper">
<div class="menu-header__text">
<i class="sprite sprite-lock-icon"></i>COMPRA 100% SEGURA
</div>
<button class="menu-header__close-button">
<i class="sprite sprite-close-menu-icon"></i>
</button>
</div>
<div class="menu-header__search-box">
<vtex.cmc:fullTextSearchBox />
</div>
</div>
<ul class="main-menu__departments"> <ul class="main-menu__departments">
<li class="main-menu__department"><!--quando mudar no hover pra bolt, nao mover a div--> <li class="main-menu__department"><!--quando mudar no hover pra bolt, nao mover a div-->
<a class="main-menu__department-link" title="LOREM IPSUM" href="#">LOREM IPSUM</a> <a class="main-menu__department-link" title="LOREM IPSUM" href="#">LOREM IPSUM
<i class="sprite sprite-menu-mobile-arrow-icon"></i>
</a>
<div class="submenu"> <div class="submenu">
<div class="container"> <div class="container">
@ -10,37 +27,37 @@
<div class="submenu__categories-wrapper"> <div class="submenu__categories-wrapper">
<ul class="submenu__categories"> <ul class="submenu__categories">
<li class="submenu__category"> <li class="submenu__category">
<a class="submenu__category-link" href="">Lorem Ipsum</a> <a class="submenu__category-link" href="#">Lorem Ipsum</a>
</li> </li>
<li class="submenu__category"> <li class="submenu__category">
<a class="submenu__category-link" href="">Lorem Ipsum</a> <a class="submenu__category-link" href="#">Lorem Ipsum</a>
</li> </li>
<li class="submenu__category"> <li class="submenu__category">
<a class="submenu__category-link" href="">Lorem Ipsum</a> <a class="submenu__category-link" href="#">Lorem Ipsum</a>
</li> </li>
<li class="submenu__category"> <li class="submenu__category">
<a class="submenu__category-link" href="">Lorem Ipsum</a> <a class="submenu__category-link" href="#">Lorem Ipsum</a>
</li> </li>
</ul> </ul>
<ul class="submenu__categories"> <ul class="submenu__categories">
<li class="submenu__category"> <li class="submenu__category">
<a class="submenu__category-link" href="">Lorem Ipsum</a> <a class="submenu__category-link" href="#">Lorem Ipsum</a>
</li> </li>
<li class="submenu__category"> <li class="submenu__category">
<a class="submenu__category-link" href="">Lorem Ipsum</a> <a class="submenu__category-link" href="#">Lorem Ipsum</a>
</li> </li>
<li class="submenu__category"> <li class="submenu__category">
<a class="submenu__category-link" href="">Lorem Ipsum</a> <a class="submenu__category-link" href="#">Lorem Ipsum</a>
</li> </li>
<li class="submenu__category"> <li class="submenu__category">
<a class="submenu__category-link" href="">Lorem Ipsum</a> <a class="submenu__category-link" href="#">Lorem Ipsum</a>
</li> </li>
</ul> </ul>
</div> </div>
@ -53,11 +70,20 @@
</li> </li>
<li class="main-menu__department"> <li class="main-menu__department">
<a class="main-menu__department-link" title="LOREM IPSUM" href="#">LOREM IPSUM</a> <a class="main-menu__department-link" title="LOREM IPSUM" href="#">LOREM IPSUM
<i class="sprite sprite-menu-mobile-arrow-icon"></i>
</a>
</li> </li>
<li class="main-menu__department"> <li class="main-menu__department">
<a class="main-menu__department-link" title="LOREM IPSUM" href="#">LOREM IPSUM</a> <a class="main-menu__department-link" title="LOREM IPSUM" href="#">LOREM IPSUM
<i class="sprite sprite-menu-mobile-arrow-icon"></i>
</a>
</li> </li>
</ul> </ul>
<a class="main-menu__account-link" href="/account">
<i class="sprite sprite-user-icon"></i>
ENTRAR / MEUS PEDIDOS
</a>
</nav> </nav>