From e3cf414fb745bf15048ce65bea9c891fd3d64b15 Mon Sep 17 00:00:00 2001 From: kpomm Date: Wed, 25 Oct 2023 13:49:43 -0400 Subject: [PATCH] Minor styling changes --- src/components/RecipeDetail.jsx | 44 +++++++++++++------------- src/style.scss | 56 ++++++++++++++++++--------------- 2 files changed, 53 insertions(+), 47 deletions(-) diff --git a/src/components/RecipeDetail.jsx b/src/components/RecipeDetail.jsx index 50ad81e..090ced6 100644 --- a/src/components/RecipeDetail.jsx +++ b/src/components/RecipeDetail.jsx @@ -44,35 +44,37 @@ function RecipeDetail({ recipe, marketsPromise }) { return (
-
{recipe.title}
-
-
-

Quick Facts

+
+
-

Ready in {recipe.readyInMinutes} minutes -

+
{recipe.title}
+ { recipe.dishTypes && (
{dishTypes}
)}
+ +
+
-

Is is affordable? {recipe.cheap} -

-
-
-

Servings: {recipe.servings} -

-
- { recipe.dishTypes && (

Dish Types:
{dishTypes}

)} -
-

Source: {' '} - {recipe.sourceName} -

+
+

Ready in {recipe.readyInMinutes} minutes +

+
+
+

Servings: {recipe.servings} +

+
+
+

Source: {' '} + {recipe.sourceName} +

+
-
-
{markets && (

Shop Local!

{displayMarkets}
)} +
-
+
+ ); } diff --git a/src/style.scss b/src/style.scss index a1f3996..14f37d0 100644 --- a/src/style.scss +++ b/src/style.scss @@ -192,7 +192,7 @@ body, html { } #recipe-list { - width: 40%; + width: 35%; margin-left: 2%; margin-right: 2%; margin-top: 0; @@ -200,7 +200,7 @@ body, html { display: flex; flex-direction: row; flex-wrap: wrap; - justify-content: flex-center; + justify-content: flex-end; } .flex-row { @@ -210,6 +210,25 @@ body, html { height: fit-content; } + .columns { + display: flex; + flex-direction: row; + justify-content: space-between; + height: 100%; + } + + .col-2 { + width: 48%; + height: 100%; + display: flex; + flex-direction: column; + justify-content: space-between; + } + + .col-2 img { + width: 90%; + } + .recipe-item { width: 75%; height: fit-content; @@ -265,8 +284,8 @@ body, html { #recipe-detail { color: $dark-color; - width: 40%; - height: 50vh; + width: 53%; + height: 55vh; background-color: $accent-color; border: solid 2px $dark-color; border-bottom: solid 5px $dark-color; @@ -275,23 +294,10 @@ body, html { display: flex; flex-direction: column; justify-content: space-evenly; - - img { - height: 100%; - - overflow-y: hidden; - } } #recipe-title { - width: 45%; - } - - .detail-header { - display: flex; - flex-direction: row; - justify-content: space-between; - height: 35% + width: 80%; } .ingredient-container { @@ -330,13 +336,9 @@ body, html { justify-content: space-between; align-items: end; } - .details { - flex-direction: column; - } - .details-right { - flex-direction: column; - text-align: right; + #detail-container img { + width: 25vw; } #dish-types { @@ -348,8 +350,10 @@ body, html { .dish-type { margin-right: 1%; padding: 1%; - background-color: #b9d9f7; - border: solid 2px #88abdb; + border-radius: 5px; + font-weight: 400; + background-color: #d0e6fc; + border: solid 2px #9ebbe3; color: #4d5678; }