From 9985d6f86fcee9d3c1d1148a5977190b673a8e8e Mon Sep 17 00:00:00 2001 From: xengineering Date: Sat, 23 Mar 2024 20:50:29 +0100 Subject: view: Add recipe step adding --- view/html/recipe-edit.html | 27 +++++++++++++++++++++------ 1 file changed, 21 insertions(+), 6 deletions(-) (limited to 'view') diff --git a/view/html/recipe-edit.html b/view/html/recipe-edit.html index 18c4ab0..b5fea1d 100644 --- a/view/html/recipe-edit.html +++ b/view/html/recipe-edit.html @@ -29,14 +29,17 @@

-

{{range .Steps}} +

-
- - - -
{{end}} +
{{range .Steps}} +
+ + + +
{{end}} +
+ @@ -84,6 +87,18 @@ console.error('Network error:', error); }); } + + function addNewStep() { + var newStep = document.createElement("section"); + newStep.innerHTML = ` + + + + `; + + var steps = document.querySelector("#steps"); + steps.appendChild(newStep); + } -- cgit v1.2.3-70-g09d2