ProxmoxAAS-Dashboard/css/nav.css

112 lines
2.1 KiB
CSS
Raw Normal View History

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;
--nav-link-active-text-color: white;
--nav-link-active-bg-color: var(--main-bg-color, #404040);
}
@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;
grid-template-columns: auto 1fr;
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-05-11 06:03:37 +00:00
header h1 {
2023-05-08 00:50:14 +00:00
font-size: 18px;
margin: 0px;
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-05-11 06:13:00 +00:00
nav a, header h1, label[for="navtoggle"] {
text-align: left;
2023-05-07 04:15:22 +00:00
padding: 8px 10px;
text-decoration: none;
}
2023-05-11 06:13:00 +00:00
label[for="navtoggle"], #navtoggle {
display: none;
}
@media screen and (min-width: 600px){
2023-05-11 06:13:00 +00:00
nav a:hover, nav a[aria-current="true"], nav:hover a[aria-current="true"]:hover {
color: var(--nav-link-active-text-color);
background-color: var(--nav-link-active-bg-color);
}
2023-05-11 06:13:00 +00:00
nav:hover a[aria-current="true"] {
color: var(--nav-text-color);
2023-05-08 00:50:14 +00:00
background-color: var(--nav-bg-color);
}
nav {
display: flex;
align-items: center;
}
2023-05-11 06:13:00 +00:00
nav {
display: flex;
}
}
@media screen and (max-width: 600px){
2023-05-11 06:03:37 +00:00
header {
display: grid;
grid-template-columns: 1fr auto;
}
2023-05-11 06:13:00 +00:00
nav {
display: block;
position: absolute;
2023-05-08 02:27:14 +00:00
top: 43px;
right: 0;
2023-05-08 02:27:14 +00:00
background-color: var(--nav-bg-color);
}
2023-05-11 06:13:00 +00:00
nav a {
box-sizing: border-box;
display: block;
text-align: center;
width: 100%;
}
2023-05-11 06:13:00 +00:00
label[for="navtoggle"] {
display: inline-block;
}
2023-05-11 06:13:00 +00:00
#navtoggle ~ nav a {
height: 0;
padding: 0 0.5em;
border: 0;
transition: height 250ms cubic-bezier(0.23, 1, 0.32, 1);
2023-05-08 02:27:14 +00:00
visibility: hidden;
}
2023-05-11 06:13:00 +00:00
#navtoggle:checked ~ nav a {
height: 2.5em;
padding: 0.5em;
transition: height 250ms cubic-bezier(0.23, 1, 0.32, 1);
2023-05-08 02:27:14 +00:00
visibility: visible;
}
}