index-main/assets/css/partials/_site-header.scss

298 lines
4.6 KiB
SCSS
Raw Normal View History

2026-01-06 11:19:25 +01:00
#site-header {
2025-11-04 08:33:39 +01:00
2026-02-23 17:34:16 +01:00
2026-01-23 17:38:08 +01:00
z-index: var(--z-header);
2026-01-06 11:19:25 +01:00
--gap: 3ch;
2025-11-04 08:33:39 +01:00
2026-01-22 14:46:05 +01:00
position: fixed;
top: 0;
left: 0;
2026-01-06 11:19:25 +01:00
width: 100vw;
height: var(--header-h);
background-color: var(--color-bg);
padding: 0 var(--padding-body);
2025-11-04 08:33:39 +01:00
2026-01-23 17:38:08 +01:00
box-shadow: -1px 4px 10px 0px var(--color-bg);
2026-01-06 11:19:25 +01:00
.site-header__inner{
width: 100%;
height: 100%;
2026-02-18 18:17:48 +01:00
2025-11-04 08:33:39 +01:00
display: flex;
align-items: center;
justify-content: space-between;
2026-02-18 18:17:48 +01:00
gap: calc(var(--gap)*0.25);
2026-01-06 11:19:25 +01:00
}
2025-11-04 08:33:39 +01:00
2026-01-06 11:19:25 +01:00
a{
text-decoration: none;
&:hover{
color: var(--grey-200);
2025-11-04 08:33:39 +01:00
}
2026-01-06 11:19:25 +01:00
}
2025-11-04 08:33:39 +01:00
#site-title {
position: relative;
top: -3px;
width: 140px;
2025-11-04 08:33:39 +01:00
svg{
width: 100px;
}
@media #{$small}{
svg{ width: 80px; }
top: -4px;
}
}
2026-01-06 11:19:25 +01:00
2026-02-18 18:17:48 +01:00
#nav-highlight,
#nav-investigation{
flex-grow: 2;
ul{
2026-02-23 14:02:26 +01:00
width: 100%;
2026-02-18 18:17:48 +01:00
display: flex;
align-items: center;
justify-content: center;
gap: var(--gap);
list-style-type: none;
2026-02-23 17:34:16 +01:00
li{
white-space: nowrap;
}
2026-02-18 18:17:48 +01:00
}
}
2026-02-23 17:34:16 +01:00
2026-02-18 18:17:48 +01:00
#nav-highlight ul{
font-weight: 500;
2026-02-23 14:02:26 +01:00
text-transform: uppercase;
2026-02-23 17:34:16 +01:00
@media #{$medium}{
font-size: var(--fs-small);
}
@media screen and (max-width: 890px){
justify-content: flex-end;
padding-right: 2ch;
li{ display: none; }
li.support{ display: block; }
}
2026-02-18 18:17:48 +01:00
}
2026-02-23 17:34:16 +01:00
2026-02-18 18:17:48 +01:00
#nav-investigation{
2026-02-23 14:02:26 +01:00
position: absolute;
// transition: top var(--transition-scroll);
top: 10%;
left: 0;
display: flex;
opacity: 0;
// transform: translateY(-10px);
transition: top 0.3s ease;
pointer-events: none;
2026-02-23 17:34:16 +01:00
min-width: 0;
.title{
text-transform: uppercase;
font-size: var(--fs-small);
font-weight: 500;
max-width: 100%;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
padding-left: 2ch;
padding-right: 2ch;
text-align: center;
color: var(--color-txt-light);
}
@media #{$medium}{
ul{
font-size: var(--fs-small);
padding-left: 6ch;
padding-right: 6ch;
}
}
2026-02-23 14:02:26 +01:00
li{
color: var(--color-txt-light);
transition: color 0.3s ease;
}
li.is-selected{
color: var(--color-txt);
&:hover{
color: var(--color-txt);
pointer-events: none;
a:hover{
color: var(--color-txt);
}
}
}
2026-02-23 17:34:16 +01:00
2026-02-18 18:17:48 +01:00
}
2025-11-04 08:33:39 +01:00
2026-02-23 17:34:16 +01:00
2026-02-23 14:02:26 +01:00
2026-01-06 11:19:25 +01:00
#theme-toggle{
width: var(--h-block);
height: var(--h-block);
display: flex;
align-items: center;
justify-content: center;
svg{
width: 18px;
position: relative;
top: -2px;
2025-11-04 08:33:39 +01:00
}
2026-01-06 11:19:25 +01:00
}
2025-11-04 08:33:39 +01:00
2026-01-06 11:19:25 +01:00
#lang-toggle{
display: flex;
2026-02-18 18:17:48 +01:00
gap: 0.75ch;
padding-right: 1.5ch;
a{
font-size: var(--fs-small);
2026-02-03 08:24:43 +01:00
font-weight: 500;
}
2026-01-06 11:19:25 +01:00
button:disabled{ color: var(--color-txt-light); }
}
#menu-toggle{
cursor: pointer;
svg{
width: 30px;
2026-01-25 22:25:08 +01:00
fill: var(--color-txt);
2026-01-06 11:19:25 +01:00
}
.close{ display: none; }
}
2025-11-04 08:33:39 +01:00
2026-01-06 11:19:25 +01:00
button{
&:hover{
svg{ fill: var(--grey-200)!important; }
2025-11-04 08:33:39 +01:00
}
2026-01-06 11:19:25 +01:00
}
2025-11-04 08:33:39 +01:00
2026-01-06 11:19:25 +01:00
}
2025-11-04 08:33:39 +01:00
2026-02-23 17:34:16 +01:00
// Animation, change header
#site-header.has-nav-investigation{
#nav-highlight{
display: none;
}
#nav-investigation{
position: relative;
opacity: 1;
transform: translateY(0);
top: 0px;
pointer-events: auto;
}
}
@media #{$small-up}{
#site-header #nav-investigation .title{
2026-01-06 11:19:25 +01:00
display: none;
}
2026-02-23 17:34:16 +01:00
}
@media #{$small}{
#site-header #nav-highlight ul{
display: none;
}
#site-header #nav-investigation .title{
display: none;
}
#site-header.has-nav-investigation{
#nav-investigation{
ul{ display: none; }
.title{ display: block; }
}
}
2026-01-06 11:19:25 +01:00
}
2025-11-04 08:33:39 +01:00
2026-02-23 17:34:16 +01:00
// @media #{$x-small}{
// #site-header.has-nav-investigation{
// #nav-investigation{
// .title{ display: none; }
// }
// }
// }
// @media #{$x-small}{
// [data-template="investigation"] #site-header{
// #lang-toggle{ display: none; }
// #theme-toggle{ padding-right: 1ch; }
// #nav-investigation .title{
// font-size: var(--fs-xsmall);
// }
// }
// }
// Quand le menu est ouvert : on dimme tout sauf le logo
body.menu-open #site-header {
#nav-highlight,
#nav-investigation,
#theme-toggle,
#lang-toggle,
#menu-toggle {
opacity: 0.15;
transition: opacity .3s ease-in;
}
}