Compare commits

..

13 Commits

Author SHA1 Message Date
e2cc848fec Merge branch 'develop' of https://gitea.steve-dekart.xyz/web_programming/fridge_bites into TIST-16 2025-07-06 14:31:28 +02:00
b21465e89f Merge pull request 'TIST-49: fixed display issues of warning and success alerts' (#41) from TIST-49 into develop
Reviewed-on: #41
2025-07-06 14:31:23 +02:00
5cd2030848 Merge branch 'develop' of https://gitea.steve-dekart.xyz/web_programming/fridge_bites into TIST-16 2025-07-06 14:31:08 +02:00
db6f9538e1 TIST-49: fixed display issues of warning and success alerts 2025-07-06 13:57:56 +02:00
d0db460f28 Merge pull request 'TIST-45: added custom error page' (#40) from TIST-45 into develop
Reviewed-on: #40
2025-07-06 13:51:53 +02:00
df65db797b Merge pull request 'TIST-48: added reset button in catalog filters' (#39) from TIST-48 into develop
Reviewed-on: #39
2025-07-06 13:51:46 +02:00
c56bfdc80e Merge pull request 'TIST-47: fixed display issues with pagination' (#38) from TIST-47 into develop
Reviewed-on: #38
2025-07-06 13:51:40 +02:00
cbcb3f1c5a Merge pull request 'TIST-46: fixed display issues with recent reviews and daily recipes' (#37) from TIST-46 into develop
Reviewed-on: #37
2025-07-06 13:51:16 +02:00
924fb17927 TIST-45: added custom error page 2025-07-06 13:48:20 +02:00
ba7a1eac31 TIST-48: added reset button in catalog filters 2025-07-06 13:34:59 +02:00
97895c35d2 TIST-47: fixed display issues with pagination 2025-07-06 13:23:27 +02:00
ffaef7e153 Merge branch 'develop' of gitea.steve-dekart.xyz:web_programming/fridge_bites into TIST-46 2025-07-06 13:07:08 +02:00
931596354b TIST-46: fixed display issues with recent reviews and daily recipes 2025-07-06 13:06:57 +02:00
7 changed files with 137 additions and 40 deletions

View File

@ -1,4 +1,7 @@
<?php
use Lycoreco\Includes\Routing\HttpExceptions\PageError;
$error = $context['error_model'];
the_header(
@ -7,7 +10,8 @@ the_header(
'error',
[
['robots', 'nofollow, noindex']
]);
]
);
/**
* @var PageError
@ -15,9 +19,10 @@ the_header(
?>
<div class="container">
<div class="error-page">
<div class="error-code"><?php echo $error->get_http_error() ?></div>
<div class="error-message"><?php echo $error->getMessage() ?></div>
</div>
</div>
<?php the_footer() ?>

View File

@ -106,6 +106,7 @@ the_header(
</div>
</div>
<?php if(CURRENT_USER): ?>
<?php if($context['usermenu_recipe_prefetch']): ?>
<div class="daily-meals">
<h2 class="title">Your Menu for <?= date("l"); ?></h2>
<div class="daily-meals-grid">
@ -116,6 +117,12 @@ the_header(
?>
</div>
</div>
<?php else: ?>
<div class="daily-meals">
<h2 class="title">No meals added for <?= date("l"); ?></h2>
<p class="no-daily-meals-msg">You have not added any recipes for <?= date("l");?>, please go to the catalog and add recipes.</p>
</div>
<?php endif; ?>
<?php endif; ?>
</div>

View File

@ -46,7 +46,8 @@ the_header(
$is_checked = true;
?>
<li>
<input id="<?= $field_id ?>" type="radio" name="category" value="<?= $cat->get_id() ?>" <?= $is_checked ? 'checked' : '' ?>>
<input id="<?= $field_id ?>" type="radio" name="category"
value="<?= $cat->get_id() ?>" <?= $is_checked ? 'checked' : '' ?>>
<label for="<?= $field_id ?>"><?= $cat->field_name ?></label>
</li>
<?php endforeach; ?>
@ -73,7 +74,8 @@ the_header(
}
?>
<li>
<input id="<?= $field_id ?>" type="checkbox" name="ingredient[]" value="<?= $ing->get_id() ?>" <?= $is_checked ? 'checked' : '' ?>>
<input id="<?= $field_id ?>" type="checkbox" name="ingredient[]"
value="<?= $ing->get_id() ?>" <?= $is_checked ? 'checked' : '' ?>>
<label for="<?= $field_id ?>"><?= $ing->field_name ?></label>
</li>
<?php endforeach; ?>
@ -83,6 +85,9 @@ the_header(
<button class="btn btn-primary hover-anim" type="submit">
Apply
</button>
<a class="btn btn-secondary hover-anim" type="button" href="<?php the_permalink('recipes:catalog') ?>">
Reset
</a>
</form>
</div>
</div>

View File

@ -17,6 +17,7 @@ the_header(
<?php
foreach ($context['weeks'] as $day => $recipe_prefetches) {
?>
<?php if(!empty($recipe_prefetches)): ?>
<div class="daily-meals">
<h2 class="title">Your Menu for <?= ucfirst($day) ?></h2>
<div class="daily-meals-grid">
@ -28,6 +29,12 @@ foreach ($context['weeks'] as $day => $recipe_prefetches) {
?>
</div>
</div>
<?php else: ?>
<div class="daily-meals">
<h2 class="title">No meals added for <?= ucfirst($day); ?></h2>
<p class="no-daily-meals-msg">You have not added any recipes for <?= ucfirst($day);?>, please go to the catalog and add recipes.</p>
</div>
<?php endif; ?>
<?php
}
?>

View File

@ -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;
}
@ -819,7 +831,7 @@ input[type="checkbox"]{
.filters {
position: fixed;
max-height: 454px;
max-height: 500px;
width: 230px;
padding: 15px;
background-color: var(--panel-background);
@ -862,6 +874,7 @@ input[type="checkbox"]{
.filters-form .btn {
width: 200px;
margin-bottom: 10px;
}
.single-recipe {
@ -1167,6 +1180,11 @@ label {
width: 50%;
}
.review{
margin-bottom: 20px;
border-bottom: 1px solid #b3b3b3;
}
.subtitle{
font-family: var(--title-font);
font-size: 16px;
@ -1264,6 +1282,60 @@ 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;
}
.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;
}
.alert{
display: flex;
margin-bottom: 5px;
}
.alert .alert-icon{
margin-right: 5px;
}
.warning{
color: #ff0000;
}
.success{
color: #00ff00;
}
@media (max-width: 768px) {
.catalog-items {

View File

@ -1,4 +1,5 @@
<?php
use Lycoreco\Apps\Index\Controllers\ErrorController;
use Lycoreco\Includes\Routing\Router;
require APPS_PATH . '/Index/urls.php';
@ -13,5 +14,5 @@ Router::includes($admin_urls, 'admin');
Router::includes($ajax_urls, 'ajax');
Router::includes($recipes_urls, 'recipes');
// Router::set_error_controller('default', new ErrorController())
Router::set_error_controller('default', new ErrorController());
?>