Merge pull request #82 from ThomasRubini/moving_main_in_article
moved from files home/view, recipe/search, recipe/view
This commit is contained in:
commit
01ae39a025
@ -1,14 +1,16 @@
|
||||
<img src="static/img/bandeau.jpg" alt="Cook">
|
||||
|
||||
<?php View::show("common/category_list") ?>
|
||||
|
||||
<main>
|
||||
<section>
|
||||
<h1> Nos idées recettes: </h1>
|
||||
<?php
|
||||
foreach ($A_view as $recipe){
|
||||
View::show("common/recipe", $recipe);
|
||||
}
|
||||
?>
|
||||
</section>
|
||||
<?php View::show("common/category_list") ?>
|
||||
<article>
|
||||
<section>
|
||||
<h1> Nos idées recettes: </h1>
|
||||
<?php
|
||||
foreach ($A_view as $recipe){
|
||||
View::show("common/recipe", $recipe);
|
||||
}
|
||||
?>
|
||||
</section>
|
||||
</article>
|
||||
</main>
|
||||
|
@ -3,28 +3,30 @@
|
||||
$has_query = $A_view["QUERY"] !== null;
|
||||
?>
|
||||
|
||||
<?php View::show("common/category_list") ?>
|
||||
|
||||
<main>
|
||||
<!-- Inclure les catégories -->
|
||||
<form method="GET" action="/recipe/search">
|
||||
<label for="query">Saisissez les termes à rechercher</label>
|
||||
<input id="query" type="text" name="query" placeholder="<?= $has_query ? $A_view["QUERY"] : "Votre recherche" ?>">
|
||||
<input type="submit" value="Rechercher">
|
||||
</form>
|
||||
<section>
|
||||
<?php
|
||||
if ($has_query) {
|
||||
$search_results = $A_view["RESULTS"];
|
||||
if (empty($search_results)) {
|
||||
echo '<h2 class="no_results">Aucun résultat</h2>';
|
||||
echo '<p class="no_results_description">Assurez-vous d\'avoir rentré correctement vos termes de recherche ou essayez des mots clefs différents.</p>';
|
||||
} else {
|
||||
foreach ($search_results as $key => $value) {
|
||||
View::show("common/recipe", $value);
|
||||
<?php View::show("common/category_list") ?>
|
||||
<article>
|
||||
<!-- Inclure les catégories -->
|
||||
<form method="GET" action="/recipe/search">
|
||||
<label for="query">Saisissez les termes à rechercher</label>
|
||||
<input id="query" type="text" name="query" placeholder="<?= $has_query ? $A_view["QUERY"] : "Votre recherche" ?>">
|
||||
<input type="submit" value="Rechercher">
|
||||
</form>
|
||||
<section>
|
||||
<?php
|
||||
if ($has_query) {
|
||||
$search_results = $A_view["RESULTS"];
|
||||
if (empty($search_results)) {
|
||||
echo '<h2 class="no_results">Aucun résultat</h2>';
|
||||
echo '<p class="no_results_description">Assurez-vous d\'avoir rentré correctement vos termes de recherche ou essayez des mots clefs différents.</p>';
|
||||
} else {
|
||||
foreach ($search_results as $key => $value) {
|
||||
View::show("common/recipe", $value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
</section>
|
||||
?>
|
||||
</section>
|
||||
</article>
|
||||
</main>
|
||||
|
@ -1,41 +1,42 @@
|
||||
<?php View::show("common/category_list") ?>
|
||||
|
||||
<main>
|
||||
<?php View::show("common/category_list") ?>
|
||||
<article>
|
||||
<img src="<?= $A_view["IMG_LINK"] ?>" alt="Image d'illustration de la recette">
|
||||
|
||||
<img src="<?= $A_view["IMG_LINK"] ?>" alt="Image d'illustration de la recette">
|
||||
<section class="infosRecette">
|
||||
<header>
|
||||
<h1><?= $A_view["NAME"] ?></h1>
|
||||
<p><?= $A_view["TIME"] ?> — <?= $A_view["DIFFICULTY_NAME"] ?></p>
|
||||
</header>
|
||||
<p><?= $A_view["DESC"] ?></p>
|
||||
</section>
|
||||
|
||||
<section class="infosRecette">
|
||||
<header>
|
||||
<h1><?= $A_view["NAME"] ?></h1>
|
||||
<p><?= $A_view["TIME"] ?> — <?= $A_view["DIFFICULTY_NAME"] ?></p>
|
||||
</header>
|
||||
<p><?= $A_view["DESC"] ?></p>
|
||||
</section>
|
||||
<section class="ingredientsRecette">
|
||||
<h2>Ingrédients</h2>
|
||||
<ul>
|
||||
<?php
|
||||
foreach($A_view["INGREDIENTS"] as $ingredient)
|
||||
echo "<li> {$ingredient["NAME"]}: {$ingredient["QUANTITY"]} </li>";
|
||||
?>
|
||||
</ul>
|
||||
</section>
|
||||
|
||||
<section class="ingredientsRecette">
|
||||
<h2>Ingrédients</h2>
|
||||
<ul>
|
||||
<?php
|
||||
foreach($A_view["INGREDIENTS"] as $ingredient)
|
||||
echo "<li> {$ingredient["NAME"]}: {$ingredient["QUANTITY"]} </li>";
|
||||
?>
|
||||
</ul>
|
||||
</section>
|
||||
<section>
|
||||
<h2>Préparation</h2>
|
||||
<ol>
|
||||
<?php
|
||||
foreach(explode("\n", $A_view["RECIPE"]) as $instructions)
|
||||
echo "<li>".$instructions."</li>";
|
||||
?>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<h2>Préparation</h2>
|
||||
<ol>
|
||||
<?php
|
||||
foreach(explode("\n", $A_view["RECIPE"]) as $instructions)
|
||||
echo "<li>".$instructions."</li>";
|
||||
?>
|
||||
</ol>
|
||||
</section>
|
||||
<p>By <?= $A_view["AUTHOR_USERNAME"] ?></p>
|
||||
|
||||
<p>By <?= $A_view["AUTHOR_USERNAME"] ?></p>
|
||||
|
||||
<?php
|
||||
View::show("appreciations/view_all", $A_view)
|
||||
?>
|
||||
<?php
|
||||
View::show("appreciations/view_all", $A_view)
|
||||
?>
|
||||
</article>
|
||||
|
||||
</main>
|
||||
|
Loading…
Reference in New Issue
Block a user