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

Improve themes handling

- Store user theme in session
- Logged out users will keep their theme
- Add theme background color to web manifest and meta tag
This commit is contained in:
Frédéric Guillot 2018-07-18 22:30:05 -07:00
parent c1ab27172c
commit a291d8a38b
15 changed files with 76 additions and 31 deletions

View file

@ -15,6 +15,7 @@ import (
"github.com/miniflux/miniflux/config"
"github.com/miniflux/miniflux/filter"
"github.com/miniflux/miniflux/http/route"
"github.com/miniflux/miniflux/model"
"github.com/miniflux/miniflux/url"
)
@ -90,6 +91,9 @@ func (f *funcMap) Map() template.FuncMap {
return str
},
"theme_color": func(theme string) string {
return model.ThemeColor(theme)
},
// These functions are overrided at runtime after the parsing.
"elapsed": func(timezone string, t time.Time) string {