diff options
author | 2018-07-18 22:30:05 -0700 | |
---|---|---|
committer | 2018-07-18 22:30:05 -0700 | |
commit | a291d8a38b40569fdd1f00125ca0b29e4b9264f2 (patch) | |
tree | 13345ce7b413d9919521de258e60954467afcda0 /template/functions.go | |
parent | c1ab27172c0d82f9289aeb3402056f727bc473fd (diff) |
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
Diffstat (limited to 'template/functions.go')
-rw-r--r-- | template/functions.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/template/functions.go b/template/functions.go index 4673487..225984b 100644 --- a/template/functions.go +++ b/template/functions.go @@ -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 { |