Showing
1 changed file
with
12 additions
and
12 deletions
... | @@ -54,19 +54,19 @@ function boxinfo(results){ | ... | @@ -54,19 +54,19 @@ function boxinfo(results){ |
54 | <div class="flex-container"> | 54 | <div class="flex-container"> |
55 | <h1 class="title">${result.recipe.label}</h1> | 55 | <h1 class="title">${result.recipe.label}</h1> |
56 | <a href="${result.recipe.url}" target="_blank">View Recipe</a> | 56 | <a href="${result.recipe.url}" target="_blank">View Recipe</a> |
57 | + ${(cal => { | ||
58 | + if (cal >= 2000) { | ||
59 | + return `<p style="color:red">${cal}</p>`; | ||
60 | + } | ||
61 | + else if(cal >= 1000 && cal < 2000){ | ||
62 | + return `<p style="color:rgb(245,176,65)">${cal}</p>`; | ||
63 | + } | ||
64 | + else { | ||
65 | + return `<p style="color:green">${cal}</p>`; | ||
66 | + } | ||
67 | + })(object.cal) | ||
68 | + } | ||
57 | </div> | 69 | </div> |
58 | - ${(cal => { | ||
59 | - if (cal >= 2000) { | ||
60 | - return `<p style="color:red">${cal}</p>`; | ||
61 | - } | ||
62 | - else if(cal >= 1000 && cal < 2000){ | ||
63 | - return `<p style="color:yellow">${cal}</p>`; | ||
64 | - } | ||
65 | - else { | ||
66 | - return `<p style="color:green">${cal}</p>`; | ||
67 | - } | ||
68 | - })(object.cal) | ||
69 | - } | ||
70 | </div> | 70 | </div> |
71 | ` | 71 | ` |
72 | }) | 72 | }) | ... | ... |
-
Please register or login to post a comment