2023-05-08 00:50:14 +00:00
|
|
|
:root {
|
|
|
|
--nav-bg-color: black;
|
|
|
|
--nav-text-color: white;
|
|
|
|
--nav-header-bg-color: #0f0;
|
|
|
|
--nav-header-text-color: black;
|
2023-05-10 21:32:41 +00:00
|
|
|
--nav-link-active-text-color: white;
|
|
|
|
--nav-link-active-bg-color: var(--main-bg-color, #404040);
|
2023-09-26 19:15:54 +00:00
|
|
|
--nav-transition-speed: 250ms;
|
2023-05-10 21:32:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@media screen and (prefers-color-scheme: light) {
|
|
|
|
:root {
|
|
|
|
--nav-bg-color: black;
|
|
|
|
--nav-text-color: white;
|
|
|
|
--nav-header-bg-color: #0f0;
|
|
|
|
--nav-header-text-color: black;
|
|
|
|
--nav-link-active-text-color: black;
|
|
|
|
--nav-link-active-bg-color: var(--main-bg-color, white);
|
|
|
|
}
|
2023-05-08 00:50:14 +00:00
|
|
|
}
|
|
|
|
|
2023-05-11 06:03:37 +00:00
|
|
|
header {
|
|
|
|
display: grid;
|
|
|
|
align-items: center;
|
|
|
|
width: 100%;
|
2023-05-08 00:50:14 +00:00
|
|
|
background-color: var(--nav-bg-color);
|
|
|
|
color: var(--nav-text-color);
|
2023-04-25 21:35:50 +00:00
|
|
|
}
|
|
|
|
|
2023-05-11 06:03:37 +00:00
|
|
|
header h1 {
|
2023-05-08 00:50:14 +00:00
|
|
|
font-size: 18px;
|
2023-06-29 22:39:21 +00:00
|
|
|
margin: 0;
|
2023-05-08 00:50:14 +00:00
|
|
|
background-color: var(--nav-header-bg-color);
|
|
|
|
color: var(--nav-header-text-color);
|
|
|
|
}
|
|
|
|
|
2023-05-11 06:03:37 +00:00
|
|
|
nav {
|
|
|
|
overflow: hidden;
|
|
|
|
font-size: larger;
|
2023-06-29 21:38:14 +00:00
|
|
|
width: fit-content;
|
2023-05-11 06:03:37 +00:00
|
|
|
}
|
|
|
|
|
2023-05-11 06:13:00 +00:00
|
|
|
nav a, header h1, label[for="navtoggle"] {
|
2023-04-25 21:35:50 +00:00
|
|
|
text-align: left;
|
2023-09-26 19:15:54 +00:00
|
|
|
padding-left: 8px;
|
|
|
|
padding-right: 8px;
|
2023-04-25 21:35:50 +00:00
|
|
|
text-decoration: none;
|
2023-09-26 19:15:54 +00:00
|
|
|
vertical-align: middle;
|
|
|
|
height: 2em;
|
|
|
|
line-height: 2em;
|
2023-04-25 21:35:50 +00:00
|
|
|
}
|
|
|
|
|
2023-05-11 06:13:00 +00:00
|
|
|
label[for="navtoggle"], #navtoggle {
|
2023-04-25 21:35:50 +00:00
|
|
|
display: none;
|
|
|
|
}
|
|
|
|
|
2023-06-29 22:39:21 +00:00
|
|
|
@media screen and (width >= 600px){
|
2023-09-26 19:15:54 +00:00
|
|
|
header {
|
|
|
|
grid-template-columns: auto 1fr;
|
|
|
|
}
|
|
|
|
|
|
|
|
nav {
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
nav a[aria-current="page"], nav a:hover {
|
2023-05-10 21:32:41 +00:00
|
|
|
color: var(--nav-link-active-text-color);
|
|
|
|
background-color: var(--nav-link-active-bg-color);
|
2023-05-03 21:39:26 +00:00
|
|
|
}
|
|
|
|
|
2023-09-26 19:15:54 +00:00
|
|
|
nav:hover a[aria-current="page"]:hover {
|
2023-06-29 22:39:21 +00:00
|
|
|
color: var(--nav-link-active-text-color);
|
|
|
|
background-color: var(--nav-link-active-bg-color);
|
2023-04-25 21:35:50 +00:00
|
|
|
}
|
2023-09-28 01:38:19 +00:00
|
|
|
|
|
|
|
nav:hover a[aria-current="page"]:has(~ a:hover) {
|
|
|
|
color: var(--nav-text-color);
|
|
|
|
background-color: var(--nav-bg-color);
|
|
|
|
}
|
2023-04-25 21:35:50 +00:00
|
|
|
}
|
|
|
|
|
2023-06-29 22:39:21 +00:00
|
|
|
@media screen and (width <= 600px){
|
2023-05-11 06:03:37 +00:00
|
|
|
header {
|
2023-04-25 21:35:50 +00:00
|
|
|
grid-template-columns: 1fr auto;
|
|
|
|
}
|
|
|
|
|
2023-05-11 06:13:00 +00:00
|
|
|
nav {
|
2023-04-25 21:35:50 +00:00
|
|
|
display: block;
|
2023-05-03 21:39:26 +00:00
|
|
|
position: absolute;
|
2023-09-26 19:15:54 +00:00
|
|
|
top: 2em;
|
2023-05-03 21:39:26 +00:00
|
|
|
right: 0;
|
2023-05-08 02:27:14 +00:00
|
|
|
background-color: var(--nav-bg-color);
|
2023-04-25 21:35:50 +00:00
|
|
|
}
|
|
|
|
|
2023-05-11 06:13:00 +00:00
|
|
|
nav a {
|
2023-04-25 21:35:50 +00:00
|
|
|
box-sizing: border-box;
|
|
|
|
display: block;
|
|
|
|
text-align: center;
|
|
|
|
width: 100%;
|
|
|
|
}
|
|
|
|
|
2023-05-11 06:13:00 +00:00
|
|
|
label[for="navtoggle"] {
|
2023-04-25 21:35:50 +00:00
|
|
|
display: inline-block;
|
|
|
|
}
|
|
|
|
|
2023-05-11 06:13:00 +00:00
|
|
|
#navtoggle ~ nav a {
|
2023-05-03 22:08:00 +00:00
|
|
|
height: 0;
|
2023-09-26 19:15:54 +00:00
|
|
|
line-height: 2em;
|
|
|
|
opacity: 0;
|
|
|
|
transition:
|
|
|
|
height var(--nav-transition-speed) cubic-bezier(0.23, 1, 0.32, 1),
|
|
|
|
opacity var(--nav-transition-speed) cubic-bezier(0.23, 1, 0.32, 1)
|
|
|
|
;
|
2023-04-25 21:35:50 +00:00
|
|
|
}
|
|
|
|
|
2023-05-11 06:13:00 +00:00
|
|
|
#navtoggle:checked ~ nav a {
|
2023-09-26 19:15:54 +00:00
|
|
|
height: 2em;
|
|
|
|
line-height: 2em;
|
|
|
|
opacity: 1;
|
|
|
|
transition:
|
|
|
|
height var(--nav-transition-speed) cubic-bezier(0.23, 1, 0.32, 1),
|
|
|
|
opacity var(--nav-transition-speed) cubic-bezier(0.23, 1, 0.32, 1)
|
|
|
|
;
|
2023-04-25 21:35:50 +00:00
|
|
|
}
|
|
|
|
}
|