mirror of
https://github.com/miniflux/v2.git
synced 2025-07-02 16:38:37 +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
|
@ -80,6 +80,13 @@ func (f *funcMap) Map() template.FuncMap {
|
|||
"theme_color": func(theme string) string {
|
||||
return model.ThemeColor(theme)
|
||||
},
|
||||
"icon": func(iconName string) template.HTML {
|
||||
return template.HTML(fmt.Sprintf(
|
||||
`<svg class="icon" aria-hidden="true"><use xlink:href="%s#icon-%s"></svg>`,
|
||||
route.Path(f.router, "appIcon", "filename", "sprite.svg"),
|
||||
iconName,
|
||||
))
|
||||
},
|
||||
|
||||
// These functions are overrided at runtime after the parsing.
|
||||
"elapsed": func(timezone string, t time.Time) string {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue