feat(settings): add gear trigger and panel markup to base template

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
ashisgreat22 2026-03-22 02:51:29 +01:00
parent 8e53a8b11d
commit 84777211f8
2 changed files with 21 additions and 1 deletions

View file

@ -32,6 +32,7 @@ type PageData struct {
Infoboxes []InfoboxView
UnresponsiveEngines [][2]string
PageNumbers []PageNumber
ShowHeader bool
}
// ResultView is a template-friendly wrapper around a MainResult.
@ -163,12 +164,13 @@ func FromResponse(resp contracts.SearchResponse, query string, pageno int) PageD
// RenderIndex renders the homepage (search box only).
func RenderIndex(w http.ResponseWriter) error {
w.Header().Set("Content-Type", "text/html; charset=utf-8")
return tmplIndex.ExecuteTemplate(w, "base", PageData{})
return tmplIndex.ExecuteTemplate(w, "base", PageData{ShowHeader: true})
}
// RenderSearch renders the full search results page (with base layout).
func RenderSearch(w http.ResponseWriter, data PageData) error {
w.Header().Set("Content-Type", "text/html; charset=utf-8")
data.ShowHeader = true
return tmplFull.ExecuteTemplate(w, "base", data)
}