From e3fc0778001b15a0df0a4bc06dbe561f4b153856 Mon Sep 17 00:00:00 2001 From: ThiagoDuutra Date: Tue, 6 Dec 2022 16:28:06 -0300 Subject: [PATCH] feat: menu desktop --- src/arquivos/sass/partials/_header.scss | 2 +- src/arquivos/sass/partials/_menu.scss | 116 +++++++++++++++++- src/arquivos/sass/utils/_normalize.scss | 2 +- src/arquivos/sprite/menu-arrow.png | Bin 0 -> 230 bytes src/controles-customizados/menuPrincipal.html | 76 ++++++++++++ .../sub-templates/thiagodutra-header.html | 2 +- 6 files changed, 194 insertions(+), 4 deletions(-) create mode 100644 src/arquivos/sprite/menu-arrow.png create mode 100644 src/controles-customizados/menuPrincipal.html diff --git a/src/arquivos/sass/partials/_header.scss b/src/arquivos/sass/partials/_header.scss index c9f6191..10fb9dd 100644 --- a/src/arquivos/sass/partials/_header.scss +++ b/src/arquivos/sass/partials/_header.scss @@ -1,7 +1,7 @@ .page-header { background-color: $color-black; padding: 28px 0; - + position: relative; @include mq(lg, max) { padding: 18px 0 0; } diff --git a/src/arquivos/sass/partials/_menu.scss b/src/arquivos/sass/partials/_menu.scss index 577cd86..b49f0c4 100644 --- a/src/arquivos/sass/partials/_menu.scss +++ b/src/arquivos/sass/partials/_menu.scss @@ -1,4 +1,5 @@ .menu { + align-self: stretch; &__button { padding: 0; border: 0; @@ -11,6 +12,119 @@ } .main-menu { - display: none; + height: 100%; + &__departments { + display: flex; + height: 100%; + margin: 0; + } + + &__department { + display: flex; + align-items: center; + margin-right: 40px; + + @include mq(lg, min) { + &:hover { + .main-menu__department-link { + text-decoration: underline; + font-weight: 700; + color: $color-blue; + } + + .submenu { + top: 100%; + opacity: 1; + pointer-events: all; + } + } + } + } + + &__department-link { + font-size: 15px; + line-height: 12px; + color: $color-white; + + @include mq(lg, min) { + &::after { + content: attr(title); + display: block; + height: 0; + overflow: hidden; + font-weight: bold; + visibility: hidden; + } + } + } + } + + .submenu { + position: absolute; + top: calc(100% + 32px); + left: 0; + width: 100%; + padding: 30px 0 43px; + z-index: map-get($z-index, menu); + background: rgba($color-white, 0.95); + box-shadow: 0px 4px 4px rgba($color-black, 0.02); + opacity: 0; + pointer-events: none; + transition: all 0.2s ease-in-out; + + &::before { + content: ""; + position: absolute; + left: 0; + bottom: 100%; + width: 100%; + height: 28px; + background: transparent; + } + + &__title { + margin: 0 0 16px; + font-size: 20px; + line-height: 24px; + } + + &__categories-wrapper { + display: flex; + margin-bottom: 8px; + } + + &__categories { + margin-right: 30px; + } + + &__category { + padding: 8px 0; + } + + &__category-link { + font-size: 12px; + line-height: 15px; + color: $color-black; + transition: color 0.2s linear; + + @include mq(lg, min) { + &:hover { + color: $color-blue; + } + } + } + + &__see-all { + display: flex; + align-items: center; + font-size: 12px; + line-height: 15px; + font-weight: bold; + color: $color-black; + + i { + margin-left: 9px; + } + } } } diff --git a/src/arquivos/sass/utils/_normalize.scss b/src/arquivos/sass/utils/_normalize.scss index 69d0d98..1fbd3ac 100644 --- a/src/arquivos/sass/utils/_normalize.scss +++ b/src/arquivos/sass/utils/_normalize.scss @@ -23,7 +23,7 @@ html { */ body { - color: #142032; + color: $color-black; margin: 0; } diff --git a/src/arquivos/sprite/menu-arrow.png b/src/arquivos/sprite/menu-arrow.png new file mode 100644 index 0000000000000000000000000000000000000000..0843e37c0032d71111d7902bee70ca489ed2c5fe GIT binary patch literal 230 zcmeAS@N?(olHy`uVBq!ia0vp^JU}eQ!3HG1Sky`ZDb50q$YP+FDhM-r2B~}i3NjW4 zxjQkeJ16rJ$YDu$^mSxl*x1kgCy^D%ul96t45?t;Iw6p^!GOm_|I7iE24)onM)n6O z77nL$8k#&Em@FEErX67KF} + + diff --git a/src/template-pagina/sub-templates/thiagodutra-header.html b/src/template-pagina/sub-templates/thiagodutra-header.html index c096804..9fe24f0 100644 --- a/src/template-pagina/sub-templates/thiagodutra-header.html +++ b/src/template-pagina/sub-templates/thiagodutra-header.html @@ -5,7 +5,7 @@ - + -- 2.34.1