diff --git a/README.md b/README.md index eea3bbc..ca45bc8 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ Aplicación para que los grupos creen sus propios carteles. ## TODO -* [ ] Separar fecha y hora en campos distintos. -* [ ] Quitar el 'de' de la fecha +* [x] Separar fecha y hora en campos distintos. +* [x] Quitar el 'de' de la fecha * [ ] Generar texto de boletín junto al cartel. ### Verde diff --git a/src/lib/form/Colabs.svelte b/src/lib/form/Colabs.svelte index 6049f8a..bcb540c 100644 --- a/src/lib/form/Colabs.svelte +++ b/src/lib/form/Colabs.svelte @@ -35,7 +35,12 @@ x - + {/each} {/if} @@ -69,14 +74,14 @@ grid-gap: 0.5rem; align-items: center; justify-content: center; - margin: 1rem; + margin: 0.25rem 1rem; background-color: #ddd; padding: 0.25rem; } .organization-logo { - max-height: 64px; - max-width: 100px; + max-height: 72px; + max-width: 144px; margin: 0 auto; background-color: #fff; } @@ -94,7 +99,7 @@ input { display: block; - max-width: 100px; + width: 100%; } button { diff --git a/src/lib/form/Organized.svelte b/src/lib/form/Organized.svelte index c88722d..8f6d17a 100644 --- a/src/lib/form/Organized.svelte +++ b/src/lib/form/Organized.svelte @@ -35,7 +35,12 @@ x - + {/each} {/if} @@ -68,13 +73,13 @@ grid-gap: 0.5rem; align-items: center; justify-content: center; - margin: 1rem; + margin: 0.25rem 1rem; background-color: #ddd; padding: 0.25rem; } .organized-logo { - max-height: 64px; - max-width: 100px; + max-height: 72px; + max-width: 128px; margin: 0 auto; background-color: #fff; } @@ -91,7 +96,7 @@ input { display: block; - max-width: 100px; + width: 100%; } button { diff --git a/src/lib/preview/Preview.svelte b/src/lib/preview/Preview.svelte index 9fe897f..9e5c1de 100644 --- a/src/lib/preview/Preview.svelte +++ b/src/lib/preview/Preview.svelte @@ -130,7 +130,7 @@ max-height: 64px; max-width: 128px; margin: 0 auto; - opacity: 75%; + opacity: 100%; } .caption { diff --git a/src/lib/templates/Date.svelte b/src/lib/templates/Date.svelte index 5f2bff2..d13b47a 100644 --- a/src/lib/templates/Date.svelte +++ b/src/lib/templates/Date.svelte @@ -5,30 +5,28 @@ /** @type number */ export let templateIndex; import { date } from '$lib/stores/store'; - /** @typedef - * {{ - * date: string; - * }} Newdate - */ - - /** @type {Newdate} */ let newdate = { date: '' }; + /** @type {string} */ let newdate; - const convertDate = (/** @type {(string | undefined)} */ datetime) => { - if (datetime == undefined) { - return { - date: '' - }; + /** + * @param {string} date - Fecha del evento + * @returns {string} - Fecha en dia (número) mes (letras) + */ + const convertDate = (date) => { + if (date == undefined) { + return ''; } - /** @type {string} */ const monthNumber = datetime.split('-')[1]; - /** @type {string} */ let day = datetime.split('-')[2].split('T')[0]; + /** @type {string} */ const monthNumber = date.split('-')[1]; + /** @type {string} */ let day = date.split('-')[2].split('T')[0]; /** @type {number} */ const dayNumber = Number(day); /** @type {string} */ const month = getMonthName(monthNumber); + + /** Removes 0 on single digit days */ if (dayNumber < 10) { day = day.charAt(1); } - return { - date: `${day} de ${month}` - }; + + /** @type {string} */ const res = `${day} ${month}`; + return res; }; $: if ($date !== '') { @@ -36,7 +34,7 @@ } -{#if templates[templateIndex] && newdate.date} +{#if templates[templateIndex] && newdate}
- {newdate.date} + {newdate}
{/if}