From 6d3a9fad5fd98018f085f15184067e402b05e146 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Kura=C5=84da?= Date: Tue, 23 Aug 2022 14:31:53 +0200 Subject: [PATCH] Render no image photo --- IDEAS.md | 1 + public/css/meals-add-new.css | 4 +- public/icons/no-image.png | Bin 0 -> 1006 bytes src/YummyData.ts | 6 ++ src/YummyRouter.ts | 10 +-- views/layouts/meals-add-new.handlebars | 8 ++- views/layouts/result.handlebars | 6 +- views/layouts/search.handlebars | 88 ++----------------------- 8 files changed, 28 insertions(+), 95 deletions(-) create mode 100644 public/icons/no-image.png 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 0000000000000000000000000000000000000000..a1ff5970a56d3d5cb030d7bbd61f61ef7798ee97 GIT binary patch literal 1006 zcmV{4+6c8aIDClWOT5f?$ zfSw|vq00>*k z6o(Ot!wAJ;gkqFE;3aT6@LC8()vlr$ZzvRJAVP5nA{2)pv!V-q^JE19p)^f)5D-d} z6afLD)J-uE5K5gC1p%SNQXB+?GAkw^Ae3n_0|B9gVhRF6nT$CI2xWg;8~#U zA)=UroC973+8rv2Dad)?O`y#oqnLqQ;NXuC2*n8GBJd^9mQV~pE&<;I?FgkxQIH$J zk3bu3tHg)L72w^da{dZZF_2rp@4)-JFjH11+Q>Q6ih$e!{si9J1(ZpQ+$dQ==776_ z_jCni8b(f(Y#>K~`+@Ddf)c~Xg^~qif&W)*yM|I1BL_-ykZCKnT|sGzks2i_NNmN{ zqMF_kxA|^;ivPzX1F5@W>wTuQt+q2I2}siwTdSFJDsViZnbNk}%#_w3hh4EPT@Qiz zDaYh#rnClWvtnDSHkghvj+dFz8pL~rFy`@l`sy`E=rnZ{c!1vveQ!Y?5uO=`eZ;73 z)txE51vxX(?@0`=D1!i*hT##Vw;-ETC}*ioU$O1Ip!62xFy-MwFOZ3{MiEG$EKvk9 zrL0f{GNUX|1QMyzcV7ajQIwy^>N;KAkVqK+CqOl$j4^p}2Vxly9A9srM(6D1n!gZEmwP@=IuaL<(kB^v94_Fkz`l#J=> z7g2j1p*W0C97ZS(BNT@bio;C%dfgSvP7OUFl((imQVyVeu

{{meal.title}}

{{meal.description}}

{{mealType}}

-
{{meal.title}} photo
+
+ {{#if meal.image}} + {{meal.title}} photo + {{else}} + {{meal.title}} no photo + {{/if}} +
    {{#each ingredients as |ing|}} diff --git a/views/layouts/result.handlebars b/views/layouts/result.handlebars index 7247651..f7bbda7 100644 --- a/views/layouts/result.handlebars +++ b/views/layouts/result.handlebars @@ -4,7 +4,11 @@ >Wróć do wyszukiwania
Zdjęcie posiłku o nazwie {{meal.title}}
diff --git a/views/layouts/search.handlebars b/views/layouts/search.handlebars index 41f64d5..e5ab43f 100644 --- a/views/layouts/search.handlebars +++ b/views/layouts/search.handlebars @@ -55,7 +55,11 @@ {{#each meals as |meal| }}
+ {{#if meal.image}} Zdjęcie posiłku o nazwie {{meal.title}} + {{else}} + Brak zdjęcia posiłku o nazwie {{meal.title}} + {{/if}}
@@ -68,90 +72,6 @@
{{/each}} -
-
- img-title -
-
-
-
Tytuł
-
Opis tego czegoś
-
-
- -
-
-
-
-
- img-title -
-
-
-
Tytuł
-
Opis tego czegoś
-
-
- -
-
-
-
-
- img-title -
-
-
-
Tytuł
-
Opis tego czegoś
-
-
- -
-
-
-
-
- img-title -
-
-
-
Tytuł
-
Opis tego czegoś
-
-
- -
-
-
-
-
- img-title -
-
-
-
Tytuł
-
Opis tego czegoś
-
-
- -
-
-
-
-
- img-title -
-
-
-
Tytuł
-
Opis tego czegoś
-
-
- -
-
-

Brakuje szukanego posiłku? Dodaj go!