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:
parent
b730aa520d
commit
f6ed2feab4
11 changed files with 155 additions and 174 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue