Add portions count in ingredients

This commit is contained in:
Théophile Bastian 2019-05-13 13:43:42 +02:00
parent 58fa5572fb
commit dafdd206d6
3 changed files with 17 additions and 0 deletions

View file

@ -1,6 +1,15 @@
<div class="outer_ingredients"> <div class="outer_ingredients">
<div id="ingredients"> <div id="ingredients">
<div class="ingred-title">Ingrédients</div> <div class="ingred-title">Ingrédients</div>
{{ with .Params.portions -}}
<div class="ingred-portions">
pour {{ .qt }}
{{- with .name }} {{.}}
{{- else }} portions{{ end -}}
</div>
{{- end }}
<ul> <ul>
{{ range $.Param "ingredients" }} {{ range $.Param "ingredients" }}
<li> <li>

View file

@ -66,6 +66,11 @@ body {
font-weight: bold; font-weight: bold;
} }
.ingred-portions {
text-align: right;
font-style: italic;
}
.ingred-qt { .ingred-qt {
color: $ingred_qt_color; color: $ingred_qt_color;
} }

View file

@ -50,6 +50,9 @@ body {
#ingredients .ingred-title { #ingredients .ingred-title {
font-size: 1.3em; font-size: 1.3em;
font-weight: bold; } font-weight: bold; }
#ingredients .ingred-portions {
text-align: right;
font-style: italic; }
#ingredients .ingred-qt { #ingredients .ingred-qt {
color: #efc586; } color: #efc586; }
#ingredients ul { #ingredients ul {