From bf328dd38a28cf44cfa81c7f1dcd95936d2d0301 Mon Sep 17 00:00:00 2001 From: xengineering Date: Sun, 7 Apr 2024 12:04:11 +0200 Subject: view: Add ingredient overview to recipe read page --- view/html/recipe.html | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'view') diff --git a/view/html/recipe.html b/view/html/recipe.html index 3d9ab63..d794b9d 100644 --- a/view/html/recipe.html +++ b/view/html/recipe.html @@ -11,10 +11,16 @@

-

{{ if ne .Portions "" }} +

{{ if ne .Notes "" }} +

{{.Notes}}

{{end}}{{ if ne .Portions "" }}

Portions: {{.Portions}}

{{end}}{{ if ne .Url "" }} -

Original recipe: link

{{end}}{{ if ne .Notes "" }} -

{{.Notes}}

{{end}}{{range .Steps}} +

Original recipe: link

{{end}} +

Ingredients:

+ {{range .Steps}}

{{.Text}}

{{range $i, $el := .Ingredients}}{{if $i}}, {{end}}{{if ne $el.Amount ""}}{{$el.Amount}} {{end}}{{if ne $el.Unit ""}}{{$el.Unit}} {{end}}{{$el.Type}}{{end}}

-- cgit v1.2.3-70-g09d2