rough first draft of v2!
This commit is contained in:
parent
103bf3f1c3
commit
dd04d44f47
29 changed files with 430 additions and 389 deletions
|
|
@ -1,63 +1,63 @@
|
|||
header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
top: 8px;
|
||||
left: 0;
|
||||
width: 100vw;
|
||||
border-bottom: 1px solid #8888;
|
||||
background-color: var(--background);
|
||||
z-index: 1;
|
||||
|
||||
z-index: 999;
|
||||
transition: color .2s, background-color .2s;
|
||||
}
|
||||
|
||||
nav {
|
||||
width: min(calc(100% - 4rem), 720px);
|
||||
width: min-content; /* min(calc(100% - 7.25em), 900px); */
|
||||
height: 3em;
|
||||
margin: auto;
|
||||
padding: 0 1em;
|
||||
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 {
|
||||
flex-grow: 1;
|
||||
display: flex;
|
||||
gap: .5em;
|
||||
}
|
||||
|
||||
img#header-icon {
|
||||
width: 2em;
|
||||
height: 2em;
|
||||
margin: .5em;
|
||||
display: block;
|
||||
}
|
||||
|
||||
#header-text {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
#header-text h1 {
|
||||
width: fit-content;
|
||||
margin: 0;
|
||||
font-size: 1em;
|
||||
}
|
||||
|
||||
#header-text h2 {
|
||||
width: fit-content;
|
||||
height: 1.2em;
|
||||
line-height: 1.2em;
|
||||
margin: 0;
|
||||
font-size: .7em;
|
||||
color: #bbb;
|
||||
}
|
||||
|
||||
#header-links-toggle {
|
||||
width: 3em;
|
||||
height: 3em;
|
||||
margin-left: auto;
|
||||
margin-right: .5em;
|
||||
display: none;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
|
@ -69,73 +69,77 @@ img#header-icon {
|
|||
}
|
||||
|
||||
header ul#header-links {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
gap: .5em;
|
||||
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%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
header ul li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
header ul li a,
|
||||
header ul li span {
|
||||
padding: .4em .5em;
|
||||
border: 1px solid var(--links);
|
||||
color: var(--links);
|
||||
border-radius: 2px;
|
||||
background-color: transparent;
|
||||
transition-property: color, border-color, background-color;
|
||||
transition-duration: .2s;
|
||||
animation-delay: 0s;
|
||||
animation: list-item-fadein .2s forwards;
|
||||
opacity: 0;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
header ul li span {
|
||||
color: #aaa;
|
||||
border-color: #aaa;
|
||||
cursor: default;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
header ul li a:hover {
|
||||
color: #eee;
|
||||
border-color: #eee;
|
||||
background-color: var(--links) !important;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
||||
#toggle-crt a {
|
||||
color: var(--primary);
|
||||
border-color: var(--primary);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
#toggle-crt a:hover {
|
||||
color: #111;
|
||||
background-color: var(--primary) !important;
|
||||
}
|
||||
|
||||
#toggle-crt.disabled a {
|
||||
opacity: .5 !important;
|
||||
}
|
||||
|
||||
@media screen and (max-width: 780px) {
|
||||
@media screen and (max-width: 540px) {
|
||||
header {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
nav {
|
||||
width: calc(100vw - 2rem);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div#header-text {
|
||||
flex-grow: 1;
|
||||
}
|
||||
|
|
@ -146,32 +150,40 @@ header ul li a:hover {
|
|||
|
||||
header ul#header-links {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 2.7rem;
|
||||
width: calc(100vw - 2rem);
|
||||
padding: 1rem;
|
||||
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-bottom: 1px solid #888;
|
||||
|
||||
border-radius: 1em;
|
||||
box-shadow: 0 1px 2px #0004;
|
||||
background: var(--background);
|
||||
display: none;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
ul#header-links li {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
ul#header-links li a,
|
||||
ul#header-links li span {
|
||||
margin: 0;
|
||||
display: block;
|
||||
font-size: 1em;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes list-item-fadein {
|
||||
|
|
@ -185,4 +197,3 @@ header ul li a:hover {
|
|||
background: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue