lista esta branch

pull/8/head
Borja Robert 2 years ago
parent 8cb98b9c25
commit b831fb1f26

@ -2,8 +2,8 @@
Aplicación para que los grupos creen sus propios carteles. Aplicación para que los grupos creen sus propios carteles.
## TODO ## TODO
* [ ] Separar fecha y hora en campos distintos. * [x] Separar fecha y hora en campos distintos.
* [ ] Quitar el 'de' de la fecha * [x] Quitar el 'de' de la fecha
* [ ] Generar texto de boletín junto al cartel. * [ ] Generar texto de boletín junto al cartel.
### Verde ### Verde

@ -35,7 +35,12 @@
x x
</div> </div>
<img class="organization-logo" src={organization.image} alt={organization.text} /> <img class="organization-logo" src={organization.image} alt={organization.text} />
<input class="logo-title" type="text" bind:value={organization.text} /> <input
class="logo-title"
type="text"
bind:value={organization.text}
placeholder="Nombre(opcional)"
/>
</div> </div>
{/each} {/each}
{/if} {/if}
@ -69,14 +74,14 @@
grid-gap: 0.5rem; grid-gap: 0.5rem;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin: 1rem; margin: 0.25rem 1rem;
background-color: #ddd; background-color: #ddd;
padding: 0.25rem; padding: 0.25rem;
} }
.organization-logo { .organization-logo {
max-height: 64px; max-height: 72px;
max-width: 100px; max-width: 144px;
margin: 0 auto; margin: 0 auto;
background-color: #fff; background-color: #fff;
} }
@ -94,7 +99,7 @@
input { input {
display: block; display: block;
max-width: 100px; width: 100%;
} }
button { button {

@ -35,7 +35,12 @@
x x
</div> </div>
<img class="organized-logo" src={organization.image} alt={organization.text} /> <img class="organized-logo" src={organization.image} alt={organization.text} />
<input class="logo-title" type="text" bind:value={organization.text} /> <input
class="logo-title"
type="text"
bind:value={organization.text}
placeholder="Nombre (opcional)"
/>
</div> </div>
{/each} {/each}
{/if} {/if}
@ -68,13 +73,13 @@
grid-gap: 0.5rem; grid-gap: 0.5rem;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin: 1rem; margin: 0.25rem 1rem;
background-color: #ddd; background-color: #ddd;
padding: 0.25rem; padding: 0.25rem;
} }
.organized-logo { .organized-logo {
max-height: 64px; max-height: 72px;
max-width: 100px; max-width: 128px;
margin: 0 auto; margin: 0 auto;
background-color: #fff; background-color: #fff;
} }
@ -91,7 +96,7 @@
input { input {
display: block; display: block;
max-width: 100px; width: 100%;
} }
button { button {

@ -130,7 +130,7 @@
max-height: 64px; max-height: 64px;
max-width: 128px; max-width: 128px;
margin: 0 auto; margin: 0 auto;
opacity: 75%; opacity: 100%;
} }
.caption { .caption {

@ -5,30 +5,28 @@
/** @type number */ export let templateIndex; /** @type number */ export let templateIndex;
import { date } from '$lib/stores/store'; import { date } from '$lib/stores/store';
/** @typedef /** @type {string} */ let newdate;
* {{
* date: string;
* }} Newdate
*/
/** @type {Newdate} */ let newdate = { date: '' };
const convertDate = (/** @type {(string | undefined)} */ datetime) => { /**
if (datetime == undefined) { * @param {string} date - Fecha del evento
return { * @returns {string} - Fecha en dia (número) mes (letras)
date: '' */
}; const convertDate = (date) => {
if (date == undefined) {
return '';
} }
/** @type {string} */ const monthNumber = datetime.split('-')[1]; /** @type {string} */ const monthNumber = date.split('-')[1];
/** @type {string} */ let day = datetime.split('-')[2].split('T')[0]; /** @type {string} */ let day = date.split('-')[2].split('T')[0];
/** @type {number} */ const dayNumber = Number(day); /** @type {number} */ const dayNumber = Number(day);
/** @type {string} */ const month = getMonthName(monthNumber); /** @type {string} */ const month = getMonthName(monthNumber);
/** Removes 0 on single digit days */
if (dayNumber < 10) { if (dayNumber < 10) {
day = day.charAt(1); day = day.charAt(1);
} }
return {
date: `${day} de ${month}` /** @type {string} */ const res = `${day} ${month}`;
}; return res;
}; };
$: if ($date !== '') { $: if ($date !== '') {
@ -36,7 +34,7 @@
} }
</script> </script>
{#if templates[templateIndex] && newdate.date} {#if templates[templateIndex] && newdate}
<div <div
class="date" class="date"
style=" style="
@ -52,7 +50,7 @@
line-height: {templates[templateIndex].date.lineHeight}rem; line-height: {templates[templateIndex].date.lineHeight}rem;
" "
> >
{newdate.date} {newdate}
</div> </div>
{/if} {/if}

Loading…
Cancel
Save