diff --git a/scripts/addNewRecipeToBook.js b/scripts/addNewRecipeToBook.js index f05f5c7..8f2dae8 100644 --- a/scripts/addNewRecipeToBook.js +++ b/scripts/addNewRecipeToBook.js @@ -53,7 +53,7 @@ async function saveRecipe(recipeData) { async function saveRecipetoAIdataSet(body, id) { try { - const apiUrl = 'https://recipieai.azurewebsites.net/add-recipe-to-dataset'; + const apiUrl = 'http://127.0.0.1:5000/add-recipe-to-dataset'; const photoPathURL = await getPhotoPathURL(id); const new_body = { ...body, photoPathURL }; diff --git a/scripts/recipeDetail.js b/scripts/recipeDetail.js index ab99d45..613d021 100644 --- a/scripts/recipeDetail.js +++ b/scripts/recipeDetail.js @@ -107,7 +107,7 @@ class RecipeDetail { // Update cuisine const cuisineElement = document.getElementById('recipe-cuisine'); - if (selectedRecipe.cuisine) { + if (selectedRecipe.cuisine && selectedRecipe.cuisine.length > 1) { cuisineElement.innerHTML = `

${selectedRecipe.cuisine}

`; } else { cuisineElement.innerHTML = '

No cuisine information available

'; diff --git a/scripts/userRecipeDetail.js b/scripts/userRecipeDetail.js index a585a0b..79b4941 100644 --- a/scripts/userRecipeDetail.js +++ b/scripts/userRecipeDetail.js @@ -84,7 +84,7 @@ class RecipeDetail { } const cuisineElement = document.getElementById('recipe-cuisine'); - if (selectedRecipe.cuisine) { + if (selectedRecipe.cuisine && !selectedRecipe.cuisine.length > 1) { cuisineElement.innerHTML = `

${selectedRecipe.cuisine}

`; } else { cuisineElement.innerHTML = '

No cuisine information available

'; diff --git a/styles/recipeDetail.css b/styles/recipeDetail.css index ec08a07..7335baa 100644 --- a/styles/recipeDetail.css +++ b/styles/recipeDetail.css @@ -6,7 +6,6 @@ --background_color: rgb(205, 199, 208); } - body { font-family: Arial, sans-serif; font-size: larger; @@ -22,13 +21,26 @@ header { padding: 1em; } + +.recipe-ingredients, +.recipe-description, +.recipe-cuisine, +.recipe-meal, +.recipe-prep-time { + margin-bottom: 20px; + padding: 10px; + box-shadow: inset 0 0 30px rgba(48, 3, 42, 0.1); + border-radius: 10px; + text-align: justify; +} + .recipe-container { max-width: 800px; margin: 20px auto; background-color: #fff; padding: 20px; border-radius: 8px; - box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); + box-shadow: 0 0 30px rgba(0, 0, 0, 0.1); } .recipe-image { @@ -36,14 +48,14 @@ header { height: auto; border-radius: 8px; margin-bottom: 20px; + max-width: 500px; + max-height: 500px; + object-fit: cover; + border-radius: 5px; } -.recipe-ingredients { - margin-bottom: 20px; -} - -.recipe-description { - line-height: 1.6; +h2 { + color: var(--dark_purple); } #header-container { @@ -107,6 +119,6 @@ header { font-weight: bold; } -.highlight{ +.highlight { color: red; -} \ No newline at end of file +} diff --git a/styles/userRecipeDetail.css b/styles/userRecipeDetail.css index b6cc6ad..0c5f453 100644 --- a/styles/userRecipeDetail.css +++ b/styles/userRecipeDetail.css @@ -7,6 +7,11 @@ } +h2 { + color: var(--dark_purple); +} + + body { font-family: Arial, sans-serif; font-size: larger; @@ -31,6 +36,18 @@ header { box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); } +.recipe-ingredients, +.recipe-description, +.recipe-cuisine, +.recipe-meal, +.recipe-prep-time { + margin-bottom: 20px; + padding: 10px; + box-shadow: inset 0 0 30px rgba(48, 3, 42, 0.1); + border-radius: 10px; + text-align: justify; +} + .recipe-image { max-width: 100%; height: auto; diff --git a/templates/recipeDetail.html b/templates/recipeDetail.html index 5c184a7..3a25a98 100644 --- a/templates/recipeDetail.html +++ b/templates/recipeDetail.html @@ -21,8 +21,9 @@

Loading...

Delicious Recipe +

Ingredients

-

Ingredients

+
diff --git a/templates/userRecipeDetail.html b/templates/userRecipeDetail.html index 271cd15..a26f7df 100644 --- a/templates/userRecipeDetail.html +++ b/templates/userRecipeDetail.html @@ -21,8 +21,8 @@

Loading...

Delicious Recipe -
-

Ingredients

+

Ingredients

+