nomnom/layouts/partials/ingredients_ul.html

27 lines
658 B
HTML
Raw Permalink Normal View History

<ul>
{{- range . }}
{{ if isset . "catname" }}
</ul>
<h2>{{ .catname | markdownify }}</h2>
{{ partial "ingredients_ul.html" .ingredients }}
<ul>
{{ else }}
<li>
<span
class="ingred-qt{{ with .qt -}}
{{ if eq . "QS" }} with_abbrv" title="Quantité Suffisante{{ end }}
{{- end }}">{{ with .qt }}{{ . | markdownify }}{{ end }}</span>
{{ with .article -}}
{{ . | markdownify -}}
{{- if substr . -1 1 | eq "'" -}}{{ else }} {{ end -}}
{{/* ^^^ No space only if article ends with an apostrophe */}}
{{- end -}}
<span class="ingred-name">{{ .name | markdownify }}</span>
</li>
{{ end }}
{{ end -}}
</ul>