From 1cd6aa04658b25c896df34f1c77499b6c3de499c Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Wed, 27 Jan 2021 12:42:00 +0100 Subject: [PATCH] search improvements --- src/components/SearchResult.svelte | 17 ++++----- src/routes/search.svelte | 59 +++++++++++++++++------------- 2 files changed, 42 insertions(+), 34 deletions(-) diff --git a/src/components/SearchResult.svelte b/src/components/SearchResult.svelte index 8a4cdd3..6af2a2c 100644 --- a/src/components/SearchResult.svelte +++ b/src/components/SearchResult.svelte @@ -5,7 +5,6 @@ let href = '/' $: { - console.log(type, slug) switch (type) { case 'works': case 'projects': @@ -21,6 +20,14 @@ } +
  • + +

    {slug.replace(/-/g, ' ')}

    + {type} + Score: {result.score.toFixed(1)} +
    +
  • + - -
  • - -

    {slug.replace(/-/g, ' ')}

    - {type} - Score: {result.score.toFixed(1)} -
    -
  • diff --git a/src/routes/search.svelte b/src/routes/search.svelte index e00002a..7b1ca95 100644 --- a/src/routes/search.svelte +++ b/src/routes/search.svelte @@ -1,18 +1,19 @@ - - + +