From c6d23aa13161b816ddd69439abc7e8b68ff51a56 Mon Sep 17 00:00:00 2001 From: Borja Robert Date: Sun, 2 Oct 2022 00:36:05 +0200 Subject: [PATCH] =?UTF-8?q?a=C3=B1ado=20archivos=20para=20ver=20si=20consi?= =?UTF-8?q?go=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 + + + +
+
+
+
+ +