fix: apply the BrandingName setting to the masthead and page title
The brandingName admin setting was saved but never used — layout/login/register hardcoded "Bounty Board". render() now passes the configured brand into every page, and the top-nav masthead, <title>, and login/register headers use it. (The "Bounty Board" board-feature labels are left as-is.) Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -23,6 +23,7 @@ type pageData struct {
|
||||
User *domain.User
|
||||
DefaultTheme string
|
||||
NavLayout string
|
||||
Brand string
|
||||
Narrow bool
|
||||
OIDCEnabled bool
|
||||
Error string
|
||||
@@ -88,6 +89,12 @@ func (s *Server) render(w http.ResponseWriter, r *http.Request, page string, dat
|
||||
data.NavLayout = "top"
|
||||
}
|
||||
}
|
||||
if data.Brand == "" {
|
||||
data.Brand = "Bounty Board"
|
||||
if st, err := s.store.GetSettings(r.Context()); err == nil && st.BrandingName != "" {
|
||||
data.Brand = st.BrandingName
|
||||
}
|
||||
}
|
||||
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||
if err := t.ExecuteTemplate(w, "layout", data); err != nil {
|
||||
s.log.Error("execute template", "page", page, "err", err)
|
||||
|
||||
Reference in New Issue
Block a user