diff --git a/main.go b/main.go index 6a42097..c7ef7f6 100644 --- a/main.go +++ b/main.go @@ -91,6 +91,15 @@ func handleStatic(w http.ResponseWriter, r *http.Request) { return } + if !strings.Contains(name, ".") { + t := templates.Lookup(name + ".html") + if t != nil { + w.Header().Set("Content-Type", "text/html") + t.Execute(w, templateData()) + return + } + } + http.ServeFile(w, r, filepath.Join("static", name)) } @@ -266,8 +275,8 @@ func handleDonate(w http.ResponseWriter, r *http.Request) { Quantity: stripe.Int64(1), }, }, - SuccessURL: stripe.String(os.Getenv("BASE_URL") + "/" + eventID + ".html?donated=1"), - CancelURL: stripe.String(os.Getenv("BASE_URL") + "/" + eventID + ".html"), + SuccessURL: stripe.String(os.Getenv("BASE_URL") + "/" + eventID + "?donated=1"), + CancelURL: stripe.String(os.Getenv("BASE_URL") + "/" + eventID), Metadata: map[string]string{ "event_id": eventID, "email": email, diff --git a/static/index.html b/static/index.html index be79886..aaeec5b 100644 --- a/static/index.html +++ b/static/index.html @@ -63,7 +63,7 @@

Events

- + Applause for a Cause

Feb 7, 2026 ยท 6:30 PM