Add Stats page

This commit is contained in:
Mukhtar Akere
2025-08-08 12:45:58 +01:00
parent b4efa22bfd
commit 1d243dd12b
6 changed files with 374 additions and 1 deletions

View File

@@ -156,3 +156,13 @@ func (wb *Web) ConfigHandler(w http.ResponseWriter, r *http.Request) {
}
_ = wb.templates.ExecuteTemplate(w, "layout", data)
}
func (wb *Web) StatsHandler(w http.ResponseWriter, r *http.Request) {
cfg := config.Get()
data := map[string]interface{}{
"URLBase": cfg.URLBase,
"Page": "stats",
"Title": "Statistics",
}
_ = wb.templates.ExecuteTemplate(w, "layout", data)
}