forked from M3-Academy/vtex-cms-template-atualizado
feat: Cria menu mobile
This commit is contained in:
parent
3895e08f1a
commit
e29ce47aab
@ -17,6 +17,7 @@
|
||||
@import "./components/instagram-gallery";
|
||||
|
||||
@import "./partials/header";
|
||||
@import "./partials/search";
|
||||
@import "./partials/menu";
|
||||
@import "./partials/barraDeVantagens";
|
||||
@import "./partials/footer";
|
||||
|
@ -109,44 +109,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
.busca {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 0;
|
||||
padding: 13px 0;
|
||||
|
||||
legend,
|
||||
label,
|
||||
select {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.fulltext-search-box {
|
||||
flex: 1;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
height: 23px;
|
||||
background-color: transparent;
|
||||
outline: 0;
|
||||
color: $white-500;
|
||||
font-size: 10px;
|
||||
line-height: 12px;
|
||||
}
|
||||
|
||||
.btn-buscar {
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
background-color: transparent;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
font-size: 0;
|
||||
|
||||
@extend .sprite;
|
||||
@extend .sprite-search-icon;
|
||||
}
|
||||
}
|
||||
|
||||
&__search-box {
|
||||
margin-top: 18px;
|
||||
border-top: 1px solid;
|
||||
|
@ -12,21 +12,85 @@
|
||||
}
|
||||
}
|
||||
|
||||
.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-color: $black-500;
|
||||
|
||||
.busca {
|
||||
padding: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.main-menu {
|
||||
height: 100%;
|
||||
|
||||
@include mq(lg, max) {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
transform: translateX(-100%);
|
||||
z-index: map-get($z-index, level-5);
|
||||
background-color: $white-500;
|
||||
}
|
||||
|
||||
&__departments {
|
||||
display: flex;
|
||||
margin: 0;
|
||||
|
||||
@include mq(lg, max) {
|
||||
flex-direction: column;
|
||||
flex: 1;
|
||||
position: relative;
|
||||
overflow: hidden auto;
|
||||
}
|
||||
|
||||
@include mq(lg, min) {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
&__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 {
|
||||
font-weight: 700;
|
||||
@ -48,6 +112,15 @@
|
||||
line-height: 15px;
|
||||
color: $white-500;
|
||||
|
||||
@include mq(lg, max) {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 20px 16px;
|
||||
color: $black-500;
|
||||
}
|
||||
|
||||
@include mq(lg, min) {
|
||||
&::after {
|
||||
content: attr(title);
|
||||
@ -59,20 +132,47 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&__account-link {
|
||||
display: flex;
|
||||
background-color: $black-500;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 64px;
|
||||
line-height: 12px;
|
||||
font-size: 10px;
|
||||
color: $white-500;
|
||||
|
||||
i {
|
||||
margin-right: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.submenu {
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
|
||||
@include mq(lg, max) {
|
||||
overflow: auto;
|
||||
left: 100%;
|
||||
padding-bottom: 34px;
|
||||
top: 0;
|
||||
background-color: $white-500;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
@include mq(lg, min) {
|
||||
left: 0;
|
||||
opacity: 0;
|
||||
pointer-events: none;
|
||||
position: absolute;
|
||||
top: calc(100% + 32px);
|
||||
width: 100%;
|
||||
z-index: map-get($z-index, level-4);
|
||||
left: 0;
|
||||
padding: 30px 0 43px;
|
||||
background: rgba(255, 255, 255, 0.95);
|
||||
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.02);
|
||||
transition: all 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: "";
|
||||
@ -85,16 +185,51 @@
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.container {
|
||||
@include mq(lg, max) {
|
||||
padding: 0 16px;
|
||||
}
|
||||
}
|
||||
|
||||
&__return-button {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
border-bottom: 1px solid $gray-100;
|
||||
outline: 0;
|
||||
text-align: left;
|
||||
padding: 16px;
|
||||
margin-bottom: 34px;
|
||||
background-color: transparent;
|
||||
|
||||
i {
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
&__title {
|
||||
font-size: 20px;
|
||||
margin: 0;
|
||||
line-height: 24px;
|
||||
margin-bottom: 16px;
|
||||
|
||||
@include mq(lg, max) {
|
||||
text-decoration-line: underline;
|
||||
font-size: 12px;
|
||||
line-height: 14px;
|
||||
color: $blue-500;
|
||||
}
|
||||
}
|
||||
|
||||
&__categories-wrapper {
|
||||
display: flex;
|
||||
margin-bottom: 16px;
|
||||
|
||||
@include mq(lg, min) {
|
||||
margin-bottom: 8px;
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
&__categories {
|
||||
|
37
src/arquivos/sass/partials/_search.scss
Normal file
37
src/arquivos/sass/partials/_search.scss
Normal file
@ -0,0 +1,37 @@
|
||||
.busca {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 0;
|
||||
padding: 13px 0;
|
||||
|
||||
legend,
|
||||
label,
|
||||
select {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.fulltext-search-box {
|
||||
flex: 1;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
height: 23px;
|
||||
background-color: transparent;
|
||||
outline: 0;
|
||||
color: $white-500;
|
||||
font-size: 10px;
|
||||
line-height: 12px;
|
||||
}
|
||||
|
||||
.btn-buscar {
|
||||
width: 23px;
|
||||
height: 23px;
|
||||
background-color: transparent;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
outline: 0;
|
||||
font-size: 0;
|
||||
|
||||
@extend .sprite;
|
||||
@extend .sprite-search-icon;
|
||||
}
|
||||
}
|
@ -14,6 +14,8 @@ $white-500: #fff;
|
||||
|
||||
$blue-500: #00c8ff;
|
||||
|
||||
$gray-100: #e0e0e0;
|
||||
$gray-200: #828282;
|
||||
$gray-500: #333;
|
||||
|
||||
$color-black: #000;
|
||||
|
BIN
src/arquivos/sprite/back-icon.png
Normal file
BIN
src/arquivos/sprite/back-icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 271 B |
BIN
src/arquivos/sprite/close-menu-icon.png
Normal file
BIN
src/arquivos/sprite/close-menu-icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 366 B |
BIN
src/arquivos/sprite/department-arrow-icon.png
Normal file
BIN
src/arquivos/sprite/department-arrow-icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 273 B |
BIN
src/arquivos/sprite/lock-icon.png
Normal file
BIN
src/arquivos/sprite/lock-icon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 538 B |
@ -1,11 +1,33 @@
|
||||
<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">
|
||||
<li class="main-menu__department">
|
||||
<a class="main-menu__department-link" href="#" title="LOREM IPSUM"
|
||||
>LOREM IPSUM</a
|
||||
>
|
||||
<a class="main-menu__department-link" href="#" title="LOREM IPSUM">
|
||||
LOREM IPSUM
|
||||
<i class="sprite sprite-department-arrow-icon"></i>
|
||||
</a>
|
||||
|
||||
<div class="submenu">
|
||||
<button class="submenu__return-button">
|
||||
<i class="sprite sprite-back-icon"></i>
|
||||
VOLTAR
|
||||
</button>
|
||||
<div class="container">
|
||||
<h2 class="submenu__title">LOREM IPSUM</h2>
|
||||
|
||||
@ -65,14 +87,21 @@
|
||||
</div>
|
||||
</li>
|
||||
<li class="main-menu__department">
|
||||
<a class="main-menu__department-link" href="#" title="LOREM IPSUM"
|
||||
>LOREM IPSUM</a
|
||||
>
|
||||
<a class="main-menu__department-link" href="#" title="LOREM IPSUM">
|
||||
LOREM IPSUM
|
||||
<i class="sprite sprite-department-arrow-icon"></i>
|
||||
</a>
|
||||
</li>
|
||||
<li class="main-menu__department">
|
||||
<a class="main-menu__department-link" href="#" title="LOREM IPSUM"
|
||||
>LOREM IPSUM</a
|
||||
>
|
||||
<a class="main-menu__department-link" href="#" title="LOREM IPSUM">
|
||||
LOREM IPSUM
|
||||
<i class="sprite sprite-department-arrow-icon"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<a class="main-menu__account-link" href="account">
|
||||
<i class="sprite sprite-user-icon"></i>
|
||||
ENTRAR / MEUS PEDIDOS
|
||||
</a>
|
||||
</nav>
|
||||
|
Loading…
Reference in New Issue
Block a user