diff --git a/src/components/svgCard.svelte b/src/components/svgCard.svelte index 5cda850..078370b 100644 --- a/src/components/svgCard.svelte +++ b/src/components/svgCard.svelte @@ -28,6 +28,7 @@ // Props: export let svgInfo: iSVG; + export let searchTerm: string; let isInFigma = false; onMount(() => { @@ -37,6 +38,11 @@ // Wordmark SVG: let wordmarkSvg = false; + $: { + if (searchTerm) { + wordmarkSvg = false; + } + } const insertSVG = async (url?: string) => { const content = (await getSvgContent(url)) as string; @@ -59,7 +65,7 @@ class="group flex flex-col items-center justify-center rounded-md border border-neutral-200 p-4 transition-colors duration-100 hover:bg-neutral-100/80 dark:border-neutral-800 dark:hover:bg-neutral-800/20" > - {#if wordmarkSvg == true} + {#if wordmarkSvg == true && svgInfo.wordmark !== undefined} {/if} - {#if wordmarkSvg} + {#if wordmarkSvg && svgInfo.wordmark !== undefined} {:else} diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 021e713..a06b2cb 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -134,7 +134,7 @@ {#each filteredSvgs.slice(0, showAll ? undefined : 30) as svg} - + {/each} {#if filteredSvgs.length > 30 && !showAll}