feat: dynamic logo from synced assets + SVG favicon
Logo handler now checks Hub-synced assets first, falling back to embedded SVG. Added SVG favicon to layout and catchall templates. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -431,6 +431,16 @@ func (s *Server) serveChartJSHandler(w http.ResponseWriter, r *http.Request) {
|
||||
}
|
||||
|
||||
func (s *Server) serveLogoHandler(w http.ResponseWriter, r *http.Request) {
|
||||
// Try synced asset first (allows logo updates via Hub without rebuild)
|
||||
if s.assetsSyncer != nil {
|
||||
path := s.assetsSyncer.Resolve("felhom-logo.svg")
|
||||
if _, err := os.Stat(path); err == nil {
|
||||
w.Header().Set("Cache-Control", "public, max-age=86400")
|
||||
http.ServeFile(w, r, path)
|
||||
return
|
||||
}
|
||||
}
|
||||
// Fallback to embedded logo
|
||||
w.Header().Set("Content-Type", "image/svg+xml")
|
||||
w.Header().Set("Cache-Control", "public, max-age=86400")
|
||||
fmt.Fprint(w, FelhomLogoSVG)
|
||||
|
||||
Reference in New Issue
Block a user