1
0
Fork 0
forked from jriou/coller

feat: serve only the bootstrap minimal css file

Fixes #45.

Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
Julien Riou 2025-10-10 09:19:29 +02:00
commit b0c0162b06
Signed by: jriou
GPG key ID: 9A099EDA51316854

View file

@ -177,7 +177,9 @@ func (s *Server) Start() error {
}
if s.config.BootstrapDirectory != "" {
r.PathPrefix("/static/bootstrap/").Handler(http.StripPrefix("/static/bootstrap/", http.FileServer(http.Dir(s.config.BootstrapDirectory))))
r.HandleFunc("/static/bootstrap/css/bootstrap.min.css", func(w http.ResponseWriter, r *http.Request) {
http.ServeFile(w, r, s.config.BootstrapDirectory+"/css/bootstrap.min.css")
})
}
r.Path("/").Handler(&HomeHandler{Templates: templates, PageData: p}).Methods("GET")