about summary refs log tree commit diff stats
path: root/templates/error.templ
diff options
context:
space:
mode:
Diffstat (limited to 'templates/error.templ')
-rw-r--r--templates/error.templ17
1 files changed, 17 insertions, 0 deletions
diff --git a/templates/error.templ b/templates/error.templ
new file mode 100644
index 0000000..369cb83
--- /dev/null
+++ b/templates/error.templ
@@ -0,0 +1,17 @@
+package templates
+
+import (
+	"go.alanpearce.eu/website/internal/config"
+	"go.alanpearce.eu/website/internal/http"
+	"strconv"
+)
+
+templ Error(config *config.Config, path string, err *http.Error) {
+	@Page(config, PageSettings{
+		Title: "Error",
+		Path:  path,
+	}) {
+		<h1>{ strconv.Itoa(err.Code) } { err.Message }</h1>
+		<h2>ʕノ•ᴥ•ʔノ ︵ ┻━┻</h2>
+	}
+}