diff options
Diffstat (limited to 'addons/website/static/src')
4 files changed, 36 insertions, 8 deletions
diff --git a/addons/website/static/src/scss/bootstrap_overridden.scss b/addons/website/static/src/scss/bootstrap_overridden.scss index d9a17a61997..6f20d0c4c20 100644 --- a/addons/website/static/src/scss/bootstrap_overridden.scss +++ b/addons/website/static/src/scss/bootstrap_overridden.scss @@ -14,7 +14,7 @@ $yiq-text-light: o-color('white') !default; // // Settings for the `<body>` element. -$body-bg: if($o-theme-layout == 'full', o-color('o-cc1-bg'), o-color('body')) !default; +$body-bg: if(o-website-value('layout') != 'full', o-color('body'), o-color('o-cc1-bg')) !default; $body-color: o-color('o-cc1-text') or color-yiq(o-color('o-cc1-bg')) !default; // Links diff --git a/addons/website/static/src/scss/options/layout/option_layout_boxed_variables.scss b/addons/website/static/src/scss/options/layout/option_layout_boxed_variables.scss deleted file mode 100644 index 9251dde4fa7..00000000000 --- a/addons/website/static/src/scss/options/layout/option_layout_boxed_variables.scss +++ /dev/null @@ -1 +0,0 @@ -$o-theme-layout: 'boxed'; diff --git a/addons/website/static/src/scss/primary_variables.scss b/addons/website/static/src/scss/primary_variables.scss index 7764ae7df9f..a68242f5c4e 100644 --- a/addons/website/static/src/scss/primary_variables.scss +++ b/addons/website/static/src/scss/primary_variables.scss @@ -1,4 +1,3 @@ -$o-theme-layout: 'full'; //------------------------------------------------------------------------------ // Colors @@ -247,6 +246,7 @@ $o-base-website-values-palette: ( 'body-image': null, 'body-image-type': 'image', // 'image' or 'pattern' + 'layout': 'full', // 'full' / 'boxed' 'color-palettes-number': null, // Default to the individual variables for each color palette type 'btn-primary-outline': false, diff --git a/addons/website/static/src/scss/website.scss b/addons/website/static/src/scss/website.scss index b9a17bff532..72ac9b20588 100644 --- a/addons/website/static/src/scss/website.scss +++ b/addons/website/static/src/scss/website.scss @@ -72,13 +72,42 @@ $-seen-urls: (); } } - @if ($o-theme-layout == 'boxed') { - @include media-breakpoint-up(md) { - padding: 0 7.5%; + @if o-website-value('layout') == 'boxed' { + > main { + background-color: o-color('o-cc1-bg'); } - #wrap { - background-color: o-color('o-cc1-bg'); + @include media-breakpoint-up(sm) { + padding-right: $grid-gutter-width * 2; + padding-left: $grid-gutter-width * 2; + + > * { + // When the website is visually acting like a container (eg. + // boxed layout), increase its maximum size to handle bigger + // horizontal paddings. + $-max-widths: (); + @each $key, $value in $container-max-widths { + $-max-widths: map-merge($-max-widths, ( + #{$key}: $value + $grid-gutter-width * 2, + )); + } + @include make-container(0); + @include make-container-max-widths($-max-widths); + } + + > header .container { + max-width: 100% !important; + } + + // Vertical alignment when top-menu has visually "no background" + @if o-color('menu') == o-color('body') { + > header { + .navbar, .container { + padding-left: 0; + padding-right: 0; + } + } + } } } } |
