feat:Cria submenu mobile

This commit is contained in:
Gustavo Rallenson Gonçalves Da Silva 2022-12-10 02:56:40 -03:00
parent ea22ba4d63
commit a8f6869640
10 changed files with 331 additions and 60 deletions

View File

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

View File

@ -30,43 +30,6 @@
}
}
.busca{
display: flex;
align-items: center;
margin: 0;
legend,
label,
select{
display: none;
}
.fulltext-search-box{
color: $white-500;
flex: 1;
height: 30px;
background: transparent;
outline: 0;
font-size: 10px;
line-height: 12px;
padding: 0;
border: 0;
}
.btn-buscar{
width: 23px;
height: 23px;
padding: 0;
border: 0;
outline: 0;
font-size: 0;
background-color: transparent;
@extend .sprite;
@extend .sprite-search-icon;
}
}
.user-items{
display: flex;

View File

@ -10,19 +10,79 @@
display: none;
}
}
.menu-header{
&__top-wrapper{
padding: 16px;
display: flex;
align-items: center;
justify-content: space-between;
}
&__text{
display: flex;
align-items: center;
line-height: 15px;
font-size: 12px;
color: $gray-200;
i{
margin-right: 10px;
}
}
&__close-button{
padding: 0;
border: 0;
outline: 0;
background: transparent;
}
&__search-box{
background:$black-500;
.busca{
padding: 16px;
}
}
}
.main-menu{
height: 100%;
@include mq(lg,max){
position: fixed;
display: flex;
flex-direction: column;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index:map-get($z-index,Level-5 );
transform: translateX(-100%);
background: $white-500;
}
&__departments{
display: flex;
height: 100%;
margin: 0;
@include mq(lg,min){
height: 100%;
}
@include mq(lg, max){
flex: 1;
flex-direction: column;
position: relative;
overflow:hidden auto;
}
}
&__department{
display: flex;
align-items: center;
margin-right: 40px;
@include mq(lg,max){
border-bottom: 1px solid $gray-100;
}
@include mq(lg,min){
margin-right: 40px;
&:hover{
.main-menu__department-link{
@ -41,10 +101,20 @@
&__department-link{
font-size: 12px;
line-height: 15px;
color:$white-500;
color:$black-500;
@include mq(lg,max){
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
padding: 20px 16px;
}
@include mq(lg,min){
color: $white-500;
i{
display: none;
}
&::after{
content: attr(title);
display: block;
@ -55,19 +125,44 @@
}
}
}
}
&__account-link{
display: flex;
align-items: center;
justify-content: center;
height: 64px;
font-size: 10px;
line-height: 12px;
color: $white-500;
background: $black-500;
i{
margin-right: 16px; ;
}
}
.submenu{
position: absolute;
top: calc(100% + 32px);
left: 0;
z-index: map-get($map:$z-index, $key: Level-4);
left: 100%;
top: 0;
width: 100%;
padding: 30px 0 44px;
background: rgba($white-500, 0.95);
box-shadow: 0px 4px 4px rgba($black-500, 0.02);
opacity: 0;
pointer-events: none;
transition: all 0.2s ease-in-out;
@include mq(lg,max){
top: 0;
height: 100%;
overflow: auto;
padding-bottom: 34px;
background: $white-500;
}
@include mq(lg,min){
top: calc(100% + 32px);
left: 0;
z-index: map-get($map:$z-index, $key: Level-4);
padding: 30px 0 44px;
background: rgba($white-500, 0.95);
box-shadow: 0px 4px 4px rgba($black-500, 0.02);
opacity: 0;
pointer-events: none;
transition: all 0.2s ease-in-out;
}
&::before{
content: '';
position: absolute;
@ -77,16 +172,49 @@
height: 28px;
background: transparent;
}
.container{
@include mq(lg, max){
padding: 0 16px;
margin: 0;
}
}
&__return-button{
display: flex;
align-items: center;
width: 100%;
margin-bottom: 34px;
padding:16px;
border: solid $gray-100;
outline: 0;
text-align: left;
background: transparent;
i{
margin-right: 8px;
}
}
&__title{
margin: 0 0 8px;
line-height: 24px;
font-size: 20px;
@include mq(lg,max){
font-size: 12px;
line-height: 14px;
text-decoration-line: underline;
color: $blue-500;
}
}
&__categorias-wrapper{
margin-bottom: 8px;
display: flex;
margin-bottom: 16px;
@include mq(lg, min){
margin-bottom: 8px;
display: flex;
}
}
&__categorias{
@ -119,3 +247,4 @@
}
}
}
}

View File

@ -0,0 +1,37 @@
.busca{
display: flex;
align-items: center;
margin: 0;
legend,
label,
select{
display: none;
}
.fulltext-search-box{
color: $white-500;
flex: 1;
height: 30px;
background: transparent;
outline: 0;
font-size: 10px;
line-height: 12px;
padding: 0;
border: 0;
}
.btn-buscar{
width: 23px;
height: 23px;
padding: 0;
border: 0;
outline: 0;
font-size: 0;
background-color: transparent;
@extend .sprite;
@extend .sprite-search-icon;
}
}

View File

@ -10,6 +10,8 @@ $font-height: 1.5;
$black-500: #000000;
$white-500: #ffffff;
$blue-500:#00C8FF;
$gray-100:#e0e0e0;
$gray-200:#828282;
$gray-500:#333333;

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: 264 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 267 B

View File

@ -1,9 +1,83 @@
<nav class="main-menu">
<div class="menu-header">
<div class="menu-header__top-wrapper">
<div class="menu-header__text">
<i class="sprite sprite-lock-item">
</i>
COMPRA 100% SEGURA
</div>
<button class="menu-header__close-button">
<i class="sprite sprite-close-menu-item"></i>
</button>
</div>
<div class="menu-header__search-box">
<vtex.cmc:fullTextSearchBox />
</div>
</div>
<ul class="main-menu__departments">
<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>
<div class="submenu">
<button class="submenu__return-button">
<i class="sprite sprite-menu-left-arrow-icon"></i>
VOLTAR
</button>
<div class="container">
<h2 class="submenu__title">Lorem IPSUM</h2>
<div class="submenu__categorias-wrapper">
<ul class="submenu__categorias">
<li class="submenu__categoria">
<a class="submenu__category-link" href="">Lorem IPSUM</a>
</li>
<li class="submenu__categoria">
<a class="submenu__category-link" href="">Lorem IPSUM</a>
</li>
<li class="submenu__categoria">
<a class="submenu__category-link" href="">Lorem IPSUM</a>
</li>
<li class="submenu__categoria">
<a class="submenu__category-link" href="">Lorem IPSUM</a>
</li>
</ul>
<ul class="submenu__categorias">
<li class="submenu__categoria">
<a class="submenu__category-link" href="">Lorem IPSUM</a>
</li>
<li class="submenu__categoria">
<a class="submenu__category-link" href="">Lorem IPSUM</a>
</li>
<li class="submenu__categoria">
<a class="submenu__category-link" href="">Lorem IPSUM</a>
</li>
<li class="submenu__categoria">
<a class="submenu__category-link" href="">Lorem IPSUM</a>
</li>
</ul>
</div>
<a class="submenu__see-all" href="">
VER TODOS
<i class="sprite sprite-menu-arrow-icon"></i>
</a>
</div>
</div>
</li>
<li class="main-menu__department">
<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">
<button class="submenu__return-button">
<i class="sprite sprite-menu-left-arrow-icon"></i>
VOLTAR
</button>
<div class="container">
<h2 class="submenu__title">Lorem IPSUM</h2>
<div class="submenu__categorias-wrapper">
@ -54,17 +128,82 @@
</div>
<a class="submenu__see-all" href="">
VER TODAS
VER TODOS
<i class="sprite sprite-menu-arrow-icon"></i>
</a>
</div>
</div>
</li>
<li class="main-menu__department">
<a class="main-menu__department-link" title="LOREM IPSUM" href="#">LOREM IPSUM</a>
</li>
<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>
<div class="submenu">
<button class="submenu__return-button">
<i class="sprite sprite-menu-left-arrow-icon"></i>
VOLTAR
</button>
<div class="container">
<h2 class="submenu__title">Lorem IPSUM</h2>
<div class="submenu__categorias-wrapper">
<ul class="submenu__categorias">
<li class="submenu__categoria">
<a class="submenu__category-link" href="">Lorem IPSUM</a>
</li>
<li class="submenu__categoria">
<a class="submenu__category-link" href="">Lorem IPSUM</a>
</li>
<li class="submenu__categoria">
<a class="submenu__category-link" href="">Lorem IPSUM</a>
</li>
<li class="submenu__categoria">
<a class="submenu__category-link" href="">Lorem IPSUM</a>
</li>
</ul>
<ul class="submenu__categorias">
<li class="submenu__categoria">
<a class="submenu__category-link" href="">Lorem IPSUM</a>
</li>
<li class="submenu__categoria">
<a class="submenu__category-link" href="">Lorem IPSUM</a>
</li>
<li class="submenu__categoria">
<a class="submenu__category-link" href="">Lorem IPSUM</a>
</li>
<li class="submenu__categoria">
<a class="submenu__category-link" href="">Lorem IPSUM</a>
</li>
</ul>
</div>
<a class="submenu__see-all" href="">
VER TODOS
<i class="sprite sprite-menu-arrow-icon"></i>
</a>
</div>
</div>
</li>
</ul>
<a class="main-menu__account-link" href="/account">
<i class="sprite sprite-user-icon">
</i>
ENTRAR/MEUS PEDIDOS
</a>
</nav>