feat: serve only the bootstrap minimal css file
All checks were successful
/ pre-commit (push) Successful in 1m21s
All checks were successful
/ pre-commit (push) Successful in 1m21s
Fixes #45. Signed-off-by: Julien Riou <julien@riou.xyz>
This commit is contained in:
parent
888e2b3278
commit
b0c0162b06
1 changed files with 3 additions and 1 deletions
|
@ -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")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue