Add page footer with request time display

This commit is contained in:
2026-05-07 08:19:39 +02:00
parent e8c3e53685
commit 2a85492489
5 changed files with 41 additions and 1 deletions
+2
View File
@@ -23,6 +23,7 @@ type searchPageData struct {
EditMode bool
Query string
Results []searchResult
RenderMS int64
}
// handleSearch walks the wiki root and renders a search results page for the
@@ -43,6 +44,7 @@ func (h *handler) handleSearch(w http.ResponseWriter, r *http.Request) {
Results: results,
}
w.Header().Set("Content-Type", "text/html; charset=utf-8")
data.RenderMS = elapsedMS(r)
if err := searchTmpl.ExecuteTemplate(w, "layout", data); err != nil {
log.Printf("search template error: %v", err)
}