feat(static): Add terms of service page and update routes
Some checks failed
CI / Test (1.22) (push) Failing after -24m33s
CI / Test (1.23) (push) Failing after -24m32s
CI / Build (push) Successful in -26m46s
CI / Lint (push) Successful in -26m38s

* Implement ServeTermsOfService handler to serve the terms of service page.
* Update index.html and privacy-policy.html to include links to the terms of service.
* Add logo1024.png for branding.
This commit is contained in:
Hein
2026-02-04 19:41:11 +02:00
parent 6d7687a311
commit 71f26c214f
6 changed files with 259 additions and 5 deletions

View File

@@ -31,6 +31,20 @@ func (h *Handlers) ServeIndex(w http.ResponseWriter, r *http.Request) {
writeBytes(w, content)
}
// ServeTermsOfService serves the terms of service page
func (h *Handlers) ServeTermsOfService(w http.ResponseWriter, r *http.Request) {
content, err := staticFiles.ReadFile("static/terms-of-service.html")
if err != nil {
logging.Error("Failed to read terms-of-service.html", "error", err)
http.Error(w, "Internal Server Error", http.StatusInternalServerError)
return
}
w.Header().Set("Content-Type", "text/html; charset=utf-8")
w.WriteHeader(http.StatusOK)
writeBytes(w, content)
}
// ServePrivacyPolicy serves the privacy policy page
func (h *Handlers) ServePrivacyPolicy(w http.ResponseWriter, r *http.Request) {
content, err := staticFiles.ReadFile("static/privacy-policy.html")