From 3d631f69b541649aa0c3137c8a8e7183c6ee8e15 Mon Sep 17 00:00:00 2001 From: AlexBocken Date: Mon, 3 Jul 2023 00:09:00 +0200 Subject: [PATCH] Remove unnecessary a11y warnings --- src/lib/components/Card.svelte | 2 +- src/lib/components/CardAdd.svelte | 6 +++-- .../components/CreateIngredientList.svelte | 25 +++++++++++-------- src/lib/components/CreateStepList.svelte | 23 ++++++----------- src/lib/components/SeasonSelect.svelte | 3 ++- src/lib/components/TitleImgParallax.svelte | 7 ------ src/routes/rezepte/add/+page.svelte | 1 - src/routes/rezepte/add/+page.ts | 13 ---------- src/routes/rezepte/edit/[name]/+page.svelte | 6 ----- 9 files changed, 28 insertions(+), 58 deletions(-) delete mode 100644 src/routes/rezepte/add/+page.ts diff --git a/src/lib/components/Card.svelte b/src/lib/components/Card.svelte index 3eddcca..5155ff3 100644 --- a/src/lib/components/Card.svelte +++ b/src/lib/components/Card.svelte @@ -197,7 +197,7 @@ if(icon_override){
{recipe.category}
-
{recipe.name}
+
{@html recipe.name}
{recipe.description}
diff --git a/src/lib/components/CardAdd.svelte b/src/lib/components/CardAdd.svelte index a35f679..f669fbc 100644 --- a/src/lib/components/CardAdd.svelte +++ b/src/lib/components/CardAdd.svelte @@ -346,6 +346,7 @@ input::placeholder{ {#if image_preview_url} + {/if}
@@ -369,9 +370,10 @@ input::placeholder{
{#each card_data.tags as tag} -
{tag}
+ +
{tag}
{/each} -
+
+
+
diff --git a/src/lib/components/CreateIngredientList.svelte b/src/lib/components/CreateIngredientList.svelte index f034e5a..5893d7f 100644 --- a/src/lib/components/CreateIngredientList.svelte +++ b/src/lib/components/CreateIngredientList.svelte @@ -361,6 +361,7 @@ h3{

Zutaten

{#each ingredients as list, list_index} +

{#if list.name } @@ -378,7 +379,9 @@ h3{

{#each list.list as ingredient, ingredient_index} +
show_modal_edit_ingredient(list_index, ingredient_index)} >{ingredient.amount} {ingredient.unit}
+
show_modal_edit_ingredient(list_index, ingredient_index)} >{ingredient.name}
@@ -389,11 +392,11 @@ h3{
- do_on_key(event, 'Enter', false, add_new_ingredient)}> + do_on_key(event, 'Enter', false, add_new_ingredient)}>
- do_on_key(event, 'Enter', false, add_new_ingredient)}> - do_on_key(event, 'Enter', false, add_new_ingredient)}> - do_on_key(event, 'Enter', false, add_new_ingredient)}> + do_on_key(event, 'Enter', false, add_new_ingredient)}> + do_on_key(event, 'Enter', false, add_new_ingredient)}> + do_on_key(event, 'Enter', false, add_new_ingredient)}> @@ -403,11 +406,11 @@ h3{

Zutat verändern

-
do_on_key(event, 'Enter', false, edit_ingredient_and_close_modal)}> - do_on_key(event, 'Enter', false, edit_ingredient_and_close_modal)}> - do_on_key(event, 'Enter', false, edit_ingredient_and_close_modal)}> - do_on_key(event, 'Enter', false, edit_ingredient_and_close_modal)}> -
@@ -417,8 +420,8 @@ h3{

Kategorie umbenennen

- do_on_key(event, 'Enter', false, edit_subheading_and_close_modal)} > -
diff --git a/src/lib/components/CreateStepList.svelte b/src/lib/components/CreateStepList.svelte index 267e43e..4f3ffdc 100644 --- a/src/lib/components/CreateStepList.svelte +++ b/src/lib/components/CreateStepList.svelte @@ -350,17 +350,6 @@ h3{ cursor: pointer; user-select: none; } -.additional_info input{ - all:unset; - display: inline; - width: 10ch; - border-radius: 1000px; - border: 2px solid grey; - padding: 0em 0.5em; -} -.additional_info input::placeholder{ - color: grey; -} .additional_info p[contenteditable]{ display: inline; padding: 0.25em 1em; @@ -416,6 +405,7 @@ h3{

Zubereitung

{#each instructions as list, list_index} +

show_modal_edit_subheading_step(list_index)}> {#if list.name} {list.name} @@ -432,6 +422,7 @@ h3{

    {#each list.steps as step, step_index} +
  1. show_modal_edit_step(list_index, step_index)}>{step}
    - do_on_key(event, 'Enter', false , add_new_step)} > + do_on_key(event, 'Enter', false , add_new_step)} >
    -

    do_on_key(event, 'Enter', true , add_new_step)}>

    +

    do_on_key(event, 'Enter', true , add_new_step)}>

    @@ -459,9 +450,9 @@ h3{

    Schritt verändern

    - do_on_key(event, 'Enter', false , edit_step_and_close_modal)}> + do_on_key(event, 'Enter', false , edit_step_and_close_modal)}>
    -

    do_on_key(event, 'Enter', true , edit_step_and_close_modal)}>

    +

    do_on_key(event, 'Enter', true , edit_step_and_close_modal)}>

    @@ -471,7 +462,7 @@ h3{

    Kategorie umbenennen

    - do_on_key(event, 'Enter', false, edit_subheading_steps_and_close_modal)}> + do_on_key(event, 'Enter', false, edit_subheading_steps_and_close_modal)}> diff --git a/src/lib/components/SeasonSelect.svelte b/src/lib/components/SeasonSelect.svelte index 26c1fd8..1593869 100644 --- a/src/lib/components/SeasonSelect.svelte +++ b/src/lib/components/SeasonSelect.svelte @@ -88,7 +88,8 @@ input[type=checkbox]::after
    {#each months as month}
    - + +
    {/each}
    diff --git a/src/lib/components/TitleImgParallax.svelte b/src/lib/components/TitleImgParallax.svelte index 9049140..d963641 100644 --- a/src/lib/components/TitleImgParallax.svelte +++ b/src/lib/components/TitleImgParallax.svelte @@ -35,13 +35,6 @@ position: relative; margin: 30vh auto 0; } -.blocker{ - display:block; - z-index: 10; - background-color: white; - width: 100%; - height: 20vh; -} .image-container { position: sticky; diff --git a/src/routes/rezepte/add/+page.svelte b/src/routes/rezepte/add/+page.svelte index 1d3394f..0210cc9 100644 --- a/src/routes/rezepte/add/+page.svelte +++ b/src/routes/rezepte/add/+page.svelte @@ -3,7 +3,6 @@ import SeasonSelect from '$lib/components/SeasonSelect.svelte'; import '$lib/css/action_button.css' - export let data: PageData; let preamble = "" let addendum = "" diff --git a/src/routes/rezepte/add/+page.ts b/src/routes/rezepte/add/+page.ts deleted file mode 100644 index 475472d..0000000 --- a/src/routes/rezepte/add/+page.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { PageLoad } from "./$types"; - -export async function load({ fetch }) { - let current_month = new Date().getMonth() + 1 - const res_season = await fetch(`/api/items/category`); - const res_all_brief = await fetch(`/api/items/tag`); - const item_season = await res_season.json(); - const item_all_brief = await res_all_brief.json(); - return { - season: item_season, - all_brief: item_all_brief, - }; -}; diff --git a/src/routes/rezepte/edit/[name]/+page.svelte b/src/routes/rezepte/edit/[name]/+page.svelte index 839186d..2fbab20 100644 --- a/src/routes/rezepte/edit/[name]/+page.svelte +++ b/src/routes/rezepte/edit/[name]/+page.svelte @@ -245,12 +245,6 @@ h1{ h3{ text-align: center; } -.delete{ - position: fixed; - right: 0; - bottom: 0; - margin: 2rem; -}

    Rezept editieren