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(
|
||||
"LINK" => "/recipe/view/1",
|
||||
"RECIPE_LINK" => "/recipe/view/1",
|
||||
"NAME" => "Pâte à crêpe",
|
||||
"IMG" => "/static/img/recipes/1.jpg",
|
||||
"IMG_LINK" => "/static/img/recipes/1.jpg",
|
||||
"NOTE" => "4.5"
|
||||
),
|
||||
array(
|
||||
"LINK" => "/recipe/view/1",
|
||||
"RECIPE_LINK" => "/recipe/view/1",
|
||||
"NAME" => "Pâte à crêpe",
|
||||
"IMG" => "/static/img/recipes/1.jpg",
|
||||
"IMG_LINK" => "/static/img/recipes/1.jpg",
|
||||
"NOTE" => "4.5"
|
||||
),
|
||||
array(
|
||||
"LINK" => "/recipe/view/1",
|
||||
"RECIPE_LINK" => "/recipe/view/1",
|
||||
"NAME" => "Pâte à crêpe",
|
||||
"IMG" => "/static/img/recipes/1.jpg",
|
||||
"IMG_LINK" => "/static/img/recipes/1.jpg",
|
||||
"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>
|
||||
|
||||
<nav>
|
||||
<ul>
|
||||
<?php
|
||||
@ -18,5 +17,4 @@ $array_header = array(
|
||||
?>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
</header>
|
||||
|
@ -1,5 +1,7 @@
|
||||
<img src="static/img/bandeau.jpg" alt="Cook">
|
||||
|
||||
<?php View::show("common/category_list") ?>
|
||||
|
||||
<main>
|
||||
<section>
|
||||
<h1> Nos idées recettes: </h1>
|
||||
|
@ -1,3 +1,5 @@
|
||||
<?php View::show("common/category_list") ?>
|
||||
|
||||
<main>
|
||||
|
||||
<img src="<?= $A_view["IMAGE_URL"] ?>" alt="Image d'illustration de la recette">
|
||||
|
Loading…
Reference in New Issue
Block a user