From 929aa37d995a5900593ba7af7b3ca3c8b991985c Mon Sep 17 00:00:00 2001 From: Borja Robert Date: Fri, 2 Dec 2022 11:15:07 +0100 Subject: [PATCH] =?UTF-8?q?cambios=20para=20incluir=20descripci=C3=B3n=20e?= =?UTF-8?q?n=20las=20plantillas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/templates/templates.js | 1 + src/lib/templates/verde.js | 8 ++++++++ src/routes/+page.svelte | 22 +++++++++++++++++----- 3 files changed, 26 insertions(+), 5 deletions(-) diff --git a/src/lib/templates/templates.js b/src/lib/templates/templates.js index d548de4..ed9ab57 100644 --- a/src/lib/templates/templates.js +++ b/src/lib/templates/templates.js @@ -20,6 +20,7 @@ import { posits } from '$lib/templates/posits'; /** * @typedef {{ * name: string; +* description: string; * image: string; * heading: Element; * title: Element; diff --git a/src/lib/templates/verde.js b/src/lib/templates/verde.js index 569a9ec..9a77cf9 100644 --- a/src/lib/templates/verde.js +++ b/src/lib/templates/verde.js @@ -3,6 +3,14 @@ import '$lib/templates/templates' /** @type {import('$lib/templates/templates').Template} */ export const verde = { name: "verde", + description: ``, image: "plantilla_verde.png", heading: { top: 100, diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index e7c3187..66a4a35 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -9,7 +9,7 @@ content="Aplicación para la generación automática de carteles de actividades de DMD" /> -
+

Elige plantilla

    @@ -17,18 +17,24 @@
  • Plantilla en blanco estilo {template.name} -
    {template.name}
    + {#if template.description} +
    {@html template.description}
    + {:else} +
    {template.name}
    + {/if} +
  • {/each}
-
+