);
} else if(results.get('statuses') && results.get('statuses').size === 0 && !searchEnabled && !(searchTerm.startsWith('@') || searchTerm.startsWith('#') || searchTerm.includes(' '))) {
statuses = (
- <section>
+ <section className='search-results__section'>
<h5><Icon id='quote-right' fixedWidth /><FormattedMessage id='search_results.statuses' defaultMessage='Toots' /></h5>
<div className='search-results__info'>
if (results.get('accounts') && results.get('accounts').size > 0) {
count += results.get('accounts').size;
accounts = (
- <section>
+ <section className='search-results__section'>
<h5><Icon id='users' fixedWidth /><FormattedMessage id='search_results.accounts' defaultMessage='People' /></h5>
{results.get('accounts').map(accountId => <AccountContainer id={accountId} key={accountId} />)}
if (results.get('statuses') && results.get('statuses').size > 0) {
count += results.get('statuses').size;
statuses = (
- <section>
+ <section className='search-results__section'>
<h5><Icon id='quote-right' fixedWidth /><FormattedMessage id='search_results.statuses' defaultMessage='Toots' /></h5>
{results.get('statuses').map(statusId => <StatusContainer id={statusId} key={statusId}/>)}
if (results.get('hashtags') && results.get('hashtags').size > 0) {
count += results.get('hashtags').size;
hashtags = (
- <section>
+ <section className='search-results__section'>
<h5><Icon id='hashtag' fixedWidth /><FormattedMessage id='search_results.hashtags' defaultMessage='Hashtags' /></h5>
{results.get('hashtags').map(hashtag => <Hashtag key={hashtag.get('name')} hashtag={hashtag} />)}
<FormattedMessage id='search_results.total' defaultMessage='{count, number} {count, plural, one {result} other {results}}' values={{ count }} />
</header>
- <div className='search-results__contents'>
- {accounts}
- {statuses}
- {hashtags}
- </div>
+ {accounts}
+ {statuses}
+ {hashtags}
</div>
);
};
}
.drawer--results {
- background: $ui-base-color;
- overflow: hidden;
- display: flex;
- flex-direction: column;
- flex: 1 1 auto;
+ overflow-x: hidden;
+ overflow-y: scroll;
+}
- & > header {
- color: $dark-text-color;
- background: lighten($ui-base-color, 2%);
+.search-results__section {
+ margin-bottom: 5px;
+
+ h5 {
+ background: darken($ui-base-color, 4%);
+ border-bottom: 1px solid lighten($ui-base-color, 8%);
+ cursor: default;
+ display: flex;
padding: 15px;
font-weight: 500;
font-size: 16px;
- cursor: default;
- flex: 0 0 auto;
+ color: $dark-text-color;
.fa {
display: inline-block;
}
}
- & > .search-results__contents {
- overflow-x: hidden;
- overflow-y: scroll;
- flex: 1 1 auto;
-
- & > section {
- margin-bottom: 5px;
-
- h5 {
- background: darken($ui-base-color, 4%);
- border-bottom: 1px solid lighten($ui-base-color, 8%);
- cursor: default;
- display: flex;
- padding: 15px;
- font-weight: 500;
- font-size: 16px;
- color: $dark-text-color;
-
- .fa {
- display: inline-block;
- margin-right: 5px;
- }
- }
+ .account:last-child,
+ & > div:last-child .status {
+ border-bottom: 0;
+ }
- .account:last-child,
- & > div:last-child .status {
- border-bottom: 0;
- }
+ & > .hashtag {
+ display: block;
+ padding: 10px;
+ color: $secondary-text-color;
+ text-decoration: none;
- & > .hashtag {
- display: block;
- padding: 10px;
- color: $secondary-text-color;
- text-decoration: none;
-
- &:hover,
- &:active,
- &:focus {
- color: lighten($secondary-text-color, 4%);
- text-decoration: underline;
- }
- }
+ &:hover,
+ &:active,
+ &:focus {
+ color: lighten($secondary-text-color, 4%);
+ text-decoration: underline;
}
}
}