drupal-erable/web/themes/erabletheme/scss/partials/_header.scss

269 lines
9.6 KiB
SCSS

body.toolbar-tray-open header[role="banner"] {
left: 15rem !important;
width: calc(100% - 15rem) !important;
}
body.toolbar-fixed header[role="banner"] {
top: 2.4em !important;
}
.layout-container {
width: 100%;
overflow: hidden;
header[role="banner"] {
width: 100%;
background: white;
position: fixed;
top: 0;
left: 0;
z-index: 99;
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.2);
@media (min-width: $breakpoint_desktop) {
box-shadow: none;
}
> div {
height: 10vh;
display: grid;
grid-template-columns: repeat(16, 1fr);
> div{
height: 10vh;
grid-row: 1;
max-height: 100%;
width: 100%;
> div {
width: 100%;
display: flex;
justify-content: center;
align-items: center;
> div {
height: 10vh;
a {
display: block;
height: 100%;
width: 100%;
display: flex;
justify-content: center;
align-items: center;
}
img {
width: auto;
height: auto;
max-width: 100%;
max-height: 100%;
}
}
}
}
#block-erabletheme-logorep-2 {
grid-column: 1 / 5;
@media (min-width: $breakpoint_tablet) {
grid-column: 0 / 4;
}
@media (min-width: $breakpoint_desktop) {
grid-column: 1 / 3;
}
}
#block-erabletheme-logoepau-2 {
grid-column: 5 / 10;
@media (min-width: $breakpoint_tablet) {
grid-column: 4 / 7;
}
@media (min-width: $breakpoint_desktop) {
grid-column: 3 / 6;
img {
padding: 0 1rem;
}
}
}
#block-erabletheme-logoerable {
grid-column: 11 / 15;
@media (min-width: $breakpoint_desktop) {
grid-column: 14 / 16;
}
img {
padding: 0 1.5rem;
}
}
#block-erabletheme-socialmedialinks {
display: none;
}
#block-erabletheme-header {
grid-column: 15 / 17;
@media (min-width: $breakpoint_desktop) {
grid-column: 16 / 17;
}
#hamburger {
cursor: pointer;
width: 100%;
height: 100%;
background-color: $fluo_green;
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-around;
padding: 0.5rem 0;
h2 {
font-size: $sm_font_size;
font-family: 'Marianne', sans-serif;
font-weight: 800;
text-align: center;
}
.burger-icon {
width: 2rem;
height: 1.5rem;
display: flex;
flex-direction: column;
justify-content: space-between;
padding-bottom: 0.5rem;
div {
border-bottom: solid 1px black;
width: 100%;
background-color: black;
opacity: 1;
transition: opacity 0.2s ease-out, transform 0.4s ease-out;
transform: none;
}
}
.burger-icon.open {
div:first-of-type {
transform: translate(0rem, 0.5rem) rotate(-45deg);
}
div:nth-of-type(2) {
opacity: 0;
}
div:last-of-type {
transform: translate(0rem, -0.5rem) rotate(45deg);
}
}
}
ul:not(.social-media-links--platforms) {
display: none;
height: auto;
max-height: 0vh;
transition: max-height 0.9s ease, padding 0.5s ease-out;
position: fixed;
background-color: $dark_green;
top: 10vh;
left: 0;
width: 100vw;
z-index: 0;
padding: 0;
align-items: center;
flex-direction: column;
> li {
width: 100%;
display: flex;
justify-content: center;
padding: 6px 0;
opacity: 0;
transition: opacity 0.3s ease;
max-width: 60vw;
> a {
text-align: center;
line-height: 1.2;
color: white;
font-family: 'Marianne', sans-serif;
font-weight: 800;
padding: 4px 6px;
background-color: rgba(255, 255, 255, 0);
transition: background-color 0.3s ease, color 0.3s ease;
}
> a:hover {
background-color: white;
color: $dark_green;
}
> a.is-active {
background-color: white;
color: $dark_green;
}
@media (min-width: $breakpoint_tablet) {
max-width: 30vw;
}
#socials-in-menu-wrapper {
display: flex;
width: auto;
li {
width: auto;
padding: 0 1rem;
margin-top: 1rem;
a {
span {
color: white;
}
svg {
display: none;
}
}
}
}
}
> li.visible {
opacity: 1;
}
> li:nth-of-type(1),
> li:nth-of-type(2),
> li:nth-of-type(6) {
border-bottom: solid 1px white;
padding: 12px 0;
}
@media (min-width: $breakpoint_desktop) {
width: 25vw;
right: 0;
left: auto;
li {
width: calc(100% - $x_margin * 2);
a {
width: 100%;
text-align: left;
}
}
}
}
ul.active {
padding: 30px 0;
max-height: 100vh;
}
}
#block-erabletheme-navigationprincipale {
display: none;
grid-column: 1 / 17;
grid-row: 2;
background-color: white;
box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.2);
@media (min-width: $breakpoint_desktop) {
display: block;
}
ul {
width: 100%;
display: flex;
padding: 1rem 10vw;
justify-content: space-around;
border-top: solid 1px $dark_green;
li {
font-family: 'Marianne', sans-serif;
font-size: $m_font_size;
a {
font-weight: 800;
padding: 4px 6px;
color: black;
background-color: rgba(255, 255, 255, 0);
transition: background-color 0.3s ease;
}
a:hover {
background-color: $fluo_green;
}
a.is-active {
background-color: $fluo_green;
}
}
}
}
}
}
}