init project files
This commit is contained in:
144
components/layout/Header.module.scss
Normal file
144
components/layout/Header.module.scss
Normal file
@@ -0,0 +1,144 @@
|
||||
.header {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
z-index: 100;
|
||||
background: var(--bg);
|
||||
border-bottom: 1px solid var(--border);
|
||||
transition: box-shadow var(--transition);
|
||||
}
|
||||
|
||||
.scrolled {
|
||||
box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.container {
|
||||
@include container;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
height: 60px;
|
||||
}
|
||||
|
||||
.logo {
|
||||
font-family: $font-display;
|
||||
font-weight: 700;
|
||||
font-size: 1.125rem;
|
||||
letter-spacing: 0.02em;
|
||||
color: var(--accent);
|
||||
transition: opacity var(--transition);
|
||||
|
||||
&:hover {
|
||||
opacity: 0.85;
|
||||
}
|
||||
}
|
||||
|
||||
.nav {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 2rem;
|
||||
|
||||
@include respond(md) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.navLink {
|
||||
font-size: 0.875rem;
|
||||
font-weight: 500;
|
||||
color: var(--text-2);
|
||||
position: relative;
|
||||
padding-bottom: 2px;
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 2px;
|
||||
background: var(--accent);
|
||||
transform: scaleX(0);
|
||||
transform-origin: right;
|
||||
transition: transform 0.25s ease;
|
||||
border-radius: 1px;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: var(--text);
|
||||
|
||||
&::after {
|
||||
transform: scaleX(1);
|
||||
transform-origin: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.hamburger {
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 5px;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
background: none;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
color: var(--text);
|
||||
|
||||
@include respond(md) {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background: var(--bg-2);
|
||||
}
|
||||
|
||||
span {
|
||||
display: block;
|
||||
width: 20px;
|
||||
height: 2px;
|
||||
background: currentColor;
|
||||
border-radius: 2px;
|
||||
transition: transform 0.25s ease, opacity 0.25s ease;
|
||||
}
|
||||
}
|
||||
|
||||
.open span:nth-child(1) {
|
||||
transform: translateY(7px) rotate(45deg);
|
||||
}
|
||||
|
||||
.open span:nth-child(2) {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.open span:nth-child(3) {
|
||||
transform: translateY(-7px) rotate(-45deg);
|
||||
}
|
||||
|
||||
.mobileMenu {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding: 0.5rem 0 1rem;
|
||||
background: var(--bg);
|
||||
border-bottom: 1px solid var(--border);
|
||||
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
.mobileLink {
|
||||
display: block;
|
||||
padding: 0.75rem clamp(1.25rem, 5vw, 2.5rem);
|
||||
font-size: 1rem;
|
||||
font-weight: 500;
|
||||
color: var(--text-2);
|
||||
transition: color var(--transition), background var(--transition);
|
||||
|
||||
&:hover {
|
||||
color: var(--accent);
|
||||
background: var(--bg-2);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user