diff --git a/content/recettes/pizza/pate.md b/content/recettes/pizza/pate.md
index 2930c0f..64d6000 100644
--- a/content/recettes/pizza/pate.md
+++ b/content/recettes/pizza/pate.md
@@ -10,6 +10,7 @@ ingredients:
- qt: 250g
article: de
name: farine (T45 de préférence)
+ percent: true
- qt: 6g
article: de
name: levure boulangère fraîche
diff --git a/layouts/partials/ingredients_ul.html b/layouts/partials/ingredients_ul.html
index 4013cf2..3b46c89 100644
--- a/layouts/partials/ingredients_ul.html
+++ b/layouts/partials/ingredients_ul.html
@@ -1,25 +1,44 @@
+{{ $ingrRoot := 0 }}
+{{- range . }}
+ {{ if isset . "percent" }}
+ {{ with .qt }}
+ {{ $ingrRoot := (int .) }}
+ {{ end }}
+ {{ end }}
+{{ end -}}
{{- range . }}
{{ if isset . "catname" }}
{{ .catname | markdownify }}
-
+ {{- $prevIngrRoot := $ingrRoot -}}
{{ partial "ingredients_ul.html" .ingredients }}
+ {{- $ingrRot := $prevIngrRoot -}}
{{ else }}
-
- {{ with .qt }}{{ . | markdownify }}{{ end }}
- {{ with .article -}}
- {{ . | markdownify -}}
- {{- if substr . -1 1 | eq "'" -}}{{ else }} {{ end -}}
- {{/* ^^^ No space only if article ends with an apostrophe */}}
- {{- end -}}
- {{ .name | markdownify }}
+
+ {{ with .qt }}{{ . | markdownify }}{{ end }}
+ {{ with .article -}}
+ {{ . | markdownify -}}
+ {{- if substr . -1 1 | eq "'" -}}{{ else }} {{ end -}}
+ {{/* ^^^ No space only if article ends with an apostrophe */}}
+ {{- end -}}
+ {{ .name | markdownify }}
+
+
+ {{ if not eq $ingrRoot.percent 0 -}}
+ {{ with .qt }}
+ {{ if not eq . "QS" }}
+ {{ mul 100 (div . $ingrRoot.percent) }} %
+ {{ end }}
+ {{ end }}
+ {{- end }}
{{ end }}
{{ end -}}