Skip to content

Commit

Permalink
added grid and fixed fav btn
Browse files Browse the repository at this point in the history
  • Loading branch information
Piyush-Bhor committed May 3, 2023
1 parent 768ff8c commit e8f2e31
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,22 @@ app.get('/',(req, res) => {
var pageData = {
recipes : {
0 : {
id:0,
title : "Ramen Noodle Coleslaw",
image : "https://spoonacular.com/recipeImages/Ramen-Noodle-Coleslaw-556177.jpg",
},
1 : {
id:1,
title : "Ramen Noodle Coleslaw",
image : "https://spoonacular.com/recipeImages/Ramen-Noodle-Coleslaw-556177.jpg",
},
2 : {
id:2,
title : "Ramen Noodle Coleslaw",
image : "https://spoonacular.com/recipeImages/Ramen-Noodle-Coleslaw-556177.jpg",
},
3 : {
id:3,
title : "Ramen Noodle Coleslaw",
image : "https://spoonacular.com/recipeImages/Ramen-Noodle-Coleslaw-556177.jpg",
}
Expand Down
4 changes: 2 additions & 2 deletions views/home.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@
<div class="col">
<div class="recipe">
<!--onclick="toggleFavourites(pageData.id)""-->
<a href="/add/<%=recipe_id%>">
<i class="fa-solid fa-star" id="<%=recipe_id%>" onclick="toggleFavourites(recipe_id)"></i>
<a href="/add/<%=recipes[3].id%>">
<i class="fa-solid fa-star" id="<%=recipes[3].id%>" onclick="toggleFavourites(recipe_id)"></i>
</a>
<img src="<%= recipes[3].image %>" alt="food" />
<div class="recipe-info">
Expand Down

0 comments on commit e8f2e31

Please sign in to comment.