Added 503 error page and streamlined error paging

This commit is contained in:
2025-02-18 21:37:15 +11:00
parent 1f7a9e08e6
commit 90bf997578
8 changed files with 39 additions and 22 deletions

View File

@@ -12,11 +12,7 @@ func HandleRoot() http.Handler {
return http.HandlerFunc(
func(w http.ResponseWriter, r *http.Request) {
if r.URL.Path != "/" {
page.Error(
"404",
"Page not found",
"The page or resource you have requested does not exist",
).Render(r.Context(), w)
ErrorPage(http.StatusNotFound, w, r)
return
}
page.Index().Render(r.Context(), w)