1
0

themes.rb 317 B

123456789101112131415161718192021
  1. # frozen_string_literal: true
  2. require 'singleton'
  3. require 'yaml'
  4. class Themes
  5. include Singleton
  6. THEME_COLORS = {
  7. dark: '#181820',
  8. light: '#ffffff',
  9. }.freeze
  10. def initialize
  11. @conf = YAML.load_file(Rails.root.join('config', 'themes.yml'))
  12. end
  13. def names
  14. ['system'] + @conf.keys
  15. end
  16. end