diff options
author | xengineering <me@xengineering.eu> | 2023-05-01 19:20:43 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2023-05-01 19:20:43 +0200 |
commit | 60b7cf6456a40fef76ca2aecc4dd79956a22b410 (patch) | |
tree | b1ebf0f58c75f5ea403a94ebabc254a156a79c55 | |
parent | c646cc886691de6ca0e4cf584f4385e3dadf5f79 (diff) | |
download | ceres-60b7cf6456a40fef76ca2aecc4dd79956a22b410.tar ceres-60b7cf6456a40fef76ca2aecc4dd79956a22b410.tar.zst ceres-60b7cf6456a40fef76ca2aecc4dd79956a22b410.zip |
Implement ingredient summary
-rw-r--r-- | data/templates/recipe.html | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/data/templates/recipe.html b/data/templates/recipe.html index 2b387c0..f95ace6 100644 --- a/data/templates/recipe.html +++ b/data/templates/recipe.html @@ -15,7 +15,13 @@ </header> <main> - <p>This recipe is written for {{.Recipe.Portions}} portions.</p> + <p>For {{.Recipe.Portions}} portions you will need these ingredients:</p> + + <ul> + {{range .Recipe.Steps}}{{range $i, $el := .Ingredients}} + <li>{{if ne $el.Amount 0.0}}{{$el.Amount}} {{end}}{{if ne $el.Unit ""}}{{$el.Unit}} {{end}}{{$el.Type}}</li> + {{end}}{{end}} + </ul> {{if ne .Recipe.Url ""}} <p>Use this <a href="{{.Recipe.Url}}">link</a> to go to the original recipe.</p> |