webapp/src/components/Nav/Header.module.scss

275 lines
4.1 KiB
SCSS
Raw Normal View History

2022-09-28 21:08:14 +00:00
.mainHeader {
2022-09-15 19:41:05 +00:00
background: #fff;
2022-09-09 11:53:35 +00:00
margin-bottom: 2.2rem;
2022-09-15 19:41:05 +00:00
width: 100%;
2022-09-14 21:07:47 +00:00
z-index: 10;
2022-09-09 11:53:35 +00:00
.wide-container {
2022-09-14 21:07:47 +00:00
background: #fff;
2022-09-09 11:53:35 +00:00
@include media-breakpoint-down(sm) {
padding: 0 divide($container-padding-x, 2);
}
}
}
2022-09-28 21:08:14 +00:00
.headerFixed {
2022-09-23 21:29:32 +00:00
position: fixed;
top: 0;
2022-09-15 19:41:05 +00:00
.main-logo {
height: 56px;
img {
height: 20px;
}
}
}
2022-09-28 21:08:14 +00:00
.headerInner {
2022-09-29 10:08:22 +00:00
align-items: center;
2022-09-09 11:53:35 +00:00
background: #fff;
border-bottom: 4px solid #000;
flex-wrap: nowrap;
justify-content: space-between;
margin: 0;
&.fixed {
border-bottom: 4px solid #000;
left: 0;
position: fixed;
right: 0;
top: 0;
padding: 0 divide($container-padding-x, 2);
z-index: 9;
@include media-breakpoint-up(sm) {
padding: 0 $container-padding-x;
}
}
}
2022-09-28 21:08:14 +00:00
.mainLogo {
2022-09-09 11:53:35 +00:00
align-items: center;
display: inline-flex;
height: 70px;
padding: 0 $container-padding-x 0 0;
position: relative;
2022-09-15 19:41:05 +00:00
transition: height 0.2s;
text-align: center;
2022-09-09 11:53:35 +00:00
z-index: 9;
@include media-breakpoint-up(lg) {
height: 80px;
}
img {
2022-09-15 19:41:05 +00:00
height: 32px;
object-fit: contain;
object-position: left;
transition: height 0.2s;
2022-09-09 11:53:35 +00:00
vertical-align: middle;
width: 100px;
@include media-breakpoint-up(lg) {
width: 175px;
}
}
a {
border: none;
color: #000;
&:hover {
background: none;
}
}
}
.usernav {
display: inline-flex;
padding-right: 0;
width: auto;
@include media-breakpoint-down(md) {
flex: 1;
padding-left: 0;
padding-right: 0;
}
}
2022-09-28 21:08:14 +00:00
.mainNavigation {
2022-09-15 19:41:05 +00:00
position: relative;
2022-09-09 11:53:35 +00:00
@include font-size(1.7rem);
2022-09-15 19:41:05 +00:00
ul {
display: inline-flex;
list-style: none;
margin: 0;
opacity: 1;
padding: 0;
transition: opacity 0.3s;
@include media-breakpoint-down(md) {
background: #fff;
bottom: 0;
display: none;
font-size: 2.6rem;
font-weight: bold;
left: 0;
padding: $container-padding-x;
position: fixed;
top: 74px;
width: 100%;
z-index: 1;
li {
margin-bottom: 2.4rem;
}
}
2022-09-09 11:53:35 +00:00
2022-09-15 19:41:05 +00:00
@include media-breakpoint-down(sm) {
padding: divide($container-padding-x, 2);
2022-09-09 11:53:35 +00:00
}
2022-09-15 19:41:05 +00:00
.header--scrolled-bottom & {
opacity: 0;
}
2022-09-09 11:53:35 +00:00
}
&.fixed {
2022-09-15 19:41:05 +00:00
ul {
display: inline-flex;
2022-09-09 11:53:35 +00:00
2022-09-15 19:41:05 +00:00
@include media-breakpoint-down(lg) {
display: block !important;
}
2022-09-09 11:53:35 +00:00
}
}
li {
margin-right: 2.4rem;
}
a {
border: none;
}
.selected a {
border-bottom: 2px solid;
color: #000;
cursor: default;
2022-09-15 19:41:05 +00:00
pointer-events: none;
2022-09-09 11:53:35 +00:00
}
}
2022-09-29 10:08:22 +00:00
.burgerContainer {
2022-09-09 11:53:35 +00:00
box-sizing: content-box;
display: inline-flex;
float: right;
padding-right: 0;
padding-left: 0;
width: 2.2rem;
@include media-breakpoint-up(sm) {
padding-left: divide($container-padding-x, 2);
}
@include media-breakpoint-up(md) {
display: none;
}
}
.burger {
background: #fff;
cursor: pointer;
height: 1.8rem;
display: inline-block;
position: relative;
vertical-align: middle;
width: 2.2rem;
> div,
&::after,
&::before {
background: #000;
content: '';
display: block;
height: 2px;
left: 0;
position: absolute;
width: 100%;
}
> div {
margin-top: -1px;
opacity: 1;
top: 50%;
transition: opacity 0.2s 0.1s;
}
&::after,
&::before {
transform-origin: center !important;
transition: top 0.3s, transform 0.3s;
}
&::after {
bottom: 0;
}
&::before {
top: 0;
}
&.fixed {
> div {
opacity: 0;
transition: opacity 0s;
}
&::after {
bottom: 0.8rem;
transform: rotate(-45deg);
}
&::before {
transform: rotate(45deg);
top: 0.8rem;
}
}
}
2022-09-15 19:41:05 +00:00
2022-09-29 10:08:22 +00:00
.articleHeader {
2022-09-15 19:41:05 +00:00
@include font-size(1.4rem);
left: 0;
margin: 0.2em;
opacity: 0;
overflow: hidden;
position: absolute;
text-overflow: ellipsis;
transition: opacity 0.3s, z-index 0s 0.3s;
white-space: nowrap;
width: 100%;
z-index: -1;
.header--scrolled-bottom & {
transition: opacity 0.3s;
opacity: 1;
z-index: 1;
}
}
2022-09-18 15:31:48 +00:00
2022-09-28 21:08:14 +00:00
.headerSearch {
2022-09-18 15:31:48 +00:00
text-transform: lowercase;
.icon {
display: inline-block;
height: 1em;
margin-right: 0.3em;
vertical-align: middle;
width: 1em;
}
}