From b9ba610251c848d8b8a834e54010924d876442f1 Mon Sep 17 00:00:00 2001 From: Borja Robert Date: Fri, 30 Sep 2022 16:23:01 +0200 Subject: [PATCH 01/13] =?UTF-8?q?empiezo=20lo=20dif=C3=ADcil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/routes/+page.svelte | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 8954221..91e25d4 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,8 +1,6 @@ -- 2.38.5 From c6d23aa13161b816ddd69439abc7e8b68ff51a56 Mon Sep 17 00:00:00 2001 From: Borja Robert Date: Sun, 2 Oct 2022 00:36:05 +0200 Subject: [PATCH 02/13] =?UTF-8?q?a=C3=B1ado=20archivos=20para=20ver=20si?= =?UTF-8?q?=20consigo=20usar=20plantillas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/templates/Template.svelte | 2 -- src/lib/templates/templates.js | 6 +++++ src/lib/templates/verde.js | 18 +++++++++++++ src/routes/+page.svelte | 2 ++ src/routes/[slug]/+page.js | 7 +++++ src/routes/[slug]/+page.svelte | 45 +++++++++++++++++++++++++++++++ 6 files changed, 78 insertions(+), 2 deletions(-) delete mode 100644 src/lib/templates/Template.svelte create mode 100644 src/lib/templates/templates.js create mode 100644 src/lib/templates/verde.js create mode 100644 src/routes/[slug]/+page.js create mode 100644 src/routes/[slug]/+page.svelte diff --git a/src/lib/templates/Template.svelte b/src/lib/templates/Template.svelte deleted file mode 100644 index 49f5fcd..0000000 --- a/src/lib/templates/Template.svelte +++ /dev/null @@ -1,2 +0,0 @@ - diff --git a/src/lib/templates/templates.js b/src/lib/templates/templates.js new file mode 100644 index 0000000..675482b --- /dev/null +++ b/src/lib/templates/templates.js @@ -0,0 +1,6 @@ +import { verde } from '$lib/templates/verde'; +/** +* @type {Array} +*/ +export const templates = []; +templates.push(verde); diff --git a/src/lib/templates/verde.js b/src/lib/templates/verde.js new file mode 100644 index 0000000..29d13a1 --- /dev/null +++ b/src/lib/templates/verde.js @@ -0,0 +1,18 @@ +export const verde = { + name: "verde", + heading: { + top: "50px", + bottom: "120px", + left: "5rem", + right: "5rem", + fontSize: "1rem", + color: "blue", + + }, + title: "title", + subtitle: "subtitle", + content: "content", + datetime: "datetime", + weekday: "weekday", + address: "address", +} diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 91e25d4..8954221 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -1,6 +1,8 @@ diff --git a/src/routes/[slug]/+page.js b/src/routes/[slug]/+page.js new file mode 100644 index 0000000..cd69885 --- /dev/null +++ b/src/routes/[slug]/+page.js @@ -0,0 +1,7 @@ +/** @type {import('./$types').PageLoad} */ +export function load(event) { + const slug = event.params.slug; + return { + slug + } +} diff --git a/src/routes/[slug]/+page.svelte b/src/routes/[slug]/+page.svelte new file mode 100644 index 0000000..6421648 --- /dev/null +++ b/src/routes/[slug]/+page.svelte @@ -0,0 +1,45 @@ + + + + Carteles DMD + + + +
+
+
+
+ + -- 2.38.5 From b1083c934e5127032e64f565de78fc650a8dea1c Mon Sep 17 00:00:00 2001 From: Borja Robert Date: Sun, 2 Oct 2022 01:39:09 +0200 Subject: [PATCH 03/13] pruebas locas --- src/lib/preview/Preview.svelte | 5 ++++- src/lib/templates/heading.svelte | 15 +++++++++++++++ src/lib/templates/templates.js | 16 ++++++++++++++-- src/lib/templates/verde.js | 11 +++++++++++ 4 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 src/lib/templates/heading.svelte diff --git a/src/lib/preview/Preview.svelte b/src/lib/preview/Preview.svelte index c8b0e53..424992f 100644 --- a/src/lib/preview/Preview.svelte +++ b/src/lib/preview/Preview.svelte @@ -1,5 +1,7 @@ + +
+ +
+ + + diff --git a/src/lib/templates/templates.js b/src/lib/templates/templates.js index 675482b..289d461 100644 --- a/src/lib/templates/templates.js +++ b/src/lib/templates/templates.js @@ -1,6 +1,18 @@ import { verde } from '$lib/templates/verde'; + /** -* @type {Array} -*/ + * @typedef {{ + * name: string; + * heading: Object; + * title: string; + * subtitle: string; + * datetime: string; + * weekday: string; + * content: string; + * address: string; + * }} Template + */ + +/** @type Array