TeleQom.org/css/sections/nav.css

167 lines
2.4 KiB
CSS

nav {
position: fixed;
top: 0;
width: 100%;
background-color: var(--background-color-1);
z-index: 1;
display: flex;
justify-content: space-between;
align-items: center;
height: var(--nav-height);
left: 50%;
transform: translatex(-50%);
max-width: var(--max-display-size);
box-shadow: 0.1rem 0.1rem 0.5rem 0.1rem var(--box-shadow);
}
.logo {
justify-content: center;
align-items: center;
display: flex;
}
nav .logo img {
width: 12rem;
height: 3.5rem;
margin-left: 1rem;
margin-right: 1rem;
}
nav ul {
position: absolute;
left: 50%;
transform: translatex(-50%);
display: flex;
align-items: center;
justify-content: center;
}
nav ul li {
display: inline-block;
}
nav ul li a:hover {
background-color: var(--item-color-1);
}
#mobile-navbar-btn {
display: none;
}
#navbar-action-btn {
margin-right: 1rem;
}
#mobile-nav-action-btn a,
#navbar-action-btn a {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
#mobile-nav-action-btn img,
#navbar-action-btn img {
height: 3.5rem;
width: 3.5rem;
}
#mobile-nav-action-btn {
display: none;
}
#navbar-menu-btn {
display: none;
}
#menu-btn-close,
#menu-btn-open {
display: none;
cursor: pointer;
}
#menu-btn-close img,
#menu-btn-open img {
width: 2.8rem;
height: 2.8rem;
margin-left: 1rem;
}
#qonsole-btn {
display: none;
}
@media only screen and (max-width: 1200px) {
.logo {
position: absolute;
left: 50%;
transform: translatex(-50%);
}
#nav-list {
width: 100%;
height: calc(100vh - var(--nav-height));
flex-direction: column;
justify-content: space-evenly;
transition: all 0.5s;
left: -100%;
top: var(--nav-height);
background: rgb(17, 26, 39, 0.8);
transform: none;
}
#nav-list li {
margin: 0.5rem 0;
}
#nav-list li a {
font-size: 2rem;
}
#mobile-nav-action-btn {
display: unset;
}
#navbar-action-btn {
display: none;
}
#menu-btn-open {
display: block;
}
#menu-btn-close {
display: none;
}
#navbar-menu-btn:checked~#nav-list {
left: 0;
}
#navbar-menu-btn:checked~#menu-btn-close {
display: block;
}
#navbar-menu-btn:checked~#menu-btn-open {
display: none;
}
.mobile-nav-action-btn {
display: inline-block;
}
}
@media only screen and (max-width: 500px) {
}
@media only screen and (max-width: 375px) {
nav .logo img {
height: 2.7rem;
width: 8rem;
}
}