gab-social/app/javascript/styles/gabsocial/components/tabs-bar.scss

353 lines
6.3 KiB
SCSS

.tabs-bar {
display: flex;
box-sizing: border-box;
background: #000;
flex: 0 0 auto;
overflow-y: auto;
height: 50px;
position: sticky;
top: 0;
z-index: 1000;
transition: transform 0.2s ease;
// body.theme-gabsocial-light & {
// background: #fff;
// border-bottom: 1px solid #ddd;
// }
&--collapsed {
@media screen and (max-width: 895px) {
margin-top: -46px;
transform: translateY(-46px);
}
}
&__container {
display: flex;
box-sizing: border-box;
width:100%;
max-width: 1200px;
margin: 0 auto;
padding: 0 15px;
// NOTE - might need to adjust this based on column sizing
@media screen and (max-width: $nav-breakpoint-4) {padding: 0 10px;}
}
&__split {
display: flex;
width: auto;
&--left {
margin-right: auto;
}
&--right {
margin-left: auto;
padding-top: 8px;
@media screen and (max-width: $nav-breakpoint-3) {padding-top: 4px;}
}
}
&__search-container {
display: block;
width: 251px;
@media screen and (max-width: 1024px) {
display: none;
}
}
&__profile {
position: relative;
overflow: hidden;
margin: 0 0 0 20px;
height: 34px;
width: 34px;
@media screen and (max-width: $nav-breakpoint-3) {
height: 42px;
width: 42px;
margin: 0;
}
.account__avatar {
width: 34px;
height: 34px;
background-size: 34px 34px;
@media screen and (max-width: $nav-breakpoint-3) {
width: 42px;
height: 42px;
background-size: 42px 42px;
}
}
@media screen and (max-width: 895px) {
width: 30px;
height: 30px;
background-size: 30px 30px;
.account__avatar {
width: 30px;
height: 30px;
background-size: 30px 30px;
}
}
.compose__action-bar {
display: block;
position: absolute;
top: 0;
right: 0;
left: -5px;
bottom: 0;
i {
display: none;
}
@media screen and (max-width: 895px) {
display: none;
}
}
}
&__sidebar-btn {
display: block;
position: absolute;
top: 0;
right: 0;
left: 0;
bottom: 0;
width: 30px;
opacity: 0;
@media (min-width: 895px) {
display: none;
}
}
&__page-name {
display: block;
margin-left: 18px;
line-height: 30px;
font-weight: 600;
font-size: 18px;
color: #fff;
@media (min-width: 895px) {
display: none;
}
}
&__button-compose {
display: block;
@media screen and (max-width: $nav-breakpoint-3) {display: none;}
width: 70px;
height: 34px;
margin-left: 20px;
border-radius: 4px;
background-image: url('../images/sprite-main-navigation.png');
background-color: $gab-brand-default !important;
background-repeat: no-repeat;
background-size: 161px 152px;
background-position: 18px 2px;
&:hover {
background-color: lighten($gab-brand-default, 5%) !important;
background-position: 18px -98px;
box-shadow: inset 0px 0px 6px darken($gab-brand-default, 10%);
}
span {display: none;}
}
&__button {
margin-left: 12px;
height: 34px;
}
.flex {
display: flex;
}
@media (max-width: 895px) {
height: 92px;
&__search-container,
&__button-compose {
display: none;
}
&__container {
max-width: 560px;
flex-direction: column-reverse;
padding: 0;
}
&__profile {
margin: 0;
}
&__split {
flex-direction: row;
align-items: stretch;
&--left {
margin: 0;
width: 100%;
}
&--right {
padding: 6px 0 6px 20px;
margin-left: 0;
margin-right: auto;
}
}
}
}
.tabs-bar__link {
display: flex;
flex: 1 1 auto;
margin: 0 20px 0 0;
color: white;
text-decoration: none;
@media screen and (max-width: 895px) {
width: 36px;
height: 42px;
margin: 4px 4px 0 0;
justify-content: center;
&.active {
border-bottom: 2px solid $gab-brand-default;
}
& > span {display: none;}
}
> span {
font-size: 15px;
line-height: 50px;
margin-left: 4px;
}
&--search {
@media (min-width: 1024px) {
display: none;
}
}
@media screen and (max-width:895px) {
&.apps {
display: none;
}
}
&__icon {
width: 20px;
background-repeat: no-repeat;
background-image: url('../images/sprite-main-navigation-links.png');
background-size: auto 84px;
@media screen and (max-width: 895px) {
width: 32px;
background-size: auto 120px;
}
&.home {
background-position: 0 18px;
@media screen and (max-width: 895px) {
background-position: 1px 11px;
}
}
&.notifications {
background-position: -140px 18px;
@media screen and (max-width: 895px) {
background-position: -195px 11px;
}
}
&.groups {
background-position: -280px 18px;
@media screen and (max-width: 895px) {
background-position: -400px 11px;
}
}
&.apps {
background-position: -825px 18px;
}
&.tabs-bar__link__icon--search {
background-position: -697px 18px;
@media screen and (max-width: 895px) {
background-position: -995px 11px;
}
}
}
&.active {
color: $gab-text-highlight;
font-weight: 700;
}
&.active & {
&__icon {
&.home {
background-position: 0 -52px;
@media screen and (max-width: 895px) {
background-position: 1px -89px;
}
}
&.notifications {
background-position: -140px -52px;
@media screen and (max-width: 895px) {
background-position: -195px -89px;
}
}
&.groups {
background-position: -280px -52px;
@media screen and (max-width: 895px) {
background-position: -400px -89px;
}
}
&.tabs-bar__link__icon--search {
@media (min-width: 895px) and (max-width: 1024px) {
background-position: -697px -52px;
}
@media screen and (max-width: 895px) {
background-position: -995px -89px;
}
}
}
}
&--logo {
display: block;
// NOTE - Revisit right-margin of home button / positioning between 376px and 350px
// - want to keep the icons centered between logo and profile image while shrinking
@media screen and (max-width: 895px) {display:none;}
width: 50px;
height: 50px;
margin-right: 28px;
border: none;
background-image: url('../images/gab_logo.svg');
background-repeat: no-repeat;
background-position: 0 10px;
background-size: 50px 30px;
& span {display: none !important;}
&:hover {
background-color: #000 !important;
border: none !important;
}
}
&--no-highlight,
&--no-highlight:hover,
&--no-highlight.active,
&--no-highlight:active,
&--no-highlight:focus {
background: transparent !important;
border-bottom-color: transparent !important;
}
}