From f10765778208840e4dd675646041305ad6b17861 Mon Sep 17 00:00:00 2001 From: xengineering Date: Wed, 6 Mar 2024 19:17:07 +0100 Subject: view: Make recipe portions, URL and notes optional An empty string for one of these attributes will lead to a recipe view page which does not render the paragraph for this item. --- view/html/recipe.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'view') diff --git a/view/html/recipe.html b/view/html/recipe.html index bce4ffa..356abda 100644 --- a/view/html/recipe.html +++ b/view/html/recipe.html @@ -7,10 +7,10 @@

{{.Title}}

-
-

Portions: {{.Portions}}

-

original recipe

-

{{.Notes}}

+
{{ if ne .Portions "" }} +

Portions: {{.Portions}}

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

original recipe

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

{{.Notes}}

{{end}}
-- cgit v1.2.3-70-g09d2