From 931596354b5c63c028a346a05f45a7163a753fe8 Mon Sep 17 00:00:00 2001 From: David Katrinka Date: Sun, 6 Jul 2025 13:06:57 +0200 Subject: [PATCH] TIST-46: fixed display issues with recent reviews and daily recipes --- apps/Index/Templates/index.php | 7 +++++ .../Templates/components/recipe-ings-item.php | 2 +- apps/Recipes/Templates/daily-meals.php | 7 +++++ assets/css/style.css | 29 +++++++++++++++---- 4 files changed, 38 insertions(+), 7 deletions(-) diff --git a/apps/Index/Templates/index.php b/apps/Index/Templates/index.php index c4e3197..b58968c 100644 --- a/apps/Index/Templates/index.php +++ b/apps/Index/Templates/index.php @@ -106,6 +106,7 @@ the_header( +

Your Menu for

@@ -116,6 +117,12 @@ the_header( ?>
+ +
+

No meals added for

+

You have not added any recipes for , please go to the catalog and add recipes.

+
+ diff --git a/apps/Recipes/Templates/components/recipe-ings-item.php b/apps/Recipes/Templates/components/recipe-ings-item.php index b9eb960..1dfcb7a 100644 --- a/apps/Recipes/Templates/components/recipe-ings-item.php +++ b/apps/Recipes/Templates/components/recipe-ings-item.php @@ -5,7 +5,7 @@

field_title ?>

- field_estimated_time ?>mins to make + field_estimated_time ?> mins to make
    diff --git a/apps/Recipes/Templates/daily-meals.php b/apps/Recipes/Templates/daily-meals.php index 56d4e46..fa18f80 100644 --- a/apps/Recipes/Templates/daily-meals.php +++ b/apps/Recipes/Templates/daily-meals.php @@ -17,6 +17,7 @@ the_header( $recipe_prefetches) { ?> +

    Your Menu for

    @@ -28,6 +29,12 @@ foreach ($context['weeks'] as $day => $recipe_prefetches) { ?>
    + +
    +

    No meals added for

    +

    You have not added any recipes for , please go to the catalog and add recipes.

    +
    + diff --git a/assets/css/style.css b/assets/css/style.css index 7a63042..13716d3 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -334,12 +334,15 @@ body { .reviews-grid { display: grid; grid-template-columns: repeat(3, 310px); - grid-template-rows: repeat(2, 175px); + grid-auto-rows: 175px; row-gap: 20px; column-gap: 50px; } .recent-review { + display: flex; + flex-direction: column; + justify-content: space-around; height: 100%; width: 310px; padding: 15px; @@ -406,7 +409,7 @@ body { .daily-meals-grid { display: grid; grid-template-columns: repeat(2, 300px); - grid-template-rows: repeat(3, 100px); + grid-auto-rows: auto; row-gap: 20px; column-gap: 20px; margin: 0 auto; @@ -452,6 +455,7 @@ body { font-family: var(--title-font); font-size: 14px; color: var(--common-text); + margin-bottom: 3px; } @@ -469,19 +473,27 @@ body { } .ingredients-list { - /* columns: 2; - -webkit-columns: 2; - -moz-columns: 2; */ margin-left: 15px; display: grid; grid-template-columns: 1fr 1fr; row-gap: 3px; column-gap: 8px; padding: 0; + height: 100%; } .ingredients-list li { - margin-right: 5px; + margin-right: 15px; + max-width: 72px; +} + +.daily-meal-ingredients{ + height: 100%; +} + +.no-daily-meals-msg{ + width: 100%; + text-align: center; } @@ -1157,6 +1169,11 @@ label { width: 50%; } +.review{ + margin-bottom: 20px; + border-bottom: 1px solid #b3b3b3; +} + .subtitle{ font-family: var(--title-font); font-size: 16px;