diff --git a/IDEAS.md b/IDEAS.md index 564d67d..9b40b3a 100644 --- a/IDEAS.md +++ b/IDEAS.md @@ -8,6 +8,7 @@ - Edition of existing meals - you can edit anything you want apart from the title - because it occurs as the name. - Each result has a property called `relevance` - could be measured as a percentage. The found results should be sorted according to the this property. - Better handling MongoDB errors - types of errors and their communicates. +- Improved README and guide for developers how to add ingredients and other things. ## Bugs diff --git a/public/css/meals-add-new.css b/public/css/meals-add-new.css index ac1a031..a662aaa 100644 --- a/public/css/meals-add-new.css +++ b/public/css/meals-add-new.css @@ -31,8 +31,8 @@ body { margin-left: 0.5em; } -.new-meal-ingredients-container > ul > li > i + span { - margin-left: 0.5em; +.new-meal-ingredients-container > ul > li > img + span { + margin-left: 0.2em; } .new-meal-ingredients-container > ul > li > span { diff --git a/public/icons/no-image.png b/public/icons/no-image.png new file mode 100644 index 0000000..a1ff597 Binary files /dev/null and b/public/icons/no-image.png differ diff --git a/src/YummyData.ts b/src/YummyData.ts index 735765b..5514e4d 100644 --- a/src/YummyData.ts +++ b/src/YummyData.ts @@ -61,6 +61,12 @@ export const icons = { undefined, "https://icons8.com/icon/13296/list-view" ), + noImage: new Icon( + "no-image", + "", + undefined, + "https://icons8.com/icon/1G2BW7-tQJJJ/no-image" + ), // Food - berries blueberry: new Icon( "blueberry", diff --git a/src/YummyRouter.ts b/src/YummyRouter.ts index c0cd562..2b9c495 100644 --- a/src/YummyRouter.ts +++ b/src/YummyRouter.ts @@ -85,13 +85,7 @@ export class YummyRouter { }, mealTypes: mealTypes, meals: meals, - }); - } - - private result(req: Request, res: Response): void { - res.render("result", { - elements: elements.result, - isNotMain: res.req.url !== "/", + noImage: icons.noImage, }); } @@ -114,6 +108,7 @@ export class YummyRouter { meal: meal, ingredients: ings, sourceUrl: `/search?${res.req.url.split("?")[1] ?? ""}`, + noImage: icons.noImage, }); } @@ -168,6 +163,7 @@ export class YummyRouter { meal: newMeal, mealType: Type[newMeal.type as keyof typeof Type], ingredients: ings, + noImage: icons.noImage, }); } catch (err: any) { console.log(err); diff --git a/views/layouts/meals-add-new.handlebars b/views/layouts/meals-add-new.handlebars index 943f413..cf5893c 100644 --- a/views/layouts/meals-add-new.handlebars +++ b/views/layouts/meals-add-new.handlebars @@ -11,7 +11,13 @@
{{meal.description}}
{{mealType}}
Brakuje szukanego posiłku? Dodaj go!