From 931596354b5c63c028a346a05f45a7163a753fe8 Mon Sep 17 00:00:00 2001 From: David Katrinka Date: Sun, 6 Jul 2025 13:06:57 +0200 Subject: [PATCH 1/4] 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; From 97895c35d2871b3061982138d6e4a4a5e8de1469 Mon Sep 17 00:00:00 2001 From: David Katrinka Date: Sun, 6 Jul 2025 13:23:27 +0200 Subject: [PATCH 2/4] TIST-47: fixed display issues with pagination --- assets/css/style.css | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/assets/css/style.css b/assets/css/style.css index 13716d3..2fe2628 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -1271,6 +1271,22 @@ label { z-index: 9999; } +.pagination ul{ + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + margin-top: 20px; +} + +.pagination ul li { + margin: 0 5px; +} + +.pagination ul li:hover{ + opacity: 0.7; +} + @media (max-width: 768px) { .catalog-items { From ba7a1eac31efab7f4c22be1cce08d965f0537c34 Mon Sep 17 00:00:00 2001 From: David Katrinka Date: Sun, 6 Jul 2025 13:34:59 +0200 Subject: [PATCH 3/4] TIST-48: added reset button in catalog filters --- apps/Recipes/Templates/catalog.php | 41 +++++++++++++++++------------- assets/css/style.css | 3 ++- 2 files changed, 25 insertions(+), 19 deletions(-) diff --git a/apps/Recipes/Templates/catalog.php b/apps/Recipes/Templates/catalog.php index b08f088..6419310 100644 --- a/apps/Recipes/Templates/catalog.php +++ b/apps/Recipes/Templates/catalog.php @@ -28,61 +28,66 @@ the_header(
    -

    - Categories

    +

    + Categories

    - +
      - get_id(); $is_checked = false; $category = $_GET['category'] ?? null; - if($category == $cat->get_id()) + if ($category == $cat->get_id()) $is_checked = true; ?> -
    • - > - -
    • +
    • + > + +
    -

    - Ingredients

    +

    + Ingredients

      - get_id(); $is_checked = false; $ingredients = $_GET['ingredient'] ?? null; - if($ingredients) { + if ($ingredients) { if (in_array($ing->get_id(), $ingredients)) $is_checked = true; } ?> -
    • - > - -
    • - +
    • + > + +
    • +
    + + Reset +
diff --git a/assets/css/style.css b/assets/css/style.css index 2fe2628..d98053a 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -831,7 +831,7 @@ input[type="checkbox"]{ .filters { position: fixed; - max-height: 454px; + max-height: 500px; width: 230px; padding: 15px; background-color: var(--panel-background); @@ -874,6 +874,7 @@ input[type="checkbox"]{ .filters-form .btn { width: 200px; + margin-bottom: 10px; } .single-recipe { From 924fb17927d4b1784370e5483e999b1d66e53dd9 Mon Sep 17 00:00:00 2001 From: David Katrinka Date: Sun, 6 Jul 2025 13:48:20 +0200 Subject: [PATCH 4/4] TIST-45: added custom error page --- apps/Index/Templates/error.php | 31 ++++++++++++++++++------------- assets/css/style.css | 21 +++++++++++++++++++++ urls.php | 3 ++- 3 files changed, 41 insertions(+), 14 deletions(-) diff --git a/apps/Index/Templates/error.php b/apps/Index/Templates/error.php index 7b31a6e..e04c8cc 100644 --- a/apps/Index/Templates/error.php +++ b/apps/Index/Templates/error.php @@ -1,23 +1,28 @@ -get_http_error(), - '', - 'error', + $error->get_http_error(), + '', + 'error', [ ['robots', 'nofollow, noindex'] - ]); + ] +); + +/** + * @var PageError + */ - /** - * @var PageError - */ - ?> -
-
get_http_error() ?>
-
getMessage() ?>
+
+
+
get_http_error() ?>
+
getMessage() ?>
+
- \ No newline at end of file diff --git a/assets/css/style.css b/assets/css/style.css index d98053a..ad28aed 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -1288,6 +1288,27 @@ label { opacity: 0.7; } +.error-page{ + margin-top: 46px; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; +} + +.error-code{ + font-family: var(--title-font); + font-size: 100px; + color: var(--title-color); + margin-bottom: 20px; +} + +.error-message{ + font-size: 24px; + color: var(--common-text); + text-align: center; +} + @media (max-width: 768px) { .catalog-items { diff --git a/urls.php b/urls.php index 8a2d6bb..2b2d536 100644 --- a/urls.php +++ b/urls.php @@ -1,4 +1,5 @@ \ No newline at end of file