From f198ec4e400b8036ad3111c8522596286722a91c Mon Sep 17 00:00:00 2001 From: Damillora Date: Tue, 3 Dec 2024 00:31:29 +0700 Subject: [PATCH] feat: make search more like regular posts thanks to directus --- src/routes/search/+page.svelte | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/src/routes/search/+page.svelte b/src/routes/search/+page.svelte index 497b7a4..31dc43b 100644 --- a/src/routes/search/+page.svelte +++ b/src/routes/search/+page.svelte @@ -2,12 +2,13 @@ import { page } from '$app/stores'; import { browser } from '$app/environment'; - import { Container, Hero, Index, SearchCard } from '@damillora/plachta'; + import { Container, Hero, Index, Post, PostCard } from '@damillora/plachta'; import { onMount } from 'svelte'; import { search } from '$lib/content/searchApi'; import { afterNavigate } from '$app/navigation'; import { searchPost } from '$lib/content/contentApi.js'; + import dayjs from 'dayjs'; let { data } = $props(); let posts: any[] = $state([]); @@ -64,9 +65,20 @@ + +

Search results for: {url.searchParams.get('q')}

+
{#each posts as post} - + {/each}