generated from nhcarrigan/template
0b5b4eadb9
### Explanation _No response_ ### Issue _No response_ ### Attestations - [ ] I have read and agree to the [Code of Conduct](https://docs.nhcarrigan.com/community/coc/) - [ ] I have read and agree to the [Community Guidelines](https://docs.nhcarrigan.com/community/guide/). - [ ] My contribution complies with the [Contributor Covenant](https://docs.nhcarrigan.com/dev/covenant/). ### Dependencies - [ ] I have pinned the dependencies to a specific patch version. ### Style - [ ] I have run the linter and resolved any errors. - [ ] My pull request uses an appropriate title, matching the conventional commit standards. - [ ] My scope of feat/fix/chore/etc. correctly matches the nature of changes in my pull request. ### Tests - [ ] My contribution adds new code, and I have added tests to cover it. - [ ] My contribution modifies existing code, and I have updated the tests to reflect these changes. - [ ] All new and existing tests pass locally with my changes. - [ ] Code coverage remains at or above the configured threshold. ### Documentation _No response_ ### Versioning _No response_ Reviewed-on: #1 Co-authored-by: Naomi Carrigan <commits@nhcarrigan.com> Co-committed-by: Naomi Carrigan <commits@nhcarrigan.com>
87 lines
1.6 KiB
CSS
87 lines
1.6 KiB
CSS
nav {
|
|
background-color: var(--color-secondary);
|
|
color: var(--color-primary);
|
|
position: relative;
|
|
}
|
|
|
|
.nav-menu {
|
|
display: flex;
|
|
gap: 1rem;
|
|
list-style: none;
|
|
}
|
|
|
|
.hamburger-btn {
|
|
display: none;
|
|
flex-direction: column;
|
|
gap: 5px;
|
|
background: none;
|
|
border: none;
|
|
cursor: pointer;
|
|
padding: 5px;
|
|
z-index: 31;
|
|
}
|
|
|
|
.hamburger-btn span {
|
|
width: 25px;
|
|
height: 3px;
|
|
background-color: var(--color-accent);
|
|
transition: all 0.3s ease;
|
|
}
|
|
|
|
.hamburger-btn:hover span {
|
|
background-color: var(--color-primary);
|
|
}
|
|
|
|
/* Mobile styles */
|
|
@media (max-width: 500px) {
|
|
.hamburger-btn {
|
|
display: flex;
|
|
}
|
|
|
|
.nav-menu {
|
|
position: absolute;
|
|
top: 100%;
|
|
left: 0;
|
|
right: 0;
|
|
flex-direction: column;
|
|
background-color: var(--color-secondary);
|
|
padding: 1rem;
|
|
gap: 0;
|
|
max-height: 0;
|
|
overflow: hidden;
|
|
transition: max-height 0.3s ease;
|
|
opacity: 0;
|
|
}
|
|
|
|
.nav-menu.menu-open {
|
|
max-height: 500px;
|
|
opacity: 1;
|
|
}
|
|
|
|
.nav-menu a {
|
|
display: block;
|
|
padding: 0.75rem 0;
|
|
border-bottom: 1px solid rgba(224, 224, 224, 0.1);
|
|
}
|
|
|
|
.nav-menu a:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
/* Hamburger animation */
|
|
nav.menu-open .hamburger-btn {
|
|
gap: 0;
|
|
}
|
|
|
|
nav.menu-open .hamburger-btn span:nth-child(1) {
|
|
transform: rotate(45deg) translateY(4px);
|
|
}
|
|
|
|
nav.menu-open .hamburger-btn span:nth-child(2) {
|
|
opacity: 0;
|
|
}
|
|
|
|
nav.menu-open .hamburger-btn span:nth-child(3) {
|
|
transform: rotate(-45deg) translateY(-4px);
|
|
}
|
|
} |