From 87aeee8e8fcec7f4c5e1032051fc484b7ee6b459 Mon Sep 17 00:00:00 2001 From: Xyphyn Date: Mon, 2 Oct 2023 17:22:25 -0700 Subject: [PATCH] misc: make search buttons look much better --- src/routes/communities/+page.svelte | 18 +++++++- src/routes/search/+page.svelte | 65 +++++++++++++++++++---------- 2 files changed, 59 insertions(+), 24 deletions(-) diff --git a/src/routes/communities/+page.svelte b/src/routes/communities/+page.svelte index 7d7bc635..d500cba4 100644 --- a/src/routes/communities/+page.svelte +++ b/src/routes/communities/+page.svelte @@ -8,6 +8,7 @@ GlobeAmericas, Icon, InformationCircle, + MagnifyingGlass, PencilSquare, Plus, QuestionMarkCircle, @@ -87,8 +88,21 @@ on:submit|preventDefault={() => searchParam($page.url, 'q', search, 'page')} class="flex flex-col sm:flex-row gap-2 sm:ml-auto items-center" > - - + +
    diff --git a/src/routes/search/+page.svelte b/src/routes/search/+page.svelte index 08e9bb6b..3139de4c 100644 --- a/src/routes/search/+page.svelte +++ b/src/routes/search/+page.svelte @@ -22,10 +22,11 @@ PersonView, PostView, } from 'lemmy-js-client' - import { Button, Select, Spinner, TextInput } from 'mono-svelte' + import { Button, Disclosure, Select, Spinner, TextInput } from 'mono-svelte' import { AdjustmentsHorizontal, Bars3BottomRight, + ChevronDown, Icon, MagnifyingGlass, } from 'svelte-hero-icons' @@ -39,6 +40,8 @@ let query = data.query || '' let pageNum = data.page + + let moreOptions = false @@ -46,7 +49,7 @@

    Search

    -
    +
    -
    +
    searchParam($page.url, 'q', query, 'page')} + > searchParam($page.url, 'q', query, 'page')} - /> - -
    -
    -
    - - searchParam($page.url, 'community', c.detail?.id || undefined, 'page')} - /> + + + +
    +{#if moreOptions} +
    + + searchParam($page.url, 'community', c.detail?.id || undefined, 'page')} + /> +
    +{/if} {#if !data.results} {:else} {#await data.streamed.object}