|
|
@ -15,6 +15,7 @@
|
|
|
|
} from '$lib/stores/store';
|
|
|
|
} from '$lib/stores/store';
|
|
|
|
|
|
|
|
|
|
|
|
/** @type {HTMLDivElement} */ let editor;
|
|
|
|
/** @type {HTMLDivElement} */ let editor;
|
|
|
|
|
|
|
|
/** @type {HTMLDivElement} */ let editor2;
|
|
|
|
|
|
|
|
|
|
|
|
const handleSubmit = async () => {
|
|
|
|
const handleSubmit = async () => {
|
|
|
|
console.log('submit');
|
|
|
|
console.log('submit');
|
|
|
@ -33,10 +34,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
const downloadCanvas = async () => {
|
|
|
|
const downloadCanvas = async () => {
|
|
|
|
if ($canvas !== undefined) {
|
|
|
|
if ($canvas !== undefined) {
|
|
|
|
const res = await html2canvas($canvas, { backgroundColor: '#fffffff' });
|
|
|
|
const res = await html2canvas($canvas, { scale: 2 });
|
|
|
|
const image = res.toDataURL('image/png');
|
|
|
|
const image = res.toDataURL('image/png');
|
|
|
|
const link = document.createElement('a');
|
|
|
|
const link = document.createElement('a');
|
|
|
|
link.download = 'cartel.png';
|
|
|
|
const city = $address.split('\n');
|
|
|
|
|
|
|
|
link.download = `${$date.split('T')[0]}-${city[city.length - 1]}-cartel.png`;
|
|
|
|
link.href = image;
|
|
|
|
link.href = image;
|
|
|
|
link.click();
|
|
|
|
link.click();
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -101,7 +103,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
|
|
|
<div class="form-group">
|
|
|
|
<label for="address">Dirección</label>
|
|
|
|
<label for="address">Dirección</label>
|
|
|
|
<input bind:value={$address} type="text" name="address" />
|
|
|
|
<textarea bind:value={$address} type="text" name="address" />
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group media">
|
|
|
|
<div class="form-group media">
|
|
|
@ -131,6 +133,16 @@
|
|
|
|
padding: 0.45rem;
|
|
|
|
padding: 0.45rem;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
textarea {
|
|
|
|
|
|
|
|
display: block;
|
|
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
font-size: 0.8rem;
|
|
|
|
|
|
|
|
font-family: sans-serif;
|
|
|
|
|
|
|
|
padding: 0.5rem;
|
|
|
|
|
|
|
|
min-height: 5rem;
|
|
|
|
|
|
|
|
line-height: 1.3rem;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
label {
|
|
|
|
label {
|
|
|
|
display: block;
|
|
|
|
display: block;
|
|
|
|
font-size: 0.8rem;
|
|
|
|
font-size: 0.8rem;
|
|
|
|