diff --git a/src/lib/components/City.svelte b/src/lib/components/City.svelte new file mode 100644 index 0000000..e5147d2 --- /dev/null +++ b/src/lib/components/City.svelte @@ -0,0 +1,35 @@ + + +{#if templates[templateIndex] && $city} +
+ {$city} +
+{/if} + + diff --git a/src/lib/components/Text.svelte b/src/lib/components/Text.svelte index 73ae1b0..636b0de 100644 --- a/src/lib/components/Text.svelte +++ b/src/lib/components/Text.svelte @@ -7,7 +7,8 @@ date, time, weekday, - address + address, + city } from '$lib/stores/store'; import { convertDate } from '$lib/convertDate'; @@ -18,8 +19,6 @@ $: if ($date !== '') { textDate = convertDate($date); } - - $: city = $address.split('\n')[$address.split('\n').length - 1];
@@ -29,7 +28,7 @@ {#if checked}

Estimada/o amiga/o:

-

El {$weekday.toLowerCase()}, {textDate}, celebramos el acto '{$title}' en {city}.

+

El {$weekday.toLowerCase()}, {textDate}, celebramos el acto '{$title}' en {$city}.

Como siempre, la entrada es gratuita hasta completar aforo.

El acto comienza a las {$time}.

{@html $content}

diff --git a/src/lib/form/Form.svelte b/src/lib/form/Form.svelte index 8528ced..6268559 100644 --- a/src/lib/form/Form.svelte +++ b/src/lib/form/Form.svelte @@ -12,6 +12,7 @@ time, weekday, address, + city, canvas } from '$lib/stores/store'; @@ -117,9 +118,10 @@ bind:value={$address} type="text" name="address" - placeholder="Ej. Calle del Abeto, 4 -Albacete" + placeholder="Ej. Calle del Abeto, 4" /> + +
@@ -160,7 +162,7 @@ Albacete" font-size: 0.8rem; font-family: sans-serif; padding: 0.5rem; - min-height: 5rem; + min-height: 3rem; line-height: 1.3rem; resize: vertical; } diff --git a/src/lib/preview/Preview.svelte b/src/lib/preview/Preview.svelte index e34cad1..381c496 100644 --- a/src/lib/preview/Preview.svelte +++ b/src/lib/preview/Preview.svelte @@ -13,6 +13,7 @@ import Weekday from '$lib/components/Weekday.svelte'; import Address from '$lib/components/Address.svelte'; import Text from '$lib/components/Text.svelte'; + import City from '$lib/components/City.svelte';
@@ -26,6 +27,7 @@