get all poems workin, get semantic search workin, get thoughts section working

This commit is contained in:
2024-06-02 19:01:57 -04:00
parent de9cccabda
commit 2faf292aab
168 changed files with 3204 additions and 31 deletions

View File

@@ -0,0 +1,26 @@
<script lang="ts">
import { searchResults } from '$lib/store';
import type { SearchResult } from '$lib/utils/search';
import { onMount } from 'svelte';
import type { PageData } from './$types';
export let data: PageData;
const { title, date: _date, Content, categories: _ } = data;
let results: SearchResult[] = [];
searchResults.subscribe((value: SearchResult[]) => {
results = value ? value : [];
});
onMount(() => {
searchResults.set([]);
});
</script>
{#if results.length <= 0}
<div class="container mx-auto flex flex-col items-center prose px-4">
<h1 class="pt-10">{title}</h1>
<Content />
<a href="/thoughts" class="link py-10">Back to Thoughts</a>
</div>
{/if}