311 lines
6.2 KiB
SCSS
311 lines
6.2 KiB
SCSS
@import 'variables';
|
|
@import 'mixins';
|
|
|
|
.top-bar {
|
|
position: fixed;
|
|
top: 0px;
|
|
left: 0px;
|
|
right: 0px;
|
|
-webkit-backface-visibility: hidden;
|
|
z-index: 1000;
|
|
height: $header-height;
|
|
font-size: 16px; // todo: make it global, based on body
|
|
@include themeable(background, theme-top-bar-background, $tan);
|
|
border-bottom: 1px solid rgba(0, 0, 0, 0.2);
|
|
&.hidden {
|
|
display: none;
|
|
}
|
|
|
|
&,
|
|
& * {
|
|
box-sizing: border-box; // todo: make it global
|
|
}
|
|
|
|
nav {
|
|
max-width: $max-width;
|
|
height: 100%;
|
|
margin: auto;
|
|
position: relative;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
|
|
.pwa-nav-buttons {
|
|
position: absolute;
|
|
top: 17px;
|
|
left: -200px;
|
|
display: none;
|
|
button {
|
|
background: transparent;
|
|
border: 0px;
|
|
width: 28px;
|
|
text-align: center;
|
|
opacity: 0.75;
|
|
@include themeable(filter, theme-social-icon-invert, invert(0));
|
|
img {
|
|
width: 15px;
|
|
height: 15px;
|
|
}
|
|
&:hover {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
@media screen and (min-width: 950px) {
|
|
left: 88px;
|
|
&.pwa-nav-buttons--showing {
|
|
display: block;
|
|
}
|
|
}
|
|
@media screen and (min-width: 1439px) {
|
|
left: -88px;
|
|
}
|
|
}
|
|
|
|
// TODO make it a component in future.
|
|
.nav-indicator {
|
|
position: absolute;
|
|
padding: 4px;
|
|
border-radius: 3px;
|
|
font-weight: bold;
|
|
display: none;
|
|
color: $white;
|
|
top: 4px;
|
|
right: 0;
|
|
font-size: 0.8em;
|
|
min-width: 18px;
|
|
text-align: center;
|
|
|
|
&.showing {
|
|
display: block;
|
|
}
|
|
|
|
&.connect-number {
|
|
background: $green;
|
|
}
|
|
|
|
&.notifications-number {
|
|
background: $dark-purple;
|
|
}
|
|
}
|
|
|
|
.top-bar--menu {
|
|
position: relative;
|
|
height: 100%;
|
|
|
|
&.showing {
|
|
.top-bar--menu-dropdown,
|
|
.top-bar--menu-overlay {
|
|
display: block;
|
|
}
|
|
}
|
|
|
|
&.desktop {
|
|
&:hover,
|
|
&:active,
|
|
&:focus {
|
|
.top-bar--menu-dropdown {
|
|
display: block;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.top-bar--menu-trigger {
|
|
all: unset;
|
|
display: flex;
|
|
height: 100%;
|
|
padding: 0 8px;
|
|
align-items: center;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.top-bar--menu-overlay {
|
|
position: fixed;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: rgba(17, 17, 17, 0.88);
|
|
top: $header-height;
|
|
display: none;
|
|
}
|
|
.top-bar--menu-dropdown {
|
|
position: fixed;
|
|
right: 0;
|
|
top: $header-height;
|
|
padding: 16px;
|
|
@include themeable(background, theme-top-bar-background, $tan);
|
|
display: none;
|
|
width: 100%;
|
|
border-radius: 0 0 3px 3px;
|
|
box-shadow: $shadow;
|
|
|
|
@media screen and (min-width: 380px) {
|
|
position: absolute;
|
|
width: 250px;
|
|
}
|
|
|
|
.header {
|
|
padding: 3px 10px;
|
|
border-bottom: 3px solid rgb(241, 244, 246);
|
|
margin-bottom: 5px;
|
|
color: rgb(178, 192, 203);
|
|
}
|
|
.option {
|
|
padding: 15px 10px;
|
|
@media screen and (min-width: 380px) {
|
|
padding: 6px 10px;
|
|
}
|
|
&.prime-option {
|
|
border-bottom: 3px solid;
|
|
@include themeable(
|
|
border-color,
|
|
theme-prime-option-border-color,
|
|
#7a7e81
|
|
);
|
|
margin-bottom: 5px;
|
|
font-size: 1.22em;
|
|
font-weight: 500;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
&:hover {
|
|
@include themeable(
|
|
background,
|
|
theme-top-bar-background-hover,
|
|
darken($tan, 2%)
|
|
);
|
|
}
|
|
}
|
|
a {
|
|
@include themeable(color, theme-color, $black);
|
|
}
|
|
}
|
|
}
|
|
|
|
.skip-content-link {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 50%;
|
|
transform: translate(-50%, -100px);
|
|
background: black;
|
|
color: white;
|
|
z-index: 9999;
|
|
padding: 13px;
|
|
cursor: default;
|
|
pointer-events: none;
|
|
opacity: 0;
|
|
transition: opacity 0.3s linear, transform 0.3s linear;
|
|
|
|
&:focus {
|
|
pointer-events: auto;
|
|
opacity: 1;
|
|
transform: translate(-50%, 22px);
|
|
transition: opacity 0.3s linear, transform 0.3s linear;
|
|
}
|
|
}
|
|
}
|
|
|
|
// Logo
|
|
.top-bar--logo {
|
|
display: flex;
|
|
align-items: center;
|
|
height: 100%;
|
|
margin-left: 8px;
|
|
@media screen and (min-width: 950px) {
|
|
margin-left: 16px;
|
|
}
|
|
|
|
.logo {
|
|
width: 51px;
|
|
height: 34px;
|
|
padding: 7px 8px 6px 10px;
|
|
@include themeable(fill, theme-logo-color, white);
|
|
border-radius: 3px;
|
|
@include themeable(background, theme-logo-background, $black);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Search bar
|
|
.top-bar--search {
|
|
display: flex;
|
|
max-width: 490px;
|
|
padding: 0 8px;
|
|
flex: 1 auto;
|
|
|
|
&,
|
|
& * {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
form {
|
|
width: 100%;
|
|
}
|
|
}
|
|
|
|
.top-bar--search-input {
|
|
width: 100%;
|
|
border-radius: 3px;
|
|
padding: 6px 9px 5px;
|
|
font-size: 16px;
|
|
@include themeable(background, theme-top-bar-search-background, #e8e7e7);
|
|
@include themeable(color, theme-top-bar-search-color, $black);
|
|
-webkit-appearance: none;
|
|
border: 1px solid transparent;
|
|
&:focus {
|
|
border: 1px solid $dark-purple;
|
|
}
|
|
&::placeholder {
|
|
opacity: 0.5;
|
|
@include themeable(color, theme-top-bar-search-color, $black);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Actions on right side...
|
|
.top-bar--links {
|
|
height: $header-height;
|
|
display: flex;
|
|
align-items: center;
|
|
}
|
|
|
|
.top-bar--link {
|
|
position: relative;
|
|
display: flex;
|
|
padding: 0 8px;
|
|
height: 100%;
|
|
align-items: center;
|
|
@include themeable(fill, theme-top-bar-color, $black);
|
|
|
|
&.write {
|
|
border-radius: 3px;
|
|
height: auto;
|
|
margin-right: 8px;
|
|
padding: 4px 8px;
|
|
white-space: nowrap;
|
|
font-size: 0.9em;
|
|
border: 2px solid var(--theme-top-bar-write-color, $black);
|
|
@include themeable(color, theme-top-bar-write-color, $black);
|
|
@include themeable(background, theme-top-bar-write-background, $green);
|
|
display: none;
|
|
|
|
@media screen and (min-width: 650px) {
|
|
display: inline-block;
|
|
}
|
|
}
|
|
}
|
|
|
|
.top-bar--profile {
|
|
height: 32px;
|
|
width: 32px;
|
|
background: $dark-gray;
|
|
border-radius: 50%;
|
|
|
|
img {
|
|
height: 32px;
|
|
width: 32px;
|
|
border-radius: 50%;
|
|
}
|
|
}
|
|
|