Skip to content

Commit

Permalink
fix: backport white header preset from child themes and fix header mo…
Browse files Browse the repository at this point in the history
…bile (#380)
  • Loading branch information
pnicolli authored Oct 27, 2023
1 parent 46a4d5f commit 60276ec
Show file tree
Hide file tree
Showing 8 changed files with 123 additions and 4 deletions.
15 changes: 15 additions & 0 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions src/theme/ItaliaTheme/_main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ a {
color: $secondary-text !important;
}

button.custom-navbar-toggler svg.icon {
fill: $secondary-text;
}

::selection {
background-color: default;
}
Expand Down
62 changes: 62 additions & 0 deletions src/theme/ItaliaTheme/_white-header.scss
Original file line number Diff line number Diff line change
@@ -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;
}
}
}
}
6 changes: 6 additions & 0 deletions src/theme/_site-variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions src/theme/bootstrap-override/_bootstrap-italia-site.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
19 changes: 19 additions & 0 deletions src/theme/bootstrap-override/bootstrap-italia/_header.scss
Original file line number Diff line number Diff line change
@@ -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;
}
}
}
19 changes: 19 additions & 0 deletions src/theme/bootstrap-override/bootstrap-italia/_headercenter.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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%;
}
}
}
}
1 change: 1 addition & 0 deletions src/theme/site.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down

0 comments on commit 60276ec

Please sign in to comment.