Some styling of RecipePage.

This commit is contained in:
Jesse Brault 2024-08-10 18:04:34 -05:00
parent 8be7ff7b29
commit d4686d0a39
2 changed files with 27 additions and 14 deletions

View File

@ -13,15 +13,17 @@ const Recipe = ({ recipe, imgUrl }: RecipeProps) => {
return ( return (
<div className={classes.fullRecipeContainer}> <div className={classes.fullRecipeContainer}>
<article className={classes.fullRecipe}> <article className={classes.fullRecipe}>
<div className={classes.info}>
<div className={classes.infoRow}>
<h1 className={classes.recipeTitle}>{recipe.title}</h1>
<StarCount count={recipe.starCount} />
</div>
<div className={classes.infoRow}>
<UserIconAndName username={recipe.ownerUsername} />
<RecipeVisibilityIcon isPublic={recipe.isPublic} />
</div>
</div>
<img src={imgUrl} className={classes.mainImage} /> <img src={imgUrl} className={classes.mainImage} />
<div className={classes.infoRow}>
<h1>{recipe.title}</h1>
<StarCount count={recipe.starCount} />
</div>
<div className={classes.infoRow}>
<UserIconAndName username={recipe.ownerUsername} />
<RecipeVisibilityIcon isPublic={recipe.isPublic} />
</div>
<div dangerouslySetInnerHTML={{ __html: recipe.text }} /> <div dangerouslySetInnerHTML={{ __html: recipe.text }} />
</article> </article>
</div> </div>

View File

@ -1,19 +1,30 @@
.full-recipe-container { .full-recipe-container {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center;
max-width: 100%;
} }
.full-recipe { .full-recipe {
max-width: 600px; max-width: 80ch;
display: flex;
flex-direction: column;
gap: 15px;
} }
.full-recipe .main-image { .info {
width: 100%; display: flex;
flex-direction: column;
gap: 5px;
} }
.full-recipe .info-row { .info-row {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }
.recipe-title {
margin-block: 0.5em;
}
.main-image {
width: 100%;
}