|
|
|
@ -1,5 +1,4 @@
|
|
|
|
|
<script>
|
|
|
|
|
import { templates } from '$lib/templates/templates';
|
|
|
|
|
import {
|
|
|
|
|
heading,
|
|
|
|
|
title,
|
|
|
|
@ -13,25 +12,34 @@
|
|
|
|
|
|
|
|
|
|
import { convertDate } from '$lib/convertDate';
|
|
|
|
|
|
|
|
|
|
/** @type number */ export let templateIndex;
|
|
|
|
|
|
|
|
|
|
const template = templates[templateIndex];
|
|
|
|
|
|
|
|
|
|
/** @type {string} */ let textDate;
|
|
|
|
|
/** @type {string} */ let textHeading;
|
|
|
|
|
/** @type {string} */ let textWeekday;
|
|
|
|
|
/** @type {string} */ let textDate = '';
|
|
|
|
|
/** @type {boolean} */ let checked = true;
|
|
|
|
|
|
|
|
|
|
$: if ($date !== '') {
|
|
|
|
|
textDate = convertDate($date);
|
|
|
|
|
}
|
|
|
|
|
$: if ($heading !== '') {
|
|
|
|
|
textHeading = $heading;
|
|
|
|
|
}
|
|
|
|
|
$: if ($weekday !== '') {
|
|
|
|
|
textWeekday = $weekday;
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<div class="text-container">
|
|
|
|
|
<input type="checkbox" bind:checked />
|
|
|
|
|
|
|
|
|
|
{#if checked}
|
|
|
|
|
<div class="text" contenteditable="true">
|
|
|
|
|
<p>El {textWeekday}, {textDate}, te invitamos a participar en el {textHeading}</p>
|
|
|
|
|
<p>Estimada/o amiga/o:</p>
|
|
|
|
|
<p>El {$weekday.toLowerCase()}, {textDate}, celebramos el acto '{$title}'.</p>
|
|
|
|
|
<p>Lo haremos en {$address.split('\n')[-1]}</p>
|
|
|
|
|
</div>
|
|
|
|
|
{/if}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
.text-container {
|
|
|
|
|
margin: 1rem auto;
|
|
|
|
|
}
|
|
|
|
|
.text {
|
|
|
|
|
margin: 1rem auto;
|
|
|
|
|
}
|
|
|
|
|
p {
|
|
|
|
|
margin-bottom: 1rem;
|
|
|
|
|
}
|
|
|
|
|
</style>
|
|
|
|
|