ldc-legaulois/resources/sass/front/_header.scss
2021-06-14 16:31:17 +02:00

372 lines
11 KiB
SCSS
Vendored

html {
header {
@media print {
display: none !important;
}
.logo_site {
picture,img {
position: absolute;
width: 14rem;
padding: 0.3rem;
transition-duration: 0.3s;
@include max-width($tablet) {
width: 10rem !important;
}
}
}
}
&:not([data-scroll="0"]) {
header {
.logo_site {
picture,img {
width: 10rem;
}
}
}
}
}
body > div > header {
display: block;
background-color: $color3;
width: 100vw;
height: $menuBaseHeight;
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 5000;
& > nav {
margin: 0;
padding: 0;
float: right;
font-size: 2em;
font-family: "Veneer";
& ul {
display: flex;
flex-wrap: wrap;
font-size: 1rem;
& li {
padding-right: 3.2em;
height: 3em;
display: flex;
align-items: center;
justify-content: center;
@include max-width($big_screen + 170px) {
padding-right: 2.1em;
}
@include max-width($big_screen) {
padding-right: 1.1em;
}
@include max-width($tablet + 100px) {
padding-right: 0.9em;
}
&:last-child {
padding-right: 1.2em;
}
& label > span {
display: none;
}
& a,
label {
color: white;
font-size: 2.4em;
padding-top: 0.6em;
@include max-width($big_screen + 150px) {
padding-top: 0.8em;
font-size: 2em;
}
@include max-width($big_screen) {
padding-top: 1em;
font-size: 1.8em;
}
@include max-width($desktop + 50px) {
font-size: 1.6em;
}
@include max-width($desktop - 50px) {
font-size: 1.4em;
}
}
& .logout-link {
text-align: center;
font-size: 0.8em;
margin-top: 1em;
& > i {
font-size: 2.4em;
color: white;
}
& > p {
text-decoration: underline;
padding-top: 2px;
color: #f7c120;
font-family: "Catamaran-Bold";
font-size: 1em;
text-transform: none;
}
}
@include min-width($menuBreakPoint) {
&.hassub {
&:hover .submenu, input:checked ~ .submenu {
height: 200px;
&:hover {
height: 200px;
}
}
}
}
& .submenu {
position: absolute;
top: $menuBaseHeight;
left: 0;
background-color: #ffffff;
display: flex;
flex-direction: row;
align-items: stretch;
width: 100%;
height: 0;
z-index: -1;
overflow: hidden;
transition: 500ms height 100ms;
& .leftside {
position: relative;
display: flex;
justify-content: flex-end;
align-items: center;
width: 50%;
height: 200px;
text-align: right;
background-repeat: no-repeat;
background-size: cover;
& p {
color: #ffffff;
border-bottom: 3px solid $color6;
position: relative;
font-size: 2.2em;
margin-right: 50px;
z-index: 20;
font-family: "Veneer";
}
& img {
top: 0;
left: 0;
width: 100%;
height: 100%;
object-fit: cover;
position: absolute;
}
}
& .rightside {
width: 50%;
display: flex;
flex-direction: column;
flex-wrap: nowrap;
justify-content: center;
align-items: flex-start;
padding-left: 20px;
margin-left: 30px;
& li {
height: 30px;
padding: 5px 0 5px 0;
display: flex;
flex-direction: row;
& i,
[data-icon="chevron-right"] {
color: $color6;
}
& a {
color: #000000;
font-size: 1em;
font-weight: bold;
margin-left: 10px;
font-family: "Catamaran-Regular";
@include min-width($menuBreakPoint) {
padding-top: 0.2em;
}
&:hover {
color: $color6;
}
& img {
vertical-align: middle;
margin-left: 2px;
width: 48px;
height: auto;
}
}
}
}
}
}
}
}
// Checkox menu state
.menu-checkbox,
.submenu-checkbox {
opacity: 0;
position: absolute;
top: -1000px;
&:checked ~ nav {
display: block;
overflow-y: auto;
max-height: 90vh;
-webkit-overflow-scrolling: touch;
padding-bottom: 20px;
}
&:focus + .menu-toggle,
&:focus + .submenu-toggle {
outline: #00a1a1 auto 5px;
}
}
// Burger Menu button
.menu-toggle {
font-size: $font-size-base * 3;
padding: $font-size-base * 0.6;
margin-right: 0.6em;
float: right;
display: none;
cursor: pointer;
color: $color1;
}
.submenu-toggle {
float: right;
display: none;
cursor: pointer;
color: $color1;
}
// Hide menu and display burger
@include max-width($menuBreakPoint) {
& nav {
display: none;
background-color: $color3;
width: 100%;
margin-top: 0.5rem;
& ul {
flex-direction: column;
margin-top: 20px;
& li {
width: 100%;
position: relative;
padding-right: 0;
& label > span {
display: inline;
}
a,
label {
padding: 0;
width: 100%;
text-align: center;
}
&:last-child {
height: 4em;
}
&.hassub {
z-index: 1;
height: inherit;
min-height: 3em;
&:hover > .submenu {
height: inherit !important;
}
& > a {
/* display: none;*/
}
}
& a {
display: inline;
font-size: 2.4em;
top: 0;
position: absolute;
}
.submenu-checkbox ~ .submenu {
height: inherit;
max-height: 0;
overflow: hidden;
}
.submenu-checkbox:checked ~ .submenu {
max-height: 30em;
position: relative;
top: inherit;
margin-top: 3rem;
transition: max-height 0.25s ease-in;
}
.submenu {
align-items: stretch;
&:hover {
height: inherit !important;
}
.leftside {
display: none;
}
.rightside {
width: 100%;
}
ul {
margin: 0 !important;
padding-left: 0.2rem !important;
li {
display: block !important;
height: inherit !important;
position: relative;
font-size: 1.5em;
padding: 0.6rem 0 !important;
padding-right: 2rem !important;
a {
display: flex;
margin: 0;
margin-left: 1.5rem !important;
font-size: 0.9em !important;
line-height: 3rem;
width: 93vw;
text-align: left;
}
}
}
}
}
}
}
&.color-vegetal nav {
background-color: $vegetalTitle;
}
& .menu-toggle {
display: block;
}
}
}