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

333 lines
11 KiB
SCSS
Raw Normal View History

2024-03-20 22:28:16 +01:00
body.toolbar-tray-open header[role="banner"] {
2024-01-06 08:57:17 +01:00
left: 15rem !important;
width: calc(100% - 15rem) !important;
}
2024-03-20 22:28:16 +01:00
body.toolbar-fixed header[role="banner"] {
2024-01-06 08:57:17 +01:00
top: 2.4em !important;
}
.layout-container {
2024-04-10 12:37:31 +02:00
//max-width: 100vw;
//overflow: hidden;
2024-03-20 22:28:16 +01:00
header[role="banner"] {
2024-01-06 08:57:17 +01:00
width: 100%;
2024-10-31 01:32:57 +01:00
background-color: white;
z-index: 99;
// box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.2);
2024-03-18 21:45:12 +01:00
@media (min-width: $breakpoint_desktop) {
2024-04-10 12:37:31 +02:00
position: sticky;
top: -12vh;
2024-03-18 21:45:12 +01:00
box-shadow: none;
}
2024-10-31 01:32:57 +01:00
> div:first-of-type {
z-index: 99;
position: relative;
2024-03-18 21:45:12 +01:00
display: grid;
grid-template-columns: repeat(16, 1fr);
> div{
2024-04-10 12:37:31 +02:00
height: 12vh;
2024-03-18 21:45:12 +01:00
grid-row: 1;
max-height: 100%;
width: 100%;
> div {
width: 100%;
display: flex;
2024-03-18 21:45:12 +01:00
justify-content: center;
align-items: center;
2024-03-18 21:45:12 +01:00
> div {
2024-04-10 12:37:31 +02:00
height: 12vh;
2024-03-18 21:45:12 +01:00
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%;
}
}
}
2024-03-18 21:45:12 +01:00
}
#block-erabletheme-logorep-2 {
2024-04-10 12:37:31 +02:00
img {
padding-top: 0.8rem;
padding-bottom: 0.8rem;
}
2024-03-18 21:45:12 +01:00
grid-column: 1 / 5;
2023-12-21 12:48:12 +01:00
@media (min-width: $breakpoint_tablet) {
2024-03-18 21:45:12 +01:00
grid-column: 0 / 4;
2023-12-21 12:48:12 +01:00
}
@media (min-width: $breakpoint_desktop) {
2024-03-18 21:45:12 +01:00
grid-column: 1 / 3;
}
}
2024-03-18 21:45:12 +01:00
#block-erabletheme-logoepau-2 {
2024-04-10 12:37:31 +02:00
grid-column: 5 / 9;
> div {
align-items: flex-start;
justify-content: flex-start;
> div > a > img {
transform: translateX(-20px);
padding-top: 1.2rem;
padding-bottom: 1.2rem;
}
}
2024-03-18 21:45:12 +01:00
@media (min-width: $breakpoint_tablet) {
grid-column: 4 / 7;
2024-04-10 12:37:31 +02:00
> div > div > a > img {
padding-top: 1.5rem;
padding-bottom: 1.5rem;
}
}
@media (min-width: $breakpoint_desktop) {
2024-10-31 01:32:57 +01:00
grid-column: 3 / 8;
}
@media (min-width: $breakpoint_desktop_large) {
grid-column: 3 / 6;
> div > div > a > img {
transform: translateX(-40px);
padding-top: 30px;
padding-bottom: 30px;
}
}
2024-03-18 21:45:12 +01:00
}
#block-erabletheme-logoerable {
2024-04-10 12:37:31 +02:00
grid-column: 10 / 15;
@media (min-width: $breakpoint_desktop) {
2024-03-18 21:45:12 +01:00
grid-column: 14 / 16;
}
img {
2024-04-10 12:37:31 +02:00
padding-right: 1rem;
padding-top: 0.8rem;
padding-bottom: 0.8rem;
}
}
#block-erabletheme-socialmedialinks {
display: none;
}
#block-erabletheme-header {
2024-03-18 21:45:12 +01:00
grid-column: 15 / 17;
@media (min-width: $breakpoint_desktop) {
grid-column: 16 / 17;
}
#hamburger {
cursor: pointer;
2024-04-10 12:37:31 +02:00
width: auto;
height: 100%;
background-color: $fluo_green;
display: flex;
2023-12-14 06:01:09 +01:00
flex-direction: column;
align-items: center;
2023-12-14 06:01:09 +01:00
justify-content: space-around;
2023-12-21 12:48:12 +01:00
padding: 0.5rem 0;
h2 {
font-size: $sm_font_size;
font-family: 'Marianne', sans-serif;
font-weight: 800;
text-align: center;
}
2023-12-14 06:01:09 +01:00
.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) {
2024-04-10 12:37:31 +02:00
position: absolute;
2024-04-15 11:54:19 +02:00
left: 0;
2024-04-10 12:37:31 +02:00
z-index: -1;
display: none;
2023-12-14 06:01:09 +01:00
height: auto;
max-height: 0vh;
transition: max-height 0.9s ease, padding 0.5s ease-out;
background-color: $dark_green;
width: 100vw;
2023-12-14 06:01:09 +01:00
padding: 0;
align-items: center;
flex-direction: column;
> li {
width: 100%;
display: flex;
justify-content: center;
padding: 6px 0;
2023-12-14 06:01:09 +01:00
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;
}
}
2024-10-31 01:32:57 +01:00
}
}
}
> li.visible {
2023-12-14 06:01:09 +01:00
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;
}
}
}
2023-12-14 06:01:09 +01:00
}
ul.active {
padding: 30px 0;
2024-03-29 21:29:59 +01:00
padding-top: 3rem;
2023-12-14 06:01:09 +01:00
max-height: 100vh;
}
}
2024-03-18 21:45:12 +01:00
#block-erabletheme-navigationprincipale {
2024-03-29 21:29:59 +01:00
margin-top: 0 !important;
}
}
2024-10-31 01:32:57 +01:00
> div:nth-of-type(2) {
z-index: 98;
position: relative;
}
2024-03-29 21:29:59 +01:00
}
#block-erabletheme-navigationprincipale {
background: linear-gradient(to bottom, white, transparent);
width: 100vw;
display: none;
position: absolute;
padding-top: 1rem;
@media (min-width: $breakpoint_desktop) {
display: block;
}
ul {
width: 100%;
display: flex;
padding: 1rem 10vw;
justify-content: space-around;
li {
font-family: 'Marianne', sans-serif;
font-size: $m_font_size;
padding: 4px 12px;
background-color: white;
transition: background-color 0.3s ease;
&:first-of-type {
display: flex;
justify-items: center;
&::after {
content: url(../assets/icons/arrow-down-s-line.svg);
display: inline-block;
height: 1rem;
width: 1rem;
margin-left: 0.2rem;
2024-03-18 21:45:12 +01:00
}
}
&:hover, &.submenu-open {
background-color: $fluo_green;
}
a {
font-weight: 800;
color: black;
&:is-active {
2024-10-31 01:32:57 +01:00
background-color: $fluo_green;
2024-03-29 21:29:59 +01:00
}
}
}
}
}
2024-10-31 01:32:57 +01:00
#block-erabletheme-leprogramme {
position: fixed;
2024-10-31 01:32:57 +01:00
background-color: white;
max-height: 0vh;
overflow: hidden;
display: none;
transition: max-height 0.6s ease;
> h2 {
display: none;
}
ul {
padding: 1rem 1.5rem;
li {
font-family: 'Marianne', sans-serif;
font-size: $m_font_size;
margin: 0.5rem 0;
a {
color: black;
&:hover, &.is-active {
font-weight: 800;
}
2024-10-31 01:32:57 +01:00
}
}
}
}
2024-03-29 21:29:59 +01:00
}