![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/old/app/design/frontend/Cnc/default/web/scss/layout/header/ |
// ============================================== // LAYOUT - Menu // ============================================== // // Configuration // _____________________________________________ $nav-section-mobile-position-top: $header-height - 1px; $nav-section-mobile-width: 100vw; $nav-section-mobile-height: calc(var(--app-height) - #{$header-height}); $nav-sections-mobile-bg-color: $c-white; $nav-sections-desktop-bg-color: $c-white; $nav-link-hover-bg-color: $c-blue; $main-menu-link-desktop-padding: 18px 10px; $main-menu-link-mobile-padding: 16px 20px; $submenu-desktop-min-width: 230px; $submenu-desktop-bg-color: $nav-sections-desktop-bg-color; $submenu-desktop-border-color: #d1d1d1; $submenu-mobile-bg-color: $c-white; $submenu-mobile-item-border-color: lighten($c-black, 90%); $submenu-link-desktop-padding: 10px; $submenu-link-mobile-padding: 6px 10px; $submenu-link-mobile-font-size: 1.4rem; $submenu-link-mobile-line-height: 1.4; // // Magento default // _____________________________________________ .nav-sections-item-title { @extend .visually-hidden; } // // Desktop // _____________________________________________ @include breakpoint(xl) { .cms-home .nav-sections { position: absolute; left: 0; right: 0; } .nav-sections { background-color: rgba(247, 247, 247, 0.88); border-bottom: 1px solid transparent; transition: background-color .2s linear, border .2s linear; &.is-active, &:hover { background-color: $c-white; border-bottom: 1px solid $c-grey; } .nav-sections-item-content { position: relative; } .navigation { max-width: 800px + $gutter*2; padding: 0 $gutter / 2; margin: 0 auto; @include breakpoint(sm) { padding: 0 $gutter; } // LEVEL 1 - Main menu > ul { display: flex; justify-content: center; > li { &.ambrands-menu-item a { color: $c-pink; &:hover:after { left: 5px; } &:after { content: "\e914"; margin-left: 10px; position: relative; left: 0; top: 1px; transition: left .3s linear; font-size: 16px; @include icon-icomoon; } } &.is-active, &:hover { > a { color: $c-pink; } } &.is-active { // Show Submenu &.parent::before, > .submenu-container { opacity: 1; visibility: visible; max-height: none; overflow: auto; } } > a { display: flex; text-align: center; height: 100%; align-items: center; justify-content: center; font-weight: bold; padding: $main-menu-link-desktop-padding; transition: color .2s; font-size: 1.3rem; white-space: nowrap; } // LEVEL 2 - Submenu &.parent::before, > .submenu-container { display: block; position: absolute; left: 0; right: 0; // Hide Submenu height: 65vh; max-height: 0; opacity: 0; visibility: hidden; overflow: hidden; } &::before { content: ""; bottom: 1px; z-index: -1; transform: translateY(100%); background-color: $c-white; } > .submenu-container { padding: 30px; > ul { @include container; position: relative; height: 100%; max-width: 1185px; overflow-y: auto; &:before { content: ""; display: block; position: absolute; left: calc(30% + 8px); top: 0; bottom: 0; border-left: 1px solid $c-grey-border; } > li { width: 30%; margin-top: 10px; &:first-child { margin-top: 20px; } &.is-active, &:hover { > a { background-color: $nav-link-hover-bg-color; color: $c-white; transition: background-color .2s ease-out; } } &.is-active { > .submenu-container { max-height: none; overflow: auto; > ul > li, .push-marketing { // Show Submenu opacity: 1; visibility: visible; transform: translateX(0); } } } > a { display: block; padding: 6px 10px 6px 2px; text-align: left; font-weight: $fw-roboto-bold; background-color: transparent; > span:not(.icon) { margin-left: 8px; } .icon { display: inline-block; width: 30px; text-align: center; } } // LEVEL 3 - Sub submenu > .submenu-container { display: flex; position: absolute; top: 0; bottom: 0; left: calc(30% + 8px); right: 20px; min-width: $submenu-desktop-min-width; overflow: hidden; max-height: 0; font-size: 1.4rem; padding-right: 10px; // Common SubMenu Link a:not(.btn) { color: $c-blue-dark; } > ul { width: 40%; padding: 20px 40px; border-right: 1px solid $c-grey-border; overflow: auto; > li { visibility: hidden; overflow: auto; &:hover > a { text-decoration: underline; } > a { display: inline-block; padding: $submenu-link-desktop-padding 0; text-align: left; transition: border-bottom .2s linear; } } } // Level3 Item's displaying animation > ul > li, .push-marketing { transform: translateX(-10px); transition: transform .2s linear, opacity .3s linear; opacity: 0; } } } } } } } } } .nav-sections-cursor { position: absolute; bottom: 0; left: 0; right: 0; height: 2px; opacity: 0; transition: opacity .2s linear; pointer-events: none; &.is-visible { opacity: 1; } > span { display: block; position: absolute; bottom: 0; left: 0; height: 10px; width: 20px; transition: left .3s linear; transform: translateX(-50%); &:before, &:after { position: absolute; content: ''; display: inline-block; left: 50%; transform: translateX(-50%); width: 0; height: 0; border-style: solid; border-width: 0 10px 10px 10px; } &:before { border-color: transparent transparent $c-grey transparent; } &:after { border-color: transparent transparent $c-white transparent; margin-top: 1px; } } } } // Push Marketing of Menu Navigation .nav-sections .push-marketing { width: 60%; padding: 30px 0 30px 40px; .push-item { display: flex; align-items: center; position: relative; border: 1px solid $c-grey; padding: 5px; & + .push-item { margin-top: 45px; } } .content { padding: 10px 10px 25px; flex: 2; } .title { display: block; font-size: 1.8rem; font-weight: bold; color: $c-blue; margin-bottom: 10px; } .text { font-size: 1.4rem; } .picture { flex: 1; text-align: center; } a { @extend .btn; position: absolute; bottom: -15px; left: 20px; } } // // Tablets & Mobiles // _____________________________________________ @include breakpoint(only-xl) { .nav-sections { position: fixed; top: $nav-section-mobile-position-top; bottom: 0; left: 0; right: 0; width: $nav-section-mobile-width; height: $nav-section-mobile-height; max-height: 0; background-color: $nav-sections-mobile-bg-color; overflow-y: auto; overflow-x: hidden; transition: max-height .4s ease-in, padding-top .3s linear; z-index: 10; padding-top: 0; &.is-active { max-height: 1000px; transition: max-height .4s ease-in; padding-top: 52px; } .navigation { // LEVEL 1 - Main menu > ul { > li { > a { position: relative; display: block; padding: $main-menu-link-mobile-padding; font-size: 1.3rem; font-weight: $fw-roboto-bold; line-height: 1.4; } &.ambrands-menu-item > a { color: $c-pink; } // Add toggle icon &.parent, &.ambrands-menu-item { // State open &.is-active { > a { color: $c-blue; &::after { transform: translateY(-50%) rotate(-180deg); } } // LEVEL 2 - Submenu Open > .submenu-container { opacity: 1; visibility: visible; transform: translateY(0); max-height: none; padding-bottom: 20px; } } > a { // State close &::after { content: '\e90c'; position: absolute; top: 50%; right: 20px; transform: translateY(-50%) rotate(-90deg); font-size: 1rem; @include icon-icomoon; transition: transform .3s linear; } } } // LEVEL 2 - Submenu // State Close > .submenu-container { max-height: 0; overflow: hidden; opacity: 0; visibility: hidden; transform: translateY(-10px); transition: transform .3s linear, opacity .3s linear; > ul.submenu { > li { &.see-all > a { color: $c-blue; font-size: 1.3rem; text-decoration: underline; } > a { display: block; padding: 12px 10px 12px 25px; color: $c-blue-dark; font-size: 1.2rem; font-weight: $fw-roboto-bold; > .icon { display: inline-block; vertical-align: middle; text-align: center; text-align: center; font-size: 1.7rem; width: 20px; margin-right: 10px; } } .submenu-container { display: none; } } } } } } } .push-marketing { display: none; } } .nav-sections-items { margin-bottom: 15px; &:after { content: ""; display: block; margin: 0 20px; border-bottom: 1px solid $c-grey; } } } // Display moving elements inside navigation section only mobile version .page-header .nav-sections { .panel.wrapper, .customer-block { display: block; } }