está el modo básico, falta incluir el espacio para organiza y colaboran y también un campo editable más complejo para contenido

pull/2/head
Borja Robert 2 years ago
parent d41f65e311
commit 32c8875d12

@ -1,5 +1,27 @@
<script> <script>
import {title, subtitle, date, address, content, heading} from '$lib/stores/store' import {title, subtitle, date, address, content, heading} from '$lib/stores/store'
let newdate = "";
const convertDateTime = (datetime) => {
if (datetime == undefined) {
console.log("datetime no existe");
return {
date: "",
time: ""
}
};
const year = datetime.split("-")[0];
const month = datetime.split("-")[1];
const day = datetime.split("-")[2].split("T")[0]
const time = datetime.split("T")[1];
return {
date: `${day}/${month}`,
time: time
}
}
$: if ($date !== "") {newdate = convertDateTime($date)};
</script> </script>
<div class="preview"> <div class="preview">
@ -8,8 +30,9 @@
<div class="title">{$title}</div> <div class="title">{$title}</div>
<div class="subtitle">{$subtitle}</div> <div class="subtitle">{$subtitle}</div>
<div class="content">{$content}</div> <div class="content">{$content}</div>
<div class="date">{$date}</div> {#if newdate}<div class="date">{newdate.date}</div>{/if}
<div class="address">{$address}</div> {#if newdate}<div class="time">{newdate.time}</div>{/if}
<div class="address">{$address}</div>
</div> </div>
</div> </div>
@ -51,6 +74,7 @@
top: 320px; top: 320px;
left: 1rem; left: 1rem;
right: 1rem; right: 1rem;
align-self: center;
font-family: 'Gill Sans', sans-serif; font-family: 'Gill Sans', sans-serif;
font-size: 2.8rem; font-size: 2.8rem;
font-variant: small-caps; font-variant: small-caps;
@ -86,10 +110,19 @@
color: white; color: white;
} }
.time {
position: absolute;
top: 640px;
left: 23rem;
right: 6rem;
font-size: 1.8rem;
color: white;
}
.address { .address {
position: absolute; position: absolute;
top: 620px; top: 620px;
left: 1rem; left: 2rem;
right: 20rem; right: 20rem;
font-size: 1.4rem; font-size: 1.4rem;
font-family: serif; font-family: serif;

Loading…
Cancel
Save