webapp/src/components/HeaderNav/Header.module.scss
2024-08-26 15:23:51 +03:00

872 lines
13 KiB
SCSS

.mainHeader {
background: var(--background-color);
color: var(--default-color);
font-size: 1.4rem;
margin-bottom: 2.2rem;
position: absolute;
width: 100%;
z-index: 10003;
.wide-container {
@include media-breakpoint-down(lg) {
padding: 0 divide($container-padding-x, 2);
}
background: var(--background-color);
}
}
.mainHeaderInner {
position: relative;
}
.headerFixed.headerScrolledBottom,
.headerFixed.headerScrolledTop {
.mainLogo {
height: 56px;
img {
height: 20px;
}
}
}
.headerFixed {
position: fixed;
top: 0;
.fixed & {
bottom: 0;
margin-bottom: 0;
}
}
.headerInner {
align-items: center;
background: var(--background-color);
color: var(--default-color);
flex-wrap: nowrap !important;
justify-content: flex-start;
.fixed & {
@include media-breakpoint-down(md) {
border-bottom: 2px solid #000;
}
left: 0;
position: fixed;
right: 0;
top: 0;
margin: 0;
padding: 0;
z-index: 9;
}
> * {
margin-bottom: 0 !important;
}
}
.mainLogo {
align-items: center;
color: var(--default-color);
display: inline-flex;
height: 56px;
position: relative;
text-align: center;
z-index: 9;
img {
height: 20px;
object-fit: contain;
object-position: left;
position: relative;
top: 0.1rem;
transition: height 0.2s;
vertical-align: middle;
width: 100px;
[data-editor-dark-mode='true'] & {
filter: invert(1);
}
}
a,
a:link,
a:visited {
border-bottom: none;
color: var(--link-color);
&:hover {
background: none;
}
}
}
.usernav {
@include media-breakpoint-down(lg) {
max-width: 100% !important;
position: absolute;
right: 0;
}
display: inline-flex;
font-weight: 500;
justify-content: end;
position: relative;
.control {
align-items: center;
display: flex;
}
}
.mainNavigationWrapper {
@include font-size(1.7rem);
@include media-breakpoint-down(lg) {
display: none;
}
position: relative;
.fixed & {
display: block;
}
}
.mainNavigation {
// margin: 0 0 0 -0.4rem !important;
@include media-breakpoint-down(lg) {
background: var(--background-color);
bottom: 0;
display: none;
font-size: 2.6rem;
font-weight: 500;
left: 0;
overflow: auto;
padding: $container-padding-x !important;
position: fixed;
top: 58px;
width: 100%;
z-index: 10003;
li {
margin-bottom: 2.4rem !important;
}
&.fixed {
display: block !important;
line-height: 1.1;
ul {
display: block;
font-size: 3.2rem !important;
font-weight: bold;
margin: 0 0 4rem;
}
li {
display: block !important;
margin: 0 0 1.5rem !important;
}
a,
button {
border: none !important;
}
.mobileCopyright {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
a {
border-bottom: 1px solid !important;
}
}
}
}
@include media-breakpoint-down(sm) {
padding: divide($container-padding-x, 2) !important;
}
font-size: 1.4rem !important;
opacity: 1;
transition: opacity 0.3s;
:global(.view-switcher) {
margin: 0;
overflow: hidden;
padding: 0;
}
li {
margin-bottom: 0 !important;
&::first-letter {
text-transform: capitalize;
}
}
h4 {
color: #9fa1a7;
font-size: 1.4rem;
letter-spacing: 0.05em;
text-transform: uppercase;
}
}
.mainNavigationMobile {
display: none;
.fixed & {
display: block;
}
a {
padding-top: 0.1em;
}
}
.mainNavigationSocial {
font-size: 2rem;
font-weight: 500;
.mainNavigation .mainNavigationMobile & {
margin-bottom: 0 !important;
}
a {
align-items: center;
display: flex;
&:hover {
.icon {
filter: invert(1);
}
}
.icon {
height: 3.8rem;
margin-right: 0.3em;
width: 3.8rem;
}
}
}
.languageSelectorMobile {
border: 2px solid #e8e8e8;
border-radius: 1.6rem;
display: block;
font-family: inherit;
font-size: 1.7rem;
height: 5.6rem;
margin-bottom: 5rem;
padding: 0 1.2rem;
width: 100%;
}
.mainNavigationAdditionalLinks {
border-top: 1px solid #ccc;
display: flex;
flex-wrap: wrap;
justify-content: space-between;
gap: 1rem;
padding: 1.6rem 0 2rem;
}
.mobileDescription {
color: #696969;
}
.mainNavigationItemActive {
background: var(--link-hover-background) !important;
color: var(--link-hover-color) !important;
}
.headerWithTitle.headerScrolledBottom {
.mainNavigation,
.userControl {
opacity: 0;
}
}
.burgerContainer {
@include media-breakpoint-up(lg) {
display: none;
}
box-sizing: content-box;
display: inline-flex;
}
.burger {
cursor: pointer;
height: 1.6rem;
display: inline-block;
position: relative;
vertical-align: middle;
width: 2.2rem;
> div,
&::after,
&::before {
background: var(--link-color);
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.7rem;
transform: rotate(-45deg);
}
&::before {
transform: rotate(45deg);
top: 0.7rem;
}
}
}
.articleHeader,
.articleControls {
opacity: 0;
transition:
opacity 0.3s,
z-index 0s 0.3s;
z-index: -1;
.headerScrolledBottom & {
transition: opacity 0.3s;
opacity: 1;
z-index: 1;
}
}
.articleHeader {
@include font-size(1.4rem);
@include media-breakpoint-down(md) {
display: none;
}
left: $container-padding-x;
margin: 0.2em 0;
overflow: hidden;
position: absolute;
text-overflow: ellipsis;
white-space: nowrap;
width: 100%;
}
.iconHover {
display: none;
}
.headerSearch {
text-transform: lowercase;
.icon {
display: inline-block;
height: 1em;
margin-right: 0.3em;
vertical-align: middle;
width: 1em;
}
}
.articleControls {
@include media-breakpoint-up(xl) {
right: 1.4rem;
}
display: flex;
justify-content: flex-end;
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
width: 100%;
.control {
border: 0;
cursor: pointer;
height: 3.2rem;
margin: 0 0.6rem;
width: 3.2rem;
&:hover {
background: none;
.icon {
display: none;
}
.iconHover {
display: block;
}
}
}
.control + .control {
margin: 0 0.6rem;
}
img {
vertical-align: middle;
}
}
.articleControlsAuthorized {
@include media-breakpoint-up(xl) {
right: 9rem;
}
right: 3.6rem;
}
.userControl {
align-items: center;
display: flex;
justify-content: flex-end;
opacity: 1;
transition: opacity 0.3s;
z-index: 1;
.headerWithTitle.headerScrolledBottom & {
transition:
opacity 0.3s,
z-index 0s 0.3s;
opacity: 0;
z-index: -1;
}
.userpic {
align-items: center;
margin-right: 0;
img {
height: 100%;
width: 100%;
}
}
.editorControl {
border-radius: 2em;
font-size: 1.4rem !important;
&:hover {
background: var(--background-color-invert);
}
}
.settingsControlContainer {
margin-left: 1rem !important;
margin-right: 2rem !important;
}
.settingsControl {
border-radius: 100%;
min-width: 4rem !important;
padding: 0.8rem !important;
&:hover {
background: var(--background-color-invert);
img {
filter: invert(1);
}
}
}
}
.userControlItem {
@include media-breakpoint-up(md) {
height: 3.2rem;
margin: 0 0.7rem;
width: 3.2rem;
}
@include media-breakpoint-down(xl) {
margin-left: 0.4rem !important;
}
align-items: center;
border-radius: 100%;
display: flex;
height: 2.8rem;
justify-content: center;
margin: 0 0.4rem;
order: 2;
position: relative;
transition: margin-left 0.3s;
width: 2.8rem;
.headerScrolledTop &,
.headerScrolledBottom & {
transition: none;
}
.circlewrap {
height: 23px;
min-width: 23px;
width: 23px;
}
.button,
a,
a:link {
border: none;
cursor: pointer;
height: 100%;
margin: 0;
padding: 0;
width: 100%;
&:hover {
background: none;
.icon {
display: none;
}
.iconHover {
display: block;
}
}
}
.icon {
img {
max-width: none;
}
}
.textLabel {
display: none;
}
}
.userControlItemSearch {
@include media-breakpoint-down(xl) {
order: 1;
}
margin: 0 1rem 0 2.2rem;
}
.userControlItemUserpic {
@include media-breakpoint-up(md) {
height: 4rem;
width: 4rem;
}
height: 3.2rem;
width: 3.2rem;
}
.userControlItemVerbose {
@include media-breakpoint-up(md) {
height: 4rem;
width: 4rem;
}
@include media-breakpoint-up(xl) {
margin-left: 3rem !important;
margin-right: 0;
width: auto;
&:last-child {
margin-right: 0;
}
.icon {
display: none !important;
}
.textLabel {
color: var(--link-color);
display: inline;
padding: 0;
position: relative;
white-space: nowrap;
z-index: 1;
}
}
align-items: stretch;
display: flex;
height: 3.2rem;
margin-left: 1rem !important;
width: 3.2rem;
&:first-child {
margin-left: 0 !important;
}
&:global(.loginbtn) {
@include media-breakpoint-up(xl) {
background: none;
margin-left: 0.8rem !important;
}
background: #e9e9ee;
.icon {
height: 2.4rem;
width: 2.4rem;
}
a:hover {
.icon {
display: block;
}
}
img {
max-width: none;
height: 2.4rem;
width: 2.4rem;
}
}
a:link,
a:visited,
button {
@include media-breakpoint-up(xl) {
border-radius: 2rem;
box-shadow: inset 0 0 0 2px #000;
padding: 0 2rem;
}
align-items: center;
display: flex;
justify-content: center;
&:hover {
@include media-breakpoint-up(xl) {
background-color: var(--link-hover-background);
}
&,
.textLabel {
color: #fff !important;
}
.icon {
display: none;
}
.iconHover {
display: block;
}
}
}
button {
margin: 0 !important;
}
a::before {
display: none;
}
}
.userControlItemCreate {
.icon {
@include media-breakpoint-up(md) {
height: 3.2rem;
width: 3.2rem;
}
height: 2.8rem;
width: 2.8rem;
}
}
.subnavigation {
@include media-breakpoint-down(md) {
display: none;
}
background: #000;
color: #fff;
font-weight: 500;
left: 0;
position: absolute;
top: 100%;
transform: translateY(-2px);
width: 100%;
ul {
@include media-breakpoint-up(xl) {
margin: 0 calc(0.5 * var(--bs-gutter-x));
}
display: flex;
flex-wrap: wrap;
height: 6rem;
line-height: 6rem;
margin-bottom: 0;
padding: 0 150px 0 0;
position: relative;
overflow: hidden;
li {
margin-right: 2.4rem;
white-space: nowrap;
}
.rightItem {
margin-right: 0;
position: absolute;
right: 0;
top: 0; }
}
a:link,
a:visited {
border: none;
color: #fff;
.icon {
filter: invert(1);
}
&:hover {
opacity: 0.5;
}
}
}
.subnavigationItemName {
align-items: center;
display: flex;
transition: background-color 0.3s;
.subnavigationFeed & {
line-height: 60px;
}
}
.subnavigationFeed {
ul {
padding-right: 0;
}
li {
align-items: center;
display: flex;
}
.icon {
margin-right: 0.3em;
}
}
.rightItemIcon {
display: inline-block;
margin-left: 0.3em;
position: relative;
top: 0.15em;
}
.editorPopup {
border: 1px solid rgb(0 0 0 / 15%) !important;
border-radius: 1.6rem;
line-height: 1.3;
min-width: 28rem;
padding: 1.6rem !important;
}
.editorModePopupOpener {
display: inline-block;
margin-right: 2rem;
position: relative;
text-align: right;
width: 9em;
}
.editorModePopupOpenerIcon {
height: 2rem;
left: 100%;
margin-left: 0.2em;
top: 0;
transform: rotate(90deg);
position: absolute;
width: 2rem;
}
.editorModesList {
li {
cursor: pointer;
margin-bottom: 1.6rem;
padding-left: 3rem !important;
position: relative;
&:hover {
opacity: 0.6;
}
}
.editorModesSelected {
cursor: default;
opacity: 0.6;
}
}
.editorModeTitle {
color: #000;
margin-bottom: 0.5rem;
}
.editorModeDescription {
color: #696969;
font-size: 1.2rem;
}
.editorModeIcon {
height: 2.4rem;
left: 0;
position: absolute;
top: -0.2em;
width: 2.4rem;
}