2017-09-19 15:36:23 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'singleton'
|
|
|
|
require 'yaml'
|
|
|
|
|
|
|
|
class Themes
|
|
|
|
include Singleton
|
|
|
|
|
2024-04-05 10:52:43 +01:00
|
|
|
THEME_COLORS = {
|
2024-08-20 16:56:44 +01:00
|
|
|
dark: '#181820',
|
2024-06-27 17:46:20 +01:00
|
|
|
light: '#ffffff',
|
2024-04-05 10:52:43 +01:00
|
|
|
}.freeze
|
2024-03-29 13:32:07 +00:00
|
|
|
|
2017-09-19 15:36:23 +01:00
|
|
|
def initialize
|
|
|
|
@conf = YAML.load_file(Rails.root.join('config', 'themes.yml'))
|
|
|
|
end
|
|
|
|
|
|
|
|
def names
|
2024-03-26 09:25:49 +00:00
|
|
|
['system'] + @conf.keys
|
2017-09-19 15:36:23 +01:00
|
|
|
end
|
|
|
|
end
|