1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-26 18:21:01 +00:00

Use SVG sprite for icons

This commit is contained in:
Frédéric Guillot 2021-03-07 11:02:52 -08:00 committed by fguillot
parent b730aa520d
commit f6ed2feab4
11 changed files with 155 additions and 174 deletions

View file

@ -6,6 +6,7 @@ package ui // import "miniflux.app/ui"
import (
"net/http"
"path/filepath"
"time"
"miniflux.app/http/request"
@ -29,7 +30,13 @@ func (h *handler) showAppIcon(w http.ResponseWriter, r *http.Request) {
return
}
b.WithHeader("Content-Type", "image/png")
switch filepath.Ext(filename) {
case ".png":
b.WithHeader("Content-Type", "image/png")
case ".svg":
b.WithHeader("Content-Type", "image/svg+xml")
}
b.WithoutCompression()
b.WithBody(blob)
b.Write()