Fix Chart.js loading and add favicon support

- Switch from chart.min.js to chart.umd.js for proper module loading
- Add favicon.ico file and proper serving
- Add favicon link in HTML head to prevent 404 errors

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ole-Morten Duesund 2025-08-23 22:43:25 +02:00
commit 5c33bdacd2
3 changed files with 11 additions and 2 deletions

View file

@ -81,8 +81,15 @@ func (s *Server) serveIndex(w http.ResponseWriter, r *http.Request) {
}
func (s *Server) serveFavicon(w http.ResponseWriter, r *http.Request) {
data, err := s.staticFiles.ReadFile("static/favicon.ico")
if err != nil {
w.Header().Set("Content-Type", "image/x-icon")
w.WriteHeader(http.StatusNotFound)
return
}
w.Header().Set("Content-Type", "image/x-icon")
w.WriteHeader(http.StatusNotFound)
w.Write(data)
}
func (s *Server) getAircraft(w http.ResponseWriter, r *http.Request) {