diff options
author | xengineering <me@xengineering.eu> | 2023-04-22 17:40:02 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2023-04-22 17:54:57 +0200 |
commit | 17f2abc3961fb854fb127f6b99c30ebb494b8e3d (patch) | |
tree | 5659716de60641fba08742e386e386e1a31a9a8f /data/templates/recipe.html | |
parent | cff4718b1acd5a34e8dceaf4d21d4bc11c0de8d6 (diff) | |
download | ceres-17f2abc3961fb854fb127f6b99c30ebb494b8e3d.tar ceres-17f2abc3961fb854fb127f6b99c30ebb494b8e3d.tar.zst ceres-17f2abc3961fb854fb127f6b99c30ebb494b8e3d.zip |
Implement basic recipe target with JSON
Diffstat (limited to 'data/templates/recipe.html')
-rw-r--r-- | data/templates/recipe.html | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/data/templates/recipe.html b/data/templates/recipe.html index 348a44d..7bbb660 100644 --- a/data/templates/recipe.html +++ b/data/templates/recipe.html @@ -11,11 +11,26 @@ <a href="/index.html">HOME</a> <a href="/add_recipes">add recipe</a> </nav> - <h1>{{.Title}}</h1> + <h1>{{.Recipe.Title}}</h1> </header> <main> - {{.Html}} + <p>This recipe is written for {{.Recipe.Portions}} portions.</p> + + <p><a href="{{.Recipe.Url}}">Link</a></p> + + <hr> + + {{range .Recipe.Steps}} + <p>{{.Text}}</p> + <ul> + {{range .Ingredients}} + <li>{{.Amount}} {{.Type}}</li> + {{end}} + </ul> + <hr> + {{end}} + <a href="/recipe/edit?id={{.Id}}"><button>edit</button></a> {{ template "footer.html" }} |