diff options
| author | Cocographique <nmi@odoo.com> | 2020-06-29 07:35:33 +0000 |
|---|---|---|
| committer | Xavier-Do <xdo@odoo.com> | 2020-08-27 17:07:34 +0000 |
| commit | b30e47d81c1f71a66b1b6aa6846b52e080c25643 (patch) | |
| tree | b92d5862cbb302e62aa99e98c22efd587dea7a8d /addons/website/static/src | |
| parent | d3d5983e0a76eb6500e0d3f78f128879b50390e0 (diff) | |
[IMP] website, *: add 'sidebar' header template
*: website_sale, website_sale_wishlist
Part of https://github.com/odoo/odoo/pull/56427
task-2264627
Co-authored-by: qsm-odoo <qsm@odoo.com>
Diffstat (limited to 'addons/website/static/src')
| -rw-r--r-- | addons/website/static/src/scss/primary_variables.scss | 3 | ||||
| -rw-r--r-- | addons/website/static/src/scss/website.edit_mode.scss | 7 | ||||
| -rw-r--r-- | addons/website/static/src/scss/website.scss | 56 |
3 files changed, 65 insertions, 1 deletions
diff --git a/addons/website/static/src/scss/primary_variables.scss b/addons/website/static/src/scss/primary_variables.scss index f0463e8cc26..be6fa5fd575 100644 --- a/addons/website/static/src/scss/primary_variables.scss +++ b/addons/website/static/src/scss/primary_variables.scss @@ -260,12 +260,13 @@ $o-base-website-values-palette: ( 'navbar-font': null, 'buttons-font': null, - 'header-template': 'default', // 'default' / 'hamburger' / 'vertical' + 'header-template': 'default', // 'default' / 'hamburger' / 'vertical' / 'sidebar' 'header-font-size': null, // Default to BS (normal font-size) 'header-links-style': 'default', // 'default' / 'fill' / 'outline' / 'pills' / 'block' / 'border-bottom' 'logo-height': null, // Default to navbar height (see portal) 'hamburger-type': 'default', // 'default' / 'off-canvas' 'hamburger-position': 'left', // 'left' / 'center' / 'right' + 'sidebar-width': 18.75rem, // 300px 'footer-template': 'default', 'footer-effect': null, // null / 'slideout_slide_hover' / 'slideout_shadow' diff --git a/addons/website/static/src/scss/website.edit_mode.scss b/addons/website/static/src/scss/website.edit_mode.scss index a5763900af2..f99c95ea822 100644 --- a/addons/website/static/src/scss/website.edit_mode.scss +++ b/addons/website/static/src/scss/website.edit_mode.scss @@ -173,6 +173,13 @@ body.editor_enable.editor_has_snippets { } .editor_enable { + @if o-website-value('header-template') == 'sidebar' { + #wrapwrap > header { + @if o-website-value('hamburger-position') != 'right' { + left: $o-we-sidebar-width; + } + } + } @if o-website-value('hamburger-type') == 'off-canvas' { #top_menu_collapse { &.collapsing, &.show { diff --git a/addons/website/static/src/scss/website.scss b/addons/website/static/src/scss/website.scss index 90a090df4f6..b818c72abd8 100644 --- a/addons/website/static/src/scss/website.scss +++ b/addons/website/static/src/scss/website.scss @@ -931,6 +931,62 @@ header { } } +@if o-website-value('header-template') == 'sidebar' { + @include media-breakpoint-up(lg) { + #wrapwrap { + // Hack: padding is used by layout option (boxed, etc) so use + // border here to be able to combine the effect. + @if $-hamburger-right { + border-right: o-website-value('sidebar-width') solid transparent; + } @else { + border-left: o-website-value('sidebar-width') solid transparent; + } + + > header { + @if $-hamburger-right { + @include o-position-absolute(0, 0, 0, auto); + } @else { + @include o-position-absolute(0, auto, 0, 0); + } + position: fixed; + z-index: $zindex-fixed; + display: flex; + width: o-website-value('sidebar-width'); + transform: none !important; + + .navbar { + width: 100%; + align-items: start; + padding: $spacer; + + .navbar-brand { + max-width: 100%; + padding: 0 0 $spacer 0; + } + #top_menu_container { + flex-direction: column; + align-items: start; + padding: 0; + } + .navbar-nav { + flex-direction: column; + } + .nav-link, + .dropdown-item { + white-space: initial; + } + .dropdown-menu { + position: relative; + } + } + } + } + body.o_connected_user #wrapwrap > header { + top: $o-navbar-height; + } + } +} + // Mega menu .o_mega_menu { width: 100%; |
