Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Search UI #627

Merged
merged 15 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
115 changes: 0 additions & 115 deletions src/lib/components/Search.svelte

This file was deleted.

24 changes: 24 additions & 0 deletions src/lib/components/search/ArticleSearchResult.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<script lang="ts">
import type { ArticleSearchReturnAttributes } from "$lib/search/searchTypes";
export let article: ArticleSearchReturnAttributes;
</script>

<li>
<a
href={"/news/" + article.slug}
class="border border-transparent focus:border-primary"
id=".search-result"
danieladugyan marked this conversation as resolved.
Show resolved Hide resolved
>
<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>
30 changes: 30 additions & 0 deletions src/lib/components/search/CommitteeSearchResult.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<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="border border-transparent focus:border-primary"
id=".search-result"
>
<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>
24 changes: 24 additions & 0 deletions src/lib/components/search/EventSearchResult.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<script lang="ts">
import type { EventSearchReturnAttributes } from "$lib/search/searchTypes";
export let event: EventSearchReturnAttributes;
</script>

<li>
<a
href={"/events/" + event.slug}
class="border border-transparent focus:border-primary"
id=".search-result"
>
<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>
Loading
Loading