From 60276ecc3aa0dc51016f0bc8d1fad2e4a09ccd4e Mon Sep 17 00:00:00 2001 From: Piero Nicolli Date: Fri, 27 Oct 2023 12:12:32 +0200 Subject: [PATCH] fix: backport white header preset from child themes and fix header mobile (#380) --- RELEASE.md | 15 +++++ src/theme/ItaliaTheme/_main.scss | 4 -- src/theme/ItaliaTheme/_white-header.scss | 62 +++++++++++++++++++ src/theme/_site-variables.scss | 6 ++ .../_bootstrap-italia-site.scss | 1 + .../bootstrap-italia/_header.scss | 19 ++++++ .../bootstrap-italia/_headercenter.scss | 19 ++++++ src/theme/site.scss | 1 + 8 files changed, 123 insertions(+), 4 deletions(-) create mode 100644 src/theme/ItaliaTheme/_white-header.scss create mode 100644 src/theme/bootstrap-override/bootstrap-italia/_header.scss diff --git a/RELEASE.md b/RELEASE.md index cd66dd4ad..d24f9f53e 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -41,6 +41,21 @@ - ... --> +## Versione 8.7.11 (dd/mm/yyyy) + +### Migliorie + +- ... + +### Novità + +- ... + +### Fix + +- Migliorata icona del menù mobile +- Sistemata dimensione logo e bottone di ricerca su mobile + ## Versione 8.7.10 (19/10/2023) ## Fix diff --git a/src/theme/ItaliaTheme/_main.scss b/src/theme/ItaliaTheme/_main.scss index 432e2f3db..8a9c5e181 100644 --- a/src/theme/ItaliaTheme/_main.scss +++ b/src/theme/ItaliaTheme/_main.scss @@ -55,10 +55,6 @@ a { color: $secondary-text !important; } -button.custom-navbar-toggler svg.icon { - fill: $secondary-text; -} - ::selection { background-color: default; } diff --git a/src/theme/ItaliaTheme/_white-header.scss b/src/theme/ItaliaTheme/_white-header.scss new file mode 100644 index 000000000..54a25170f --- /dev/null +++ b/src/theme/ItaliaTheme/_white-header.scss @@ -0,0 +1,62 @@ +@if ($enable-header-white-background) { + .it-header-wrapper { + .it-header-center-wrapper { + .it-header-center-content-wrapper { + .it-brand-wrapper { + .it-brand-text, + .it-brand-text h2, + .it-brand-text h3 { + color: $text-color; + font-weight: 700; + } + } + + .it-right-zone { + color: $text-color; + + .it-socials { + ul { + .icon { + color: $primary; + fill: $primary; + } + + a:hover svg { + fill: darken($primary, 10%); + } + } + } + + .it-search-wrapper a.rounded-icon { + background-color: $primary; + color: white; + + &:hover { + background-color: darken($primary, 10%); + } + } + } + } + } + + .it-header-navbar-wrapper { + background-color: $primary; + } + + .navbar .navbar-collapsable { + .menu-wrapper .it-brand-wrapper { + .it-brand-text, + .it-brand-text h2, + .it-brand-text h3 { + color: $text-color; + font-weight: 700; + } + } + } + @media (max-width: map-get($map: $grid-breakpoints, $key: 'lg') - 1px) { + button.custom-navbar-toggler svg.icon { + fill: $primary; + } + } + } +} diff --git a/src/theme/_site-variables.scss b/src/theme/_site-variables.scss index 4be5c5458..46d63fcfb 100644 --- a/src/theme/_site-variables.scss +++ b/src/theme/_site-variables.scss @@ -19,6 +19,12 @@ $tertiary-text: #fff !default; $highlight-search: #ff0 !default; $font-family-monospace-light: Roboto Mono Light !default; +// Per abilitare l'header bianco impostare a true +// e impostare "$header-center-bg-color: white" come qui sotto +$enable-header-white-background: false; +// $header-center-bg-color: white; +// $header-slim-bg-color: #3f3f3f; + // GDPR-BANNER RELATED $gdpr-accept-all: #005700 !default; $gdpr-toggle-checked: #005700 !default; diff --git a/src/theme/bootstrap-override/_bootstrap-italia-site.scss b/src/theme/bootstrap-override/_bootstrap-italia-site.scss index 1981959d1..c9906f505 100644 --- a/src/theme/bootstrap-override/_bootstrap-italia-site.scss +++ b/src/theme/bootstrap-override/_bootstrap-italia-site.scss @@ -188,6 +188,7 @@ @import 'bootstrap-italia/src/scss/custom/headernavbar'; @import 'bootstrap-italia/src/scss/custom/headernavbartheme'; @import 'bootstrap-italia/src/scss/custom/header'; + @import './bootstrap-italia/header'; // footer @import 'bootstrap-italia/src/scss/custom/footer'; diff --git a/src/theme/bootstrap-override/bootstrap-italia/_header.scss b/src/theme/bootstrap-override/bootstrap-italia/_header.scss new file mode 100644 index 000000000..40336eccf --- /dev/null +++ b/src/theme/bootstrap-override/bootstrap-italia/_header.scss @@ -0,0 +1,19 @@ +.it-header-wrapper { + @media (max-width: map-get($map: $grid-breakpoints, $key: 'lg') - 1px) { + .it-header-navbar-wrapper { + background-color: transparent; + + > .container { + padding: 0; + } + } + + .it-nav-wrapper .it-header-navbar-wrapper nav { + padding-right: 0; + } + + .it-nav-wrapper .it-header-navbar-wrapper { + margin-top: -20px; + } + } +} diff --git a/src/theme/bootstrap-override/bootstrap-italia/_headercenter.scss b/src/theme/bootstrap-override/bootstrap-italia/_headercenter.scss index cd72208b5..e063009f6 100644 --- a/src/theme/bootstrap-override/bootstrap-italia/_headercenter.scss +++ b/src/theme/bootstrap-override/bootstrap-italia/_headercenter.scss @@ -24,4 +24,23 @@ } } } + + @media (max-width: map-get($map: $grid-breakpoints, $key: 'lg') - 1px) { + .it-header-center-content-wrapper { + .it-brand-wrapper { + .header-logo { + img { + width: 30px; + height: 30px; + } + } + } + + .it-right-zone .it-search-wrapper a.rounded-icon { + width: 36px; + height: 36px; + border-radius: 50%; + } + } + } } diff --git a/src/theme/site.scss b/src/theme/site.scss index 70e4fe563..c6c794d4d 100644 --- a/src/theme/site.scss +++ b/src/theme/site.scss @@ -21,6 +21,7 @@ @import 'ItaliaTheme/css_variables'; @import 'ItaliaTheme/common'; @import 'ItaliaTheme/main'; +@import 'ItaliaTheme/white-header'; @import 'ItaliaTheme/ar'; @import 'ItaliaTheme/home'; @import 'ItaliaTheme/sitemap';