1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-06-27 16:36:00 +00:00

Use embed package for CSS bundles instead of generated files

This commit is contained in:
Frédéric Guillot 2021-02-17 21:58:04 -08:00 committed by fguillot
parent 42edd357bc
commit 9569666259
9 changed files with 83 additions and 58 deletions

View file

@ -29,7 +29,7 @@ func (h *handler) showStylesheet(w http.ResponseWriter, r *http.Request) {
return
}
etag, found := static.StylesheetsChecksums[filename]
etag, found := static.StylesheetBundleChecksums[filename]
if !found {
html.NotFound(w, r)
return
@ -37,7 +37,7 @@ func (h *handler) showStylesheet(w http.ResponseWriter, r *http.Request) {
response.New(w, r).WithCaching(etag, 48*time.Hour, func(b *response.Builder) {
b.WithHeader("Content-Type", "text/css; charset=utf-8")
b.WithBody(static.Stylesheets[filename])
b.WithBody(static.StylesheetBundles[filename])
b.Write()
})
}