nomnom/layouts/partials/ingredients.html

28 lines
704 B
HTML
Raw Normal View History

<div class="outer_ingredients">
<div id="ingredients">
<div class="ingred-title">Ingrédients</div>
2019-05-13 13:43:42 +02:00
{{ with .Params.portions -}}
<div class="ingred-portions">
pour {{ .qt }}
{{- with .name }} {{.}}
{{- else }} portions{{ end -}}
</div>
{{- end }}
<ul>
{{ range $.Param "ingredients" }}
2019-05-11 20:53:33 +02:00
<li>
<span class="ingred-qt">{{ with .qt }}{{ . }}{{ end }}</span>
2019-05-13 13:45:25 +02:00
{{ with .article -}}
{{ . -}}
{{- if substr . -1 1 | eq "'" -}}{{ else }} {{ end -}}
{{/* ^^^ No space only if article ends with an apostrophe */}}
{{- end -}}
2019-05-11 20:53:33 +02:00
<span class="ingred-name">{{ .name }}</span>
</li>
{{ end }}
</ul>
</div>
</div>