added homepage view with recipe preview

This commit is contained in:
AntLafI 2023-01-18 10:06:42 +01:00
parent 7f3ba9a918
commit f6647577ef
3 changed files with 41 additions and 1 deletions

7
Views/home/recipe.php Normal file
View File

@ -0,0 +1,7 @@
<a href="/recipe/view/1">
<img scr="<?= $A_view["img"] ?>">
<section>
<h2> <?= $A_view["nom"]?> </h2>
<p> <?= $A_view["note"]?> </p>
</section>
</a>

View File

@ -1 +1,34 @@
<h3> Hello ! </h3>
<?php
$array_recipes = array(
array(
"nom" => "Quaso",
"img" => "4.jpg",
"note" => "4.5"
),
array(
"nom" => "Quaso",
"img" => "4.jpg",
"note" => "4.5"
),
array(
"nom" => "Quaso",
"img" => "4.jpg",
"note" => "4.5"
),
);
?>
<img src="static/img/bandeau.jpg" alt="Cook">
<section>
<h1> idées recettes: </h1>
<section>
<?php
foreach ($array_recipes as $recipe){
View::show("home/recipe", $recipe);
}
?>
</section>
</section>

BIN
static/img/bandeau.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 276 KiB