From 64ece1c4455ed6f8e8be5cb8f060f14b6131823f Mon Sep 17 00:00:00 2001 From: xengineering Date: Sun, 12 May 2024 20:20:14 +0200 Subject: view: Create new html/recipe-step.html This allows to use it in two places: - template for loop for backend-generated steps - a HTML template tag for frontend- / JS-generated steps --- view/html/recipe-edit.html | 6 +----- view/html/recipe-step.html | 6 ++++++ 2 files changed, 7 insertions(+), 5 deletions(-) create mode 100644 view/html/recipe-step.html diff --git a/view/html/recipe-edit.html b/view/html/recipe-edit.html index fb9cf74..5467895 100644 --- a/view/html/recipe-edit.html +++ b/view/html/recipe-edit.html @@ -16,11 +16,7 @@

-
{{range .Steps}} -
- - -
{{end}} +
{{range .Steps}}{{template "recipe-step" .}}{{end}}
diff --git a/view/html/recipe-step.html b/view/html/recipe-step.html new file mode 100644 index 0000000..96fbb48 --- /dev/null +++ b/view/html/recipe-step.html @@ -0,0 +1,6 @@ +{{define "recipe-step"}} +
+ + +
+{{end}} -- cgit v1.2.3-70-g09d2