From 015172df86335d211db2a68b48058a0c101ddbc9 Mon Sep 17 00:00:00 2001 From: Borja Robert Date: Sun, 25 Sep 2022 13:45:26 +0200 Subject: [PATCH] =?UTF-8?q?a=C3=B1ado=20los=20rudimentos=20de=20form,=20de?= =?UTF-8?q?=20preview=20y=20las=20vinculo=20con=20una=20store?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.css | 5 +++++ src/lib/form/Form.svelte | 34 ++++++++++++++++++++++++++++++++++ src/lib/preview/Preview.svelte | 7 +++++++ src/lib/stores/store.js | 3 +++ src/routes/+layout.svelte | 16 ---------------- src/routes/+page.svelte | 10 ++++++---- 6 files changed, 55 insertions(+), 20 deletions(-) create mode 100644 src/lib/form/Form.svelte create mode 100644 src/lib/preview/Preview.svelte create mode 100644 src/lib/stores/store.js diff --git a/src/app.css b/src/app.css index 77bf6af..a8cfce1 100644 --- a/src/app.css +++ b/src/app.css @@ -1,4 +1,9 @@ @import '@fontsource/fira-mono'; +* { + box-sizing: border-box; + margin: 0; + padding: 0; +} :root { font-family: Arial, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, diff --git a/src/lib/form/Form.svelte b/src/lib/form/Form.svelte new file mode 100644 index 0000000..8420a66 --- /dev/null +++ b/src/lib/form/Form.svelte @@ -0,0 +1,34 @@ + + +
+ + +
+ + diff --git a/src/lib/preview/Preview.svelte b/src/lib/preview/Preview.svelte new file mode 100644 index 0000000..b16e88c --- /dev/null +++ b/src/lib/preview/Preview.svelte @@ -0,0 +1,7 @@ + + +
+ {$title} +
diff --git a/src/lib/stores/store.js b/src/lib/stores/store.js new file mode 100644 index 0000000..3bea4a9 --- /dev/null +++ b/src/lib/stores/store.js @@ -0,0 +1,3 @@ +import {writable} from 'svelte/store' + +export const title = writable(""); diff --git a/src/routes/+layout.svelte b/src/routes/+layout.svelte index ea26203..37e0f42 100644 --- a/src/routes/+layout.svelte +++ b/src/routes/+layout.svelte @@ -8,10 +8,6 @@ - -