Compare commits
No commits in common. "df65db797b72f6c34111d4fbc3a38e2cb2f0dd3c" and "c56bfdc80ed44a60a4260d58c0b986137c2faa97" have entirely different histories.
df65db797b
...
c56bfdc80e
@ -28,8 +28,8 @@ the_header(
|
|||||||
<div class="filters-inner">
|
<div class="filters-inner">
|
||||||
<form class="filters-form" method="get">
|
<form class="filters-form" method="get">
|
||||||
<div class="categories-filter">
|
<div class="categories-filter">
|
||||||
<h3 class="filters__title">
|
<h3 class="filters__title">
|
||||||
Categories</h3>
|
Categories</h3>
|
||||||
<div class="filters__search">
|
<div class="filters__search">
|
||||||
<i class="fa-solid fa-magnifying-glass search-icon"></i>
|
<i class="fa-solid fa-magnifying-glass search-icon"></i>
|
||||||
<input type="text" class="search-input" placeholder="Search categories...">
|
<input type="text" class="search-input" placeholder="Search categories...">
|
||||||
@ -42,21 +42,20 @@ 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; ?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ingredients-filter">
|
<div class="ingredients-filter">
|
||||||
<h3 class="filters__title">
|
<h3 class="filters__title">
|
||||||
Ingredients</h3>
|
Ingredients</h3>
|
||||||
<div class="filters__search">
|
<div class="filters__search">
|
||||||
<i class="fa-solid fa-magnifying-glass search-icon"></i>
|
<i class="fa-solid fa-magnifying-glass search-icon"></i>
|
||||||
<input type="text" class="search-input" placeholder="Search Ingredients...">
|
<input type="text" class="search-input" placeholder="Search Ingredients...">
|
||||||
@ -68,16 +67,15 @@ 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; ?>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
@ -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>
|
||||||
|
|||||||
@ -831,7 +831,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 +874,6 @@ input[type="checkbox"]{
|
|||||||
|
|
||||||
.filters-form .btn {
|
.filters-form .btn {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
margin-bottom: 10px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.single-recipe {
|
.single-recipe {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user