From ff78ebdc2ea958a59e2dfc3cd3056f69ea5c248e Mon Sep 17 00:00:00 2001 From: Elijah Date: Tue, 24 Dec 2019 12:38:25 -0600 Subject: [PATCH] Display the search results --- site/src/components/SearchResult.svelte | 50 +++++++++++++++++++++++++ site/src/components/SiteSearch.svelte | 12 ++++-- 2 files changed, 59 insertions(+), 3 deletions(-) create mode 100644 site/src/components/SearchResult.svelte diff --git a/site/src/components/SearchResult.svelte b/site/src/components/SearchResult.svelte new file mode 100644 index 0000000000..7cdb0a5e26 --- /dev/null +++ b/site/src/components/SearchResult.svelte @@ -0,0 +1,50 @@ + + + + + + + dispatch('navigate')}> +
+
+ {@html highlightQuery(title, query)} +
+
+
+ + diff --git a/site/src/components/SiteSearch.svelte b/site/src/components/SiteSearch.svelte index 94b58a15c8..a92ae4d543 100644 --- a/site/src/components/SiteSearch.svelte +++ b/site/src/components/SiteSearch.svelte @@ -45,6 +45,7 @@ import { writable } from 'svelte/store'; import { fade, fly} from 'svelte/transition'; import SearchBar from './SearchBar.svelte'; + import SearchResult from './SearchResult.svelte'; import { onMount } from 'svelte'; export let showing = false; @@ -86,11 +87,16 @@