Cria o header mobile

This commit is contained in:
Douglas Vinicius Nobrega 2022-12-07 21:00:14 -03:00
parent 11b2fd3bce
commit 9760f1c9ef
5 changed files with 121 additions and 60 deletions

View File

@ -2,28 +2,26 @@
padding: 28px 0; padding: 28px 0;
background-color: $black-500; background-color: $black-500;
@include mq(lg, max) {
padding: 18px 0 0;
}
&__wrapper { &__wrapper {
display: grid; display: grid;
grid-template-columns: 2fr 1fr 2fr; grid-template-columns: 2fr 1fr 2fr;
align-items: center; align-items: center;
@include mq(lg, max) {
grid-template-columns: repeat(3, 1fr);
}
} }
&__logo { &__logo {
display: block; display: block;
margin: 0 auto; margin: 0 auto;
}
.user-items { @include mq(lg, max) {
display: flex; max-width: 66px;
align-items: center;
justify-content: flex-end;
&__search-box {
flex: 1;
max-width: 212px;
@include mq(md, max) {
display: none;
}
} }
} }
@ -31,8 +29,6 @@
display: flex; display: flex;
align-items: center; align-items: center;
margin: 0; margin: 0;
padding: 8px 0;
border-bottom: 1px solid $white-500;
legend, legend,
label, label,
@ -66,6 +62,25 @@
} }
} }
.user-items {
display: flex;
align-items: center;
justify-content: flex-end;
&__search-box {
flex: 1;
max-width: 212px;
@include mq(lg, max) {
display: none;
}
.busca {
padding: 8px 0;
border-bottom: 1px solid $white-500;
}
}
&__account-link { &__account-link {
display: flex; display: flex;
align-items: center; align-items: center;
@ -76,6 +91,16 @@
height: 19px; height: 19px;
margin: 0 24px; margin: 0 24px;
background: $white-500; background: $white-500;
@include mq(lg, max) {
margin: 0 16px;
}
}
&::before {
@include mq(lg, max) {
display: none;
}
} }
} }
@ -117,4 +142,18 @@
background: $blue-500; background: $blue-500;
} }
} }
}
&__search-box {
margin-top: 18px;
border-top: 1px solid $gray-500;
@include mq(lg, min) {
display: none;
}
}
.busca {
padding: 13px 0;
}
} }

View File

@ -1,3 +1,16 @@
.main-menu { .menu {
&__button {
padding: 0;
border: 0;
outline: 0;
background: transparent;
@include mq(lg, min) {
display: none; display: none;
}
}
.main-menu {
display: none;
}
} }

View File

@ -12,6 +12,7 @@ $font-height: 1.5;
$black-500: #000000; $black-500: #000000;
$white-500: #ffffff; $white-500: #ffffff;
$blue-500: #00c8ff; $blue-500: #00c8ff;
$gray-500: #333333;
// Grid breakpoints // Grid breakpoints

Binary file not shown.

Before

Width:  |  Height:  |  Size: 770 B

After

Width:  |  Height:  |  Size: 822 B

View File

@ -1,11 +1,13 @@
<header class="page-header"> <header class="page-header">
<div class="container"> <div class="container">
<div class="page-header__wrapper"> <div class="page-header__wrapper">
<button class="page-header__menu-button"> <div class="menu">
<button class="menu__button">
<i class="sprite sprite-menu-icon"></i> <i class="sprite sprite-menu-icon"></i>
</button> </button>
<nav class="main-menu"></nav> <nav class="main-menu"></nav>
</div>
<a href="/"> <a href="/">
<img <img
@ -31,4 +33,10 @@
</div> </div>
</div> </div>
</div> </div>
<div class="page-header__search-box">
<div class="container">
<vtex.cmc:fullTextSearchBox />
</div>
</div>
</header> </header>