diff --git a/src/lib/preview/Preview.svelte b/src/lib/preview/Preview.svelte
index 424992f..62c9748 100644
--- a/src/lib/preview/Preview.svelte
+++ b/src/lib/preview/Preview.svelte
@@ -1,6 +1,5 @@
-
-
+
+ {$heading}
-
diff --git a/src/lib/templates/templates.js b/src/lib/templates/templates.js
index 289d461..a9a8dcb 100644
--- a/src/lib/templates/templates.js
+++ b/src/lib/templates/templates.js
@@ -1,15 +1,26 @@
import { verde } from '$lib/templates/verde';
+/**
+* @typedef {{
+* top: number;
+* height: number;
+* right: number;
+* left: number;
+* color: string;
+* fontSize: number;
+* fontFamily: string;
+}} Element
+*/
/**
* @typedef {{
* name: string;
- * heading: Object;
- * title: string;
- * subtitle: string;
- * datetime: string;
- * weekday: string;
- * content: string;
- * address: string;
+ * heading: Element;
+ * title: Element;
+ * subtitle: Element;
+ * datetime: Element;
+ * weekday: Element;
+ * content: Element;
+ * address: Element;
* }} Template
*/
diff --git a/src/lib/templates/verde.js b/src/lib/templates/verde.js
index 0ec4041..bf6982c 100644
--- a/src/lib/templates/verde.js
+++ b/src/lib/templates/verde.js
@@ -12,18 +12,66 @@
export const verde = {
name: "verde",
heading: {
- top: "50px",
- bottom: "120px",
- left: "5rem",
- right: "5rem",
- fontSize: "1rem",
- color: "blue",
-
+ top: 300,
+ height: 1.2,
+ left: 1,
+ right: 1,
+ fontSize: 1,
+ color: "grey",
+ fontFamily: "sans-serif"
+ },
+ title: {
+ top: 100,
+ height: 6,
+ left: 2,
+ right: 2,
+ fontSize: 1.8,
+ color: "firebrick",
+ fontFamily: "Gill Sans, sans-serif"
+ },
+ subtitle: {
+ top: 100,
+ height: 6,
+ left: 2,
+ right: 2,
+ fontSize: 1.8,
+ color: "firebrick",
+ fontFamily: "Gill Sans, sans-serif"
+ },
+ content: {
+ top: 100,
+ height: 6,
+ left: 2,
+ right: 2,
+ fontSize: 1.8,
+ color: "firebrick",
+ fontFamily: "Gill Sans, sans-serif"
+ },
+ datetime: {
+ top: 400,
+ height: 4,
+ left: 2,
+ right: 2,
+ fontSize: 1,
+ color: "firebrick",
+ fontFamily: "sans-serif"
+ },
+ weekday: {
+ top: 500,
+ height: 1.5,
+ left: 2,
+ right: 2,
+ fontSize: 1,
+ color: "#333",
+ fontFamily: "sans-serif"
+ },
+ address: {
+ top: 500,
+ height: 1.5,
+ left: 2,
+ right: 2,
+ fontSize: 1,
+ color: "#333",
+ fontFamily: "sans-serif"
},
- title: "title",
- subtitle: "subtitle",
- content: "content",
- datetime: "datetime",
- weekday: "weekday",
- address: "address",
}
diff --git a/src/routes/[slug]/+page.svelte b/src/routes/[slug]/+page.svelte
index 6421648..3c04646 100644
--- a/src/routes/[slug]/+page.svelte
+++ b/src/routes/[slug]/+page.svelte
@@ -5,10 +5,7 @@
import Preview from '$lib/preview/Preview.svelte';
const slug = data.slug;
- const i = templates.map((e) => e.name).indexOf(slug);
-
- const template = templates[i];
- console.log('La plantilla es ', template);
+ const templateIndex = templates.map((e) => e.name).indexOf(slug);
@@ -21,7 +18,7 @@