199 lines
3.8 KiB
CSS
199 lines
3.8 KiB
CSS
header {
|
|
position: fixed;
|
|
top: 8px;
|
|
left: 0;
|
|
width: 100vw;
|
|
z-index: 999;
|
|
transition: color .2s, background-color .2s;
|
|
}
|
|
|
|
nav {
|
|
width: min-content; /* min(calc(100% - 7.25em), 900px); */
|
|
height: 3em;
|
|
margin: auto; /* auto 6em auto auto; */
|
|
padding: 0 0 0 .25em;
|
|
display: flex;
|
|
flex-direction: row;
|
|
gap: .8em;
|
|
align-items: center;
|
|
border-radius: 2em;
|
|
backdrop-filter: blur(8px) brightness(110%);
|
|
box-shadow: 0 1px 2px #0004;
|
|
|
|
transition-property: background-color, color, backdrop-filter;
|
|
transition-duration: .2s;
|
|
|
|
img#header-icon {
|
|
width: 2em;
|
|
height: 2em;
|
|
padding: .5em;
|
|
transition: filter ease-out .1s;
|
|
}
|
|
}
|
|
|
|
@media (prefers-color-scheme: dark) {
|
|
nav {
|
|
backdrop-filter: blur(8px) brightness(200%);
|
|
|
|
img#header-icon {
|
|
filter: invert();
|
|
}
|
|
}
|
|
}
|
|
|
|
@media screen and (max-width: 540px) {
|
|
nav {
|
|
width: calc(100vw - 2em);
|
|
padding: 0 .25em;
|
|
}
|
|
}
|
|
|
|
#header-home {
|
|
display: flex;
|
|
gap: .5em;
|
|
}
|
|
|
|
#header-links-toggle {
|
|
width: 3em;
|
|
height: 3em;
|
|
margin-left: auto;
|
|
margin-right: .5em;
|
|
display: none;
|
|
justify-content: center;
|
|
align-items: center;
|
|
transition: background-color .2s;
|
|
}
|
|
|
|
#header-links-toggle:hover {
|
|
background-color: #fff2;
|
|
}
|
|
|
|
header ul#header-links {
|
|
height: 100%;
|
|
margin: 0;
|
|
padding: 0;
|
|
display: flex;
|
|
flex-direction: row;
|
|
align-items: center;
|
|
gap: .5em;
|
|
|
|
li {
|
|
height: 100%;
|
|
margin: 0 -.5em;
|
|
list-style: none;
|
|
|
|
&:last-of-type {
|
|
margin-right: 0;
|
|
|
|
a {
|
|
padding-right: 1em;
|
|
}
|
|
}
|
|
|
|
a, span {
|
|
--colour: var(--links);
|
|
|
|
height: 100%;
|
|
min-width: 3em;
|
|
padding: 0 1em;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
|
|
color: var(--colour);
|
|
transition-property: color, background-color, box-shadow;
|
|
transition-duration: .05s;
|
|
transition-timing-function: ease-out;
|
|
text-decoration: none;
|
|
}
|
|
|
|
span {
|
|
color: #aaa;
|
|
border-color: #aaa;
|
|
cursor: default;
|
|
text-decoration: none;
|
|
}
|
|
|
|
a {
|
|
border-radius: 2em;
|
|
|
|
&:hover, &.active {
|
|
--bg-transparency: 90%;
|
|
|
|
background-color: color-mix(
|
|
in srgb,
|
|
var(--colour),
|
|
transparent var(--bg-transparency)
|
|
);
|
|
text-decoration: none;
|
|
|
|
&:active {
|
|
--bg-transparency: 75%;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
@media screen and (max-width: 540px) {
|
|
header {
|
|
font-size: 14px;
|
|
}
|
|
|
|
div#header-text {
|
|
flex-grow: 1;
|
|
}
|
|
|
|
a#header-links-toggle {
|
|
display: flex;
|
|
}
|
|
|
|
header ul#header-links {
|
|
position: fixed;
|
|
left: -.75em;
|
|
top: 3.5em;
|
|
width: calc(100vw - 4em);
|
|
height: fit-content;
|
|
margin: 0 1em;
|
|
padding: 1em;
|
|
|
|
display: none;
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
|
|
border-radius: 1em;
|
|
box-shadow: 0 1px 2px #0004;
|
|
background: var(--background);
|
|
|
|
li {
|
|
width: 100%;
|
|
|
|
&:last-of-type {
|
|
margin-right: -.5em;
|
|
}
|
|
|
|
a, span {
|
|
margin: 0;
|
|
display: block;
|
|
font-size: 1em;
|
|
text-align: center;
|
|
}
|
|
}
|
|
}
|
|
|
|
header ul#header-links.open {
|
|
display: flex;
|
|
}
|
|
}
|
|
|
|
@keyframes list-item-fadein {
|
|
from {
|
|
opacity: 1;
|
|
background: #fff8;
|
|
}
|
|
|
|
to {
|
|
opacity: 1;
|
|
background: transparent;
|
|
}
|
|
}
|