From 392592a0c9a2c3738275f7600ddc473aab47a2c4 Mon Sep 17 00:00:00 2001 From: Borja Robert Date: Mon, 3 Oct 2022 00:34:00 +0200 Subject: [PATCH] =?UTF-8?q?a=C3=B1ade=20plantilla=20azul=20sin=20definir?= =?UTF-8?q?=20pero=20ya=20funcoina=20la=20imagen=20y=20el=20enlace=20y=20t?= =?UTF-8?q?odo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/lib/templates/azul.js | 88 +++++++++++++++++++++++++++++++++ src/lib/templates/templates.js | 32 +++++++++++- src/lib/templates/verde.js | 30 +---------- src/routes/+page.svelte | 12 ++++- static/azul.png | Bin 0 -> 270543 bytes 5 files changed, 132 insertions(+), 30 deletions(-) create mode 100644 src/lib/templates/azul.js create mode 100644 static/azul.png diff --git a/src/lib/templates/azul.js b/src/lib/templates/azul.js new file mode 100644 index 0000000..3b12e2b --- /dev/null +++ b/src/lib/templates/azul.js @@ -0,0 +1,88 @@ +import '$lib/templates/templates' + +/** @type {import('$lib/templates/templates').Template} */ +export const azul = { + name: "azul", + image: "azul.png", + heading: { + top: 300, + height: 1.2, + left: 1, + right: 1, + fontSize: 1, + color: "grey", + fontFamily: "sans-serif", + lineHeight: 1.1 + }, + title: { + top: 320, + height: 6, + left: 1, + right: 1, + fontSize: 2.9, + color: "firebrick", + fontFamily: "Gill Sans, sans-serif", + lineHeight: 2.5 + + }, + subtitle: { + top: 420, + height: 3, + left: 1, + right: 2, + fontSize: 1.2, + color: "#787", + fontFamily: "Gill Sans, sans-serif", + lineHeight: 1.5 + }, + content: { + top: 480, + height: 8.5, + left: 1.5, + right: 17, + fontSize: 0.8, + color: "#222", + fontFamily: "sans-serif", + lineHeight: 1.1 + }, + date: { + top: 625, + height: 4, + left: 18.5, + right: 4, + fontSize: 1.1, + color: "#fff", + fontFamily: "sans-serif", + lineHeight: 1 + }, + time: { + top: 645, + height: 2, + left: 18.5, + right: 5, + fontSize: 1.8, + color: "#fff", + fontFamily: "sans-serif", + lineHeight: 1 + }, + weekday: { + top: 600, + height: 1.5, + left: 18.5, + right: 5, + fontSize: 1.3, + color: "#fff", + fontFamily: "sans-serif", + lineHeight: 1.8 + }, + address: { + top: 625, + height: 4.5, + left: 2, + right: 20, + fontSize: 1, + color: "firebrick", + fontFamily: "sans-serif", + lineHeight: 1.5 + }, +} \ No newline at end of file diff --git a/src/lib/templates/templates.js b/src/lib/templates/templates.js index f2e2e62..701d485 100644 --- a/src/lib/templates/templates.js +++ b/src/lib/templates/templates.js @@ -1,4 +1,34 @@ import { verde } from '$lib/templates/verde'; -/** @type Array */ +import { azul } from '$lib/templates/azul'; +/** +* @typedef {{ +* top: number; +* height: number; +* right: number; +* left: number; +* color: string; +* fontSize: number; +* fontFamily: string; +* lineHeight: number; +* }} Element +*/ + +/** +* @typedef {{ +* name: string; +* image: string; +* heading: Element; +* title: Element; +* subtitle: Element; +* date: Element; +* time: Element; +* weekday: Element; +* content: Element; +* address: Element; +* }} Template +*/ + +/** @type Array