From 3ee8963a06afcf2a5d9d63cd124c535d27beb344 Mon Sep 17 00:00:00 2001 From: Caleb Gardner Date: Fri, 8 Nov 2024 06:56:19 -0600 Subject: [PATCH] Login screen --- main.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/main.go b/main.go index 08cdd34..48013ea 100644 --- a/main.go +++ b/main.go @@ -132,6 +132,10 @@ func mainHandle(w http.ResponseWriter, r *http.Request) { latestBlogsHandle(w, r) return } + if path == "login" { + sendContent(w, r, loginScreen, "", "") + return + } stat, err := os.Stat(filepath.Join(*webRoot, path)) if err == nil && !stat.IsDir() { http.ServeFile(w, r, filepath.Join(*webRoot, path)) @@ -146,3 +150,14 @@ func mainHandle(w http.ResponseWriter, r *http.Request) { } blogHandle(w, r, path) } + +const loginScreen = ` + +
+ + + + + +
+`