site-libsoc/Server/public/css/navbar.css

268 lines
4.4 KiB
CSS
Raw Normal View History

2023-08-01 19:56:41 +07:00
/* Header */
#navbar{
2023-06-15 01:41:54 +07:00
position: relative;
top: 0;
width: min(100%,116rem);
2023-08-01 19:56:41 +07:00
z-index: 1000000000;
2023-06-15 01:41:54 +07:00
height: 5.26rem;
2023-08-01 19:56:41 +07:00
padding-left: 0rem;
padding-right: 0rem;
2023-06-15 01:41:54 +07:00
}
#navbar * {
font-family: var(--sans-serif, sans-serif);
}
/* Logo */
#logo-container {
display: flex;
position: absolute;
margin-left: 1rem;
height: 100%;
max-height: 5.26rem;
color: black;
z-index: 1;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
}
#navbar-logo {
2023-06-24 04:39:41 +07:00
height: 3.5rem;
width: 3.5rem;
2023-06-15 01:41:54 +07:00
object-fit: contain;
2023-06-24 04:39:41 +07:00
border-radius: 10rem;
2023-06-15 01:41:54 +07:00
}
#navbar-logo-text {
position: relative;
2023-08-01 19:56:41 +07:00
word-wrap: normal;
2023-06-15 01:41:54 +07:00
height: 100%;
line-height: 400%;
font-size: 1.4rem;
color: #292222;
font-family: var(--sans-serif, sans-serif);
font-weight: 400;
padding-left: 1.2rem;
}
/* Nav menu */
#nav {
position: fixed;
width: 100%;
height: 100%;
background-color: white;
overflow: hidden;
z-index: 0;
}
2023-08-01 19:56:41 +07:00
#menu > li > a, .options-button {
2023-06-15 01:41:54 +07:00
display: block;
2023-08-01 19:56:41 +07:00
padding: 1.2rem;
2023-06-28 21:17:51 +07:00
padding-top: 1rem;
padding-bottom: 1rem;
2023-06-15 01:41:54 +07:00
color: black;
font-size: 1.4rem;
}
2023-08-01 19:56:41 +07:00
#menu > li > a:active{
2023-06-15 01:41:54 +07:00
}
2023-06-28 18:00:41 +07:00
#menu li {
list-style-type: none;
}
2023-06-15 01:41:54 +07:00
#nav{
max-height: 0;
/*transition: max-height .5s ease-out;*/
}
/* Menu Icon */
#hamb{
position: absolute;
cursor: pointer;
right: 0rem;
padding: 2.8rem 2rem;
z-index: 9999;
}/* Style label tag */
#hamb-line {
background: black;
display: block;
height: 2px;
position: relative;
width: 24px;
} /* Style span tag */
#hamb-line::before,
#hamb-line::after{
background: black;
content: '';
display: block;
height: 100%;
position: absolute;
transition: all .2s ease-out;
width: 100%;
}
#hamb-line::before{
top: 5px;
}
#hamb-line::after{
top: -5px;
}
#side-menu {
display: none;
} /* Hide checkbox */
/* Toggle menu icon */
#side-menu:checked ~ nav {
display: block;
max-height: 100%;
padding-top: 5.625rem;
}
#side-menu:checked ~ #logo-container {
position: fixed;
}
#side-menu:checked ~ #hamb {
position: fixed;
}
2023-06-28 21:17:51 +07:00
#side-menu:checked ~ #logo-container {
position: fixed;
}
2023-06-15 01:41:54 +07:00
#side-menu:checked ~ #hamb #hamb-line {
background: transparent;
}
#side-menu:checked ~ #hamb #hamb-line::before {
transform: rotate(-45deg);
2023-08-01 19:56:41 +07:00
top: 0;
2023-06-15 01:41:54 +07:00
}
#side-menu:checked ~ #hamb #hamb-line::after {
transform: rotate(45deg);
2023-08-01 19:56:41 +07:00
top: 0;
}
/* Options */
.options-dropdown {
position: absolute;
display: none;
top: 5.6rem;
right: 1.8rem;
border: #404040 solid 0.1rem;
background-color: white;
z-index: 10;
2023-06-15 01:41:54 +07:00
}
2023-08-01 19:56:41 +07:00
.options-dropdown button, .options-dropdown a {
display: block;
font-family: var(--sans-serif,sans-serif);
font-size: 1.2rem;
width: 100%;
padding: 1rem;
text-align: left;
2023-06-15 01:41:54 +07:00
}
2023-08-01 19:56:41 +07:00
.options-dropdown button:hover, .options-dropdown a:hover {
background-color: var(--red);
color: white;
2023-06-15 01:41:54 +07:00
}
2023-08-01 19:56:41 +07:00
.options-button {
width: 100%;
text-align: left;
2023-06-15 01:41:54 +07:00
}
2023-08-01 19:56:41 +07:00
/* Localization */
#locales {
2023-06-15 01:41:54 +07:00
position: relative;
}
2023-08-01 19:56:41 +07:00
#locales button {
width: 100%;
text-align: left;
height: 4rem;
}
#locales button:hover {
opacity: 0.5;
}
#locales-img {
position: relative;
top: 0rem;
height: 2rem;
margin-left: 1.2rem;
}
/*
#options-dropdown>:first-child {
padding-bottom: 0.5rem;
}
#options-dropdown>:nth-child(2) {
padding-top: 0.5rem;
}
*/
2023-06-15 01:41:54 +07:00
/* Responsiveness */
2023-08-01 19:56:41 +07:00
@media only screen and (min-width: 1200px) {
2023-06-15 01:41:54 +07:00
2023-06-28 21:17:51 +07:00
#navbar {
2023-08-01 19:56:41 +07:00
position: relative;
width: min(100%,116rem);
2023-06-15 01:41:54 +07:00
left: 50%;
transform: translateX(-50%);
2023-08-01 19:56:41 +07:00
padding-right: 4rem;
padding-left: 4rem;
2023-06-15 01:41:54 +07:00
}
2023-06-28 21:17:51 +07:00
#nav {
2023-06-15 01:41:54 +07:00
max-height: none;
top: 0;
position: relative;
float: right;
width: fit-content;
background-color: transparent;
2023-08-01 19:56:41 +07:00
overflow: visible;
}
#side-menu:checked ~ nav {
padding-top: 0;
2023-06-15 01:41:54 +07:00
}
2023-08-01 19:56:41 +07:00
2023-06-28 21:17:51 +07:00
#menu li {
2023-06-15 01:41:54 +07:00
float: left;
}
2023-06-28 21:17:51 +07:00
2023-08-01 19:56:41 +07:00
#menu > li > a:hover, .options-button:hover, #navbar-logo-text:hover {
2023-06-15 01:41:54 +07:00
color: rgb(127, 127, 127);
}
2023-08-01 19:56:41 +07:00
#menu > li > a, .options-button {
padding: 0.9rem;
padding-top: 1.9rem;
padding-bottom: 1.9rem;
2023-06-28 21:17:51 +07:00
}
#hamb {
2023-06-15 01:41:54 +07:00
display: none;
}
2023-08-01 19:56:41 +07:00
#locales {
position: relative;
margin-right: 1.8rem;
}
#locales-img {
top: 0.9rem;
}
2023-06-15 01:41:54 +07:00
}