From 57dc4d50fd813d44224ad81d1261182cf896e07e Mon Sep 17 00:00:00 2001 From: Borja Robert Date: Sun, 2 Oct 2022 02:51:24 +0200 Subject: [PATCH] =?UTF-8?q?ahora=20voy=20a=20por=20el=20t=C3=ADtulo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/templates/Title.svelte | 0 src/routes/[slug]/+page.svelte | 8 ++++++-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 src/lib/templates/Title.svelte diff --git a/src/lib/templates/Title.svelte b/src/lib/templates/Title.svelte new file mode 100644 index 0000000..e69de29 diff --git a/src/routes/[slug]/+page.svelte b/src/routes/[slug]/+page.svelte index 3c04646..1762b09 100644 --- a/src/routes/[slug]/+page.svelte +++ b/src/routes/[slug]/+page.svelte @@ -5,7 +5,7 @@ import Preview from '$lib/preview/Preview.svelte'; const slug = data.slug; - const templateIndex = templates.map((e) => e.name).indexOf(slug); + /** @type {number|undefined} */ const templateIndex = templates.map((e) => e.name).indexOf(slug); @@ -18,7 +18,11 @@
-
+ {#if templateIndex !== undefined} +
+ +
+ {/if}