{{define "recipe"}} {{ template "head" }}
{{ template "nav" }}

{{.Recipe.Title}}

{{ if ne .Recipe.Notes "" }}

{{.Recipe.Notes}}

{{end}}

Is favorite: {{if .Recipe.IsFavorite}}Yes{{else}}No{{end}}

{{ if ne .Recipe.Portions "" }}

Portions: {{.Recipe.Portions}}

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

Original recipe: {{.Recipe.Url}}

{{end}}{{if .HasIngredients}}

Ingredient summary:

{{end}}{{range .Recipe.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}}

{{end}}
{{ template "footer" }} {{end}}