Toggle navigation
Toggle navigation
This project
Loading...
Sign in
구희연
/
Food_recipe_info
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
윤희찬
2021-12-05 01:03:25 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
4ac2b2f6a94eb5d9ab9de69b910b89de87ac560b
4ac2b2f6
1 parent
dfaf523d
Modify RGB
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
main/main.js
main/main.js
View file @
4ac2b2f
...
...
@@ -54,19 +54,19 @@ function boxinfo(results){
<div class="flex-container">
<h1 class="title">
${
result
.
recipe
.
label
}
</h1>
<a href="
${
result
.
recipe
.
url
}
" target="_blank">View Recipe</a>
${(
cal
=>
{
if
(
cal
>=
2000
)
{
return
`<p style="color:red">
${
cal
}
</p>`
;
}
else
if
(
cal
>=
1000
&&
cal
<
2000
){
return
`<p style="color:rgb(245,176,65)">
${
cal
}
</p>`
;
}
else
{
return
`<p style="color:green">
${
cal
}
</p>`
;
}
})(
object
.
cal
)
}
<
/div
>
${(
cal
=>
{
if
(
cal
>=
2000
)
{
return
`<p style="color:red">
${
cal
}
</p>`
;
}
else
if
(
cal
>=
1000
&&
cal
<
2000
){
return
`<p style="color:yellow">
${
cal
}
</p>`
;
}
else
{
return
`<p style="color:green">
${
cal
}
</p>`
;
}
})(
object
.
cal
)
}
<
/div
>
`
})
...
...
Please
register
or
login
to post a comment