-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* use new search in frontend * fix wrong types for search return * fix loading show on backspace, don't query classbadge * refactor index filtering and log error * adjust search weights * handle translation server side * handle empty search input and refine result filtering * use i18n route resolver * add error handling to search component and server actions * add committee, refactor to reduce duplication * add search unit tests * explicit primary key when adding to meilisearch * use class name for search result
- Loading branch information
1 parent
a9c07f4
commit d6dce6a
Showing
19 changed files
with
1,026 additions
and
291 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<script lang="ts"> | ||
import type { ArticleSearchReturnAttributes } from "$lib/search/searchTypes"; | ||
export let article: ArticleSearchReturnAttributes; | ||
</script> | ||
|
||
<li> | ||
<a | ||
href={"/news/" + article.slug} | ||
class="search-result border border-transparent focus:border-primary" | ||
> | ||
<div class="avatar aspect-square w-8 overflow-hidden rounded-full"> | ||
<span class="i-mdi-newspaper text-2xl"></span> | ||
</div> | ||
<div> | ||
<h4 class="text-balance"> | ||
{article.header} | ||
</h4> | ||
<p class="line-clamp-1 text-gray-500"> | ||
{article.body} | ||
</p> | ||
</div> | ||
</a> | ||
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
<script lang="ts"> | ||
import type { CommitteeSearchReturnAttributes } from "$lib/search/searchTypes"; | ||
import CommitteeIcon from "$lib/components/images/CommitteeIcon.svelte"; | ||
export let committee: CommitteeSearchReturnAttributes; | ||
</script> | ||
|
||
<li> | ||
<a | ||
href={"/committees/" + committee.shortName} | ||
class="search-result border border-transparent focus:border-primary" | ||
> | ||
<div class="avatar aspect-square w-8 overflow-hidden rounded-full"> | ||
<figure class="relative w-full"> | ||
<CommitteeIcon {committee} /> | ||
</figure> | ||
</div> | ||
<div> | ||
<h4> | ||
<b> | ||
{committee.name} | ||
</b> | ||
</h4> | ||
<p class="line-clamp-1 text-gray-500"> | ||
{committee.description} | ||
</p> | ||
</div></a | ||
> | ||
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<script lang="ts"> | ||
import type { EventSearchReturnAttributes } from "$lib/search/searchTypes"; | ||
export let event: EventSearchReturnAttributes; | ||
</script> | ||
|
||
<li> | ||
<a | ||
href={"/events/" + event.slug} | ||
class="search-result border border-transparent focus:border-primary" | ||
> | ||
<div class="avatar aspect-square w-8 overflow-hidden rounded-full"> | ||
<span class="i-mdi-calendar text-2xl"></span> | ||
</div> | ||
<div> | ||
<h4> | ||
{event.title} | ||
</h4> | ||
<p class="line-clamp-1 text-gray-500"> | ||
{event.description} | ||
</p> | ||
</div> | ||
</a> | ||
</li> |
Oops, something went wrong.