From 147c870dbc0b8ebded81b5af9f172314219df02c Mon Sep 17 00:00:00 2001 From: Joshua Herring Date: Mon, 1 Jun 2026 13:46:53 -0400 Subject: [PATCH] make an error page - use it only for landing page errors for now --- main.go | 3 +- pages/error_page.go | 153 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 155 insertions(+), 1 deletion(-) create mode 100644 pages/error_page.go diff --git a/main.go b/main.go index e2e5c59..1659623 100644 --- a/main.go +++ b/main.go @@ -242,7 +242,8 @@ func handleLoginPost(w http.ResponseWriter, r *http.Request) { func getPortal(w http.ResponseWriter, r *http.Request) { _, e := w.Write([]byte(pages.LandingPage)) if e != nil { - writeHTML(w, pages.LoginPage("Username or Password is incorrect.")) + content := fmt.Sprintf(pages.ErrorPage, "Unable to display landing page") + writeHTML(w, content) } } diff --git a/pages/error_page.go b/pages/error_page.go new file mode 100644 index 0000000..9ad779a --- /dev/null +++ b/pages/error_page.go @@ -0,0 +1,153 @@ +package pages + +var ErrorPage = ` + + + + + + + Landing page + + + + + + + + + + +
+ + + + Skip to main content + + + + +
+ + + +
+ + + +
+
+
+
+ Maurer Applications +

Faculty Activity Portal

+ +
+
+
+
+ + + + + + + + + +`