Merge pull request #133 from ThomasRubini/css_recipe_view
Css recipe view
This commit is contained in:
commit
b5f4fc3d1f
@ -1,12 +1,13 @@
|
|||||||
<?php
|
<?php
|
||||||
$O_recipe = $A_view["RECIPE"];
|
$O_recipe = $A_view["RECIPE"];
|
||||||
?>
|
?>
|
||||||
<section>
|
<section class="apprecitations">
|
||||||
<h1> Appréciations: </h1>
|
<h2> Appréciations: </h2>
|
||||||
<form method="POST" action="/appr/create">
|
<form method="POST" action="/appr/create">
|
||||||
<label for="comment">Entrez votre commentaire :</label>
|
<label for="comment">Ajoutez un commentaire :</label>
|
||||||
<input type="text" name="comment" id="comment" placeholder="Commentaire">
|
<textarea type="text" name="comment" id="comment" placeholder="Votre commentaire"></textarea>
|
||||||
|
|
||||||
|
<section class="appreciationNoteValue">
|
||||||
<label for="note">Laissez une note :</label>
|
<label for="note">Laissez une note :</label>
|
||||||
<input type="radio" name="note" id="note" value="0"> 0
|
<input type="radio" name="note" id="note" value="0"> 0
|
||||||
<input type="radio" name="note" id="note" value="1" title="1"> 1
|
<input type="radio" name="note" id="note" value="1" title="1"> 1
|
||||||
@ -14,7 +15,7 @@ $O_recipe = $A_view["RECIPE"];
|
|||||||
<input type="radio" name="note" id="note" value="3" title="3" required> 3
|
<input type="radio" name="note" id="note" value="3" title="3" required> 3
|
||||||
<input type="radio" name="note" id="note" value="4" title="4"> 4
|
<input type="radio" name="note" id="note" value="4" title="4"> 4
|
||||||
<input type="radio" name="note" id="note" value="5" title="5"> 5
|
<input type="radio" name="note" id="note" value="5" title="5"> 5
|
||||||
|
</section>
|
||||||
<input type="hidden" name="recipe_id" value="<?= $O_recipe->I_ID ?>">
|
<input type="hidden" name="recipe_id" value="<?= $O_recipe->I_ID ?>">
|
||||||
|
|
||||||
<input type="submit" value="Envoyer">
|
<input type="submit" value="Envoyer">
|
||||||
|
|||||||
@ -6,8 +6,8 @@
|
|||||||
<header>
|
<header>
|
||||||
<img src="<?= $O_appr->getAuthor()->getProfilePicLink() ?>" alt="profile picture">
|
<img src="<?= $O_appr->getAuthor()->getProfilePicLink() ?>" alt="profile picture">
|
||||||
<h3> <?= $O_appr->getAuthor()->S_USERNAME ?> </h3>
|
<h3> <?= $O_appr->getAuthor()->S_USERNAME ?> </h3>
|
||||||
<p> <?= $O_appr->I_NOTE ?> </p>
|
<p>Le <?= $O_appr->S_DATE ?> </p>
|
||||||
<p> <?= $O_appr->S_DATE ?> </p>
|
<p> <?= $O_appr->I_NOTE ?>/5 </p>
|
||||||
<?php if ($A_view["ADMIN"] || $A_view["USER_ID"] === $O_appr->I_AUTHOR_ID) { ?>
|
<?php if ($A_view["ADMIN"] || $A_view["USER_ID"] === $O_appr->I_AUTHOR_ID) { ?>
|
||||||
<a href="/appr/delete/<?= $O_appr->I_ID ?>">Supprimer l'appréciation</a>
|
<a href="/appr/delete/<?= $O_appr->I_ID ?>">Supprimer l'appréciation</a>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
$O_recipe = $A_view["RECIPE"];
|
$O_recipe = $A_view["RECIPE"];
|
||||||
?>
|
?>
|
||||||
<main class="hasAside">
|
<main class="hasAside recipeView">
|
||||||
<?php View::show("common/category_list") ?>
|
<?php View::show("common/category_list") ?>
|
||||||
<article>
|
<article>
|
||||||
<img src="<?= $O_recipe->getImgLink() ?>" alt="Image d'illustration de la recette">
|
<img src="<?= $O_recipe->getImgLink() ?>" alt="Image d'illustration de la recette">
|
||||||
|
|||||||
140
static/style.css
140
static/style.css
@ -316,7 +316,8 @@ main.userView > form > label {
|
|||||||
}
|
}
|
||||||
|
|
||||||
:is(main.userView > form,
|
:is(main.userView > form,
|
||||||
main.search > article > form)
|
main.search > article > form,
|
||||||
|
main.recipeView > article > section > form)
|
||||||
> input[type=submit] {
|
> input[type=submit] {
|
||||||
background: var(--principal-neutral);
|
background: var(--principal-neutral);
|
||||||
border: none;
|
border: none;
|
||||||
@ -351,6 +352,143 @@ main.search > article > section {
|
|||||||
gap: var(--size-xl);
|
gap: var(--size-xl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
main.recipeView > article {
|
||||||
|
max-width: 600px;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--size-xl);
|
||||||
|
}
|
||||||
|
main.recipeView > article > img {
|
||||||
|
min-width: 100%;
|
||||||
|
max-width: 100%;
|
||||||
|
max-height: 150px;
|
||||||
|
object-fit: none;
|
||||||
|
object-position: center;
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
box-shadow: var(--shadow);
|
||||||
|
}
|
||||||
|
main.recipeView > article > section.infosRecette > header {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
border: none;
|
||||||
|
border-bottom: var(--border) var(--principal-neutral);
|
||||||
|
justify-content: space-between;
|
||||||
|
margin-bottom: var(--size-l);
|
||||||
|
align-items: baseline;
|
||||||
|
}
|
||||||
|
main.recipeView > article > section.infosRecette > header > h1 {
|
||||||
|
font-size: var(--size-max);
|
||||||
|
}
|
||||||
|
main.recipeView > article > section.infosRecette > header > p {
|
||||||
|
font-size: var(--size-l);
|
||||||
|
}
|
||||||
|
main.recipeView > article > section > h2 {
|
||||||
|
font-size: var(--size-xl);
|
||||||
|
border-bottom: var(--border) var(--principal-neutral);
|
||||||
|
margin-bottom: var(--size-l);
|
||||||
|
}
|
||||||
|
main.recipeView > article > section > :is(ul, ol) {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--size-s);
|
||||||
|
}
|
||||||
|
main.recipeView > article > section > :is(ul, ol) > li {
|
||||||
|
margin-left: var(--size-l);
|
||||||
|
}
|
||||||
|
main.recipeView > article > section > ul > li::marker {
|
||||||
|
content: "- ";
|
||||||
|
}
|
||||||
|
main.recipeView > article > p {
|
||||||
|
color: var(--grey-dark);
|
||||||
|
}
|
||||||
|
main.recipeView > article > section.buttonsEditRecipe {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
gap: var(--size-xl);
|
||||||
|
}
|
||||||
|
main.recipeView > article > section.buttonsEditRecipe > a {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-size: var(--size-l);
|
||||||
|
color: var(--secondary-pastel);
|
||||||
|
background: var(--principal-neutral);
|
||||||
|
height: calc(1.5 * var(--size-xl));
|
||||||
|
text-decoration: none;
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
padding-left: var(--size-m);
|
||||||
|
padding-right: var(--size-m);
|
||||||
|
box-shadow: var(--shadow);
|
||||||
|
}
|
||||||
|
main.recipeView > article > section {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--size-l);
|
||||||
|
}
|
||||||
|
main.recipeView > article > section > form {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: var(--size-s);
|
||||||
|
}
|
||||||
|
main.recipeView > article > section > form > label {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
main.recipeView > article > section > form > label:first-child {
|
||||||
|
display: block;
|
||||||
|
font-size: var(--size-xl);
|
||||||
|
}
|
||||||
|
main.recipeView > article > section > form > textarea {
|
||||||
|
font-family: 'Nunito', 'Arial';
|
||||||
|
background: var(--grey-light);
|
||||||
|
border: none;
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
padding: var(--size-m);
|
||||||
|
font-size: var(--size-l);
|
||||||
|
}
|
||||||
|
main.recipeView > article > section > form > textarea:focus-visible {
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
|
main.recipeView > article > section > form > section.appreciationNoteValue {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
gap: var(--size-s);
|
||||||
|
}
|
||||||
|
main.recipeView > article > section.apprecitations > section {
|
||||||
|
background: var(--secondary-pastel);
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
box-shadow: var(--shadow);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
main.recipeView > article > section.apprecitations > section > header {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
gap: var(--size-m);
|
||||||
|
background: var(--grey-light);
|
||||||
|
padding: var(--size-m);
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
box-shadow: var(--shadow);
|
||||||
|
align-items: baseline;
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
main.recipeView > article > section.apprecitations > section > :not(header) {
|
||||||
|
padding: var(--size-m);
|
||||||
|
}
|
||||||
|
main.recipeView > article > section.apprecitations > section > header > img {
|
||||||
|
width: var(--size-max);
|
||||||
|
height: var(--size-max);
|
||||||
|
border-radius: var(--size-m);
|
||||||
|
}
|
||||||
|
main.recipeView > article > section.apprecitations > section > header > a {
|
||||||
|
background: var(--principal-neutral);
|
||||||
|
border-radius: var(--border-radius);
|
||||||
|
color: var(--secondary-pastel);
|
||||||
|
text-decoration: none;
|
||||||
|
padding: var(--size-m);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
main.editRecipe {
|
main.editRecipe {
|
||||||
min-width: 300px;
|
min-width: 300px;
|
||||||
width: 600px;
|
width: 600px;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user