From 0bc0cad4dcb044231cc5d80468ee0d2e25772191 Mon Sep 17 00:00:00 2001 From: Pau Figueras Date: Mon, 11 Mar 2024 19:23:04 +0100 Subject: [PATCH] Nous components --- src/lib/about.svelte | 9 ++++++--- src/lib/code.svelte | 4 ++++ src/lib/link.svelte | 18 ++++++++++++++++++ src/lib/sqmenu.svelte | 4 ++-- src/lib/title.svelte | 4 ++++ src/lib/types/link.ts | 5 +++++ src/lib/ubication.svelte | 4 ++++ 7 files changed, 43 insertions(+), 5 deletions(-) create mode 100644 src/lib/code.svelte create mode 100644 src/lib/link.svelte create mode 100644 src/lib/title.svelte create mode 100644 src/lib/types/link.ts create mode 100644 src/lib/ubication.svelte diff --git a/src/lib/about.svelte b/src/lib/about.svelte index 8e233c5..256ea69 100644 --- a/src/lib/about.svelte +++ b/src/lib/about.svelte @@ -5,10 +5,13 @@ export let headerImage: string | null = null; export let imageDesc: string = ''; -
+
{#if headerImage} {/if} -

About {who}

- +

About {who}

+
+
+ +
diff --git a/src/lib/code.svelte b/src/lib/code.svelte new file mode 100644 index 0000000..6289b18 --- /dev/null +++ b/src/lib/code.svelte @@ -0,0 +1,4 @@ + + + + diff --git a/src/lib/link.svelte b/src/lib/link.svelte new file mode 100644 index 0000000..2da64ad --- /dev/null +++ b/src/lib/link.svelte @@ -0,0 +1,18 @@ + + + {#if asCode} + {text} + {:else} + {text} + {/if} + diff --git a/src/lib/sqmenu.svelte b/src/lib/sqmenu.svelte index fdfb14c..d61d76f 100644 --- a/src/lib/sqmenu.svelte +++ b/src/lib/sqmenu.svelte @@ -2,10 +2,10 @@ export let menudata: {menuName: string, menuLink: string}[] = []; $: colNum = (Math.floor(menudata.length / 2) < 3) ? Math.floor(menudata.length / 2) : 3; -
+
{#each menudata as menu} -
+

{menu.menuName}

diff --git a/src/lib/title.svelte b/src/lib/title.svelte new file mode 100644 index 0000000..2be9270 --- /dev/null +++ b/src/lib/title.svelte @@ -0,0 +1,4 @@ + +

{title}

diff --git a/src/lib/types/link.ts b/src/lib/types/link.ts new file mode 100644 index 0000000..3ab363a --- /dev/null +++ b/src/lib/types/link.ts @@ -0,0 +1,5 @@ +export type LinkUnderline = boolean | 'hover' | undefined; +export type LinkTarget = '_blank' | '_self' | undefined; +export type LinkReferrer = 'no-referrer' | 'no-referrer-when-downgrade' | 'origin' | 'origin-when-cross-origin' | 'same-origin' | 'strict-origin' | 'strict-origin-when-cross-origin' | 'unsafe-url' | undefined; +export type LinkText = string; +export type LinkHref = string; diff --git a/src/lib/ubication.svelte b/src/lib/ubication.svelte new file mode 100644 index 0000000..f817d38 --- /dev/null +++ b/src/lib/ubication.svelte @@ -0,0 +1,4 @@ + + + +