theme.go 944 B

1234567891011121314151617181920212223242526272829
  1. // Copyright 2017 Frédéric Guillot. All rights reserved.
  2. // Use of this source code is governed by the Apache 2.0
  3. // license that can be found in the LICENSE file.
  4. package model // import "miniflux.app/model"
  5. // Themes returns the list of available themes.
  6. func Themes() map[string]string {
  7. return map[string]string{
  8. "light_serif": "Light - Serif",
  9. "light_sans_serif": "Light - Sans Serif",
  10. "dark_serif": "Dark - Serif",
  11. "dark_sans_serif": "Dark - Sans Serif",
  12. "system_serif": "System - Serif",
  13. "system_sans_serif": "System - Sans Serif",
  14. }
  15. }
  16. // ThemeColor returns the color for the address bar or/and the browser color.
  17. // https://developer.mozilla.org/en-US/docs/Web/Manifest#theme_color
  18. // https://developers.google.com/web/tools/lighthouse/audits/address-bar
  19. func ThemeColor(theme string) string {
  20. switch theme {
  21. case "dark_serif", "dark_sans_serif":
  22. return "#222"
  23. default:
  24. return "#fff"
  25. }
  26. }