2017-09-20 00:36:23 +10:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
require 'singleton'
|
|
|
|
require 'yaml'
|
|
|
|
|
|
|
|
class Themes
|
|
|
|
include Singleton
|
|
|
|
|
2024-04-05 20:52:43 +11:00
|
|
|
THEME_COLORS = {
|
|
|
|
dark: '#191b22',
|
2024-06-28 02:46:20 +10:00
|
|
|
light: '#ffffff',
|
2024-04-05 20:52:43 +11:00
|
|
|
}.freeze
|
2024-03-30 00:32:07 +11:00
|
|
|
|
2017-09-20 00:36:23 +10:00
|
|
|
def initialize
|
|
|
|
@conf = YAML.load_file(Rails.root.join('config', 'themes.yml'))
|
|
|
|
end
|
|
|
|
|
|
|
|
def names
|
2024-03-26 20:25:49 +11:00
|
|
|
['system'] + @conf.keys
|
2017-09-20 00:36:23 +10:00
|
|
|
end
|
|
|
|
end
|