feat: Add search function
This commit is contained in:
1 parent
91134d05e4
commit
1dd179d636
22 files changed
+455
-70
No files matched your search
@@ -49,11 +49,20 @@
|
||||
</a>
|
||||
</div>
|
||||
<div class="flex flex-row gap-2 py-2 px-2">
|
||||
<Button
|
||||
href="/search"
|
||||
label="Search"
|
||||
class="max-sm:w-9 max-sm:h-8 max-sm:!p-0 items-center justify-center
|
||||
dark:text-zinc-300 text-slate-700 hover:text-inherit hover:bg-slate-200 hover:dark:bg-zinc-900"
|
||||
>
|
||||
<Icon src={MagnifyingGlass} width={16} slot="icon" />
|
||||
<span class="hidden sm:inline">Search</span>
|
||||
</Button>
|
||||
<Button
|
||||
href="/communities"
|
||||
label="Communities"
|
||||
class="max-sm:w-9 max-sm:h-8 max-sm:!p-0 items-center justify-center
|
||||
dark:text-zinc-300 text-slate-700 hover:text-inherit"
|
||||
dark:text-zinc-300 text-slate-700 hover:text-inherit hover:bg-slate-200 hover:dark:bg-zinc-900"
|
||||
>
|
||||
<Icon src={GlobeAlt} width={16} slot="icon" />
|
||||
<span class="hidden sm:inline">Explore</span>
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<script lang="ts">
|
||||
import Button from '$lib/components/input/Button.svelte'
|
||||
import { createEventDispatcher } from 'svelte'
|
||||
|
||||
export let page: number
|
||||
|
||||
const dispatcher = createEventDispatcher<{ change: number }>()
|
||||
</script>
|
||||
|
||||
<div class="flex flex-row w-full gap-4">
|
||||
<Button
|
||||
on:click={() => {
|
||||
dispatcher('change', --page)
|
||||
}}
|
||||
disabled={page <= 1}
|
||||
class="flex-1"
|
||||
>
|
||||
Back
|
||||
</Button>
|
||||
|
||||
<Button
|
||||
on:click={() => {
|
||||
dispatcher('change', ++page)
|
||||
}}
|
||||
class="flex-1"
|
||||
>
|
||||
Next
|
||||
</Button>
|
||||
</div>
|
||||
Reference in new issue
Block a user