pinafore/routes/_components/search/SearchResults.html

34 lines
920 B
HTML
Raw Normal View History

2018-02-07 04:54:49 +00:00
<ul class="search-results">
{#each $searchResults.hashtags as hashtag}
<HashtagSearchResult {hashtag} />
{/each}
{#each $searchResults.accounts as account}
<AccountSearchResult {account} />
{/each}
{#each $searchResults.statuses as status, index}
<StatusSearchResult {status} {index} length={$searchResults.statuses.length}/>
{/each}
2018-02-07 04:54:49 +00:00
</ul>
<style>
.search-results {
list-style: none;
box-sizing: border-box;
border: 1px solid var(--main-border);
border-radius: 2px;
}
</style>
<script>
import { store } from '../../_store/store'
import AccountSearchResult from './AccountSearchResult.html'
import HashtagSearchResult from './HashtagSearchResult.html'
import StatusSearchResult from './StatusSearchResult.html'
export default {
store: () => store,
components: {
AccountSearchResult,
HashtagSearchResult,
StatusSearchResult
}
}
</script>