Merge pull request #31 from ThomasRubini/category_list
This commit is contained in:
commit
0f85e660ae
@ -7,21 +7,21 @@ final class DefaultController
|
|||||||
{
|
{
|
||||||
$array_recipes = array(
|
$array_recipes = array(
|
||||||
array(
|
array(
|
||||||
"LINK" => "/recipe/view/1",
|
"RECIPE_LINK" => "/recipe/view/1",
|
||||||
"NAME" => "Pâte à crêpe",
|
"NAME" => "Pâte à crêpe",
|
||||||
"IMG" => "/static/img/recipes/1.jpg",
|
"IMG_LINK" => "/static/img/recipes/1.jpg",
|
||||||
"NOTE" => "4.5"
|
"NOTE" => "4.5"
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
"LINK" => "/recipe/view/1",
|
"RECIPE_LINK" => "/recipe/view/1",
|
||||||
"NAME" => "Pâte à crêpe",
|
"NAME" => "Pâte à crêpe",
|
||||||
"IMG" => "/static/img/recipes/1.jpg",
|
"IMG_LINK" => "/static/img/recipes/1.jpg",
|
||||||
"NOTE" => "4.5"
|
"NOTE" => "4.5"
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
"LINK" => "/recipe/view/1",
|
"RECIPE_LINK" => "/recipe/view/1",
|
||||||
"NAME" => "Pâte à crêpe",
|
"NAME" => "Pâte à crêpe",
|
||||||
"IMG" => "/static/img/recipes/1.jpg",
|
"IMG_LINK" => "/static/img/recipes/1.jpg",
|
||||||
"NOTE" => "4.5"
|
"NOTE" => "4.5"
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
19
Views/common/category_list.php
Normal file
19
Views/common/category_list.php
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
<?php
|
||||||
|
$allCategory = array(
|
||||||
|
"Type de cuisson" => "type_de_cuisson",
|
||||||
|
"Temps de préparation" => "temps_de_preparation",
|
||||||
|
"Difficulté" => "difficulte",
|
||||||
|
"Végan" => "vegan",
|
||||||
|
"Sans gluten" => "sans_gluten",
|
||||||
|
"Sans lactose" => "sans_lactose");
|
||||||
|
?>
|
||||||
|
|
||||||
|
<aside>
|
||||||
|
<ul>
|
||||||
|
<li><h3>Catégories :</h3></li>
|
||||||
|
<?php
|
||||||
|
foreach($allCategory as $category => $category_path) {
|
||||||
|
echo '<li><a href="/category/' . $category_path . '">'. $category . '</a></li>';
|
||||||
|
}?>
|
||||||
|
</ul>
|
||||||
|
</aside>
|
@ -8,7 +8,6 @@ $array_header = array(
|
|||||||
);
|
);
|
||||||
?>
|
?>
|
||||||
<header>
|
<header>
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<ul>
|
<ul>
|
||||||
<?php
|
<?php
|
||||||
@ -18,5 +17,4 @@ $array_header = array(
|
|||||||
?>
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
</header>
|
</header>
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
<img src="static/img/bandeau.jpg" alt="Cook">
|
<img src="static/img/bandeau.jpg" alt="Cook">
|
||||||
|
|
||||||
|
<?php View::show("common/category_list") ?>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
<section>
|
<section>
|
||||||
<h1> Nos idées recettes: </h1>
|
<h1> Nos idées recettes: </h1>
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
<?php View::show("common/category_list") ?>
|
||||||
|
|
||||||
<main>
|
<main>
|
||||||
|
|
||||||
<img src="<?= $A_view["IMAGE_URL"] ?>" alt="Image d'illustration de la recette">
|
<img src="<?= $A_view["IMAGE_URL"] ?>" alt="Image d'illustration de la recette">
|
||||||
|
Loading…
Reference in New Issue
Block a user