mejora estilos un poco

pull/12/head
Borja Robert 2 years ago
parent f607af69d7
commit e9f63f19a2

@ -1,38 +1,16 @@
<script> <script>
/** @type {number} */ export let templateIndex; /** @type {number} */ export let templateIndex;
/** @type {string} */ export let templateImage; /** @type {string} */ export let templateImage;
import { organizedBy, colabs, canvas } from '$lib/stores/store';
import Heading from '$lib/templates/Heading.svelte'; import Heading from '$lib/templates/Heading.svelte';
import Title from '$lib/templates/Title.svelte'; import Title from '$lib/templates/Title.svelte';
import Subtitle from '$lib/templates/Subtitle.svelte'; import Subtitle from '$lib/templates/Subtitle.svelte';
import Content from '$lib/templates/Content.svelte'; import Content from '$lib/templates/Content.svelte';
import { date, weekday, address, organizedBy, colabs, canvas } from '$lib/stores/store';
import { getMonthName } from '$lib/monthName';
import Date from '$lib/templates/Date.svelte'; import Date from '$lib/templates/Date.svelte';
import Weekday from '$lib/templates/Weekday.svelte'; import Weekday from '$lib/templates/Weekday.svelte';
import Address from '$lib/templates/Address.svelte'; import Address from '$lib/templates/Address.svelte';
/** @type {Object<string,string>} */ let newdate = {};
const convertDateTime = (/** @type {string | undefined} */ datetime) => {
if (datetime == undefined) {
return {
date: '',
time: ''
};
}
const monthNumber = datetime.split('-')[1];
const day = datetime.split('-')[2].split('T')[0];
const time = datetime.split('T')[1];
const month = getMonthName(monthNumber);
return {
date: `${day} de ${month}`,
time: time
};
};
$: if ($date !== '') {
newdate = convertDateTime($date);
}
</script> </script>
<div class="preview"> <div class="preview">
@ -45,8 +23,8 @@
<Weekday {templateIndex} /> <Weekday {templateIndex} />
<Date {templateIndex} /> <Date {templateIndex} />
<Address {templateIndex} /> <Address {templateIndex} />
<!-- <div class="address">{$address}</div> -->
{/if} {/if}
{#if $organizedBy[0] && $colabs[0]} {#if $organizedBy[0] && $colabs[0]}
<div class="orgcolab"> <div class="orgcolab">
<div class="org">Organiza:</div> <div class="org">Organiza:</div>
@ -69,6 +47,7 @@
</div> </div>
</div> </div>
{/if} {/if}
{#if $organizedBy[0] && !$colabs[0]} {#if $organizedBy[0] && !$colabs[0]}
<div class="imagetitle">Organiza:</div> <div class="imagetitle">Organiza:</div>
<div class="organized-by"> <div class="organized-by">
@ -80,6 +59,7 @@
{/each} {/each}
</div> </div>
{/if} {/if}
{#if $colabs[0] && !$organizedBy[0]} {#if $colabs[0] && !$organizedBy[0]}
<div class="imagetitle">Colabora:</div> <div class="imagetitle">Colabora:</div>
<div class="organized-by"> <div class="organized-by">
@ -116,14 +96,15 @@
.imagetitle { .imagetitle {
position: absolute; position: absolute;
top: 720px; top: 725px;
font-size: 0.8rem; font-size: 0.8rem;
color: #444; color: #444;
text-transform: uppercase;
} }
.organized-by { .organized-by {
position: absolute; position: absolute;
top: 740px; top: 745px;
left: 1rem; left: 1rem;
right: 1rem; right: 1rem;
display: grid; display: grid;
@ -144,8 +125,8 @@
} }
.organization img { .organization img {
max-height: 48px; max-height: 64px;
max-width: 100px; max-width: 128px;
margin: 0 auto; margin: 0 auto;
opacity: 75%; opacity: 75%;
} }
@ -160,7 +141,7 @@
.orgcolab { .orgcolab {
position: absolute; position: absolute;
top: 720px; top: 725px;
height: 7rem; height: 7rem;
overflow: hidden; overflow: hidden;
display: grid; display: grid;
@ -176,12 +157,14 @@
grid-row: 1/2; grid-row: 1/2;
grid-column: 1/2; grid-column: 1/2;
font-size: 0.8rem; font-size: 0.8rem;
text-transform: uppercase;
} }
.colab { .colab {
font-size: 0.8rem; font-size: 0.8rem;
grid-row: 1/2; grid-row: 1/2;
grid-column: 2/3; grid-column: 2/3;
text-transform: uppercase;
} }
.orgmixed { .orgmixed {

Loading…
Cancel
Save