about summary refs log tree commit diff stats
path: root/frontend
diff options
context:
space:
mode:
authorAlan Pearce2024-05-15 12:44:03 +0200
committerAlan Pearce2024-05-15 12:44:03 +0200
commit2d5ee7b69cbe27e7e1abef7bf3451cb6455c4387 (patch)
treec0d321d6a9f1ea9de1447742175261ed231a3590 /frontend
parent149cbe7681607eb48f47df14c7a39e6f289fb7b6 (diff)
downloadsearchix-2d5ee7b69cbe27e7e1abef7bf3451cb6455c4387.tar.lz
searchix-2d5ee7b69cbe27e7e1abef7bf3451cb6455c4387.tar.zst
searchix-2d5ee7b69cbe27e7e1abef7bf3451cb6455c4387.zip
feat: render HTML error pages
Diffstat (limited to 'frontend')
-rw-r--r--frontend/static/style.css5
-rw-r--r--frontend/templates/blocks/error.gotmpl6
2 files changed, 11 insertions, 0 deletions
diff --git a/frontend/static/style.css b/frontend/static/style.css
index 8f93079..9dbe198 100644
--- a/frontend/static/style.css
+++ b/frontend/static/style.css
@@ -2,6 +2,7 @@
   --standard-border-radius: 0;
   --preformatted: var(--code);
   --min-width: 60rem;
+  --accent-error: #ffe0e0;
 }
 
 @media (prefers-color-scheme: light) {
@@ -109,3 +110,7 @@ section {
     text-align: center;
   }
 }
+
+.error {
+  background: var(--accent-error);
+}
diff --git a/frontend/templates/blocks/error.gotmpl b/frontend/templates/blocks/error.gotmpl
new file mode 100644
index 0000000..1352b2e
--- /dev/null
+++ b/frontend/templates/blocks/error.gotmpl
@@ -0,0 +1,6 @@
+{{- define "main" }}
+  <p class="notice error">
+    {{ .Code }}
+    {{ .Message }}
+  </p>
+{{- end }}