TeleQom.org/css/sections/nav.css

168 lines
2.5 KiB
CSS
Raw Normal View History

2023-03-15 19:53:04 +00:00
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 img {
width: 3.5rem;
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;
}
#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) {
.logo img {
height: 3rem;
width: 3rem;
margin-right: 0.5rem;
}
.logo h2 {
font-size: 2rem;
}
}
@media only screen and (max-width: 375px) {
}