This repository has been archived on 2026-10-23. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
dns2019/src/css/header.scss
T

159 lines
2.6 KiB
SCSS

.site-header {
padding: 0;
background: $color-black;
color: $color-white;
display: flex;
justify-content: center;
align-items: flex-end;
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 9002;
.logo {
width: 3.2rem;
height: 2.5rem;
position: relative;
margin: 0 1.2rem;
img {
position: absolute;
bottom: 0;
width: 3.6rem;
}
}
}
.site-nav {
flex: 1;
display: flex;
flex-wrap: wrap;
align-items: center;
justify-content: flex-end;
padding: 0.6rem 1rem;
&:last-of-type {
justify-content: flex-start;
}
a {
text-decoration: none;
display: inline-block;
margin-right: 1.6rem;
position: relative;
&:last-child {
margin-right: 0;
}
color: $color-white;
font-weight: 700;
//text-transform: uppercase;
letter-spacing: 0.04em;
font-size: $font-s;
&:after {
content: '';
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 2px;
background: #fff;
opacity: 0;
transform: translateY(5px);
transition: transform 1s, opacity 0.1s;
pointer-events: none;
}
&:hover:after,
&:focus:after {
opacity: 1;
transform: translateY(0px);
transition: transform 0.3s, opacity 0.3s;
}
}
&_toggle, &_program {
position: absolute;
top: 1rem;
right: 1rem;
left: auto;
font-size: $font-s;
line-height: 1;
color: $color-white;
text-transform: uppercase;
letter-spacing: 0.04em;
font-weight: 700;
display: none;
&:hover {
cursor: pointer;
}
}
&_program {
left: 1rem;
right: auto;
a {
color: $color-white;
text-decoration: none;
}
}
}
@media (max-width: $media-s) {
.site-header {
display: block;
background: $color-black;
height: 2.5rem;
padding-top: 2.5rem;
.logo {
position: absolute;
top: 0;
left: 50%;
margin-left: -1.6rem;
}
&.site-nav-visible {
height: auto;
}
}
.site-nav {
flex: none;
display: none;
text-align: center;
background: $color-black;
&_toggle, &_program {
display: block;
}
order: 2;
&:last-of-type {
order: 3;
margin-top: 0;
}
a {
font-size: 1rem;
display: block;
margin: 1rem 0 0;
&:hover {
color: $color-orange;
}
&:hover:after,
&:focus:after {
display: none;
}
}
}
.site-nav-visible {
.site-nav {
display: block;
&:first-of-type {
padding-top: 2rem;
}
&:last-of-type {
padding-bottom: 3rem;
}
}
}
}