Updated tabs bar styles to remove nav links on small devices, show other buttons

This commit is contained in:
mgabdev 2019-10-22 16:20:49 -04:00
parent 4b1051e711
commit e3e8c5c2d5
2 changed files with 56 additions and 14 deletions

View File

@ -155,6 +155,7 @@ class TabsBar extends React.PureComponent {
const classes = classNames('tabs-bar', { const classes = classNames('tabs-bar', {
'tabs-bar--collapsed': collapsed, 'tabs-bar--collapsed': collapsed,
'logged-in': !!account,
}) })
return ( return (
@ -191,6 +192,10 @@ class TabsBar extends React.PureComponent {
<button className='tabs-bar__button-compose button' onClick={onOpenCompose} aria-label='Gab'> <button className='tabs-bar__button-compose button' onClick={onOpenCompose} aria-label='Gab'>
<span>Gab</span> <span>Gab</span>
</button> </button>
<NavLink className='tabs-bar__search-btn' to='/search'>
<i className='tabs-bar__link__icon tabs-bar__link__icon--search'/>
<FormattedMessage id='tabs_bar.search' defaultMessage='Search' />
</NavLink>
</div> </div>
} }
{ {

View File

@ -9,6 +9,7 @@
top: 0; top: 0;
z-index: 1000; z-index: 1000;
transition: transform 0.2s ease; transition: transform 0.2s ease;
overflow: hidden;
// body.theme-gabsocial-light & { // body.theme-gabsocial-light & {
// background: #fff; // background: #fff;
@ -17,8 +18,8 @@
&--collapsed { &--collapsed {
@media screen and (max-width: 895px) { @media screen and (max-width: 895px) {
margin-top: -46px; margin-top: -50px;
transform: translateY(-46px); transform: translateY(-50px);
} }
} }
@ -170,20 +171,28 @@
display: flex; display: flex;
} }
@media (max-width: 895px) { &__search-btn {
height: 92px; display: none;
margin-left: auto;
.tabs-bar__link__icon--search {
display: block;
height: 32px;
width: 32px;
background-position: -995px 5px !important;
}
> span {
display: none;
}
}
@media (max-width: 895px) {
&__search-container, &__search-container,
&__button-compose { &__button-compose {
display: none; display: none;
} }
&__container {
max-width: 560px;
flex-direction: column-reverse;
padding: 0;
}
&__profile { &__profile {
margin: 0; margin: 0;
} }
@ -194,13 +203,41 @@
&--left { &--left {
margin: 0; margin: 0;
width: 100%; width: 80px;
} }
&--right { &--right {
padding: 6px 0 6px 20px; padding: 8px 0 6px 20px;
margin-left: 0; }
margin-right: auto; }
&__link {
display: none !important;
&--logo {
display: flex !important;
}
}
&.logged-in & {
&__split {
&--left {
display: none !important;
}
&--right {
padding-top: 10px;
margin-left: 0 !important;
width: 100% !important;
.flex {
width: 100%;
}
}
}
&__search-btn {
display: block;
} }
} }
} }