From 24619de64eedd22ef10f687486a93ce648746958 Mon Sep 17 00:00:00 2001 From: AlexBocken Date: Wed, 21 Jun 2023 22:54:16 +0200 Subject: [PATCH] Image upload stylized --- src/lib/components/ActionButton.svelte | 78 ++++++ src/lib/components/AddButton.svelte | 6 + src/lib/components/CardAdd.svelte | 354 +++++++++++++++++++++++++ src/lib/components/EditButton.svelte | 7 + src/lib/components/TagSelector.svelte | 0 src/routes/rezepte/add/+page.svelte | 8 +- 6 files changed, 447 insertions(+), 6 deletions(-) create mode 100644 src/lib/components/ActionButton.svelte create mode 100644 src/lib/components/AddButton.svelte create mode 100644 src/lib/components/CardAdd.svelte create mode 100644 src/lib/components/EditButton.svelte create mode 100644 src/lib/components/TagSelector.svelte diff --git a/src/lib/components/ActionButton.svelte b/src/lib/components/ActionButton.svelte new file mode 100644 index 0000000..b54d420 --- /dev/null +++ b/src/lib/components/ActionButton.svelte @@ -0,0 +1,78 @@ + + + + + + diff --git a/src/lib/components/AddButton.svelte b/src/lib/components/AddButton.svelte new file mode 100644 index 0000000..382e829 --- /dev/null +++ b/src/lib/components/AddButton.svelte @@ -0,0 +1,6 @@ + + + + diff --git a/src/lib/components/CardAdd.svelte b/src/lib/components/CardAdd.svelte new file mode 100644 index 0000000..3278066 --- /dev/null +++ b/src/lib/components/CardAdd.svelte @@ -0,0 +1,354 @@ + + + + +
+ + {#if image_preview_url} + + {/if} +
+ {#if image_preview_url} + + {/if} + + + +
+ +
+ +
+ + +
+
+ {#each tags as tag} +
{tag}
+ {/each} +
+
+
+
+
diff --git a/src/lib/components/EditButton.svelte b/src/lib/components/EditButton.svelte new file mode 100644 index 0000000..3b93ce8 --- /dev/null +++ b/src/lib/components/EditButton.svelte @@ -0,0 +1,7 @@ + + + + diff --git a/src/lib/components/TagSelector.svelte b/src/lib/components/TagSelector.svelte new file mode 100644 index 0000000..e69de29 diff --git a/src/routes/rezepte/add/+page.svelte b/src/routes/rezepte/add/+page.svelte index 7dc7899..fdc536d 100644 --- a/src/routes/rezepte/add/+page.svelte +++ b/src/routes/rezepte/add/+page.svelte @@ -6,7 +6,7 @@ let description let datecreated = new Date() let datemodified = datecreated - let tags : string[] = [] + let tags import type { PageData } from './$types'; import CardAdd from '$lib/components/CardAdd.svelte'; @@ -61,15 +61,11 @@ input{ - - - - -

Zutaten

Zubereitung

+

Zutaten