fix header logo bug in responsive

+ add arrow in menu burger
This commit is contained in:
Sebastien Hattry 2021-11-25 17:26:33 +01:00
parent 2ac023676f
commit 5e15f6ccc6
5 changed files with 107 additions and 89 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

9
public/css/app.css vendored
View file

@ -4677,6 +4677,9 @@ h3:not(.item__title, .product-card__title){
justify-content:flex-end;
height:50px;
}
.site-header .logotype img{
width:100px;
}
}
.menu-overlay__checkbox{
display:none;
@ -4743,12 +4746,18 @@ h3:not(.item__title, .product-card__title){
display:none;
}
.menu__item{
position:relative;
padding:1em;
border-bottom:solid 1px #0c1417;
}
.menu__item:last-child{
border-bottom-width:0;
}
.menu__item::after{
position:absolute;
content:url(/assets/images/arrow-burger.png?3e1f77d8c70eabbfa541980dd2c5968c);
right:40px;
}
.menu .menu-overlay{
position:fixed;
display:flex;

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -100,5 +100,8 @@
justify-content: flex-end;
height: 50px;
}
.logotype img {
width: 100px;
}
}
}

View file

@ -1,64 +1,64 @@
.menu-overlay__checkbox {
display: none;
}
@media screen and (min-width: 800px){
.menu{
width:40%;
margin-left:300px;
text-transform:uppercase;
&-overlay__btn{
@media screen and (min-width: 800px) {
.menu {
width: 40%;
margin-left: 300px;
text-transform: uppercase;
&-overlay__btn {
display: none;
}
.menu__list{
display:flex;
justify-content:space-between;
.menu__list {
display: flex;
justify-content: space-between;
}
a{
display:inline-block;
color:$color-blue;
text-decoration:none;
&:hover{
color:$color-second;
a {
display: inline-block;
color: $color-blue;
text-decoration: none;
&:hover {
color: $color-second;
}
&.active{
position:relative;
color:$color-second;
&.active {
position: relative;
color: $color-second;
}
&.active:before{
content:"";
position:absolute;
top:-60px;
left:0;
right:0;
width:75px;
height:4px;
margin-left:auto;
margin-right:auto;
&.active:before {
content: "";
position: absolute;
top: -60px;
left: 0;
right: 0;
width: 75px;
height: 4px;
margin-left: auto;
margin-right: auto;
background-color: $color-main;
}
}
.only-smrt{
display:none;
.only-smrt {
display: none;
}
}
}
}
@media screen and (max-width: 799px){
.menu{
order:2;
.only-smrt a{
color:$color-second;
@media screen and (max-width: 799px) {
.menu {
order: 2;
.only-smrt a {
color: $color-second;
}
label {
display: flex;
align-items:flex-start;
align-items: flex-start;
justify-content: center;
position: fixed;
width: 2.8em;
@ -66,108 +66,114 @@
z-index: 9999;
}
&__list{
&__list {
display: none;
}
&__item{
padding:1em;
border-bottom:solid 1px $color-dark;
&:last-child{
border-bottom-width:0;
&__item {
position: relative;
padding: 1em;
border-bottom: solid 1px $color-dark;
&:last-child {
border-bottom-width: 0;
}
&::after {
position: absolute;
content: url(~@/images/arrow-burger.png);
right: 40px;
}
}
.menu-overlay{
position:fixed;
display:flex;
right:0;
z-index:100;
.menu-overlay {
position: fixed;
display: flex;
right: 0;
z-index: 100;
&__icon {
display: block;
position: relative;
width: 1.5em;
height: .1em;
height: 0.1em;
background: $color-light;
transition: .4s;
transition: 0.4s;
&:after,
&:before {
content: "";
display: block;
position: absolute;
width: 100%;
height: .1em;
height: 0.1em;
background: $color-light;
border-radius:2em;
transition: .4s;
border-radius: 2em;
transition: 0.4s;
}
&:before {
top: -10px;
}
&:after {
top: 10px;
}
}
&__btn{
&__btn {
display: flex;
justify-content:center;
align-items:center;
top:0;
right:20px;
justify-content: center;
align-items: center;
top: 0;
right: 20px;
justify-content: center;
cursor: pointer;
}
&__checkbox {
&:checked~.menu-overlay__btn .menu-overlay__icon {
&:checked ~ .menu-overlay__btn .menu-overlay__icon {
background: 0 0;
}
&:checked~.menu-overlay__btn .menu-overlay__icon::before {
&:checked ~ .menu-overlay__btn .menu-overlay__icon::before {
transform: rotate(45deg);
}
&:checked~.menu-overlay__btn .menu-overlay__icon::after {
&:checked ~ .menu-overlay__btn .menu-overlay__icon::after {
transform: rotate(-45deg);
}
&:checked~.menu-overlay__btn .menu-overlay__icon::after,
&:checked~.menu-overlay__btn .menu-overlay__icon::before {
&:checked ~ .menu-overlay__btn .menu-overlay__icon::after,
&:checked ~ .menu-overlay__btn .menu-overlay__icon::before {
top: 0;
}
&:checked~.menu__list {
display:flex;
&:checked ~ .menu__list {
display: flex;
flex-direction: column;
position:fixed;
top:50px;
left:0;
width:100%;
padding-top:1em;
padding-left:1em;
padding-right:1em;
position: fixed;
top: 50px;
left: 0;
width: 100%;
padding-top: 1em;
padding-left: 1em;
padding-right: 1em;
text-transform: uppercase;
background-color:$color-light;
background-color: $color-light;
transition-delay: 0s;
box-shadow: 0 2px 8px rgba($color-dark, .20);
box-shadow: 0 2px 8px rgba($color-dark, 0.2);
}
}
}
}
}
.secondmenu{
display:flex;
justify-content:flex-end;
.secondmenu {
display: flex;
justify-content: flex-end;
}
@media screen and (max-width: 799px) {
.secondmenu{
.secondmenu {
margin-right: 3em;
}
}
}