|
|
|
@ -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);
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<svelte:head>
|
|
|
|
@ -18,7 +18,11 @@
|
|
|
|
|
|
|
|
|
|
<div class="main">
|
|
|
|
|
<section class="form"><Form /></section>
|
|
|
|
|
<section class="preview"><Preview {templateIndex} /></section>
|
|
|
|
|
{#if templateIndex !== undefined}
|
|
|
|
|
<section class="preview">
|
|
|
|
|
<Preview {templateIndex} />
|
|
|
|
|
</section>
|
|
|
|
|
{/if}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|