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

611 lines
9.0 KiB
SCSS
Raw Normal View History

2022-09-28 21:08:14 +00:00
.mainHeader {
background: var(--background-color);
color: var(--default-color);
2023-05-24 21:51:47 +00:00
font-size: 1.4rem;
2022-09-09 11:53:35 +00:00
margin-bottom: 2.2rem;
2022-09-29 19:16:17 +00:00
position: absolute;
2022-09-15 19:41:05 +00:00
width: 100%;
2023-08-26 09:41:21 +00:00
z-index: 10000;
2022-09-09 11:53:35 +00:00
.wide-container {
2022-09-14 21:07:47 +00:00
background: #fff;
2023-03-10 17:42:48 +00:00
@include media-breakpoint-down(lg) {
2022-09-09 11:53:35 +00:00
padding: 0 divide($container-padding-x, 2);
}
}
}
2022-10-17 20:53:04 +00:00
.mainHeaderInner {
position: relative;
}
2022-10-03 21:31:11 +00:00
.headerFixed.headerScrolledBottom,
.headerFixed.headerScrolledTop {
.mainLogo {
2022-09-15 19:41:05 +00:00
height: 56px;
img {
height: 20px;
}
}
}
2022-10-03 21:31:11 +00:00
.headerFixed {
position: fixed;
top: 0;
2022-10-17 22:03:49 +00:00
.fixed & {
bottom: 0;
margin-bottom: 0;
}
2022-10-03 21:31:11 +00:00
}
2022-09-28 21:08:14 +00:00
.headerInner {
2022-09-29 10:08:22 +00:00
align-items: center;
background: var(--background-color);
color: var(--default-color);
2023-03-10 17:42:48 +00:00
flex-wrap: nowrap !important;
2023-03-29 21:42:01 +00:00
justify-content: flex-start;
2022-09-09 11:53:35 +00:00
2022-10-17 22:03:49 +00:00
.fixed & {
2022-09-09 11:53:35 +00:00
left: 0;
position: fixed;
right: 0;
top: 0;
margin: 0;
padding: 0;
2022-09-09 11:53:35 +00:00
z-index: 9;
}
}
2022-09-28 21:08:14 +00:00
.mainLogo {
2022-09-09 11:53:35 +00:00
align-items: center;
color: var(--default-color);
2022-09-09 11:53:35 +00:00
display: inline-flex;
2022-10-17 22:03:49 +00:00
height: 56px;
2022-09-09 11:53:35 +00:00
position: relative;
2022-09-15 19:41:05 +00:00
text-align: center;
2022-09-09 11:53:35 +00:00
z-index: 9;
img {
2022-10-17 22:03:49 +00:00
height: 20px;
2022-09-15 19:41:05 +00:00
object-fit: contain;
object-position: left;
transition: height 0.2s;
2022-09-09 11:53:35 +00:00
vertical-align: middle;
width: 100px;
[data-editor-dark-mode='true'] & {
filter: invert(1);
}
2022-09-09 11:53:35 +00:00
}
2023-02-17 09:21:02 +00:00
a,
a:link,
a:visited {
border-bottom: none;
color: var(--link-color);
2022-09-09 11:53:35 +00:00
&:hover {
background: none;
}
}
}
.usernav {
display: inline-flex;
2022-11-13 13:17:38 +00:00
font-weight: 500;
2023-09-04 20:45:02 +00:00
justify-content: end;
2022-10-03 21:31:11 +00:00
position: relative;
2023-05-01 18:32:32 +00:00
2023-09-04 20:45:02 +00:00
@include media-breakpoint-down(lg) {
2023-07-26 20:37:20 +00:00
flex: 1 !important;
max-width: 100% !important;
2023-08-12 10:40:14 +00:00
padding: 0 !important;
2022-09-09 11:53:35 +00:00
}
}
2022-10-03 21:31:11 +00:00
.mainNavigationWrapper {
2023-05-01 18:32:32 +00:00
@include font-size(1.7rem);
2022-09-15 19:41:05 +00:00
position: relative;
2022-10-17 22:03:49 +00:00
2023-09-04 20:45:02 +00:00
@include media-breakpoint-down(lg) {
2022-10-17 22:03:49 +00:00
display: none;
}
.fixed & {
display: block;
}
2022-10-03 21:31:11 +00:00
}
2022-09-09 11:53:35 +00:00
2022-10-03 21:31:11 +00:00
.mainNavigation {
2023-05-24 21:51:47 +00:00
font-size: 1.4rem !important;
2023-09-04 20:45:02 +00:00
margin: 0 0 0 -0.4rem !important;
2022-10-03 21:31:11 +00:00
opacity: 1;
transition: opacity 0.3s;
2022-09-15 19:41:05 +00:00
2022-10-03 21:31:11 +00:00
@include media-breakpoint-down(md) {
background: var(--background-color);
2022-10-03 21:31:11 +00:00
bottom: 0;
display: none;
font-size: 2.6rem;
font-weight: bold;
left: 0;
padding: $container-padding-x !important;
2022-10-03 21:31:11 +00:00
position: fixed;
top: 74px;
width: 100%;
z-index: 1;
2022-09-09 11:53:35 +00:00
2022-10-03 21:31:11 +00:00
li {
2023-05-22 22:01:04 +00:00
margin-bottom: 2.4rem !important;
2022-09-09 11:53:35 +00:00
}
}
2022-10-03 21:31:11 +00:00
@include media-breakpoint-down(sm) {
padding: divide($container-padding-x, 2) !important;
2022-10-03 21:31:11 +00:00
}
@include media-breakpoint-down(md) {
:global(.fixed) & {
font-size: 2.2rem !important;
2022-09-09 11:53:35 +00:00
&,
li {
display: block !important;
}
2022-09-09 11:53:35 +00:00
}
}
2023-09-04 20:45:02 +00:00
a,
button {
padding: 0 0.4rem;
}
li {
margin-bottom: 0 !important;
&:first-letter {
text-transform: capitalize;
}
}
}
.mainNavigationItemActive {
background: #000;
color: #fff !important;
2022-09-09 11:53:35 +00:00
}
2022-10-03 21:44:21 +00:00
.headerWithTitle.headerScrolledBottom {
2022-10-03 21:31:11 +00:00
.mainNavigation,
.userControl {
opacity: 0;
}
2022-09-29 20:10:00 +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;
2023-08-12 10:40:14 +00:00
//float: right;
2022-11-13 10:36:44 +00:00
padding-left: 0;
2022-09-09 11:53:35 +00:00
2022-11-13 10:36:44 +00:00
@include media-breakpoint-up(sm) {
padding-left: divide($container-padding-x, 2);
}
2023-09-04 20:45:02 +00:00
@include media-breakpoint-up(lg) {
2022-09-09 11:53:35 +00:00
display: none;
}
}
.burger {
cursor: pointer;
height: 1.8rem;
display: inline-block;
position: relative;
vertical-align: middle;
width: 2.2rem;
> div,
&::after,
&::before {
background: var(--link-color);
2022-09-09 11:53:35 +00:00
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;
}
2022-10-17 22:03:49 +00:00
.fixed & {
2022-09-09 11:53:35 +00:00
> 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-10-03 21:31:11 +00:00
.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;
}
}
2022-09-29 10:08:22 +00:00
.articleHeader {
2022-09-15 19:41:05 +00:00
@include font-size(1.4rem);
2023-03-10 17:42:48 +00:00
left: $container-padding-x;
2022-11-14 20:32:17 +00:00
margin: 0.2em 0;
2022-09-15 19:41:05 +00:00
overflow: hidden;
position: absolute;
text-overflow: ellipsis;
white-space: nowrap;
2023-07-26 20:37:20 +00:00
width: 100%;
2022-10-17 22:03:49 +00:00
@include media-breakpoint-down(md) {
display: none;
}
2022-09-15 19:41:05 +00:00
}
2022-09-18 15:31:48 +00:00
2023-06-27 22:47:47 +00:00
.iconHover {
display: none;
}
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;
}
}
2022-10-03 21:31:11 +00:00
.articleControls {
display: flex;
2022-10-17 22:03:49 +00:00
justify-content: flex-end;
2022-10-03 21:31:11 +00:00
position: absolute;
2022-11-14 22:10:26 +00:00
right: 5rem;
2022-10-03 21:31:11 +00:00
top: 50%;
transform: translateY(-50%);
width: 100%;
2023-09-04 20:45:02 +00:00
@include media-breakpoint-up(lg) {
2023-05-24 21:51:47 +00:00
right: 0;
2022-11-14 22:10:26 +00:00
}
2023-05-24 21:51:47 +00:00
@include media-breakpoint-up(xl) {
right: 2rem;
2022-11-13 10:36:44 +00:00
}
2022-10-25 15:36:32 +00:00
.control {
cursor: pointer;
border: 0;
2022-10-03 21:31:11 +00:00
&:hover {
background: none;
.icon {
2023-07-09 18:34:59 +00:00
display: none;
}
.iconHover {
display: block;
2022-10-03 21:31:11 +00:00
}
}
}
2022-10-25 15:36:32 +00:00
.control + .control {
2022-11-13 10:36:44 +00:00
margin-left: 1.2rem;
@include media-breakpoint-up(sm) {
margin-left: 2rem;
}
}
2022-10-25 15:36:32 +00:00
img {
vertical-align: middle;
}
2022-10-03 21:31:11 +00:00
}
.userControl {
2023-05-06 16:12:17 +00:00
align-items: center;
display: flex;
2023-05-24 21:51:47 +00:00
justify-content: flex-end;
2022-10-28 09:15:11 +00:00
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;
}
@include media-breakpoint-down(md) {
padding: divide($container-padding-x, 2);
}
.userpic {
2023-06-21 20:32:16 +00:00
align-items: center;
margin-right: 0;
img {
height: 100%;
width: 100%;
}
}
}
.userControlItem {
align-items: center;
border-radius: 100%;
display: flex;
height: 2.4em;
justify-content: center;
2023-05-24 21:51:47 +00:00
margin-left: 0.3rem;
position: relative;
2022-11-13 10:36:44 +00:00
transition: margin-left 0.3s;
width: 2.4em;
2022-11-13 10:36:44 +00:00
@include media-breakpoint-down(sm) {
margin-left: 0.4rem !important;
}
.headerScrolledTop &,
.headerScrolledBottom & {
transition: none;
}
.circlewrap {
height: 23px;
min-width: 23px;
width: 23px;
}
.button,
2023-02-17 09:21:02 +00:00
a,
a:link {
border: none;
2022-10-31 19:05:26 +00:00
height: auto;
margin: 0;
padding: 0;
&:hover {
2023-07-23 15:59:28 +00:00
background: none !important;
2023-06-27 22:47:47 +00:00
.icon {
display: none;
}
2023-06-27 22:47:47 +00:00
.iconHover {
display: block;
}
}
}
2023-05-06 16:40:43 +00:00
.icon {
2023-05-04 16:59:38 +00:00
img {
2023-05-24 21:51:47 +00:00
max-width: none;
2023-05-04 16:59:38 +00:00
}
}
.textLabel {
display: none;
}
}
.userControlItemInbox,
.userControlItemSearch {
@include media-breakpoint-down(sm) {
display: none;
}
}
2022-11-13 13:17:38 +00:00
.userControlItemVerbose {
margin-left: 1.2em !important;
2023-05-06 16:40:43 +00:00
2023-08-12 10:40:14 +00:00
&:first-child {
margin-left: 0 !important;
}
2023-05-06 16:40:43 +00:00
&:global(.loginbtn) {
.icon {
height: 2.4rem;
width: 2.4rem;
}
2023-07-18 21:50:27 +00:00
a:hover {
.icon {
display: block;
@include media-breakpoint-up(lg) {
display: none;
}
}
}
2023-05-06 16:40:43 +00:00
img {
max-width: none;
height: 2.4rem;
width: 2.4rem;
}
}
2023-09-04 20:45:02 +00:00
@include media-breakpoint-up(xl) {
margin-left: 0.5em !important;
2023-06-06 20:13:13 +00:00
margin-right: 0.5em;
2022-11-04 08:13:11 +00:00
width: auto;
.icon {
2023-07-26 10:39:13 +00:00
display: none !important;
}
.textLabel {
color: var(--link-color);
display: inline;
2023-09-04 20:45:02 +00:00
padding: 0;
position: relative;
2023-09-04 20:45:02 +00:00
white-space: nowrap;
z-index: 1;
}
}
2023-07-18 21:50:27 +00:00
button {
margin: 0 !important;
}
a::before {
2023-06-06 20:13:13 +00:00
display: none;
}
2023-05-06 16:40:43 +00:00
2023-06-06 20:13:13 +00:00
a:hover,
button:hover {
2023-05-06 16:40:43 +00:00
.icon {
2023-06-27 22:47:47 +00:00
display: none;
}
.iconHover {
display: block;
2023-05-06 16:40:43 +00:00
}
.textLabel {
2023-07-26 10:39:13 +00:00
background-color: var(--link-hover-background);
color: var(--link-hover-color);
}
2023-05-06 16:40:43 +00:00
}
2023-07-18 21:50:27 +00:00
a:hover {
background-color: var(--link-hover-background) !important;
}
}
2023-08-17 20:28:24 +00:00
.subnavigation {
2023-08-28 22:15:31 +00:00
background: #000;
color: #fff;
2023-08-17 20:28:24 +00:00
font-weight: 500;
left: 0;
position: absolute;
top: 100%;
2023-08-28 22:15:31 +00:00
transform: translateY(-2px);
2023-08-17 20:28:24 +00:00
width: 100%;
2023-08-28 22:15:31 +00:00
@include media-breakpoint-down(md) {
display: none;
}
2023-08-17 20:28:24 +00:00
ul {
display: flex;
flex-wrap: wrap;
height: 6rem;
line-height: 6rem;
2023-08-28 22:15:31 +00:00
margin-bottom: 0;
2023-08-17 20:28:24 +00:00
padding: 0 150px 0 0;
position: relative;
overflow: hidden;
@include media-breakpoint-up(xl) {
margin: 0 calc(0.5 * var(--bs-gutter-x));
}
li {
margin-right: 2.4rem;
white-space: nowrap;
}
.rightItem {
margin-right: 0;
position: absolute;
right: 0;
top: 0;
}
}
a:link,
a:visited {
border: none;
2023-08-28 22:15:31 +00:00
color: #fff;
2023-08-17 20:28:24 +00:00
2023-08-28 22:15:31 +00:00
.icon {
filter: invert(1);
}
2023-08-17 20:28:24 +00:00
2023-08-28 22:15:31 +00:00
&:hover {
opacity: 0.5;
2023-08-17 20:28:24 +00:00
}
}
}
.subnavigationItemName {
align-items: center;
display: flex;
transition: background-color 0.3s;
.subnavigationFeed & {
2023-08-28 22:15:31 +00:00
line-height: 60px;
2023-08-17 20:28:24 +00:00
}
}
.subnavigationFeed {
2023-08-28 22:15:31 +00:00
ul {
padding-right: 0;
}
2023-08-17 20:28:24 +00:00
li {
align-items: center;
display: flex;
}
.icon {
margin-right: 0.3em;
}
}
.rightItemIcon {
display: inline-block;
margin-left: 0.3em;
position: relative;
top: 0.15em;
}