summaryrefslogtreecommitdiff
path: root/view/templates.go
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2024-02-11 22:44:32 +0100
committerxengineering <me@xengineering.eu>2024-02-13 20:26:42 +0100
commit40868be7d4b9e1d9909a19dccc25ec49c1b5924b (patch)
tree97a8923b73c97a4ce92f15ad632cfb65faf06d5c /view/templates.go
parent43fdfde44bce659abd30186150f667d8ba24cf2b (diff)
downloadceres-40868be7d4b9e1d9909a19dccc25ec49c1b5924b.tar
ceres-40868be7d4b9e1d9909a19dccc25ec49c1b5924b.tar.zst
ceres-40868be7d4b9e1d9909a19dccc25ec49c1b5924b.zip
view: Implement GET handler for model.Recipes
Diffstat (limited to 'view/templates.go')
-rw-r--r--view/templates.go15
1 files changed, 15 insertions, 0 deletions
diff --git a/view/templates.go b/view/templates.go
new file mode 100644
index 0000000..d08f95e
--- /dev/null
+++ b/view/templates.go
@@ -0,0 +1,15 @@
+package view
+
+import (
+ "embed"
+ "html/template"
+)
+
+//go:embed html/*.html
+var htmlFS embed.FS
+
+var html *template.Template
+
+func Init() {
+ html = template.Must(template.New("html").ParseFS(htmlFS, "html/*.html"))
+}