aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--templates/_head_common.htmpl3
-rw-r--r--templates/index.htmpl14
2 files changed, 17 insertions, 0 deletions
diff --git a/templates/_head_common.htmpl b/templates/_head_common.htmpl
new file mode 100644
index 0000000..6fcfea1
--- /dev/null
+++ b/templates/_head_common.htmpl
@@ -0,0 +1,3 @@
+{{ define _tp_head_common(handle: io::handle, title: str = "Untitled") (void | io::error | nomem) }}
+<title>{{ title }}</title>
+{{ end }}
diff --git a/templates/index.htmpl b/templates/index.htmpl
new file mode 100644
index 0000000..3562c86
--- /dev/null
+++ b/templates/index.htmpl
@@ -0,0 +1,14 @@
+{{ define tp_index(handle: io::handle) (void | io::error | nomem) }}
+{!
+ let title: str = "Test";
+!}
+<!DOCTYPE html>
+<html lang="en">
+<head>
+{{ render _tp_head_common(handle, title) }}
+</head>
+<body>
+<h1>{{ title }}</h1>
+</body>
+</html>
+{{ end }}