From 4afaf7f6f31048768eedcb303bd2352175d80180 Mon Sep 17 00:00:00 2001 From: AlexBocken Date: Thu, 22 Jun 2023 20:26:48 +0200 Subject: [PATCH] functioning Add recipe (not submitting) missing: season modals partly stylized add steps stylized --- src/lib/assets/icons/Check.svelte | 3 + src/lib/assets/icons/Cross.svelte | 4 + src/lib/assets/icons/Pen.svelte | 3 + src/lib/assets/icons/Plus.svelte | 33 ++ src/lib/assets/icons/Upload.svelte | 3 + src/lib/components/CardAdd.svelte | 15 +- .../components/CreateIngredientList.svelte | 151 +++++++++ src/lib/components/CreateStepList.svelte | 298 ++++++++++++++++++ src/routes/rezepte/add/+page.svelte | 63 +++- 9 files changed, 555 insertions(+), 18 deletions(-) create mode 100644 src/lib/assets/icons/Check.svelte create mode 100644 src/lib/assets/icons/Cross.svelte create mode 100644 src/lib/assets/icons/Pen.svelte create mode 100644 src/lib/assets/icons/Plus.svelte create mode 100644 src/lib/assets/icons/Upload.svelte create mode 100644 src/lib/components/CreateIngredientList.svelte create mode 100644 src/lib/components/CreateStepList.svelte diff --git a/src/lib/assets/icons/Check.svelte b/src/lib/assets/icons/Check.svelte new file mode 100644 index 0000000..8fde514 --- /dev/null +++ b/src/lib/assets/icons/Check.svelte @@ -0,0 +1,3 @@ + + diff --git a/src/lib/assets/icons/Cross.svelte b/src/lib/assets/icons/Cross.svelte new file mode 100644 index 0000000..f4dec21 --- /dev/null +++ b/src/lib/assets/icons/Cross.svelte @@ -0,0 +1,4 @@ + + + diff --git a/src/lib/assets/icons/Pen.svelte b/src/lib/assets/icons/Pen.svelte new file mode 100644 index 0000000..4f21de0 --- /dev/null +++ b/src/lib/assets/icons/Pen.svelte @@ -0,0 +1,3 @@ + + diff --git a/src/lib/assets/icons/Plus.svelte b/src/lib/assets/icons/Plus.svelte new file mode 100644 index 0000000..a5948c7 --- /dev/null +++ b/src/lib/assets/icons/Plus.svelte @@ -0,0 +1,33 @@ + + + diff --git a/src/lib/assets/icons/Upload.svelte b/src/lib/assets/icons/Upload.svelte new file mode 100644 index 0000000..f3a0947 --- /dev/null +++ b/src/lib/assets/icons/Upload.svelte @@ -0,0 +1,3 @@ + + diff --git a/src/lib/components/CardAdd.svelte b/src/lib/components/CardAdd.svelte index 3278066..87d9239 100644 --- a/src/lib/components/CardAdd.svelte +++ b/src/lib/components/CardAdd.svelte @@ -1,4 +1,7 @@ + + + + +{#each ingredients_lists as list, list_index} +

+ {#if list.name} + {list.name} + {:else} + Leer + {/if} + + +

+ +{/each} + + +
+ + + + + +
+ + + + + + + + + + + + + diff --git a/src/lib/components/CreateStepList.svelte b/src/lib/components/CreateStepList.svelte new file mode 100644 index 0000000..1972556 --- /dev/null +++ b/src/lib/components/CreateStepList.svelte @@ -0,0 +1,298 @@ + + + + + + +{#each instructions as list, list_index} +

+ {#if list.name} + {list.name} + {:else} + Leer + {/if} + + +

+
    + {#each list.steps as step, step_index} +
  1. {step} + + + +
  2. + {/each} +
+{/each} + +
+ +
+

+ + +
+
+ +

Schritt verändern

+
+ +
+

+ +
+
+ + + + + diff --git a/src/routes/rezepte/add/+page.svelte b/src/routes/rezepte/add/+page.svelte index fdc536d..4c09ffd 100644 --- a/src/routes/rezepte/add/+page.svelte +++ b/src/routes/rezepte/add/+page.svelte @@ -13,6 +13,8 @@ import MediaScroller from '$lib/components/MediaScroller.svelte'; import Card from '$lib/components/Card.svelte'; import Search from '$lib/components/Search.svelte'; + import CreateIngredientList from '$lib/components/CreateIngredientList.svelte'; + import CreateStepList from '$lib/components/CreateStepList.svelte'; export let data: PageData; export let current_month = new Date().getMonth() + 1 async function doPost () { @@ -43,6 +45,7 @@ console.log(result) } +

Rezept hinzufĂźgen

@@ -62,21 +106,6 @@ input{

Zutaten

- +

Zubereitung

- - -

Zutaten

- - +