Compare commits
No commits in common. "e2cc848fec3f6c75a6fdb0ee695ad4952c059d26" and "6dc6cd98eaf1a3f1510d36fbcc49088028f78f22" have entirely different histories.
e2cc848fec
...
6dc6cd98ea
@ -1,7 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
use Lycoreco\Includes\Routing\HttpExceptions\PageError;
|
|
||||||
|
|
||||||
$error = $context['error_model'];
|
$error = $context['error_model'];
|
||||||
|
|
||||||
the_header(
|
the_header(
|
||||||
@ -10,19 +7,17 @@ the_header(
|
|||||||
'error',
|
'error',
|
||||||
[
|
[
|
||||||
['robots', 'nofollow, noindex']
|
['robots', 'nofollow, noindex']
|
||||||
]
|
]);
|
||||||
);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var PageError
|
* @var PageError
|
||||||
*/
|
*/
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="container">
|
<div class="error-page">
|
||||||
<div class="error-page">
|
|
||||||
<div class="error-code"><?php echo $error->get_http_error() ?></div>
|
<div class="error-code"><?php echo $error->get_http_error() ?></div>
|
||||||
<div class="error-message"><?php echo $error->getMessage() ?></div>
|
<div class="error-message"><?php echo $error->getMessage() ?></div>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<?php the_footer() ?>
|
<?php the_footer() ?>
|
||||||
@ -106,7 +106,6 @@ the_header(
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php if(CURRENT_USER): ?>
|
<?php if(CURRENT_USER): ?>
|
||||||
<?php if($context['usermenu_recipe_prefetch']): ?>
|
|
||||||
<div class="daily-meals">
|
<div class="daily-meals">
|
||||||
<h2 class="title">Your Menu for <?= date("l"); ?></h2>
|
<h2 class="title">Your Menu for <?= date("l"); ?></h2>
|
||||||
<div class="daily-meals-grid">
|
<div class="daily-meals-grid">
|
||||||
@ -117,12 +116,6 @@ the_header(
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</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; ?>
|
<?php endif; ?>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -42,12 +42,11 @@ the_header(
|
|||||||
|
|
||||||
$is_checked = false;
|
$is_checked = false;
|
||||||
$category = $_GET['category'] ?? null;
|
$category = $_GET['category'] ?? null;
|
||||||
if ($category == $cat->get_id())
|
if($category == $cat->get_id())
|
||||||
$is_checked = true;
|
$is_checked = true;
|
||||||
?>
|
?>
|
||||||
<li>
|
<li>
|
||||||
<input id="<?= $field_id ?>" type="radio" name="category"
|
<input id="<?= $field_id ?>" type="radio" name="category" value="<?= $cat->get_id() ?>" <?= $is_checked ? 'checked' : '' ?>>
|
||||||
value="<?= $cat->get_id() ?>" <?= $is_checked ? 'checked' : '' ?>>
|
|
||||||
<label for="<?= $field_id ?>"><?= $cat->field_name ?></label>
|
<label for="<?= $field_id ?>"><?= $cat->field_name ?></label>
|
||||||
</li>
|
</li>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
@ -68,14 +67,13 @@ the_header(
|
|||||||
|
|
||||||
$is_checked = false;
|
$is_checked = false;
|
||||||
$ingredients = $_GET['ingredient'] ?? null;
|
$ingredients = $_GET['ingredient'] ?? null;
|
||||||
if ($ingredients) {
|
if($ingredients) {
|
||||||
if (in_array($ing->get_id(), $ingredients))
|
if (in_array($ing->get_id(), $ingredients))
|
||||||
$is_checked = true;
|
$is_checked = true;
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<li>
|
<li>
|
||||||
<input id="<?= $field_id ?>" type="checkbox" name="ingredient[]"
|
<input id="<?= $field_id ?>" type="checkbox" name="ingredient[]" value="<?= $ing->get_id() ?>" <?= $is_checked ? 'checked' : '' ?>>
|
||||||
value="<?= $ing->get_id() ?>" <?= $is_checked ? 'checked' : '' ?>>
|
|
||||||
<label for="<?= $field_id ?>"><?= $ing->field_name ?></label>
|
<label for="<?= $field_id ?>"><?= $ing->field_name ?></label>
|
||||||
</li>
|
</li>
|
||||||
<?php endforeach; ?>
|
<?php endforeach; ?>
|
||||||
@ -85,9 +83,6 @@ the_header(
|
|||||||
<button class="btn btn-primary hover-anim" type="submit">
|
<button class="btn btn-primary hover-anim" type="submit">
|
||||||
Apply
|
Apply
|
||||||
</button>
|
</button>
|
||||||
<a class="btn btn-secondary hover-anim" type="button" href="<?php the_permalink('recipes:catalog') ?>">
|
|
||||||
Reset
|
|
||||||
</a>
|
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
<div class="daily-meal-info">
|
<div class="daily-meal-info">
|
||||||
<div class="daily-meal-title">
|
<div class="daily-meal-title">
|
||||||
<h3><?= $recipe->field_title ?></h3>
|
<h3><?= $recipe->field_title ?></h3>
|
||||||
<span class="meta"><i class="fa-regular fa-clock"></i> <?= $recipe->field_estimated_time ?> mins to make</span>
|
<span class="meta"><i class="fa-regular fa-clock"></i><?= $recipe->field_estimated_time ?>mins to make</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="daily-meal-ingredients">
|
<div class="daily-meal-ingredients">
|
||||||
<ul class="ingredients-list">
|
<ul class="ingredients-list">
|
||||||
|
|||||||
@ -17,7 +17,6 @@ the_header(
|
|||||||
<?php
|
<?php
|
||||||
foreach ($context['weeks'] as $day => $recipe_prefetches) {
|
foreach ($context['weeks'] as $day => $recipe_prefetches) {
|
||||||
?>
|
?>
|
||||||
<?php if(!empty($recipe_prefetches)): ?>
|
|
||||||
<div class="daily-meals">
|
<div class="daily-meals">
|
||||||
<h2 class="title">Your Menu for <?= ucfirst($day) ?></h2>
|
<h2 class="title">Your Menu for <?= ucfirst($day) ?></h2>
|
||||||
<div class="daily-meals-grid">
|
<div class="daily-meals-grid">
|
||||||
@ -29,12 +28,6 @@ foreach ($context['weeks'] as $day => $recipe_prefetches) {
|
|||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</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
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|||||||
@ -334,15 +334,12 @@ body {
|
|||||||
.reviews-grid {
|
.reviews-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(3, 310px);
|
grid-template-columns: repeat(3, 310px);
|
||||||
grid-auto-rows: 175px;
|
grid-template-rows: repeat(2, 175px);
|
||||||
row-gap: 20px;
|
row-gap: 20px;
|
||||||
column-gap: 50px;
|
column-gap: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.recent-review {
|
.recent-review {
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
justify-content: space-around;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 310px;
|
width: 310px;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
@ -409,7 +406,7 @@ body {
|
|||||||
.daily-meals-grid {
|
.daily-meals-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(2, 300px);
|
grid-template-columns: repeat(2, 300px);
|
||||||
grid-auto-rows: auto;
|
grid-template-rows: repeat(3, 100px);
|
||||||
row-gap: 20px;
|
row-gap: 20px;
|
||||||
column-gap: 20px;
|
column-gap: 20px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
@ -455,7 +452,6 @@ body {
|
|||||||
font-family: var(--title-font);
|
font-family: var(--title-font);
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: var(--common-text);
|
color: var(--common-text);
|
||||||
margin-bottom: 3px;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -473,27 +469,19 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.ingredients-list {
|
.ingredients-list {
|
||||||
|
/* columns: 2;
|
||||||
|
-webkit-columns: 2;
|
||||||
|
-moz-columns: 2; */
|
||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
row-gap: 3px;
|
row-gap: 3px;
|
||||||
column-gap: 8px;
|
column-gap: 8px;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
height: 100%;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.ingredients-list li {
|
.ingredients-list li {
|
||||||
margin-right: 15px;
|
margin-right: 5px;
|
||||||
max-width: 72px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.daily-meal-ingredients{
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.no-daily-meals-msg{
|
|
||||||
width: 100%;
|
|
||||||
text-align: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -831,7 +819,7 @@ input[type="checkbox"]{
|
|||||||
|
|
||||||
.filters {
|
.filters {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
max-height: 500px;
|
max-height: 454px;
|
||||||
width: 230px;
|
width: 230px;
|
||||||
padding: 15px;
|
padding: 15px;
|
||||||
background-color: var(--panel-background);
|
background-color: var(--panel-background);
|
||||||
@ -874,7 +862,6 @@ input[type="checkbox"]{
|
|||||||
|
|
||||||
.filters-form .btn {
|
.filters-form .btn {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.single-recipe {
|
.single-recipe {
|
||||||
@ -1180,11 +1167,6 @@ label {
|
|||||||
width: 50%;
|
width: 50%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.review{
|
|
||||||
margin-bottom: 20px;
|
|
||||||
border-bottom: 1px solid #b3b3b3;
|
|
||||||
}
|
|
||||||
|
|
||||||
.subtitle{
|
.subtitle{
|
||||||
font-family: var(--title-font);
|
font-family: var(--title-font);
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
@ -1282,60 +1264,6 @@ label {
|
|||||||
z-index: 9999;
|
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) {
|
@media (max-width: 768px) {
|
||||||
|
|
||||||
.catalog-items {
|
.catalog-items {
|
||||||
|
|||||||
3
urls.php
3
urls.php
@ -1,5 +1,4 @@
|
|||||||
<?php
|
<?php
|
||||||
use Lycoreco\Apps\Index\Controllers\ErrorController;
|
|
||||||
use Lycoreco\Includes\Routing\Router;
|
use Lycoreco\Includes\Routing\Router;
|
||||||
|
|
||||||
require APPS_PATH . '/Index/urls.php';
|
require APPS_PATH . '/Index/urls.php';
|
||||||
@ -14,5 +13,5 @@ Router::includes($admin_urls, 'admin');
|
|||||||
Router::includes($ajax_urls, 'ajax');
|
Router::includes($ajax_urls, 'ajax');
|
||||||
Router::includes($recipes_urls, 'recipes');
|
Router::includes($recipes_urls, 'recipes');
|
||||||
|
|
||||||
Router::set_error_controller('default', new ErrorController());
|
// Router::set_error_controller('default', new ErrorController())
|
||||||
?>
|
?>
|
||||||
Loading…
x
Reference in New Issue
Block a user